## gate.jape.parser
Class ParseCpsl

    java.lang.Object
      |
      +--gate.jape.parser.ParseCpsl

All Implemented Interfaces:
  JapeConstants, ParseCpslConstants, Serializable

public class ParseCpsl
extends Object
implements JapeConstants, ParseCpslConstants

A parser for the CPSL language. Generated using JavaCC.

See Also:
  Serialized Form

Inner Class Summary
`(package private) static class` `ParseCpsl.JJCalls`

Field Summary
`(package private) URL` `baseURL`
`private HashSet` `bindingNameSet` A list of all the bindings we made this time, for checking the RHS during parsing.
`(package private) String` `encoding`
`private ParseCpsl.JJCalls[]` `jj_2_rtns`
`private int` `jj_endpos`
`private Vector` `jj_expentries`
`private int[]` `jj_expentry`
`private int` `jj_gc`
`private int` `jj_gen`
`(package private) ASCII_CharStream` `jj_input_stream`
`private int` `jj_kind`
`private int` `jj_la`
`private int[]` `jj_la1`
`private int[]` `jj_la1_0`
`private int[]` `jj_la1_1`
`private Token` `jj_lastpos`
`private int[]` `jj_lasttokens`
`Token` `jj_nt`
`private boolean` `jj_rescan`
`private Token` `jj_scanpos`
`private boolean` `jj_semLA`
`boolean` `lookingAhead`
`private HashMap` `macrosMap` A table of macro definitions.
`private List` `myStatusListeners`
`private int` `ruleNumber` Position of the current rule
`Token` `token`
`ParseCpslTokenManager` `token_source`

Fields inherited from interface gate.jape.JapeConstants
`APPELT_STYLE, BRILL_STYLE, DEFAULT_PRIORITY, FIRST_STYLE, INDENT_PADDING, KLEENE_PLUS, KLEENE_QUERY, KLEENE_STAR, MULTI_SPAN_BINDING, NO_BINDING, NO_KLEENE_OP, SINGLE_SPAN_BINDING`

Fields inherited from interface gate.jape.parser.ParseCpslConstants

`assign, bar, bool, colon, colonplus, comma, commentChars, commentEnd, commentStart, DEFAULT, digits, EOF, equals, exponent, floatingPoint, ident, IN_PHASES, IN_STRING, input, integer, kleeneOp, leftBrace, leftBracket, letter, letterOrDigitOrDash, letters, lettersAndDigits, lettersAndDigitsAndDashes, macro, multiphase, newline, option, other, path, period, phase, phases, PHASES_WITHIN_COMMENT, phasesCommentChars, phasesCommentEnd, phasesCommentStart, phasesSingleLineCpslStyleComment, phasesSingleLineCStyleComment, phasesWhiteSpace, pling, priority, rightBrace, rightBracket, rule, semicolon, singleLineCpslStyleComment, singleLineCStyleComment, space, spaces, string, tokenImage, whiteSpace, WITHIN_COMMENT`

Constructor Summary
`ParseCpsl(InputStream stream)`
`ParseCpsl(ParseCpslTokenManager tm)`
`ParseCpsl(Reader stream)`
`ParseCpsl(URL url, String encoding)` Construct from a URL and an encoding
`ParseCpsl(URL url, String encoding, HashMap existingMacros)` Construct from a URL and an encoding

