Parser (JEL API)
Date: 2016-05-09

gnu.jel

## Class Parser

- java.lang.Object
- - gnu.jel.Parser

-     public class Parser
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `c`
    `int` | `ct_column` Column, where the current token started
    `int` | `ct_line` Line, where the current token started
    `int` | `type` type of the current token
    `java.lang.Object` | `val` value of the current token wrapped into a reflection object

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Parser(java.lang.String in, Library lib)` Initializes the parser.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `consume(int cc)`
    `void` | `error(int code, java.lang.Object param, int column)`
    `boolean` | `isCast()`
    `void` | `nextToken()`
    `OP` | `parse(java.lang.Class<?> resultType)` Parses expression.
    `protected int` | `read()` Reads character from underlying Reader.

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

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

- - ### Field Detail

    - #### c

          protected int c

    - #### ct_column

          public int ct_column

      Column, where the current token started

    - #### ct_line

          public int ct_line

      Line, where the current token started

    - #### val

          public java.lang.Object val

      value of the current token wrapped into a reflection object

    - #### type

          public int type

      type of the current token

  - ### Constructor Detail

    - #### Parser

          public Parser(java.lang.String in,
                Library lib)

      Initializes the parser.
      Parameters:
        `in` - expression to parse
        `lib` - library to resolve functions in

  - ### Method Detail

    - #### read

          protected int read()

      Reads character from underlying Reader.

      Additionally it counts line and column numbers. The read character is automatically set as a current char of this Tokenizer.

      Returns:
        next character from the selected input.

    - #### error

          public void error(int code,
                   java.lang.Object param,
                   int column)
                     throws CompilationException

      Throws:
        `CompilationException`

    - #### consume

          protected void consume(int cc)
                          throws CompilationException

      Throws:
        `CompilationException`

    - #### nextToken

          public void nextToken()
                         throws CompilationException

      Throws:
        `CompilationException`

    - #### isCast

          public boolean isCast()

    - #### parse

          public OP parse(java.lang.Class<?> resultType)
                   throws CompilationException

      Parses expression.
      Parameters:
        `resultType` - the type to convert the result into
      Returns:
        top of the parse tree
      Throws:
        `CompilationException`

Copyright © 1998-2016 Konstantin L. Metlov All Rights Reserved.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the JEL manual.