This project has moved and is read-only. For the latest updates, please go here.

Code file containing only comments

Sep 20, 2013 at 9:32 AM
When I try to parse a code file containing only comments, Irony shows a syntax error saying that it is expecting something. Is there any method to avoid this? I mean, if the file is having only comments, display the ast as null without throwing any errors?

PS: I was working with grammars for the first time. With the help of Dragon book and Irony, I managed to write a grammar in a span of one month. Thanks for this great tool.
Sep 20, 2013 at 4:49 PM
well, probably your root nonterminal does not allow an empty content. Look at its rule closely
Marked as answer by sreejas on 4/22/2015 at 1:35 AM