|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.quasiliteral.term.TermParser
Safe:
Field Summary | |
private QuasiBuilder |
b
|
static AstroSchema |
DEFAULT_SCHEMA
Enabled: Builds ASTs according to the term.y grammar |
static short |
EOL
Enabled: |
static short |
EOTLU
Enabled: |
static short |
LiteralChar
Enabled: |
static short |
LiteralFloat64
Enabled: |
static short |
LiteralInteger
Enabled: |
static short |
LiteralString
Enabled: |
private LexerFace |
myLexer
contains all the tokens after yylval |
private Astro |
myOptResult
|
static short |
OpDef
Enabled: |
(package private) int |
stateptr
|
(package private) int[] |
statestk
|
static short |
Tag
Enabled: |
private static String[] |
TheTokens
|
(package private) int |
valptr
|
(package private) Object[] |
valstk
|
(package private) int |
yychar
|
(package private) static short[] |
yycheck
|
(package private) boolean |
yydebug
|
(package private) static short[] |
yydefred
|
(package private) static short[] |
yydgoto
|
static short |
YYERRCODE
Enabled: |
(package private) int |
yyerrflag
|
(package private) static short |
YYFINAL
|
(package private) static short[] |
yygindex
|
(package private) static short[] |
yylen
|
(package private) static short[] |
yylhs
|
(package private) Object |
yylval
|
(package private) static short |
YYMAXTOKEN
|
(package private) static String[] |
yyname
|
(package private) int |
yynerrs
|
(package private) static short[] |
yyrindex
|
(package private) static String[] |
yyrule
|
(package private) static short[] |
yysindex
|
(package private) static int |
YYSTACKSIZE
|
(package private) static short[] |
yytable
|
(package private) static int |
YYTABLESIZE
|
(package private) String |
yytext
|
(package private) Object |
yyval
|
Constructor Summary | |
TermParser(LexerFace lexer,
QuasiBuilder builder)
Enabled: |
Method Summary | |
(package private) void |
debug(String msg)
|
(package private) void |
dump_stacks(int count)
|
(package private) boolean |
init_stacks()
|
Astro |
parse()
Enabled: |
private void |
reserved(String s)
|
static Term |
run(Twine source)
Enabled: builder defaults to the quasi-adapted, non-quasi builder for building Term trees. |
static Astro |
run(Twine source,
QuasiBuilder builder)
Enabled: |
(package private) void |
state_drop(int cnt)
|
(package private) int |
state_peek(int relative)
|
(package private) int |
state_pop()
|
(package private) void |
state_push(int state)
|
private Astro |
untag(Astro token)
Transform '.Tag.("foo")' into 'foo'. |
(package private) void |
val_drop(int cnt)
|
(package private) void |
val_init()
|
(package private) Object |
val_peek(int relative)
|
(package private) Object |
val_pop()
|
(package private) void |
val_push(Object val)
|
private void |
yyerror(String s)
|
private short |
yylex()
Skips EOLs and EOTLUs. |
(package private) void |
yylexdebug(int state,
int ch)
|
(package private) int |
yyparse()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
boolean yydebug
int yynerrs
int yyerrflag
int yychar
static final int YYSTACKSIZE
int[] statestk
int stateptr
String yytext
Object yyval
Object yylval
Object[] valstk
int valptr
public static final short Tag
public static final short LiteralChar
public static final short LiteralInteger
public static final short LiteralFloat64
public static final short LiteralString
public static final short EOL
public static final short EOTLU
public static final short OpDef
public static final short YYERRCODE
static final short[] yylhs
static final short[] yylen
static final short[] yydefred
static final short[] yydgoto
static final short[] yysindex
static final short[] yyrindex
static final short[] yygindex
static final int YYTABLESIZE
static final short[] yytable
static final short[] yycheck
static final short YYFINAL
static final short YYMAXTOKEN
static final String[] yyname
static final String[] yyrule
private final LexerFace myLexer
private final QuasiBuilder b
private Astro myOptResult
private static final String[] TheTokens
public static final AstroSchema DEFAULT_SCHEMA
Constructor Detail |
public TermParser(LexerFace lexer, QuasiBuilder builder)
Method Detail |
void debug(String msg)
void state_push(int state)
int state_pop()
void state_drop(int cnt)
int state_peek(int relative)
boolean init_stacks()
void dump_stacks(int count)
void val_init()
void val_push(Object val)
Object val_pop()
void val_drop(int cnt)
Object val_peek(int relative)
public static Term run(Twine source)
public static Astro run(Twine source, QuasiBuilder builder)
public Astro parse()
private short yylex()
Note that yacc uses tag-codes, while Antlr uses type-codes.
private void reserved(String s) throws SyntaxException
SyntaxException
private void yyerror(String s) throws SyntaxException
SyntaxException
private Astro untag(Astro token)
Otherwise, is an identity function. This is needed for the TermParser specifically, since identifiers in the input must all be of token tag-name .Tag., while each of these represents a unique keyword, and therefore token-tag, in the grammar being described.
void yylexdebug(int state, int ch)
int yyparse()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |