[antlr-interest] calling one parser from within another

Monty Zukowski monty at codetransform.com
Fri Oct 15 09:41:20 PDT 2004


Sure, just call it the same way you call it from a main() program.  
You'll have to pass it the entire SQL string.  Details depend on which 
backend you are using, Java or C++.  Also be sure that you call a top 
level rule, ie a rule that doesn't call any other rules.  It's trivial 
to make a new top level entry rule if one doesn't already exist--

topExpr: expr;

Monty

ANTLR & Java Consultant -- http://www.codetransform.com
ANSI C/GCC transformation toolkit -- 
http://www.codetransform.com/gcc.html
Embrace the Decay -- http://www.codetransform.com/EmbraceDecay.html

On Oct 15, 2004, at 7:21 AM, higgins_barry wrote:

>
>
>
> Hi all,
> I'm hoping someone can tell me how to call one parser from within
> another one. I'm writing a grammer for PL/SQL and since one already
> exists for the SQL statements I'd like to just call it where
> appropriate. Is this feasible/possible?
> Thanks in advance,
> Barry
>
>
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>



 
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