|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgate.jape.parser.ParseCpsl
public class ParseCpsl
A parser for the CPSL language. Generated using JavaCC.
| Field Summary | |
|---|---|
protected URL |
baseURL
|
protected SinglePhaseTransducer |
curSPT
|
protected String |
encoding
|
Token |
jj_nt
|
boolean |
lookingAhead
|
protected HashMap |
macrosMap
A table of macro definitions. |
protected HashMap |
templatesMap
A table of template definitions. |
Token |
token
|
ParseCpslTokenManager |
token_source
|
| 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 |
| Constructor Summary | |
|---|---|
ParseCpsl(InputStream stream)
|
|
ParseCpsl(InputStream stream,
String encoding)
|
|
ParseCpsl(ParseCpslTokenManager tm)
|
|
ParseCpsl(Reader stream)
|
|
ParseCpsl(Reader stream,
HashMap existingMacros)
|
|
ParseCpsl(Reader stream,
HashMap existingMacros,
HashMap existingTemplates)
|
|
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 |
|
ParseCpsl(URL url,
String encoding,
HashMap existingMacros,
HashMap existingTemplates)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected HashMap macrosMap
protected HashMap templatesMap
protected URL baseURL
protected String encoding
protected SinglePhaseTransducer curSPT
public ParseCpslTokenManager token_source
public Token token
public Token jj_nt
public boolean lookingAhead
| Constructor Detail |
|---|
public ParseCpsl(URL url,
String encoding)
throws IOException
IOException
public ParseCpsl(URL url,
String encoding,
HashMap existingMacros)
throws IOException
IOException
public ParseCpsl(URL url,
String encoding,
HashMap existingMacros,
HashMap existingTemplates)
throws IOException
IOException
public ParseCpsl(Reader stream,
HashMap existingMacros)
public ParseCpsl(Reader stream,
HashMap existingMacros,
HashMap existingTemplates)
public ParseCpsl(InputStream stream)
public ParseCpsl(InputStream stream,
String encoding)
public ParseCpsl(Reader stream)
public ParseCpsl(ParseCpslTokenManager tm)
| Method Detail |
|---|
public void addStatusListener(StatusListener listener)
public void removeStatusListener(StatusListener listener)
protected void fireStatusChangedEvent(String text)
protected SinglePhaseTransducer createSinglePhaseTransducer(String name)
protected ParseCpsl spawn(URL sptURL)
throws IOException
IOException
protected void finishSPT(SinglePhaseTransducer t)
throws ParseException
ParseExceptionprotected void finishBPE(BasicPatternElement bpe)
public MultiPhaseTransducer MultiPhaseTransducer()
throws ParseException
ParseException
protected void appendJavaStringLiteral(StringBuffer buf,
String str)
str is null, we append the four
characters n, u, l, l. Otherwise, we append the contents of str surrounded
by double quotes, except that characters in str are escaped as necessary
to be a legal Java string literal: backspace, formfeed, tab, newline and
return are replaced by their escape sequences \b, \f, etc.; single and double
quote and backslash are preceded by an extra backslash; other non-ASCII
and non-printing characters are rendered as Unicode escapes (backslash-u
followed by four hex digits).
protected void appendAnnotationAdd(StringBuffer blockBuffer,
String newAnnotType,
String annotSetName)
protected Pair substituteTemplate(Token templateNameTok,
Map<String,Object> values)
throws ParseException
ParseExceptionpublic void setBaseURL(URL newURL)
public void setEncoding(String newEncoding)
public final MultiPhaseTransducer _MultiPhaseTransducer()
throws ParseException
ParseException
public final SinglePhaseTransducer SinglePhaseTransducer(String javaimportblock)
throws ParseException
ParseException
public final String JavaImportBlock()
throws ParseException
ParseException
public final String ControllerStartedBlock()
throws ParseException
ParseException
public final String ControllerFinishedBlock()
throws ParseException
ParseException
public final String ControllerAbortedBlock()
throws ParseException
ParseException
public final Rule Rule(String phaseName,
String currentImports)
throws ParseException
ParseException
public final void MacroDef()
throws ParseException
ParseException
public final void TemplateDef()
throws ParseException
ParseException
public final LeftHandSide LeftHandSide()
throws ParseException
ParseException
public final void ConstraintGroup(LeftHandSide lhs,
ConstraintGroup cg)
throws ParseException
ParseException
public final PatternElement PatternElement(LeftHandSide lhs)
throws ParseException
ParseException
public final BasicPatternElement BasicPatternElement()
throws ParseException
ParseException
public final ComplexPatternElement ComplexPatternElement(LeftHandSide lhs)
throws ParseException
ParseException
public final KleeneOperator KleeneOperator()
throws ParseException
ParseException
public final Constraint Constraint()
throws ParseException
ParseException
public final AnnotationAccessor FeatureAccessor()
throws ParseException
ParseException
public final Pair AttrVal()
throws ParseException
ParseException
public final Pair TemplateCall()
throws ParseException
ParseException
public final RightHandSide RightHandSide(String phaseName,
String ruleName,
LeftHandSide lhs,
String imports)
throws ParseException
ParseException
public final String[] Action(boolean checkLabel)
throws ParseException
ParseException
public final String[] NamedJavaBlock(boolean checkLabel)
throws ParseException
ParseException
public final String[] AnonymousJavaBlock()
throws ParseException
ParseException
public final String[] AssignmentExpression(boolean checkLabel)
throws ParseException
ParseExceptionpublic void ReInit(InputStream stream)
public void ReInit(InputStream stream,
String encoding)
public void ReInit(Reader stream)
public void ReInit(ParseCpslTokenManager tm)
public final Token getNextToken()
public final Token getToken(int index)
public ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||