Method Summary
`String[]` `Action()`
`void` `addStatusListener(StatusListener listener)`
`String[]` `AnonymousJavaBlock()`
`String[]` `AssignmentExpression()`
`Pair` `AttrVal()`
`BasicPatternElement` `BasicPatternElement()`
`ComplexPatternElement` `ComplexPatternElement(LeftHandSide lhs)`
`Constraint` `Constraint()`
`void` `ConstraintGroup(LeftHandSide lhs, ConstraintGroup cg)`
`(package private) String` `ConsumeBlock()`
`void` `disable_tracing()`
`void` `enable_tracing()`
`protected void` `fireStatusChangedEvent(String text)`
`ParseException` `generateParseException()`
`Token` `getNextToken()`
`Token` `getToken(int index)`
`private boolean` `jj_2_1(int xla)`
`private boolean` `jj_2_2(int xla)`
`private boolean` `jj_3_1()`
`private boolean` `jj_3_2()`
`private boolean` `jj_3R_12()`
`private boolean` `jj_3R_13()`
`private boolean` `jj_3R_14()`
`private boolean` `jj_3R_15()`
`private boolean` `jj_3R_16()`
`private boolean` `jj_3R_17()`
`private boolean` `jj_3R_18()`
`private boolean` `jj_3R_19()`
`private boolean` `jj_3R_20()`
`private boolean` `jj_3R_21()`
`private boolean` `jj_3R_22()`
`private boolean` `jj_3R_23()`
`private boolean` `jj_3R_24()`
`private void` `jj_add_error_token(int kind, int pos)`
`private Token` `jj_consume_token(int kind)`
`private void` `jj_rescan_token()`
`private void` `jj_save(int index, int xla)`
`private boolean` `jj_scan_token(int kind)`
`LeftHandSide` `LeftHandSide()`
`void` `MacroDef()`
`MultiPhaseTransducer` `MultiPhaseTransducer()`
`String[]` `NamedJavaBlock()`
`PatternElement` `PatternElement(LeftHandSide lhs)`
`void` `ReInit(InputStream stream)`
`void` `ReInit(ParseCpslTokenManager tm)`
`void` `ReInit(Reader stream)`
`void` `removeStatusListener(StatusListener listener)`
`RightHandSide` `RightHandSide(String phaseName, String ruleName, LeftHandSide lhs)`
`Rule` `Rule(String phaseName)`
`SinglePhaseTransducer` `SinglePhaseTransducer()`

Methods inherited from class java.lang.Object
`<clinit>, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait`

Field Detail

### myStatusListeners

    private transient List myStatusListeners

### ruleNumber

    private int ruleNumber

  Position of the current rule

### bindingNameSet

    private HashSet bindingNameSet

  A list of all the bindings we made this time, for checking the RHS during parsing.

### macrosMap

    private HashMap macrosMap

  A table of macro definitions.

### baseURL

    URL baseURL

### encoding

    String encoding

### token_source

    public ParseCpslTokenManager token_source

### jj_input_stream

    ASCII_CharStream jj_input_stream

### token

    public Token token

### jj_nt

    public Token jj_nt

### jj_scanpos

    private Token jj_scanpos

### jj_lastpos

    private Token jj_lastpos

### jj_la

    private int jj_la

### lookingAhead

    public boolean lookingAhead

### jj_semLA

    private boolean jj_semLA

### jj_gen

    private int jj_gen

### jj_la1

    private final int[] jj_la1

### jj_la1_0

    private final int[] jj_la1_0

### jj_la1_1

    private final int[] jj_la1_1

### jj_2_rtns

    private final ParseCpsl.JJCalls[] jj_2_rtns

### jj_rescan

    private boolean jj_rescan

### jj_gc

    private int jj_gc

### jj_expentries

    private Vector jj_expentries

### jj_expentry

    private int[] jj_expentry

### jj_kind

    private int jj_kind

### jj_lasttokens

    private int[] jj_lasttokens

### jj_endpos

    private int jj_endpos

Constructor Detail

### ParseCpsl

    public ParseCpsl(URL url,
                     String encoding)
              throws IOException

  Construct from a URL and an encoding

### ParseCpsl

    public ParseCpsl(URL url,
                     String encoding,
                     HashMap existingMacros)
              throws IOException

  Construct from a URL and an encoding

### ParseCpsl

    public ParseCpsl(InputStream stream)

### ParseCpsl

    public ParseCpsl(Reader stream)

