|
||||||||||
| 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.
| Nested Class Summary | |
|---|---|
(package private) static class |
ParseCpsl.JJCalls
|
private static class |
ParseCpsl.LookaheadSuccess
|
| Field Summary | |
|---|---|
protected URL |
baseURL
|
private HashSet |
bindingNameSet
A list of all the bindings we made this time, for checking the RHS during parsing. |
protected SinglePhaseTransducer |
curSPT
|
protected 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) SimpleCharStream |
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 ParseCpsl.LookaheadSuccess |
jj_ls
|
Token |
jj_nt
|
private boolean |
jj_rescan
|
private Token |
jj_scanpos
|
private boolean |
jj_semLA
|
private static org.apache.log4j.Logger |
log
|
boolean |
lookingAhead
|
protected HashMap |
macrosMap
A table of macro definitions. |
private List |
myStatusListeners
|
private int |
ruleNumber
Position of the current rule |
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 |
|---|
private static final org.apache.log4j.Logger log
private transient List myStatusListeners
private int ruleNumber
private HashSet bindingNameSet
protected HashMap macrosMap
protected HashMap templatesMap
protected URL baseURL
protected String encoding
protected SinglePhaseTransducer curSPT
public ParseCpslTokenManager token_source
SimpleCharStream jj_input_stream
public Token token
public Token jj_nt
private Token jj_scanpos
private Token jj_lastpos
private int jj_la
public boolean lookingAhead
private boolean jj_semLA
private int jj_gen
private final int[] jj_la1
private static int[] jj_la1_0
private static int[] jj_la1_1
private static int[] jj_la1_2
private final ParseCpsl.JJCalls[] jj_2_rtns
private boolean jj_rescan
private int jj_gc
private final ParseCpsl.LookaheadSuccess jj_ls
private Vector jj_expentries
private int[] jj_expentry
private int jj_kind
private int[] jj_lasttokens
private int jj_endpos
| 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)
private String errorMsgPrefix(Token t)
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
ParseException
void appendSpecials(Token tok,
StringBuffer block)
throws ParseException
ParseException
String ConsumeBlock()
throws ParseException
ParseExceptionprivate final boolean jj_2_1(int xla)
private final boolean jj_2_2(int xla)
private final boolean jj_3_1()
private final boolean jj_3R_27()
private final boolean jj_3R_23()
private final boolean jj_3R_21()
private final boolean jj_3R_26()
private final boolean jj_3R_25()
private final boolean jj_3R_19()
private final boolean jj_3R_24()
private final boolean jj_3R_18()
private final boolean jj_3R_16()
private final boolean jj_3R_17()
private final boolean jj_3R_22()
private final boolean jj_3_2()
private final boolean jj_3R_15()
private final boolean jj_3R_20()
private static void jj_la1_0()
private static void jj_la1_1()
private static void jj_la1_2()
public void ReInit(InputStream stream)
public void ReInit(InputStream stream,
String encoding)
public void ReInit(Reader stream)
public void ReInit(ParseCpslTokenManager tm)
private final Token jj_consume_token(int kind)
throws ParseException
ParseExceptionprivate final boolean jj_scan_token(int kind)
public final Token getNextToken()
public final Token getToken(int index)
private void jj_add_error_token(int kind,
int pos)
public ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()
private final void jj_rescan_token()
private final void jj_save(int index,
int xla)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||