ParserGenerator (API documentation of hlt.language packages)
Date: 2013-01-30

hlt.language.syntax

## Class ParserGenerator

- java.lang.Object
- - hlt.language.syntax.ParserGenerator

-     public class ParserGenerator
      extends java.lang.Object

  This is the class that uses the analysis provided by a grammar object (see `Grammar`) and builds an LALR parser's action and goto automata, reporting and resolving conflicts as they may occur. It writes out a Java source file which defines a class that extends either the class `StaticParser` or the class `DynamicParser`, both of which extend the class `GenericParser`, wherein all necessary data is initialized for the parser's `parse()` method to work. The `parse()` method assumes that the parser disposes of a class implementing the `Tokenizer` interface. This interface defines the `nextToken()` method, which provides the stream of tokens to be parsed. Such a tokenizer is necessary for the complete generated parser to work. It typically looks like:

                   import hlt.language.syntax.\*;

                   class MyTokenizer implements Tokenizer
                     {
                       MyTokenizer ( ... )
                         {
                           ...
                         }

                       public ParseNode nextToken()
                         {
                           ...
                         }
                     }

  For detailed explanations of all constructions and algorithms used by this class, please refer to the following:

  - Alfred Aho, Ravi Sethi, and Jeffrey Ullman, Compilers. Principles. Techniques, and Tools. Addison-Wesley, 1986.
  Version:
    Last modified on Wed Dec 19 20:42:15 2012 by hak
  Author:
    Hassan Aït-Kaci
  See Also:
    `Grammar`, `Options`, `GenericParser`, `StaticParser`, `DynamicParser`
  Copyright:
    © by the author

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ParserGenerator()`

  - ### Method Summary

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ParserGenerator

          public ParserGenerator()