|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.erights.e.elang.syntax.EParser
Safe:
Field Summary | |
static short |
_
Enabled: |
static short |
ABSTRACT
Enabled: |
static short |
AN
Enabled: |
static short |
AS
Enabled: |
static short |
ASSERT
Enabled: |
static short |
AssignExpr
Enabled: |
static short |
AtIdent
Enabled: |
static short |
AtOpen
Enabled: |
static short |
ATTRIBUTE
Enabled: |
private EBuilder |
b
receives parsing events |
static short |
BE
Enabled: |
static short |
BEGIN
Enabled: |
static short |
BEHALF
Enabled: |
static short |
BELIEF
Enabled: |
static short |
BELIEVE
Enabled: |
static short |
BELIEVES
Enabled: |
static short |
BIND
Enabled: |
static short |
BodyNextWord
Enabled: |
static short |
BodyStartWord
Enabled: |
static short |
BREAK
Enabled: |
static short |
CallExpr
Enabled: |
static short |
CASE
Enabled: |
static short |
CATCH
Enabled: |
static short |
CatchExpr
Enabled: |
static short |
CdrPattern
Enabled: |
static short |
CLASS
Enabled: |
static short |
CONST
Enabled: |
static short |
CONSTRUCTOR
Enabled: |
static short |
CONTEXT
Enabled: |
static short |
CONTINUE
Enabled: |
static short |
DECLARE
Enabled: |
static short |
DEF
Enabled: |
static short |
DEFAULT
Enabled: |
private static int |
DEFAULT_CONTINUE_INDENT
|
static AstroSchema |
DEFAULT_SCHEMA
Enabled: |
private static ConstMap |
DefaultProps
|
static short |
DEFINE
Enabled: |
static short |
DefineExpr
Enabled: |
static short |
DEFMACRO
Enabled: |
static short |
DELEGATE
Enabled: |
static short |
DEPRECATED
Enabled: |
static short |
DISPATCH
Enabled: |
static short |
DO
Enabled: |
static short |
DocComment
Enabled: |
static short |
DollarIdent
Enabled: |
static short |
DollarOpen
Enabled: |
static short |
ELSE
Enabled: |
static short |
EMethod
Enabled: |
static short |
ENCAPSULATE
Enabled: |
static short |
ENCAPSULATED
Enabled: |
static short |
ENCAPSULATES
Enabled: |
static short |
END
Enabled: |
static short |
ENSURE
Enabled: |
static short |
ENUM
Enabled: |
static short |
EOL
Enabled: |
static short |
EOTLU
Enabled: |
static StaticMaker |
EParserMaker
Enabled: |
static short |
ESCAPE
Enabled: |
static short |
EscapeExpr
Enabled: |
static short |
EScript
Enabled: |
static short |
EVENTUAL
Enabled: |
static short |
EVENTUALLY
Enabled: |
static short |
EXPORT
Enabled: |
static short |
EXTENDS
Enabled: |
static short |
FACET
Enabled: |
static short |
FINALLY
Enabled: |
static short |
FinallyExpr
Enabled: |
static short |
FinalPattern
Enabled: |
static short |
FOR
Enabled: |
static short |
FORALL
Enabled: |
static short |
FUNCTION
Enabled: |
static short |
GIVEN
Enabled: |
static short |
GUARDS
Enabled: |
static short |
HIDDEN
Enabled: |
static short |
HideExpr
Enabled: |
static short |
HIDES
Enabled: |
static short |
ID
Enabled: |
static short |
IF
Enabled: |
static short |
IfExpr
Enabled: |
static short |
IgnorePattern
Enabled: |
static short |
IMPLEMENTS
Enabled: |
static short |
IN
Enabled: |
static short |
INLINE
Enabled: |
static short |
INTERFACE
Enabled: |
static short |
IS
Enabled: |
static short |
KNOW
Enabled: |
static short |
KNOWS
Enabled: |
static short |
LAMBDA
Enabled: |
static short |
LET
Enabled: |
static short |
ListPattern
Enabled: |
static short |
LiteralChar
Enabled: |
static short |
LiteralExpr
Enabled: |
static short |
LiteralFloat64
Enabled: |
static short |
LiteralInteger
Enabled: |
static short |
LiteralString
Enabled: |
static short |
LiteralTwine
Enabled: |
private static int[] |
LiteralTypes
|
static short |
MapsTo
Enabled: |
static short |
MATCH
Enabled: |
static short |
MatchBind
Enabled: |
static short |
MatchBindExpr
Enabled: |
static short |
Matcher
Enabled: |
static short |
META
Enabled: |
static short |
MetaExpr
Enabled: |
static short |
METHOD
Enabled: |
static short |
METHODS
Enabled: |
static short |
MisMatch
Enabled: |
static short |
MODULE
Enabled: |
private LexerFace |
myLexer
contains all the tokens after yylval |
private boolean |
myOnlyOneExprFlag
Do we escape after parsing only one expression, or do we parse the entire input? |
private ENode |
myOptResult
Where the result is stored by the top-level productions |
static short |
NAMESPACE
Enabled: |
static short |
NATIVE
Enabled: |
static short |
NounExpr
Enabled: |
static short |
OBEYS
Enabled: |
static short |
ObjectExpr
Enabled: |
static short |
OCTET
Enabled: |
static short |
ON
Enabled: |
static short |
ONEWAY
Enabled: |
static short |
OpABA
Enabled: |
static short |
OpAsl
Enabled: |
static short |
OpAsr
Enabled: |
static short |
OpAss
Enabled: |
static short |
OpAssAdd
Enabled: |
static short |
OpAssAnd
Enabled: |
static short |
OpAssAprxDiv
Enabled: |
static short |
OpAssAsl
Enabled: |
static short |
OpAssAsr
Enabled: |
static short |
OpAssFlrDiv
Enabled: |
static short |
OpAssMod
Enabled: |
static short |
OpAssMul
Enabled: |
static short |
OpAssOr
Enabled: |
static short |
OpAssPow
Enabled: |
static short |
OpAssRemdr
Enabled: |
static short |
OpAssSub
Enabled: |
static short |
OpAssXor
Enabled: |
static short |
OpButNot
Enabled: |
static short |
OpFlrDiv
Enabled: |
static short |
OpGeq
Enabled: |
static short |
OpLAnd
Enabled: |
static short |
OpLeq
Enabled: |
static short |
OpLOr
Enabled: |
static short |
OpMod
Enabled: |
static short |
OpNSame
Enabled: |
static short |
OpPow
Enabled: |
static short |
OpSame
Enabled: |
static short |
OpThru
Enabled: |
static short |
OpTill
Enabled: |
static short |
OpWhen
Enabled: |
private static IdentityCacheTable |
OurCache
caches previous simple parses (as is used for quasi-parsing) |
static short |
PACKAGE
Enabled: |
static short |
PRAGMA
Enabled: |
static short |
PRIVATE
Enabled: |
static short |
PROTECTED
Enabled: |
static short |
PUBLIC
Enabled: |
static short |
QuasiClose
Enabled: |
static short |
QuasiLiteralExpr
Enabled: |
static short |
QuasiLiteralPatt
Enabled: |
static short |
QuasiOpen
Enabled: |
static short |
QuasiPatternExpr
Enabled: |
static short |
QuasiPatternPatt
Enabled: |
private static int[] |
QuasiTypes
|
static short |
RAISES
Enabled: |
static short |
RELIANCE
Enabled: |
static short |
RELIANT
Enabled: |
static short |
RELIES
Enabled: |
static short |
RELY
Enabled: |
static short |
RETURN
Enabled: |
static short |
REVEAL
Enabled: |
static short |
SAKE
Enabled: |
static short |
ScopeExpr
Enabled: |
static short |
SELECT
Enabled: |
static short |
Send
Enabled: |
static short |
SendExpr
Enabled: |
static short |
SeqExpr
Enabled: |
static short |
SIGNED
Enabled: |
static short |
SlotExpr
Enabled: |
(package private) int |
stateptr
|
(package private) int[] |
statestk
|
static short |
STATIC
Enabled: |
static short |
STRUCT
Enabled: |
static short |
SUCHTHAT
Enabled: |
static short |
SuchThatPattern
Enabled: |
static short |
SUPPORTS
Enabled: |
static short |
SUSPECT
Enabled: |
static short |
SUSPECTS
Enabled: |
static short |
SWITCH
Enabled: |
static short |
SYNCHRONIZED
Enabled: |
private static int[][] |
TheContinuerOps
These are the tokens that may appear at the end of a line, in which case the next line is a (to be indented) continuation of the expression. |
private static int[] |
TheContinuers
TheContinuers[tagCode] says whether this is a continuation operator, and if so, how much to indent by. |
private static String[] |
TheTokens
|
static short |
THIS
Enabled: |
static short |
THROWS
Enabled: |
static short |
THUNK
Enabled: |
static short |
TO
Enabled: |
static short |
TRANSIENT
Enabled: |
static short |
TRUNCATABLE
Enabled: |
static short |
TRY
Enabled: |
static short |
TYPEDEF
Enabled: |
static short |
UNSIGNED
Enabled: |
static short |
UNUM
Enabled: |
static short |
URI
Enabled: |
static short |
URIStart
Enabled: |
static short |
USES
Enabled: |
static short |
USING
Enabled: |
static short |
UTF16
Enabled: |
static short |
UTF8
Enabled: |
(package private) int |
valptr
|
(package private) Object[] |
valstk
|
static short |
VAR
Enabled: |
static short |
VarPattern
Enabled: |
static short |
VerbAssign
Enabled: |
static short |
VIRTUAL
Enabled: |
static short |
VOLATILE
Enabled: |
static short |
VTableNextWord
Enabled: |
static short |
VTableStartWord
Enabled: |
static short |
WHEN
Enabled: |
static short |
WHILE
Enabled: |
static short |
WSTRING
Enabled: |
(package private) int |
yychar
|
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
|
private static short[] |
yytable
|
(package private) static int |
YYTABLESIZE
|
(package private) String |
yytext
|
(package private) Object |
yyval
|
Constructor Summary | |
EParser(ENodeBuilder builder,
LexerFace lexer,
boolean debugFlag,
boolean onlyOneExprFlag)
Enabled: |
Method Summary | |
static int |
continueCount(int tagCode)
Enabled: If this token appears at the end of a line, does that make the next line a (to be indented) continuation line? |
(package private) void |
debug(String msg)
|
(package private) void |
dump_stacks(int count)
|
(package private) boolean |
init_stacks()
|
private static void |
initTables()
Ensures that yytable and yycheck are initialized. |
boolean |
isEndOfFile()
Enabled: |
(package private) static boolean |
isLiteralToken(Object tok)
|
(package private) static boolean |
isQuasiPart(Object tok)
|
private static boolean |
isTokenKind(Object tok,
int[] members)
|
static EParser |
make(ConstMap props,
LexerFace lexer)
Enabled: |
static EParser |
make(ConstMap optProps,
LexerFace lexer,
boolean debugFlag,
boolean onlyOneExprFlag)
Enabled: |
static EParser |
make(LexerFace lexer)
Enabled: |
static ENode |
matchMaker(Twine sourceCode)
Enabled: For use from E as a quasi-pattern parser. |
(package private) static NounExpr |
noun(Object name)
|
ENode |
optParse()
Enabled: |
ENode |
parse()
Enabled: If the input is empty, returns the null expression e`null`, rather than null. |
static ENode |
run(Twine sourceCode)
Enabled: For simple string -> expression parsing, especially for use from E |
static ENode |
run(Twine sourceCode,
boolean quasiFlag)
Enabled: |
static ENode |
run(Twine sourceCode,
boolean quasiFlag,
ConstMap optProps)
Enabled: No longer does the caching. |
void |
setSource(Twine newSource)
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)
|
(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)
|
static ENode |
valueMaker(Twine sourceCode)
Enabled: For use as from E as a quasi-literal parser. |
private void |
yyerror(String s)
|
private short |
yylex()
Converts EOTLUs to either EOLs or EOFTOKs according to myOnlyOneExprFlag |
(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 LiteralInteger
public static final short LiteralFloat64
public static final short LiteralChar
public static final short LiteralString
public static final short LiteralTwine
public static final short ID
public static final short VerbAssign
public static final short QuasiOpen
public static final short QuasiClose
public static final short DollarIdent
public static final short AtIdent
public static final short DollarOpen
public static final short AtOpen
public static final short URI
public static final short URIStart
public static final short DocComment
public static final short BodyStartWord
public static final short BodyNextWord
public static final short VTableStartWord
public static final short VTableNextWord
public static final short BIND
public static final short BREAK
public static final short CATCH
public static final short CONTINUE
public static final short DEF
public static final short ELSE
public static final short ESCAPE
public static final short EXTENDS
public static final short FINALLY
public static final short FOR
public static final short GUARDS
public static final short IF
public static final short IMPLEMENTS
public static final short IN
public static final short INTERFACE
public static final short MATCH
public static final short META
public static final short METHOD
public static final short PRAGMA
public static final short RETURN
public static final short SWITCH
public static final short THUNK
public static final short TO
public static final short TRY
public static final short VAR
public static final short WHEN
public static final short WHILE
public static final short _
public static final short CLASS
public static final short DELEGATE
public static final short MODULE
public static final short ON
public static final short SELECT
public static final short ABSTRACT
public static final short AN
public static final short AS
public static final short ASSERT
public static final short ATTRIBUTE
public static final short BE
public static final short BEGIN
public static final short BEHALF
public static final short BELIEF
public static final short BELIEVE
public static final short BELIEVES
public static final short CASE
public static final short CONST
public static final short CONSTRUCTOR
public static final short CONTEXT
public static final short DECLARE
public static final short DEFAULT
public static final short DEFINE
public static final short DEFMACRO
public static final short DEPRECATED
public static final short DISPATCH
public static final short DO
public static final short ENCAPSULATE
public static final short ENCAPSULATED
public static final short ENCAPSULATES
public static final short END
public static final short ENSURE
public static final short ENUM
public static final short EVENTUAL
public static final short EVENTUALLY
public static final short EXPORT
public static final short FACET
public static final short FORALL
public static final short FUNCTION
public static final short GIVEN
public static final short HIDDEN
public static final short HIDES
public static final short INLINE
public static final short IS
public static final short KNOW
public static final short KNOWS
public static final short LAMBDA
public static final short LET
public static final short METHODS
public static final short NAMESPACE
public static final short NATIVE
public static final short OBEYS
public static final short OCTET
public static final short ONEWAY
public static final short PACKAGE
public static final short PRIVATE
public static final short PROTECTED
public static final short PUBLIC
public static final short RAISES
public static final short RELIANCE
public static final short RELIANT
public static final short RELIES
public static final short RELY
public static final short REVEAL
public static final short SAKE
public static final short SIGNED
public static final short STATIC
public static final short STRUCT
public static final short SUCHTHAT
public static final short SUPPORTS
public static final short SUSPECT
public static final short SUSPECTS
public static final short SYNCHRONIZED
public static final short THIS
public static final short THROWS
public static final short TRANSIENT
public static final short TRUNCATABLE
public static final short TYPEDEF
public static final short UNSIGNED
public static final short UNUM
public static final short USES
public static final short USING
public static final short UTF8
public static final short UTF16
public static final short VIRTUAL
public static final short VOLATILE
public static final short WSTRING
public static final short EOL
public static final short EOTLU
public static final short OpLAnd
public static final short OpLOr
public static final short OpSame
public static final short OpNSame
public static final short OpButNot
public static final short OpLeq
public static final short OpABA
public static final short OpGeq
public static final short OpThru
public static final short OpTill
public static final short OpAsl
public static final short OpAsr
public static final short OpFlrDiv
public static final short OpMod
public static final short OpPow
public static final short OpAss
public static final short OpAssAdd
public static final short OpAssAnd
public static final short OpAssAprxDiv
public static final short OpAssFlrDiv
public static final short OpAssAsl
public static final short OpAssAsr
public static final short OpAssRemdr
public static final short OpAssMod
public static final short OpAssMul
public static final short OpAssOr
public static final short OpAssPow
public static final short OpAssSub
public static final short OpAssXor
public static final short Send
public static final short OpWhen
public static final short MapsTo
public static final short MatchBind
public static final short MisMatch
public static final short AssignExpr
public static final short CallExpr
public static final short DefineExpr
public static final short EscapeExpr
public static final short HideExpr
public static final short IfExpr
public static final short LiteralExpr
public static final short MatchBindExpr
public static final short NounExpr
public static final short ObjectExpr
public static final short QuasiLiteralExpr
public static final short QuasiPatternExpr
public static final short ScopeExpr
public static final short SendExpr
public static final short SeqExpr
public static final short SlotExpr
public static final short MetaExpr
public static final short CatchExpr
public static final short FinallyExpr
public static final short FinalPattern
public static final short VarPattern
public static final short ListPattern
public static final short CdrPattern
public static final short IgnorePattern
public static final short SuchThatPattern
public static final short QuasiLiteralPatt
public static final short QuasiPatternPatt
public static final short EScript
public static final short EMethod
public static final short Matcher
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
private static short[] yytable
private static short[] yycheck
static final short YYFINAL
static final short YYMAXTOKEN
static final String[] yyname
static final String[] yyrule
public static final StaticMaker EParserMaker
private static final IdentityCacheTable OurCache
private static final ConstMap DefaultProps
private final LexerFace myLexer
private final boolean myOnlyOneExprFlag
private ENode myOptResult
private final EBuilder b
private static final int[] LiteralTypes
private static final int[] QuasiTypes
private static final String[] TheTokens
public static final AstroSchema DEFAULT_SCHEMA
private static final int DEFAULT_CONTINUE_INDENT
private static final int[][] TheContinuerOps
Note that > isn't on the list because of its role in closing a calculated URI expression.
private static final int[] TheContinuers
If this isn't a continuation operator, then -1.
Constructor Detail |
public EParser(ENodeBuilder builder, LexerFace lexer, boolean debugFlag, boolean onlyOneExprFlag)
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)
private static void initTables()
public static EParser make(LexerFace lexer)
public static EParser make(ConstMap props, LexerFace lexer)
public static EParser make(ConstMap optProps, LexerFace lexer, boolean debugFlag, boolean onlyOneExprFlag)
public static ENode valueMaker(Twine sourceCode)
Transparently caches the result
sourceCode
- The source code itself, not the location of
the source codepublic static ENode matchMaker(Twine sourceCode)
Just delegates to valueMaker/1.
sourceCode
- The source code itself, not the location of
the source codepublic static ENode run(Twine sourceCode)
sourceCode
- The source code itself, not the location of
the source codepublic static ENode run(Twine sourceCode, boolean quasiFlag)
public static ENode run(Twine sourceCode, boolean quasiFlag, ConstMap optProps)
public ENode optParse()
public ENode parse()
private short yylex()
Note that yacc uses tag-codes, while Antlr uses type-codes.
private void yyerror(String s) throws SyntaxException
SyntaxException
public void setSource(Twine newSource)
public boolean isEndOfFile()
static NounExpr noun(Object name)
private static boolean isTokenKind(Object tok, int[] members)
static boolean isLiteralToken(Object tok)
static boolean isQuasiPart(Object tok)
public static int continueCount(int tagCode)
-1 if not. The number of spaces to indent if so.
void yylexdebug(int state, int ch)
int yyparse()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |