Frage

Wie kann ich kompilieren, verknüpfen und aufrufen verschiedener YACC-Grammatiken mit yyparse() in einem Programm?

War es hilfreich?

Lösung

Verwenden Sie die option-p für die einzelnen yacc Grammatik 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.
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top