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

hlt.language.syntax

## Class DynamicParser

- java.lang.Object
- - hlt.language.syntax.GenericParser
  - - hlt.language.syntax.DynamicParser

-     public abstract class DynamicParser
      extends GenericParser

  This is the generic parser that is inherited by all parser classes generated by ParserGenerator for a grammar which uses dynamic operators.
  Version:
    Last modified on Fri Apr 13 19:57:45 2012 by hak
  Author:
    Hassan Aït-Kaci
  See Also:
    `ParserGenerator`, `GenericParser`, `StaticParser`
  Copyright:
    © by the author

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `java.util.AbstractList` | `operators` The set of parser operators.

    - ### Fields inherited from class hlt.language.syntax.GenericParser

      `COMPACT_TREE, E_O_I, ERROR_SYMBOL, FULL_TREE, NO_TREE, parseTreeType, XML_TREE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DynamicParser()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `cut()` Erases the latest backtracking information.
    `void` | `cutAll()` Erases all backtracking information.
    `ParseNode` | `error()` Returns an error token.
    `static ParseNode` | `literalToken(java.lang.String symbol)` Overrides the implementation in `GenericParser` so that it does not return an error token if the symbol is not a known terminal symbol and the parser admits operators, in which case it is returned as a literal token anyway that will be resolved as a potential dynamic operator by the `readToken` method.
    `java.util.AbstractList` | `operators(java.lang.String name)` Returns the set of operators with this name; or `null` in there are none.
    `java.util.AbstractList` | `operatorsInCategory(java.lang.String category)` Returns the set of operators in this category; or `null` in there are none.
    `void` | `resetParser()`
    `void` | `showOperators()`

    - ### Methods inherited from class hlt.language.syntax.GenericParser

      `abort, currentNode, eoi, error, error, errorManager, fatalError, fatalError, fileName, getTokenizer, initialize, locate, makeXmlDocument, numberToken, numberToken, parse, parse, parse, parse, parse, parse, setErrorManager, setSwitchToken, setTokenizer, setTrace, setTreeType, setTreeType, symbolToken, syntaxError, syntaxError, toggleTrace, trace, traceAction, tracingIsOn, writeXml, xmlForm, xmlWriter`

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

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

- - ### Field Detail

    - #### operators

          public java.util.AbstractList operators

      The set of parser operators.

  - ### Constructor Detail

    - #### DynamicParser

          public DynamicParser()

  - ### Method Detail

    - #### operators

          public final java.util.AbstractList operators(java.lang.String name)

      Returns the set of operators with this name; or `null` in there are none.

    - #### operatorsInCategory

          public final java.util.AbstractList operatorsInCategory(java.lang.String category)

      Returns the set of operators in this category; or `null` in there are none.

    - #### resetParser

          public void resetParser()

      Overrides:
        `resetParser` in class `GenericParser`

    - #### error

          public ParseNode error()

      Returns an error token. Overrides the default method.
      Overrides:
        `error` in class `GenericParser`

    - #### literalToken

          public static final ParseNode literalToken(java.lang.String symbol)

      Overrides the implementation in `GenericParser` so that it does not return an error token if the symbol is not a known terminal symbol and the parser admits operators, in which case it is returned as a literal token anyway that will be resolved as a potential dynamic operator by the `readToken` method.

    - #### cutAll

          public final void cutAll()

      Erases all backtracking information.

    - #### cut

          public final void cut()

      Erases the latest backtracking information.

    - #### showOperators

          public final void showOperators()