[antlr-interest] Newbie question
Andres Chaves
anchavesb at yahoo.com
Fri Apr 16 12:15:37 PDT 2004
Hi, im trying to make a parser of functions expresions (like f
(a,b,c)). I will have a collection of functions avaiable (like sin
(x), daysinmonth, etc.) and i have the number of parameters of each
function. Here is a part of the grammar
postfixExpr
: (id:ID LPAREN)=>
id2:ID^
(
parenArgs
)?
| atom
;
I have to detect when the number of arguments is wrong (for example
sin() or sin(a,b)), and raise a parser exception, when i parse the
function (not when im calculating).
I wonder if someone could give some advice about how to do this.
Thanks
Andres
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