一个程序中包含多个YACC语法

一个程序中包含多个YACC语法

Multiple YACC grammars in one program

如何在一个程序中使用yyparse()编译,链接和调用不同的YACC语法?


为每个单独的yacc语法生成使用-p选项

1
2
3
4
5
6
7
8
 -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.

推荐阅读