Class PythonTokenKinds
- java.lang.Object
-
- net.sourceforge.pmd.lang.python.ast.PythonTokenKinds
-
@InternalApi @Generated("org.javacc.javacc") public final class PythonTokenKinds extends Object
Token kinds (JavaccToken.kind) for this language.
-
-
Field Summary
Fields Modifier and Type Field Description static intANDstatic intAND_BOOLstatic intANDEQstatic intASstatic intASSERTstatic intATstatic intBACKTICKstatic intBINNUMBERstatic intBREAKstatic intCLASSstatic intCOLONstatic intCOMMAstatic intCOMPLEXstatic intCONTINUATIONstatic intCONTINUEstatic intDECNUMBERstatic intDEFstatic intDELstatic intDIGITstatic intDIVIDEstatic intDIVIDEEQstatic intDOTstatic intELIFstatic intELSEstatic intEOFstatic intEQEQUALstatic intEQGREATERstatic intEQLESSstatic intEQUALstatic intEXCEPTstatic intEXECstatic intEXPONENTstatic intFINALLYstatic intFLOATstatic intFLOORDIVIDEstatic intFLOORDIVIDEEQstatic intFORstatic intFROMstatic intGLOBALstatic intGREATERstatic intHEXNUMBERstatic intIFstatic intIMPORTstatic intINstatic intISstatic intLAMBDAstatic intLBRACEstatic intLBRACKETstatic intLESSstatic intLESSGREATERstatic intLETTERstatic intLPARENstatic intLSHIFTstatic intLSHIFTEQstatic intMINUSstatic intMINUSEQstatic intMODULOstatic intMODULOEQstatic intMULTIPLYstatic intMULTIPLYEQstatic intNAMEstatic intNEWLINEstatic intNOTstatic intNOT_BOOLstatic intNOTEQUALstatic intOCTNUMBERstatic intORstatic intOR_BOOLstatic intOREQstatic intPASSstatic intPLUSstatic intPLUSEQstatic intPOWERstatic intPOWEREQstatic intPRINTstatic intRAISEstatic intRBRACEstatic intRBRACKETstatic intRETURNstatic intRPARENstatic intRSHIFTstatic intRSHIFTEQstatic intSEMICOLONstatic intSINGLE_BSTRINGstatic intSINGLE_BSTRING2static intSINGLE_STRINGstatic intSINGLE_STRING2static intSINGLE_USTRINGstatic intSINGLE_USTRING2static intSPACEstatic List<String>TOKEN_NAMESNams of the tokens, each index corresponds to a kind.static intTRAILING_COMMENTstatic intTRIPLE_BSTRINGstatic intTRIPLE_BSTRING2static intTRIPLE_STRINGstatic intTRIPLE_STRING2static intTRIPLE_USTRINGstatic intTRIPLE_USTRING2static intTRYstatic intWHILEstatic intWITHstatic intXORstatic intXOREQstatic intYIELD
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @Nullable Stringdescribe(int kind)Returns a string describing the given token kind.static TokenManager<JavaccToken>newTokenManager(CharStream cs)Returns a new token manager for this language.
-
-
-
Field Detail
-
EOF
public static final int EOF
- See Also:
- Constant Field Values
-
SPACE
public static final int SPACE
- See Also:
- Constant Field Values
-
CONTINUATION
public static final int CONTINUATION
- See Also:
- Constant Field Values
-
NEWLINE
public static final int NEWLINE
- See Also:
- Constant Field Values
-
TRAILING_COMMENT
public static final int TRAILING_COMMENT
- See Also:
- Constant Field Values
-
LPAREN
public static final int LPAREN
- See Also:
- Constant Field Values
-
RPAREN
public static final int RPAREN
- See Also:
- Constant Field Values
-
LBRACE
public static final int LBRACE
- See Also:
- Constant Field Values
-
RBRACE
public static final int RBRACE
- See Also:
- Constant Field Values
-
LBRACKET
public static final int LBRACKET
- See Also:
- Constant Field Values
-
RBRACKET
public static final int RBRACKET
- See Also:
- Constant Field Values
-
SEMICOLON
public static final int SEMICOLON
- See Also:
- Constant Field Values
-
COMMA
public static final int COMMA
- See Also:
- Constant Field Values
-
DOT
public static final int DOT
- See Also:
- Constant Field Values
-
COLON
public static final int COLON
- See Also:
- Constant Field Values
-
BACKTICK
public static final int BACKTICK
- See Also:
- Constant Field Values
-
PLUS
public static final int PLUS
- See Also:
- Constant Field Values
-
MINUS
public static final int MINUS
- See Also:
- Constant Field Values
-
MULTIPLY
public static final int MULTIPLY
- See Also:
- Constant Field Values
-
DIVIDE
public static final int DIVIDE
- See Also:
- Constant Field Values
-
FLOORDIVIDE
public static final int FLOORDIVIDE
- See Also:
- Constant Field Values
-
POWER
public static final int POWER
- See Also:
- Constant Field Values
-
LSHIFT
public static final int LSHIFT
- See Also:
- Constant Field Values
-
RSHIFT
public static final int RSHIFT
- See Also:
- Constant Field Values
-
MODULO
public static final int MODULO
- See Also:
- Constant Field Values
-
NOT
public static final int NOT
- See Also:
- Constant Field Values
-
XOR
public static final int XOR
- See Also:
- Constant Field Values
-
OR
public static final int OR
- See Also:
- Constant Field Values
-
AND
public static final int AND
- See Also:
- Constant Field Values
-
EQUAL
public static final int EQUAL
- See Also:
- Constant Field Values
-
GREATER
public static final int GREATER
- See Also:
- Constant Field Values
-
LESS
public static final int LESS
- See Also:
- Constant Field Values
-
EQEQUAL
public static final int EQEQUAL
- See Also:
- Constant Field Values
-
EQLESS
public static final int EQLESS
- See Also:
- Constant Field Values
-
EQGREATER
public static final int EQGREATER
- See Also:
- Constant Field Values
-
LESSGREATER
public static final int LESSGREATER
- See Also:
- Constant Field Values
-
NOTEQUAL
public static final int NOTEQUAL
- See Also:
- Constant Field Values
-
PLUSEQ
public static final int PLUSEQ
- See Also:
- Constant Field Values
-
MINUSEQ
public static final int MINUSEQ
- See Also:
- Constant Field Values
-
MULTIPLYEQ
public static final int MULTIPLYEQ
- See Also:
- Constant Field Values
-
DIVIDEEQ
public static final int DIVIDEEQ
- See Also:
- Constant Field Values
-
FLOORDIVIDEEQ
public static final int FLOORDIVIDEEQ
- See Also:
- Constant Field Values
-
MODULOEQ
public static final int MODULOEQ
- See Also:
- Constant Field Values
-
ANDEQ
public static final int ANDEQ
- See Also:
- Constant Field Values
-
OREQ
public static final int OREQ
- See Also:
- Constant Field Values
-
XOREQ
public static final int XOREQ
- See Also:
- Constant Field Values
-
LSHIFTEQ
public static final int LSHIFTEQ
- See Also:
- Constant Field Values
-
RSHIFTEQ
public static final int RSHIFTEQ
- See Also:
- Constant Field Values
-
POWEREQ
public static final int POWEREQ
- See Also:
- Constant Field Values
-
OR_BOOL
public static final int OR_BOOL
- See Also:
- Constant Field Values
-
AND_BOOL
public static final int AND_BOOL
- See Also:
- Constant Field Values
-
NOT_BOOL
public static final int NOT_BOOL
- See Also:
- Constant Field Values
-
IS
public static final int IS
- See Also:
- Constant Field Values
-
IN
public static final int IN
- See Also:
- Constant Field Values
-
LAMBDA
public static final int LAMBDA
- See Also:
- Constant Field Values
-
IF
public static final int IF
- See Also:
- Constant Field Values
-
ELSE
public static final int ELSE
- See Also:
- Constant Field Values
-
ELIF
public static final int ELIF
- See Also:
- Constant Field Values
-
WHILE
public static final int WHILE
- See Also:
- Constant Field Values
-
FOR
public static final int FOR
- See Also:
- Constant Field Values
-
TRY
public static final int TRY
- See Also:
- Constant Field Values
-
EXCEPT
public static final int EXCEPT
- See Also:
- Constant Field Values
-
DEF
public static final int DEF
- See Also:
- Constant Field Values
-
CLASS
public static final int CLASS
- See Also:
- Constant Field Values
-
FINALLY
public static final int FINALLY
- See Also:
- Constant Field Values
-
PRINT
public static final int PRINT
- See Also:
- Constant Field Values
-
PASS
public static final int PASS
- See Also:
- Constant Field Values
-
BREAK
public static final int BREAK
- See Also:
- Constant Field Values
-
CONTINUE
public static final int CONTINUE
- See Also:
- Constant Field Values
-
RETURN
public static final int RETURN
- See Also:
- Constant Field Values
-
YIELD
public static final int YIELD
- See Also:
- Constant Field Values
-
IMPORT
public static final int IMPORT
- See Also:
- Constant Field Values
-
FROM
public static final int FROM
- See Also:
- Constant Field Values
-
DEL
public static final int DEL
- See Also:
- Constant Field Values
-
RAISE
public static final int RAISE
- See Also:
- Constant Field Values
-
GLOBAL
public static final int GLOBAL
- See Also:
- Constant Field Values
-
EXEC
public static final int EXEC
- See Also:
- Constant Field Values
-
ASSERT
public static final int ASSERT
- See Also:
- Constant Field Values
-
AS
public static final int AS
- See Also:
- Constant Field Values
-
WITH
public static final int WITH
- See Also:
- Constant Field Values
-
AT
public static final int AT
- See Also:
- Constant Field Values
-
NAME
public static final int NAME
- See Also:
- Constant Field Values
-
LETTER
public static final int LETTER
- See Also:
- Constant Field Values
-
DECNUMBER
public static final int DECNUMBER
- See Also:
- Constant Field Values
-
HEXNUMBER
public static final int HEXNUMBER
- See Also:
- Constant Field Values
-
OCTNUMBER
public static final int OCTNUMBER
- See Also:
- Constant Field Values
-
BINNUMBER
public static final int BINNUMBER
- See Also:
- Constant Field Values
-
FLOAT
public static final int FLOAT
- See Also:
- Constant Field Values
-
COMPLEX
public static final int COMPLEX
- See Also:
- Constant Field Values
-
EXPONENT
public static final int EXPONENT
- See Also:
- Constant Field Values
-
DIGIT
public static final int DIGIT
- See Also:
- Constant Field Values
-
SINGLE_STRING
public static final int SINGLE_STRING
- See Also:
- Constant Field Values
-
SINGLE_STRING2
public static final int SINGLE_STRING2
- See Also:
- Constant Field Values
-
TRIPLE_STRING
public static final int TRIPLE_STRING
- See Also:
- Constant Field Values
-
TRIPLE_STRING2
public static final int TRIPLE_STRING2
- See Also:
- Constant Field Values
-
SINGLE_BSTRING
public static final int SINGLE_BSTRING
- See Also:
- Constant Field Values
-
SINGLE_BSTRING2
public static final int SINGLE_BSTRING2
- See Also:
- Constant Field Values
-
TRIPLE_BSTRING
public static final int TRIPLE_BSTRING
- See Also:
- Constant Field Values
-
TRIPLE_BSTRING2
public static final int TRIPLE_BSTRING2
- See Also:
- Constant Field Values
-
SINGLE_USTRING
public static final int SINGLE_USTRING
- See Also:
- Constant Field Values
-
SINGLE_USTRING2
public static final int SINGLE_USTRING2
- See Also:
- Constant Field Values
-
TRIPLE_USTRING
public static final int TRIPLE_USTRING
- See Also:
- Constant Field Values
-
TRIPLE_USTRING2
public static final int TRIPLE_USTRING2
- See Also:
- Constant Field Values
-
TOKEN_NAMES
public static final List<String> TOKEN_NAMES
Nams of the tokens, each index corresponds to a kind. See alsodescribe(int).
-
-
Method Detail
-
describe
public static @Nullable String describe(int kind)
Returns a string describing the given token kind. Returns null if the kind is unknown.- Parameters:
kind- Kind of token- Returns:
- A string describing the given kind
-
newTokenManager
@InternalApi public static TokenManager<JavaccToken> newTokenManager(CharStream cs)
Returns a new token manager for this language. The CharStream should be configured with the correct language-specific escaping and token document. This is not a published API, it's intended to be used as a basis for a CPD Tokenizer.
-
-