Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple YACC grammars in one program

Tags:

yacc

How do I compile, link and call different YACC grammars using yyparse() in one program?

like image 713
Shaya Avatar asked Aug 25 '08 09:08

Shaya


1 Answers

Use the -p option for each separate yacc grammar generation

 -p prefix

           Use prefix instead of yy as the prefix for all external
           names produced by yacc.  For X/Open compliance, when the
           environment variable _XPG is set, then the -p option will work
           as described in the previous sentence.  If the environment
           variable _XPG is not set, then the -p option will work as
           described below in the -P option.
like image 176
epatel Avatar answered Nov 09 '22 00:11

epatel