ANTLR Feature?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Jonah_Harris
Posted On:   Thursday, June 17, 2004 12:28 PM

Being used to ProGrammar, I was wondering it ANTLR has a similar feature to reduce my grammar translation time. Programmar supports this grammar: simple_rule ::= "WE" "LIKE" {entree, ","} This would match we like entree we like entree,entree we like entree,entree,entree ... I there a way to do it this easily in ANTLR so that someone doesn't need to repeat those portions of the rule? Aside from creating a whole other rule to handle the comma, is this the only way to do it? simple_rule : "WE" "LIKE" (entree (COMMA entree)*)+ Should this feature not exist in ANTLR, is i   More>>

Being used to ProGrammar, I was wondering it ANTLR has a similar feature to reduce my grammar translation time.

			
Programmar supports this grammar:

simple_rule ::= "WE" "LIKE" {entree, ","}

This would match
we like entree
we like entree,entree
we like entree,entree,entree
...


I there a way to do it this easily in ANTLR so that someone doesn't need to repeat those portions of the rule?

Aside from creating a whole other rule to handle the comma, is this the only way to do it?

			
simple_rule : "WE" "LIKE" (entree (COMMA entree)*)+


Should this feature not exist in ANTLR, is it something anyone else would find useful?

Thanks in advance!    <<Less
About | Sitemap | Contact