Using builder classes

The builder classes are used to generate the automata for the the processors. These classes can only used once, because they deeply depends on the used model. So for example to generate the LexicalAutomaton by a lexicon, use following code.

Lexicon lexicon = ...;

LexicalAutomatonBuilder builder = new LexicalAutomatonBuilder(lexicon);

LexicalAutomaton automaton = builder.getLexicalAutomaton();

Same pattern can used for generating the ParserAutomaton.

Grammar grammar = ...;

ParserAutomatonBuilder builder = new ParserAutomatonBuilder(grammar);

ParserAutomaton automaton = builder.getParserAutomaton();

Or same for the a PatternAutomaton.

Pattern pattern = ...;

PatternAutomatonBuilder builder = new PatternAutomatonBuilder(pattern);
PatternAutomaton automaton = builder.getPatternAutomaton();
by Stephan Michels