ur_rna.GUITester.ScriptParser

## Class GuiTestScriptParser

- java.lang.Object
- - ur_rna.GUITester.ScriptParser.GuiTestScriptParser

- All Implemented Interfaces:
    GuiTestScriptParserConstants, GuiTestScriptParserTreeConstants

      public class GuiTestScriptParser
      extends java.lang.Object
      implements GuiTestScriptParserTreeConstants, GuiTestScriptParserConstants

  Script Parser for GUI Test Framework

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `(package private) static class` | `GuiTestScriptParser.JJCalls`
    `private static class` | `GuiTestScriptParser.LookaheadSuccess`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private GuiTestScriptParser.JJCalls[]` | `jj_2_rtns`
    `private int` | `jj_endpos`
    `private java.util.List<int[]>` | `jj_expentries`
    `private int[]` | `jj_expentry`
    `private int` | `jj_gc`
    `private int` | `jj_gen`
    `(package private) JavaCharStream` | `jj_input_stream`
    `private int` | `jj_kind`
    `private int` | `jj_la`
    `private int[]` | `jj_la1`
    `private static int[]` | `jj_la1_0`
    `private static int[]` | `jj_la1_1`
    `private static int[]` | `jj_la1_2`
    `private Token` | `jj_lastpos`
    `private int[]` | `jj_lasttokens`
    `private GuiTestScriptParser.LookaheadSuccess` | `jj_ls`
    `Token` | `jj_nt` Next token.
    `private int` | `jj_ntk`
    `private boolean` | `jj_rescan`
    `private Token` | `jj_scanpos`
    `protected JJTGuiTestScriptParserState` | `jjtree`
    `Token` | `token` Current token.
    `GuiTestScriptParserTokenManager` | `token_source` Generated Token Manager.
    `private boolean` | `trace_enabled`
    `private int` | `trace_indent`

    - ### Fields inherited from interface ur_rna.GUITester.ScriptParser.GuiTestScriptParserTreeConstants

      `JJTACTION, JJTASSIGNMENT, JJTGUIREFERENCE, JJTGUISEARCHCRITERIA, JJTLITERAL, JJTNAMEDARGUMENT, jjtNodeName, JJTROOT, JJTVARREF, JJTVOID`

    - ### Fields inherited from interface ur_rna.GUITester.ScriptParser.GuiTestScriptParserConstants

      `ANCESTOR, ANDASSIGN, ARROW, ASSIGN, ASSIGN_REF, BIT_AND, BIT_NOT, BIT_OR, CHILD, COLON, COMMA, DECIMAL_LITERAL, DECR, DEFAULT, DESCENDANT, DIGIT, DIRECTIVE_PREFIX, DOT, EOF, EQ, ESC_CHAR, ESCAPED_CHAR, EXPONENT, FALSE, FLOAT_LITERAL, FLOAT_SUFFIX, GE, GT, HEX_CHAR, HEX_DIGIT, HEX_LITERAL, HOOK, IDENTIFIER, INCR, INT_SUFFIX, INTEGER_LITERAL, LBRACE, LBRACKET, LE, LETTER, LPAREN, LSHIFTASSIGN, LT, METHOD_PREFIX, MINUS, MINUSASSIGN, MOD, MULTI_LINE_COMMENT, NE, NEWLINE, NOT, NULL, OCTAL_LITERAL, ORASSIGN, PARENT, PLUS, PLUSASSIGN, POW, RBRACE, RBRACKET, REL_LABEL, REMASSIGN, RPAREN, RSIGNEDSHIFTASSIGN, RUNSIGNEDSHIFTASSIGN, SC_AND, SC_OR, SEMICOLON, SIBLING, SINGLE_LINE_COMMENT, SLASH, SLASHASSIGN, STAR, STARASSIGN, STRING_CHAR, STRING_LITERAL, tokenImage, TRUE, UNICODE_CHAR, WORD_CHAR, WORD_START_CHAR, XOR, XORASSIGN`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `Action()`
    `void` | `ArgumentList()`
    `void` | `Assignment()`
    `void` | `AssignmentOperator()`
    `void` | `disable_tracing()` Disable tracing.
    `void` | `enable_tracing()` Enable tracing.
    `void` | `EOS()`
    `java.lang.Object` | `EvalLiteral(java.lang.String data, int kind)`
    `java.lang.Object` | `EvalLiteralToken(Token t, java.lang.String sign)`
    `void` | `Expression()`
    `ParseException` | `generateParseException()` Generate ParseException.
    `Token` | `getNextToken()` Get the next Token.
    `Token` | `getToken(int index)` Get the specific Token.
    `void` | `GuiReference()`
    `void` | `GuiRelation()`
    `void` | `Instruction()`
    `private boolean` | `jj_2_1(int xla)`
    `private boolean` | `jj_2_2(int xla)`
    `private boolean` | `jj_2_3(int xla)`
    `private boolean` | `jj_2_4(int xla)`
    `private boolean` | `jj_3_1()`
    `private boolean` | `jj_3_2()`
    `private boolean` | `jj_3_3()`
    `private boolean` | `jj_3_4()`
    `private boolean` | `jj_3R_10()`
    `private boolean` | `jj_3R_6()`
    `private boolean` | `jj_3R_7()`
    `private boolean` | `jj_3R_8()`
    `private boolean` | `jj_3R_9()`
    `private void` | `jj_add_error_token(int kind, int pos)`
    `private Token` | `jj_consume_token(int kind)`
    `private static void` | `jj_la1_init_0()`
    `private static void` | `jj_la1_init_1()`
    `private static void` | `jj_la1_init_2()`
    `private int` | `jj_ntk_f()`
    `private void` | `jj_rescan_token()`
    `private void` | `jj_save(int index, int xla)`
    `private boolean` | `jj_scan_token(int kind)`
    `int` | `lastKind()` Return the kind of the last consumed token.
    `int` | `lastKind(int pos)` Return the kind of the token consumed pos steps before last.
    `java.lang.String` | `lastText()` Return the text (image) of the last consumed token.
    `java.lang.String` | `lastText(int pos)` Return the text (image) of the token consumed pos steps before last.
    `Token` | `lastToken()` Return the last consumed token.
    `Token` | `lastToken(int pos)` Return the token consumed pos steps before last.
    `void` | `Literal()`
    `static void` | `main(java.lang.String[] args)` Main entry point, if used as a stand-alone program (e.g.
    `void` | `NamedArgument()`
    `void` | `NamedArgumentList()`
    `SimpleNode` | `parse()`
    `SimpleNode` | `ParseScriptProgram()` THE SCRIPT LANGUAGE GRAMMAR STARTS HERE *
    `ScriptNode` | `peekNode()`
    `int` | `peekNodeId()`
    `ScriptNode` | `popNode()`
    `ScriptNode` | `popTypedNode(int nodeType)`
    `void` | `ReInit(GuiTestScriptParserTokenManager tm)` Reinitialise.
    `void` | `ReInit(java.io.InputStream stream)` Reinitialise.
    `void` | `ReInit(java.io.InputStream stream, java.lang.String encoding)` Reinitialise.
    `void` | `ReInit(java.io.Reader stream)` Reinitialise.
    `void` | `SignedNumber()` Usually numbers of the format (+|-)NUMBER (e.g.
    `void` | `SingleGuiItem()`
    `boolean` | `testTopNodeType(int nodeType)`
    `private void` | `trace_call(java.lang.String s)`
    `private void` | `trace_return(java.lang.String s)`
    `private void` | `trace_scan(Token t1, int t2)`
    `private void` | `trace_token(Token t, java.lang.String where)`
    `private java.lang.String` | `trimRight(java.lang.String s, int numChars)`
    `ScriptNode` | `tryPopTypedNode(int nodeType)`
    `void` | `VarRef()`

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

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

- - ### Field Detail

    - #### jj_2_rtns

          private final GuiTestScriptParser.JJCalls[] jj_2_rtns

    - #### jj_endpos

          private int jj_endpos

    - #### jj_expentries

          private java.util.List<int[]> jj_expentries

    - #### jj_expentry

          private int[] jj_expentry

    - #### jj_gc

          private int jj_gc

    - #### jj_gen

          private int jj_gen

    - #### jj_input_stream

          JavaCharStream jj_input_stream

    - #### jj_kind

          private int jj_kind

    - #### jj_la

          private int jj_la

    - #### jj_la1

          private final int[] jj_la1

    - #### jj_la1_0

          private static int[] jj_la1_0

    - #### jj_la1_1

          private static int[] jj_la1_1

    - #### jj_la1_2

          private static int[] jj_la1_2

    - #### jj_lastpos

          private Token jj_lastpos

    - #### jj_lasttokens

          private int[] jj_lasttokens

    - #### jj_ls

          private final GuiTestScriptParser.LookaheadSuccess jj_ls

    - #### jj_nt

          public Token jj_nt

      Next token.

    - #### jj_ntk

          private int jj_ntk

    - #### jj_rescan

          private boolean jj_rescan

    - #### jj_scanpos

          private Token jj_scanpos

    - #### jjtree

          protected JJTGuiTestScriptParserState jjtree

    - #### token

          public Token token

      Current token.

    - #### token_source

          public GuiTestScriptParserTokenManager token_source

      Generated Token Manager.

    - #### trace_enabled

          private boolean trace_enabled

    - #### trace_indent

          private int trace_indent

  - ### Constructor Detail

    - #### GuiTestScriptParser

          public GuiTestScriptParser(GuiTestScriptParserTokenManager tm)

      Constructor with generated Token Manager.

    - #### GuiTestScriptParser

          public GuiTestScriptParser(java.io.InputStream stream)

      Constructor with InputStream.

    - #### GuiTestScriptParser

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

      Constructor with InputStream and supplied encoding

    - #### GuiTestScriptParser

          public GuiTestScriptParser(java.io.Reader stream)

      Constructor.

  - ### Method Detail

    - #### Action

          public final void Action()
                            throws ParseException

      Throws:
        `ParseException`

    - #### ArgumentList

          public final void ArgumentList()
                                  throws ParseException

      Throws:
        `ParseException`

    - #### Assignment

          public final void Assignment()
                                throws ParseException

      Throws:
        `ParseException`

    - #### AssignmentOperator

          public final void AssignmentOperator()
                                        throws ParseException

      Throws:
        `ParseException`

    - #### disable_tracing

          public final void disable_tracing()

      Disable tracing.

    - #### enable_tracing

          public final void enable_tracing()

      Enable tracing.

    - #### EOS

          public final void EOS()
                         throws ParseException

      Throws:
        `ParseException`

    - #### EvalLiteral

          public java.lang.Object EvalLiteral(java.lang.String data,
                                              int kind)
                                       throws java.lang.IllegalArgumentException

      Throws:
        `java.lang.IllegalArgumentException`

    - #### EvalLiteralToken

          public java.lang.Object EvalLiteralToken(Token t,
                                                   java.lang.String sign)
                                            throws ParseFormatException

      Throws:
        `ParseFormatException`

    - #### Expression

          public final void Expression()
                                throws ParseException

      Throws:
        `ParseException`

    - #### generateParseException

          public ParseException generateParseException()

      Generate ParseException.

    - #### getNextToken

          public final Token getNextToken()

      Get the next Token.

    - #### getToken

          public final Token getToken(int index)

      Get the specific Token.

    - #### GuiReference

          public final void GuiReference()
                                  throws ParseException

      Throws:
        `ParseException`

    - #### GuiRelation

          public final void GuiRelation()
                                 throws ParseException

      Throws:
        `ParseException`

    - #### Instruction

          public final void Instruction()
                                 throws ParseException

      Throws:
        `ParseException`

    - #### jj_2_1

          private boolean jj_2_1(int xla)

    - #### jj_2_2

          private boolean jj_2_2(int xla)

    - #### jj_2_3

          private boolean jj_2_3(int xla)

    - #### jj_2_4

          private boolean jj_2_4(int xla)

    - #### jj_3_1

          private boolean jj_3_1()

    - #### jj_3_2

          private boolean jj_3_2()

    - #### jj_3_3

          private boolean jj_3_3()

    - #### jj_3_4

          private boolean jj_3_4()

    - #### jj_3R_10

          private boolean jj_3R_10()

    - #### jj_3R_6

          private boolean jj_3R_6()

    - #### jj_3R_7

          private boolean jj_3R_7()

    - #### jj_3R_8

          private boolean jj_3R_8()

    - #### jj_3R_9

          private boolean jj_3R_9()

    - #### jj_add_error_token

          private void jj_add_error_token(int kind,
                                          int pos)

    - #### jj_consume_token

          private Token jj_consume_token(int kind)
                                  throws ParseException

      Throws:
        `ParseException`

    - #### jj_la1_init_0

          private static void jj_la1_init_0()

    - #### jj_la1_init_1

          private static void jj_la1_init_1()

    - #### jj_la1_init_2

          private static void jj_la1_init_2()

    - #### jj_ntk_f

          private int jj_ntk_f()

    - #### jj_rescan_token

          private void jj_rescan_token()

    - #### jj_save

          private void jj_save(int index,
                               int xla)

    - #### jj_scan_token

          private boolean jj_scan_token(int kind)

    - #### lastKind

          public int lastKind()

      Return the kind of the last consumed token.

    - #### lastKind

          public int lastKind(int pos)

      Return the kind of the token consumed pos steps before last.

    - #### lastText

          public java.lang.String lastText()

      Return the text (image) of the last consumed token.

    - #### lastText

          public java.lang.String lastText(int pos)

      Return the text (image) of the token consumed pos steps before last.

    - #### lastToken

          public Token lastToken()

      Return the last consumed token.

    - #### lastToken

          public Token lastToken(int pos)

      Return the token consumed pos steps before last.

    - #### Literal

          public final void Literal()
                             throws ParseException

      Throws:
        `ParseException`

    - #### main

          public static void main(java.lang.String[] args)
                           throws ParseException

      Main entry point, if used as a stand-alone program (e.g. for testing).
      Throws:
        `ParseException`

    - #### NamedArgument

          public final void NamedArgument()
                                   throws ParseException

      Throws:
        `ParseException`

    - #### NamedArgumentList

          public final void NamedArgumentList()
                                       throws ParseException

      Throws:
        `ParseException`

    - #### parse

          public SimpleNode parse()
                           throws ParseException

      Throws:
        `ParseException`

    - #### ParseScriptProgram

          public final SimpleNode ParseScriptProgram()
                                              throws ParseException

      THE SCRIPT LANGUAGE GRAMMAR STARTS HERE *
      Throws:
        `ParseException`

    - #### peekNode

          public ScriptNode peekNode()

    - #### peekNodeId

          public int peekNodeId()

    - #### popNode

          public ScriptNode popNode()

    - #### popTypedNode

          public ScriptNode popTypedNode(int nodeType)

    - #### ReInit

          public void ReInit(GuiTestScriptParserTokenManager tm)

      Reinitialise.

    - #### 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.

    - #### SignedNumber

          public final void SignedNumber()
                                  throws ParseException

      Usually numbers of the format (+|-)NUMBER (e.g. +3 or -2.5 etc) are interpreted as Unary expressions instead of as literals. This is usually fine because it will be evaluated properly during runtime. However in cases where the true value needs to be known ahead of runtime (e.g. for directives) we need to be able to identify and evaluate these expressions without resorting to runtime expression processing. TODO: Remove the need for this by having the parser evaluate all expressions at compile-time and only leave variables (and other runtime nodes) unevaluated.
      Throws:
        `ParseException`

    - #### SingleGuiItem

          public final void SingleGuiItem()
                                   throws ParseException

      Throws:
        `ParseException`

    - #### testTopNodeType

          public boolean testTopNodeType(int nodeType)

    - #### trace_call

          private void trace_call(java.lang.String s)

    - #### trace_return

          private void trace_return(java.lang.String s)

    - #### trace_scan

          private void trace_scan(Token t1,
                                  int t2)

    - #### trace_token

          private void trace_token(Token t,
                                   java.lang.String where)

    - #### trimRight

          private java.lang.String trimRight(java.lang.String s,
                                             int numChars)

    - #### tryPopTypedNode

          public ScriptNode tryPopTypedNode(int nodeType)

    - #### VarRef

          public final void VarRef()
                            throws ParseException

      Throws:
        `ParseException`