Class Parser
java.lang.Object
|
+--Parser
- All Implemented Interfaces:
- CarFace, LexerFace
- Direct Known Subclasses:
- ParserCollection, ParserSession
- public abstract class Parser
- extends java.lang.Object
- implements LexerFace
Fields inherited from interface LexerFace |
ACTIVETAGS, AMPERSAND, any, ANY, COLON, COMMA, COMMENT, DIV, ELLIPSIS, ENDOFSOURCE, ENDTAG, EQUALS, GT, IDENTIFIER, LBRACE, LBRACKET, LPARENT, LT, MATCHERMESSAGE, MINUS, NOT, NOTE, PERIOD, PLUS, QUESTION, RBRACE, RBRACKET, RPARENT, SEMICOLON, STAR, STARTTAG, TILDE, TOKENMIN, tokenNames |
Fields inherited from interface CarFace |
BOOLEAN_LITERAL, COLLECTION, DOUBLE_LITERAL, EXTERNAL, grammarNames, INTERNAL, KEYPHRASE, LITERALcapacityIncrement, LITERALinitialCapacity, MARKUP, SERIAL, SESSION, STRING_LITERAL, STRINGVALUE_LITERAL |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sy
protected int sy
peeksy
protected int peeksy
syval
protected java.lang.String syval
id
protected java.lang.String id
tag
protected java.lang.String tag
parseControl
protected ParseControl parseControl
itok
protected int itok
ltok
protected long ltok
btok
protected boolean btok
rtok
protected float rtok
dtok
protected double dtok
ctok
protected char ctok
stok
protected java.lang.String stok
currLiteralType
protected int currLiteralType
currLiteralVal
protected java.lang.String currLiteralVal
currVal
protected java.lang.Object currVal
currLabel
protected java.lang.String currLabel
cValue
protected Value cValue
cValueTuple
protected ValueTuple cValueTuple
cValueTupleVector
protected ValueTupleVector cValueTupleVector
cAttributeTuple
protected AttributeTuple cAttributeTuple
cCommentTuple
protected CommentTuple cCommentTuple
cFieldName
protected java.lang.String cFieldName
cField
protected Field cField
cDocument
protected Document cDocument
gotAField
protected boolean gotAField
docs
protected Collection docs
grammar
protected int grammar
Parser
public Parser(ParseControl prog,
Lexer plexer)
Field
public abstract boolean Field()
throws java.lang.Exception
Start
public abstract boolean Start()
throws java.lang.Exception
t
public void t(java.lang.String s)
getLineno
public int getLineno()
error
protected boolean error(java.lang.String s)
throws java.lang.Exception
printTables
public void printTables()
- //-------------------------------
public String getSourceLine(int line) {
// puts lineno at beginning of output
String s=source;
int lineno,i,j,len;
lineno=i=j=0;
len=s.length();
while(i= i) {
if(lineno==line) return s.substring(i,j);
i=j+1;
}
else return s.substring(i,len);
lineno++;
}
return null;
}
insymbol
protected void insymbol(int dummy)
throws java.lang.Exception
insymbol
protected void insymbol()
throws java.lang.Exception
Identifier
boolean Identifier()
throws java.lang.Exception
StartTag
boolean StartTag()
throws java.lang.Exception
EndTag
boolean EndTag()
throws java.lang.Exception
isNumericLiteral
boolean isNumericLiteral(int sym)
NumericLiteral
boolean NumericLiteral()
throws java.lang.Exception
BooleanLiteral
boolean BooleanLiteral()
throws java.lang.Exception
StringLiteral
boolean StringLiteral()
throws java.lang.Exception
StringValueLiteral
boolean StringValueLiteral()
throws java.lang.Exception
minVal
protected java.lang.Object minVal(int valType)
maxVal
protected java.lang.Object maxVal(int valType)
parse
public boolean parse(Collection docs,
int grammar)
throws java.lang.Exception
Document
protected boolean Document()
throws java.lang.Exception
addField
protected void addField()
throws java.lang.Exception
AttributeTuple
protected boolean AttributeTuple()
throws java.lang.Exception
ValueSpec
protected boolean ValueSpec()
throws java.lang.Exception
Label
protected boolean Label()
throws java.lang.Exception
Value
protected boolean Value()
throws java.lang.Exception
RangeOrPrimtiveValue
protected boolean RangeOrPrimtiveValue()
throws java.lang.Exception
PrimitiveValue
protected boolean PrimitiveValue()
throws java.lang.Exception
RangeValue
protected boolean RangeValue()
throws java.lang.Exception
CommentTuple
protected boolean CommentTuple()
throws java.lang.Exception
orderAndCast
protected int orderAndCast(int firstValType,
int secondValType,
java.lang.Object[] vals)
throws java.lang.Exception
orderAndCastError
protected void orderAndCastError(int type1,
int type2)
throws java.lang.Exception
swap
protected void swap(java.lang.Object[] vals)
Submit bugs to Lindsey