I am trying to parse a language where operators have dynamic attributes (priority and priority) using the Menhir parser (similar to Ocamlyacc). During the vocabulary phase, all operators fill in the token OP:string(therefore, β+β turns into (OP "+"), etc.).
Operator attributes are defined during parsing and populate the tables linking the operators and their attributes. Given this table, how can I tell Menhir to dynamically change the priority of a rule that analyzes statements based on this table data?
Thanks CharlieP.
source
share