[antlr-interest] structure parameter access
silverio.di at qem.it
silverio.di at qem.it
Mon Nov 8 23:16:09 PST 2004
I've a problem with a simple language which have
some grammar likeness to C/C++ & Java.
I've tried to read the C & Java grammars on ANTLR
web page but I isn't been able to uderstand how they
solve my question.
My language say that:
a) struct_name.struct_parameter
How you can see (a) is likeness to c statement.
My throuble is that in between struct_name and '.' I can't
admit spaces chars and between '.' and struct_parameter
I can't admit spaces chars too. I think this is same behaviour
required to a C/C++ program.
But I don't understand how to obtain that starting from:
statement : label | struct_assign;
label : LABEL EOL;
struct_assign : IDENT POINT IDENT ASSIGN IDENT EOL;
WS : (' ' | '\t' | '\f') { $setType(Token.SKIP); };
EOL : ("\r\n" | '\r' | '\n' ) { newline(); };
POINT : '.';
IDENT : ('a'..'z')+;
Thank you very much for your suggestions...
Silverio Diquigiovanni
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list