The bison_lr1dfa module

Module for constructing Bison-compatible automata. That is, automata that can be executed using Bison’s default skeleton.

class ndcode.piyacc.bison_lr1dfa.BisonLR1DFA(translate, rules, accessing_symbols, default_action, default_goto, entry_base, entries, action_pointer, goto_pointer, n_terminals)

Class which holds a Bison-compatible automaton.

Normally all of the fields of the class are computed ahead of time by LR1DFA.to_bison_lr1dfa() and then passed into the constructor here.

At the moment, this class doesn’t have any methods, it simply holds the data which will be needed to populate a Bison skeleton. In the future we might add methods for executing the automaton directly on a stream of lexical tokens.