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.
- Author:
- Hamish Cunningham
- See Also:
- Serialized Form
Fields inherited from interface gate.jape.JapeConstants |
ALL_STYLE, APPELT_STYLE, BRILL_STYLE, DEFAULT_PRIORITY, FIRST_STYLE, INDENT_PADDING, KLEENE_PLUS, KLEENE_QUERY, KLEENE_STAR, MULTI_SPAN_BINDING, NO_BINDING, NO_KLEENE_OP, ONCE_STYLE, 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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
macrosMap
protected HashMap macrosMap
- A table of macro definitions.
baseURL
protected URL baseURL
encoding
protected String encoding
token_source
public ParseCpslTokenManager token_source
token
public Token token
jj_nt
public Token jj_nt
lookingAhead
public boolean lookingAhead
ParseCpsl
public ParseCpsl(URL url,
String encoding)
throws IOException
- Construct from a URL and an encoding
- Throws:
IOException
ParseCpsl
public ParseCpsl(URL url,
String encoding,
HashMap existingMacros)
throws IOException
- Construct from a URL and an encoding
- Throws:
IOException
ParseCpsl
public ParseCpsl(Reader stream,
HashMap existingMacros)
ParseCpsl
public ParseCpsl(InputStream stream)
ParseCpsl
public ParseCpsl(Reader stream)
ParseCpsl
public ParseCpsl(ParseCpslTokenManager tm)
addStatusListener
public void addStatusListener(StatusListener listener)
removeStatusListener
public void removeStatusListener(StatusListener listener)
fireStatusChangedEvent
protected void fireStatusChangedEvent(String text)
createSinglePhaseTransducer
protected SinglePhaseTransducer createSinglePhaseTransducer(String name)
spawn
protected ParseCpsl spawn(URL sptURL)
throws IOException
- Throws:
IOException
finishSPT
protected void finishSPT(SinglePhaseTransducer t)
throws ParseException
- Throws:
ParseException
finishBPE
protected void finishBPE(BasicPatternElement bpe)
appendAnnotationAdd
protected void appendAnnotationAdd(StringBuffer blockBuffer,
String newAnnotType,
String annotSetName)
setBaseURL
public void setBaseURL(URL newURL)
setEncoding
public void setEncoding(String newEncoding)
MultiPhaseTransducer
public final MultiPhaseTransducer MultiPhaseTransducer()
throws ParseException
- Throws:
ParseException
SinglePhaseTransducer
public final SinglePhaseTransducer SinglePhaseTransducer()
throws ParseException
- Throws:
ParseException
Rule
public final Rule Rule(String phaseName)
throws ParseException
- Throws:
ParseException
MacroDef
public final void MacroDef()
throws ParseException
- Throws:
ParseException
LeftHandSide
public final LeftHandSide LeftHandSide()
throws ParseException
- Throws:
ParseException
ConstraintGroup
public final void ConstraintGroup(LeftHandSide lhs,
ConstraintGroup cg)
throws ParseException
- Throws:
ParseException
PatternElement
public final PatternElement PatternElement(LeftHandSide lhs)
throws ParseException
- Throws:
ParseException
BasicPatternElement
public final BasicPatternElement BasicPatternElement()
throws ParseException
- Throws:
ParseException
ComplexPatternElement
public final ComplexPatternElement ComplexPatternElement(LeftHandSide lhs)
throws ParseException
- Throws:
ParseException
Constraint
public final Constraint Constraint()
throws ParseException
- Throws:
ParseException
AttrVal
public final Pair AttrVal()
throws ParseException
- Throws:
ParseException
RightHandSide
public final RightHandSide RightHandSide(String phaseName,
String ruleName,
LeftHandSide lhs)
throws ParseException
- Throws:
ParseException
Action
public final String[] Action()
throws ParseException
- Throws:
ParseException
NamedJavaBlock
public final String[] NamedJavaBlock()
throws ParseException
- Throws:
ParseException
AnonymousJavaBlock
public final String[] AnonymousJavaBlock()
throws ParseException
- Throws:
ParseException
AssignmentExpression
public final String[] AssignmentExpression()
throws ParseException
- Throws:
ParseException
ReInit
public void ReInit(InputStream stream)
ReInit
public void ReInit(Reader stream)
ReInit
public void ReInit(ParseCpslTokenManager tm)
getNextToken
public final Token getNextToken()
getToken
public final Token getToken(int index)
generateParseException
public ParseException generateParseException()
enable_tracing
public final void enable_tracing()
disable_tracing
public final void disable_tracing()