Next: , Previous: Top, Up: Top

1 Starting Rules

In Bison, one and only one nonterminal is designated as the “start” symbol. In Semantic, one or more nonterminals can be designated as the “start” symbol. They are declared following the %start keyword separated by spaces. see start Decl.

If no %start keyword is used in a grammar, then the very first is used. Internally the first start nonterminal is targeted by the reserved symbol bovine-toplevel, so it can be found by the parser harness.

To find locally defined variables, the local context handler needs to parse the body of functional code. The scopestart declaration specifies the name of a nonterminal used as the goal to parse a local context, see scopestart Decl. Internally the scopestart nonterminal is targeted by the reserved symbol bovine-inner-scope, so it can be found by the parser harness.