I have a simple grammar for quizzes that doesn't work in the debugger, although works fine in the interpreter. However, using a * in place of a + breaks it in the interpreter also. At one point it worked in the debugger.
Why does that line, noted in the below grammar, break the Interpreter? Why doesn't the grammar work in the Debugger? It seems to work fine both in the Interpreter and a custom Java test rig running in an IDE outside of ANTLRWorks. The debugger only prints a parse tree of root -> quiz, with no input shown. When the debugger worked on this grammar, the input entered would show up in the Input window. If there's a better way to write the grammar to fix these issues, I'd like to know. Tested on antlrworks-1.2.3, 1.2.4-SNAPSHOT, 1.3b. I found some ANTLRWorks code in Hudson and used maven to build the SNAPSHOT jar, but the source code link contained in pom.xml (http://fisheye2.cenqua.com/browse/antlrworks) is broken with a 404 Not Found error. Where is the source code repository for ANTLRWorks? Thanks for your time. Sample Input: 1. *a. b. 2. b. *a. Grammar: grammar Quiz; quiz: multiple_choice*; multiple_choice: mc_question responses; responses: // breaks Interpreter causing <epsilon> and <NoViableAltException> // (mc_incorrect | mc_correct)*; (mc_incorrect | mc_correct)+; mc_question : MC_QUESTION; mc_correct : MC_CORRECT; mc_incorrect : MC_INCORRECT; LETTER : ('a'..'z'|'A'..'Z'); INT : '0'..'9'+; NEWLINE : '\n' '\r'? {skip();}; WS : ('\n'|'\r'|'\t'|' ')+ {skip();}; MC_QUESTION : INT ('.'|')') .* NEWLINE; MC_INCORRECT : LETTER '.' .* NEWLINE; MC_CORRECT : '*' MC_INCORRECT; List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to il-antlr-interest@googlegroups.com To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---