public class TokenStream extends Object
org.mozilla.javascript.Parser
Modifier and Type | Field and Description |
---|---|
static int |
ADD
Token types.
|
static int |
AND
Token types.
|
static int |
ARRAYLIT
Token types.
|
static int |
ASSIGN
Token types.
|
static int |
BINDNAME
Token types.
|
static int |
BITAND
Token types.
|
static int |
BITNOT
Token types.
|
static int |
BITOR
Token types.
|
static int |
BITXOR
Token types.
|
static int |
BLOCK
Token types.
|
static int |
BREAK
Token types.
|
static int |
CALL
Token types.
|
static int |
CALLSPECIAL
Token types.
|
static int |
CASE
Token types.
|
static int |
CATCH
Token types.
|
static int |
CLOSURE
Token types.
|
static int |
COLON
Token types.
|
static int |
COMMA
Token types.
|
static int |
CONTINUE
Token types.
|
static int |
CONVERT
Token types.
|
static int |
DEBUGGER
Token types.
|
static int |
DEC
Token types.
|
static int |
DEFAULT
Token types.
|
static int |
DELPROP
Token types.
|
static int |
DIV
Token types.
|
static int |
DO
Token types.
|
static int |
DOT
Token types.
|
static int |
DUP
Token types.
|
static int |
ELEMDEC
Token types.
|
static int |
ELEMINC
Token types.
|
static int |
ELSE
Token types.
|
static int |
ENDTRY
Token types.
|
static int |
ENTERWITH
Token types.
|
static int |
ENUMDONE
Token types.
|
static int |
ENUMINIT
Token types.
|
static int |
ENUMNEXT
Token types.
|
static int |
EOF
Token types.
|
static int |
EOL
Token types.
|
static int |
EQ
Token types.
|
static int |
EQOP
Token types.
|
static int |
ERROR
Token types.
|
static int |
EXPORT
Token types.
|
static int |
EXPRSTMT
Token types.
|
static int |
FALSE
Token types.
|
static int |
FINALLY
Token types.
|
static int |
FOR
Token types.
|
static int |
FUNCTION
Token types.
|
static int |
GE
Token types.
|
static int |
GETBASE
Token types.
|
static int |
GETELEM
Token types.
|
static int |
GETPARENT
Token types.
|
static int |
GETPROP
Token types.
|
static int |
GETPROTO
Token types.
|
static int |
GETSCOPEPARENT
Token types.
|
static int |
GETTHIS
Token types.
|
static int |
GETVAR
Token types.
|
static int |
GOSUB
Token types.
|
static int |
GOTO
Token types.
|
static int |
GT
Token types.
|
static int |
GWT
Token types.
|
static int |
HOOK
Token types.
|
static int |
IF
Token types.
|
static int |
IFEQ
Token types.
|
static int |
IFNE
Token types.
|
static int |
IMPORT
Token types.
|
static int |
IN
Token types.
|
static int |
INC
Token types.
|
static int |
INSTANCEOF
Token types.
|
static int |
JSR
Token types.
|
static int |
JTHROW
Token types.
|
static int |
LABEL
Token types.
|
static int |
LAST_TOKEN
Token types.
|
static int |
LB
Token types.
|
static int |
LC
Token types.
|
static int |
LE
Token types.
|
static int |
LEAVEWITH
Token types.
|
static int |
LOOP
Token types.
|
static int |
LP
Token types.
|
static int |
LSH
Token types.
|
static int |
LT
Token types.
|
static int |
MOD
Token types.
|
static int |
MUL
Token types.
|
static int |
NAME
Token types.
|
static int |
NAMEDEC
Token types.
|
static int |
NAMEINC
Token types.
|
static int |
NE
Token types.
|
static int |
NEG
Token types.
|
static int |
NEW
Token types.
|
static int |
NEWLOCAL
Token types.
|
static int |
NEWSCOPE
Token types.
|
static int |
NEWTEMP
Token types.
|
static int |
NOP
Token types.
|
static int |
NOT
Token types.
|
static int |
NULL
Token types.
|
static int |
NUMBER
Token types.
|
static int |
OBJLIT
Token types.
|
static int |
ONE
Token types.
|
static int |
OR
Token types.
|
static int |
PARENT
Token types.
|
static int |
POP
Token types.
|
static int |
POPV
Token types.
|
static int |
POS
Token types.
|
static int |
POST
Token types.
|
static int |
PRE
Token types.
|
static int |
PRIMARY
Token types.
|
static int |
PROPDEC
Token types.
|
static int |
PROPINC
Token types.
|
static int |
RB
Token types.
|
static int |
RC
Token types.
|
static int |
REGEXP
Token types.
|
static int |
RELOP
Token types.
|
static int |
RESERVED
Token types.
|
static int |
RETRY_TOKEN
Token types.
|
static int |
RETSUB
Token types.
|
static int |
RETURN
Token types.
|
static int |
RSH
Token types.
|
static int |
SCOPE
Token types.
|
static int |
SCRIPT
Token types.
|
static int |
SEMI
Token types.
|
static int |
SETELEM
Token types.
|
static int |
SETNAME
Token types.
|
static int |
SETPARENT
Token types.
|
static int |
SETPROP
Token types.
|
static int |
SETPROTO
Token types.
|
static int |
SETVAR
Token types.
|
static int |
SHEQ
Token types.
|
static int |
SHNE
Token types.
|
static int |
SHOP
Token types.
|
static int |
STRING
Token types.
|
static int |
SUB
Token types.
|
static int |
SWITCH
Token types.
|
static int |
TARGET
Token types.
|
static int |
THIS
Token types.
|
static int |
THISFN
Token types.
|
static int |
THROW
Token types.
|
static int |
TRUE
Token types.
|
static int |
TRY
Token types.
|
static int |
TYPEOF
Token types.
|
static int |
TYPEOFNAME
Token types.
|
static int |
UNARYOP
Token types.
|
static int |
UNDEFINED
Token types.
|
static int |
URSH
Token types.
|
static int |
USELOCAL
Token types.
|
static int |
USETEMP
Token types.
|
static int |
VAR
Token types.
|
static int |
VARDEC
Token types.
|
static int |
VARINC
Token types.
|
static int |
VOID
Token types.
|
static int |
WHILE
Token types.
|
static int |
WITH
Token types.
|
static int |
ZERO
Token types.
|
Constructor and Description |
---|
TokenStream(Reader in,
String sourceName,
int lineno) |
Modifier and Type | Method and Description |
---|---|
void |
clearPushback() |
boolean |
eof() |
String |
getLine() |
int |
getLineno() |
double |
getNumber() |
int |
getOffset() |
int |
getOp() |
String |
getSourceName() |
String |
getString() |
int |
getToken() |
int |
getTokenno() |
static boolean |
isJSIdentifier(String s) |
static boolean |
isJSKeyword(String s) |
static boolean |
isJSLineTerminator(int c) |
static boolean |
isJSSpace(int c) |
boolean |
matchToken(int toMatch) |
int |
peekToken() |
int |
peekTokenSameLine() |
void |
reportSyntaxError(String messageProperty,
Object[] args) |
static String |
tokenToName(int token) |
String |
tokenToString(int token) |
void |
ungetToken(int tt) |
public static final int ERROR
public static final int EOF
public static final int EOL
public static final int POPV
public static final int ENTERWITH
public static final int LEAVEWITH
public static final int RETURN
public static final int GOTO
public static final int IFEQ
public static final int IFNE
public static final int DUP
public static final int SETNAME
public static final int BITOR
public static final int BITXOR
public static final int BITAND
public static final int EQ
public static final int NE
public static final int LT
public static final int LE
public static final int GT
public static final int GE
public static final int LSH
public static final int RSH
public static final int URSH
public static final int ADD
public static final int SUB
public static final int MUL
public static final int DIV
public static final int MOD
public static final int BITNOT
public static final int NEG
public static final int NEW
public static final int DELPROP
public static final int TYPEOF
public static final int NAMEINC
public static final int PROPINC
public static final int ELEMINC
public static final int NAMEDEC
public static final int PROPDEC
public static final int ELEMDEC
public static final int GETPROP
public static final int SETPROP
public static final int GETELEM
public static final int SETELEM
public static final int CALL
public static final int NAME
public static final int NUMBER
public static final int STRING
public static final int ZERO
public static final int ONE
public static final int NULL
public static final int THIS
public static final int FALSE
public static final int TRUE
public static final int SHEQ
public static final int SHNE
public static final int CLOSURE
public static final int REGEXP
public static final int POP
public static final int POS
public static final int VARINC
public static final int VARDEC
public static final int BINDNAME
public static final int THROW
public static final int IN
public static final int INSTANCEOF
public static final int GOSUB
public static final int RETSUB
public static final int CALLSPECIAL
public static final int GETTHIS
public static final int NEWTEMP
public static final int USETEMP
public static final int GETBASE
public static final int GETVAR
public static final int SETVAR
public static final int UNDEFINED
public static final int TRY
public static final int ENDTRY
public static final int NEWSCOPE
public static final int TYPEOFNAME
public static final int ENUMINIT
public static final int ENUMNEXT
public static final int GETPROTO
public static final int GETPARENT
public static final int SETPROTO
public static final int SETPARENT
public static final int SCOPE
public static final int GETSCOPEPARENT
public static final int THISFN
public static final int JTHROW
public static final int SEMI
public static final int LB
public static final int RB
public static final int LC
public static final int RC
public static final int LP
public static final int GWT
public static final int COMMA
public static final int ASSIGN
public static final int HOOK
public static final int COLON
public static final int OR
public static final int AND
public static final int EQOP
public static final int RELOP
public static final int SHOP
public static final int UNARYOP
public static final int INC
public static final int DEC
public static final int DOT
public static final int PRIMARY
public static final int FUNCTION
public static final int EXPORT
public static final int IMPORT
public static final int IF
public static final int ELSE
public static final int SWITCH
public static final int CASE
public static final int DEFAULT
public static final int WHILE
public static final int DO
public static final int FOR
public static final int BREAK
public static final int CONTINUE
public static final int VAR
public static final int WITH
public static final int CATCH
public static final int FINALLY
public static final int RESERVED
public static final int NOP
public static final int NOT
public static final int PRE
public static final int POST
public static final int VOID
public static final int BLOCK
public static final int ARRAYLIT
public static final int OBJLIT
public static final int LABEL
public static final int TARGET
public static final int LOOP
public static final int ENUMDONE
public static final int EXPRSTMT
public static final int PARENT
public static final int CONVERT
public static final int JSR
public static final int NEWLOCAL
public static final int USELOCAL
public static final int DEBUGGER
public static final int SCRIPT
public static final int LAST_TOKEN
public static final int RETRY_TOKEN
public static String tokenToName(int token)
public String tokenToString(int token)
public boolean matchToken(int toMatch) throws IOException
IOException
public void clearPushback()
public void ungetToken(int tt)
public int peekToken() throws IOException
IOException
public int peekTokenSameLine() throws IOException
IOException
public static boolean isJSKeyword(String s)
public static boolean isJSIdentifier(String s)
public static boolean isJSSpace(int c)
public static boolean isJSLineTerminator(int c)
public int getToken() throws IOException
IOException
public String getSourceName()
public int getLineno()
public int getOp()
public String getString()
public double getNumber()
public String getLine()
public int getOffset()
public int getTokenno()
public boolean eof()
Copyright © 2018. All rights reserved.