[antlr-interest] passing more than one parameter to a rule

G R relationalalgebra at gmail.com
Wed Dec 12 02:53:51 PST 2007


Does your testing team works for Microsoft also ?
Just kidding.
ANTLR is a very good and usefull framework. Keep going guys!

G. R.

2007/12/12, Terence Parr <parrt at cs.usfca.edu>:
>
> Ok, fixed. Grab:
>
> http://www.antlr.org/download/build/antlr-2007-12-11.19.tar.gz
>
> or just remove space from arg list after comma ;)
>
> Ter
>
> On Dec 11, 2007, at 6:57 PM, Terence Parr wrote:
>
> > Ouch. even
> >
> > a : A b["foo", $A] ;
> >
> > b[String x, String y] : C ;
> >
> > fails.  Working on bug right now...i have isolated issue.
> >
> > Ter
> >
> > On Dec 11, 2007, at 7:38 AM, Mark Volkmann wrote:
> >
> >> Here's the beginning of a rule named "define" that passes two String
> >> parameters to a rule named "polynomial".
> >>
> >> define
> >> : fn=functionName '(' fv=variable ')' '=' polynomial[$fn.text,
> >> $fv.text]
> >>
> >> Here's the beginning of the "polynomial" rule showing that it accepts
> >> two String parameters.
> >>
> >> polynomial[String fnt, String fvt]
> >>
> >> When I attempt to test this using the ANTLRWorks debugger I get the
> >> following error message.
> >>
> >> illegal start of expression
> >> [09:35:09]
> >> polynomial11=polynomial(input.toString(fn.start,fn.stop),  ,
> >> input.toString(fv.start,fv.stop));
> >>
> >> Note the consecutive commas as if it's trying to pass three
> >> parameters.
> >>
> >> Any idea what I'm doing wrong?
> >>
> >> --
> >> R. Mark Volkmann
> >> Object Computing, Inc.
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20071212/34b0420a/attachment.html 


More information about the antlr-interest mailing list