caoss.simulator.parser

## Class Parser

- java.lang.Object
- - caoss.simulator.parser.Parser

- All Implemented Interfaces:
    ParserConstants

      public class Parser
      extends java.lang.Object
      implements ParserConstants

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `Token` | `jj_nt` Next token.
    `Token` | `token` Current token.
    `ParserTokenManager` | `token_source` Generated Token Manager.

    - ### Fields inherited from interface caoss.simulator.parser.ParserConstants

      `COMPUTATION, DECIMAL_LITERAL, DEFAULT, EOF, HEX_LITERAL, IDENTIFIER, LETTER, LOOP, MEM_LOAD, MEM_STORE, PART_LETTER, SYSCALL, tokenImage`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Parser(java.io.InputStream stream)` Constructor with InputStream.
    `Parser(java.io.InputStream stream, java.lang.String encoding)` Constructor with InputStream and supplied encoding
    `Parser(ParserTokenManager tm)` Constructor with generated Token Manager.
    `Parser(java.io.Reader stream)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `DecimalLiteral()`
    `void` | `disable_tracing()` Disable tracing.
    `void` | `enable_tracing()` Enable tracing.
    `ParseException` | `generateParseException()` Generate ParseException.
    `Token` | `getNextToken()` Get the next Token.
    `Token` | `getToken(int index)` Get the specific Token.
    `Instruction` | `Instruction()`
    `long` | `IntegerLiteral()`
    `java.util.List<java.lang.Integer>` | `ListOfDecimalLiterals(java.util.List<java.lang.Integer> list)`
    `Program` | `Program(java.lang.String fileName)`
    `void` | `ReInit(java.io.InputStream stream)` Reinitialise.
    `void` | `ReInit(java.io.InputStream stream, java.lang.String encoding)` Reinitialise.
    `void` | `ReInit(ParserTokenManager tm)` Reinitialise.
    `void` | `ReInit(java.io.Reader stream)` Reinitialise.

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

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

- - ### Field Detail

    - #### token_source

          public ParserTokenManager token_source

      Generated Token Manager.

    - #### token

          public Token token

      Current token.

    - #### jj_nt

          public Token jj_nt

      Next token.

  - ### Constructor Detail

    - #### Parser

          public Parser(java.io.InputStream stream)

      Constructor with InputStream.

    - #### Parser

          public Parser(java.io.InputStream stream,
                        java.lang.String encoding)

      Constructor with InputStream and supplied encoding

    - #### Parser

          public Parser(java.io.Reader stream)

      Constructor.

    - #### Parser

          public Parser(ParserTokenManager tm)

      Constructor with generated Token Manager.

  - ### Method Detail

    - #### Program

          public final Program Program(java.lang.String fileName)
                                throws ParseException

      Throws:
        `ParseException`

    - #### Instruction

          public final Instruction Instruction()
                                        throws ParseException

      Throws:
        `ParseException`

    - #### ListOfDecimalLiterals

          public final java.util.List<java.lang.Integer> ListOfDecimalLiterals(java.util.List<java.lang.Integer> list)
                                                                        throws ParseException

      Throws:
        `ParseException`

    - #### DecimalLiteral

          public final int DecimalLiteral()
                                   throws ParseException

      Throws:
        `ParseException`

    - #### IntegerLiteral

          public final long IntegerLiteral()
                                    throws ParseException

      Throws:
        `ParseException`

    - #### ReInit

          public void ReInit(java.io.InputStream stream)

      Reinitialise.

    - #### ReInit

          public void ReInit(java.io.InputStream stream,
                             java.lang.String encoding)

      Reinitialise.

    - #### ReInit

          public void ReInit(java.io.Reader stream)

      Reinitialise.

    - #### ReInit

          public void ReInit(ParserTokenManager tm)

      Reinitialise.

    - #### getNextToken

          public final Token getNextToken()

      Get the next Token.

    - #### getToken

          public final Token getToken(int index)

      Get the specific Token.

    - #### generateParseException

          public ParseException generateParseException()

      Generate ParseException.

    - #### enable_tracing

          public final void enable_tracing()

      Enable tracing.

    - #### disable_tracing

          public final void disable_tracing()

      Disable tracing.