[antlr-interest] warning(200), error(201), error(211) and error(208). Help!

mglyons mglyons at g.cofc.edu
Fri Oct 7 13:16:58 PDT 2011


Thanks for the quick response John B.  

In the pdf I have that is instructing how to write this grammar it says
this:

/The keywords of the language are the following:/
*else if int return void while*
/All keywrods are reserved, and must be written in lowercase./

I assumed that meant that they had to be lower case in my grammar.  Am I
interpreting it incorrectly?

As for putting quote marks around the { and }, I added that.



Now I am getting these errors:

*[16:15:24] error(211): Cminus.g:31:11: [fatal] rule slct_stmt has non-LL(*)
decision due to recursive rule invocations reachable from alts 1,2.  Resolve
by left-factoring or using syntactic predicates or using backtrack=true
option.
[16:15:24] error(211): Cminus.g:37:7: [fatal] rule expr has non-LL(*)
decision due to recursive rule invocations reachable from alts 1,2.  Resolve
by left-factoring or using syntactic predicates or using backtrack=true
option.
[16:15:25] error(211): Cminus.g:41:13: [fatal] rule simple_expr has
non-LL(*) decision due to recursive rule invocations reachable from alts
1,2.  Resolve by left-factoring or using syntactic predicates or using
backtrack=true option.
[16:15:25] warning(200): Cminus.g:69:14: 
Decision can match input such as "<EOT>" using multiple alternatives: 1, 2

As a result, alternative(s) 2 were disabled for that input
[16:15:25] error(201): Cminus.g:69:14: The following alternatives can never
be matched: 2

[16:15:25] warning(200): Cminus.g:70:14: 
Decision can match input such as "<EOT>" using multiple alternatives: 1, 2

As a result, alternative(s) 2 were disabled for that input
[16:15:25] error(201): Cminus.g:70:14: The following alternatives can never
be matched: 2

[16:15:25] error(208): Cminus.g:70:1: The following token definitions can
never be matched because prior tokens match the same input: NUM*

I will have to look into how to left-factor.

--
View this message in context: http://antlr.1301665.n2.nabble.com/warning-200-error-201-error-211-and-error-208-Help-tp6870610p6870992.html
Sent from the ANTLR mailing list archive at Nabble.com.


More information about the antlr-interest mailing list