Несколько грамматик YACC в одной программе

StackOverflow https://stackoverflow.com/questions/25823

  •  09-06-2019
  •  | 
  •  

Вопрос

Как мне скомпилировать, связать и вызвать различные грамматики YACC, используя yyparse() в одной программе?

Это было полезно?

Решение

Используйте опцию -p для каждой отдельной грамматики yacc. поколение

 -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.
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top