Better parse errors

Jan 11, 2010 at 1:22 PM

Hi,

I am new to Irony, and I am working on an Irony-aware syntaxs coloring text editor for the target language. Is it possible to have better error desriptions when the parser finds an unexpected token? I would like if the error tells not only that an unexpected token was found, but also what tokens are acceptable at the errors place.

Jorge

Coordinator
Jan 11, 2010 at 5:35 PM

Do you mean "Unexpected symbol" error - when SCANNER cannot produce token? Because for "unexpected token" error (when token is there but it is not expected), the parser does show the list of expected tokens. If yes, that's what you mean - good point, I'll put it on my to-do list and try to put it into the next code drop

Roman

Jan 11, 2010 at 10:12 PM

I stand corrected. I mean "Unexpected symbol".

The parser is so fast, that it made sense in the editor to put a timer that every couple of seconds parse the text and push a display of the parseTree. But if the programmer is in the middle of typing, then the scanner will not be able to produce a token. I will be helpful to tell back the list of possible tokens.

By the way, another question. How stable do you feel is the API?

Jorge.

Coordinator
Jan 14, 2010 at 5:12 PM

The API for parser is relatively stable, I would try to change it only by adding overloads or extras so it won't break old code. But there are a few breaking changes coming in the next code drop. The API interpreter and runtime will change for sure

 

Jan 14, 2010 at 7:12 PM

Cool.

Another question... Are the interpreter, runtime and parser in separate dlls? I have not check, and it does not makes sense to have to use a dll that contains things that are not being used.

 

BTW. Thank you for such great product, I feel that it really pushes the edge in parser technology. I can only imagine the amount of time and dedication that this project takes.

Jorge.

Coordinator
Jan 14, 2010 at 9:27 PM

Thanks!

answering the question - it's all in one DLL