### ParseCpsl

    public ParseCpsl(ParseCpslTokenManager tm)

Method Detail

### addStatusListener

    public void addStatusListener(StatusListener listener)

### removeStatusListener

    public void removeStatusListener(StatusListener listener)

### fireStatusChangedEvent

    protected void fireStatusChangedEvent(String text)

### MultiPhaseTransducer

    public final MultiPhaseTransducer MultiPhaseTransducer()
                                                    throws ParseException

### SinglePhaseTransducer

    public final SinglePhaseTransducer SinglePhaseTransducer()
                                                      throws ParseException

### Rule

    public final Rule Rule(String phaseName)
                    throws ParseException

### MacroDef

    public final void MacroDef()
                        throws ParseException

### LeftHandSide

    public final LeftHandSide LeftHandSide()
                                    throws ParseException

### ConstraintGroup

    public final void ConstraintGroup(LeftHandSide lhs,
                                      ConstraintGroup cg)
                               throws ParseException

### PatternElement

    public final PatternElement PatternElement(LeftHandSide lhs)
                                        throws ParseException

### BasicPatternElement

    public final BasicPatternElement BasicPatternElement()
                                                  throws ParseException

### ComplexPatternElement

    public final ComplexPatternElement ComplexPatternElement(LeftHandSide lhs)
                                                      throws ParseException

### Constraint

    public final Constraint Constraint()
                                throws ParseException

### AttrVal

    public final Pair AttrVal()
                       throws ParseException

### RightHandSide

    public final RightHandSide RightHandSide(String phaseName,
                                             String ruleName,
                                             LeftHandSide lhs)
                                      throws ParseException

### Action

    public final String[] Action()
                          throws ParseException

### NamedJavaBlock

    public final String[] NamedJavaBlock()
                                  throws ParseException

### AnonymousJavaBlock

    public final String[] AnonymousJavaBlock()
                                      throws ParseException

### AssignmentExpression

    public final String[] AssignmentExpression()
                                        throws ParseException

### ConsumeBlock

    String ConsumeBlock()
                  throws ParseException

### jj_2_1

    private final boolean jj_2_1(int xla)

### jj_2_2

    private final boolean jj_2_2(int xla)

### jj_3_2

    private final boolean jj_3_2()

### jj_3R_20

    private final boolean jj_3R_20()

### jj_3R_23

    private final boolean jj_3R_23()

### jj_3R_18

    private final boolean jj_3R_18()

### jj_3R_21

    private final boolean jj_3R_21()

### jj_3R_16

    private final boolean jj_3R_16()

### jj_3R_15

    private final boolean jj_3R_15()

### jj_3R_13

    private final boolean jj_3R_13()

### jj_3R_19

    private final boolean jj_3R_19()

### jj_3R_14

    private final boolean jj_3R_14()

### jj_3_1

    private final boolean jj_3_1()

### jj_3R_12

    private final boolean jj_3R_12()

### jj_3R_17

    private final boolean jj_3R_17()

### jj_3R_24

    private final boolean jj_3R_24()

### jj_3R_22

    private final boolean jj_3R_22()

### ReInit

    public void ReInit(InputStream stream)

### ReInit

    public void ReInit(Reader stream)

### ReInit

    public void ReInit(ParseCpslTokenManager tm)

### jj_consume_token

    private final Token jj_consume_token(int kind)
                                  throws ParseException

### jj_scan_token

    private final boolean jj_scan_token(int kind)

### getNextToken

    public final Token getNextToken()

### getToken

    public final Token getToken(int index)

### jj_add_error_token

    private void jj_add_error_token(int kind,
                                    int pos)

### generateParseException

    public final ParseException generateParseException()

### enable_tracing

    public final void enable_tracing()

### disable_tracing

    public final void disable_tracing()

### jj_rescan_token

    private final void jj_rescan_token()

### jj_save

    private final void jj_save(int index,
                               int xla)