com.singularsys.jep.configurableparser

## Interface GrammarParser

- All Known Implementing Classes:
    LineNumberingShuntingYard, ShuntingYard

      public interface GrammarParser

  Interface used by `GrammarMatcher`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Node` | `parse(java.util.Iterator<Token> it)` Main entry point used by the ConfigurableParser
    `Node` | `parsePrefixSuffix()` Callback function used by GrammerMatchers where the matcher expects a simple number, variable, or function call with optional, prefix or suffix operator.
    `Node` | `parseSubExpression()` Parse sub expressions.
    `void` | `setIterator(Lookahead2Iterator<Token> it)` Set the iterator used by the `parseSubExpression()`

- - ### Method Detail

    - #### parse

          Node parse(java.util.Iterator<Token> it)
              throws ParseException

      Main entry point used by the ConfigurableParser
      Parameters:
        `it` - iterator with the list of tokens
      Returns:
        the generated parser tree
      Throws:
        `ParseException` - if the input cannot be parsed

    - #### parseSubExpression

          Node parseSubExpression()
                           throws ParseException

      Parse sub expressions. This methods is used by `GrammarMatcher` to parse sub expressions, for instance to parse function arguments.
      Returns:
        the root node of the matched sub expression.
      Throws:
        `ParseException` - if the input cannot be parsed

    - #### parsePrefixSuffix

          Node parsePrefixSuffix()
                          throws ParseException

      Callback function used by GrammerMatchers where the matcher expects a simple number, variable, or function call with optional, prefix or suffix operator.
      Returns:
        the root node of the matched sub expression.
      Throws:
        `ParseException` - if the input cannot be parsed
      Since:
        3.5

    - #### setIterator

          void setIterator(Lookahead2Iterator<Token> it)

      Set the iterator used by the `parseSubExpression()`
      Parameters:
        `it` - the iterator
      Since:
        3.4.0

Copyright © 2018 Singular Systems http://www.singularsys.com/jep