org.python.parser
Class PythonGrammar

java.lang.Object
  extended byorg.python.parser.PythonGrammar
All Implemented Interfaces:
PythonGrammarConstants, PythonGrammarTreeConstants

public class PythonGrammar
extends Object
implements PythonGrammarTreeConstants, PythonGrammarConstants


Field Summary
 Token jj_nt
           
 boolean lookingAhead
           
 Token token
           
 PythonGrammarTokenManager token_source
           
 
Fields inherited from interface org.python.parser.PythonGrammarTreeConstants
JJTADD_2OP, JJTAND_2OP, JJTAND_BOOLEAN, JJTARGLIST, JJTASSERT_STMT, JJTAUG_AND, JJTAUG_DIVIDE, JJTAUG_LSHIFT, JJTAUG_MINUS, JJTAUG_MODULO, JJTAUG_MULTIPLY, JJTAUG_OR, JJTAUG_PLUS, JJTAUG_POWER, JJTAUG_RSHIFT, JJTAUG_XOR, JJTBIDIREDGE, JJTBREAK_STMT, JJTCALL_OP, JJTCLASSDEF, JJTCOLON, JJTCOMMA, JJTCOMPARISION, JJTCOMPLEX, JJTCONTINUE_STMT, JJTDEFAULTARG, JJTDEL_STMT, JJTDICTIONARY, JJTDIV_2OP, JJTDOT_OP, JJTDOTTED_AS_NAME, JJTDOTTED_NAME, JJTELLIPSES, JJTEQUAL_CMP, JJTEVAL_INPUT, JJTEXCEPT_CLAUSE, JJTEXEC_STMT, JJTEXPR_STMT, JJTEXTRAARGLIST, JJTEXTRAARGVALUELIST, JJTEXTRAKEYWORDLIST, JJTEXTRAKEYWORDVALUELIST, JJTFILE_INPUT, JJTFLOAT, JJTFOR_STMT, JJTFPLIST, JJTFUNCDEF, JJTGLOBAL_STMT, JJTGREATER_CMP, JJTGREATER_EQUAL_CMP, JJTIF_STMT, JJTIMPORT, JJTIMPORT_AS_NAME, JJTIMPORTFROM, JJTIN_CMP, JJTINDEX_OP, JJTINT, JJTINVERT_1OP, JJTIS_CMP, JJTIS_NOT_CMP, JJTKEYWORD, JJTLAMBDEF, JJTLEFTDIREDGE, JJTLESS_CMP, JJTLESS_EQUAL_CMP, JJTLIKE, JJTLIST, JJTLIST_ITER, JJTLSHIFT_2OP, JJTMOD_2OP, JJTMUL_2OP, JJTNAME, JJTNEG_1OP, jjtNodeName, JJTNOT_1OP, JJTNOT_IN_CMP, JJTNOTEQUAL_CMP, JJTOR_2OP, JJTOR_BOOLEAN, JJTPASS_STMT, JJTPOS_1OP, JJTPOW_2OP, JJTPRINT_EXT, JJTPRINT_STMT, JJTQUESTIONM, JJTRAISE_STMT, JJTRCONTAINED, JJTRCONTAINS, JJTRETURN_STMT, JJTREXACT, JJTRIGHTDIREDGE, JJTROVERLAPS, JJTRSHIFT_2OP, JJTSINGLE_INPUT, JJTSLICE, JJTSTR_1OP, JJTSTRING, JJTSTRJOIN, JJTSUB_2OP, JJTSUITE, JJTTRY_STMT, JJTTUPLE, JJTVARARGSLIST, JJTVOID, JJTWHILE_STMT, JJTXOR_2OP
 
Fields inherited from interface org.python.parser.PythonGrammarConstants
AND, AND_BOOL, ANDEQ, AS, ASSERT, BIDIREDGE, BREAK, CLASS, COLON, COMMA, CONTINUATION, CONTINUE, CRLF1, DECNUMBER, DEDENT, DEF, DEFAULT, DEL, DIGIT, DIVIDE, DIVIDEEQ, DOT, ELIF, ELSE, EOF, EQEQUAL, EQGREATER, EQLESS, EQUAL, EXCEPT, EXEC, EXPONENT, FINALLY, FLOAT, FOR, FORCE_NEWLINE, FORCE_NEWLINE1, FORCE_NEWLINE2, FROM, GLOBAL, GREATER, HEXNUMBER, IF, IMPORT, IN, IN_STRING11, IN_STRING13, IN_STRING21, IN_STRING23, INDENT, INDENTATION_UNCHANGED, INDENTING, IS, LAMBDA, LBRACE, LBRACKET, LEFTDIREDGE, LESS, LESSGREATER, LETTER, LIKE, LPAREN, LSHIFT, LSHIFTEQ, MINUS, MINUSEQ, MODULO, MODULOEQ, MULTIPLY, MULTIPLYEQ, NAME, NEWLINE, NEWLINE1, NEWLINE2, NEWLINE3, NOT, NOT_BOOL, NOTEQUAL, OCTNUMBER, OR, OR_BOOL, OREQ, PASS, PLUS, PLUSEQ, POWER, POWEREQ, PRINT, QUESTIONM, RAISE, RBRACE, RBRACKET, RCONTAINED, RCONTAINS, RETURN, REXACT, RIGHTDIREDGE, ROVERLAPS, RPAREN, RSHIFT, RSHIFTEQ, SEMICOLON, SINGLE_LINE_COMMENT, SINGLE_STRING, SINGLE_STRING2, SPACE, tokenImage, TRAILING_COMMENT, TRIPLE_STRING, TRIPLE_STRING2, TRY, UNREACHABLE, WHILE, XOR, XOREQ
 
Constructor Summary
PythonGrammar(CharStream stream)
           
PythonGrammar(PythonGrammarTokenManager tm)
           
 
Method Summary
 void and_expr()
           
 void and_test()
           
 void AnyName()
           
 void arglist()
           
 void argument()
           
 void arith_expr()
           
 void assert_stmt()
           
 void atom()
           
 void atomtrailer()
           
 void classdef()
           
 void Colon()
           
 void Comma()
           
 void comp_op()
           
 void comparison()
           
 void Complex()
           
 void compound_stmt()
           
 void defaultarg()
           
 void del_stmt()
           
 void dictmaker()
           
 void disable_tracing()
           
 void dotted_as_name()
           
 void dotted_name()
           
 void enable_tracing()
           
 SimpleNode eval_input()
           
 void except_clause()
           
 void exec_stmt()
           
 void expr_stmt()
           
 void expr()
           
 void exprlist()
           
 void ExtraArgList()
           
 void ExtraArgValueList()
           
 void ExtraKeywordList()
           
 void ExtraKeywordValueList()
           
 void factor()
           
 SimpleNode file_input()
           
 void flow_stmt()
           
 void for_stmt()
           
 void fpdef()
           
 void fplist()
           
 void funcdef()
           
 ParseException generateParseException()
           
 Token getNextToken()
           
 Token getToken(int index)
           
 void global_stmt()
           
 void if_stmt()
           
 void import_as_name()
           
 void import_stmt()
           
 void Import()
           
 void ImportFrom()
           
 void lambdef()
           
 void list_for()
           
 void list_if()
           
 void list_iter()
           
 void listmaker()
           
 void Name()
           
 void normalargs()
           
 void not_test()
           
 void Number()
           
 void parameters()
           
 void pass_stmt()
           
 void power()
           
 void print_stmt()
           
 void raise_stmt()
           
 void ReInit(CharStream stream)
           
 void ReInit(PythonGrammarTokenManager tm)
           
 void return_stmt()
           
 void shift_expr()
           
 void simple_stmt()
           
 SimpleNode single_input()
           
 void slice()
           
 void small_stmt()
           
 void SmartTestList()
           
 void stmt()
           
 void String()
           
 void subscript()
           
 void subscriptlist()
           
 void suite()
           
 void term()
           
 void test()
           
 void testlist()
           
 void try_stmt()
           
 void varargslist()
           
 void while_stmt()
           
 void xor_expr()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

token_source

public PythonGrammarTokenManager token_source

token

public Token token

jj_nt

public Token jj_nt

lookingAhead

public boolean lookingAhead
Constructor Detail

PythonGrammar

public PythonGrammar(CharStream stream)

PythonGrammar

public PythonGrammar(PythonGrammarTokenManager tm)
Method Detail

single_input

public final SimpleNode single_input()
                              throws ParseException
Throws:
ParseException

file_input

public final SimpleNode file_input()
                            throws ParseException
Throws:
ParseException

eval_input

public final SimpleNode eval_input()
                            throws ParseException
Throws:
ParseException

funcdef

public final void funcdef()
                   throws ParseException
Throws:
ParseException

parameters

public final void parameters()
                      throws ParseException
Throws:
ParseException

varargslist

public final void varargslist()
                       throws ParseException
Throws:
ParseException

ExtraArgList

public final void ExtraArgList()
                        throws ParseException
Throws:
ParseException

ExtraKeywordList

public final void ExtraKeywordList()
                            throws ParseException
Throws:
ParseException

defaultarg

public final void defaultarg()
                      throws ParseException
Throws:
ParseException

fpdef

public final void fpdef()
                 throws ParseException
Throws:
ParseException

fplist

public final void fplist()
                  throws ParseException
Throws:
ParseException

stmt

public final void stmt()
                throws ParseException
Throws:
ParseException

simple_stmt

public final void simple_stmt()
                       throws ParseException
Throws:
ParseException

small_stmt

public final void small_stmt()
                      throws ParseException
Throws:
ParseException

expr_stmt

public final void expr_stmt()
                     throws ParseException
Throws:
ParseException

print_stmt

public final void print_stmt()
                      throws ParseException
Throws:
ParseException

del_stmt

public final void del_stmt()
                    throws ParseException
Throws:
ParseException

pass_stmt

public final void pass_stmt()
                     throws ParseException
Throws:
ParseException

flow_stmt

public final void flow_stmt()
                     throws ParseException
Throws:
ParseException

return_stmt

public final void return_stmt()
                       throws ParseException
Throws:
ParseException

raise_stmt

public final void raise_stmt()
                      throws ParseException
Throws:
ParseException

import_stmt

public final void import_stmt()
                       throws ParseException
Throws:
ParseException

Import

public final void Import()
                  throws ParseException
Throws:
ParseException

ImportFrom

public final void ImportFrom()
                      throws ParseException
Throws:
ParseException

dotted_as_name

public final void dotted_as_name()
                          throws ParseException
Throws:
ParseException

dotted_name

public final void dotted_name()
                       throws ParseException
Throws:
ParseException

import_as_name

public final void import_as_name()
                          throws ParseException
Throws:
ParseException

global_stmt

public final void global_stmt()
                       throws ParseException
Throws:
ParseException

exec_stmt

public final void exec_stmt()
                     throws ParseException
Throws:
ParseException

assert_stmt

public final void assert_stmt()
                       throws ParseException
Throws:
ParseException

compound_stmt

public final void compound_stmt()
                         throws ParseException
Throws:
ParseException

if_stmt

public final void if_stmt()
                   throws ParseException
Throws:
ParseException

while_stmt

public final void while_stmt()
                      throws ParseException
Throws:
ParseException

for_stmt

public final void for_stmt()
                    throws ParseException
Throws:
ParseException

try_stmt

public final void try_stmt()
                    throws ParseException
Throws:
ParseException

except_clause

public final void except_clause()
                         throws ParseException
Throws:
ParseException

suite

public final void suite()
                 throws ParseException
Throws:
ParseException

test

public final void test()
                throws ParseException
Throws:
ParseException

and_test

public final void and_test()
                    throws ParseException
Throws:
ParseException

not_test

public final void not_test()
                    throws ParseException
Throws:
ParseException

comparison

public final void comparison()
                      throws ParseException
Throws:
ParseException

comp_op

public final void comp_op()
                   throws ParseException
Throws:
ParseException

expr

public final void expr()
                throws ParseException
Throws:
ParseException

xor_expr

public final void xor_expr()
                    throws ParseException
Throws:
ParseException

and_expr

public final void and_expr()
                    throws ParseException
Throws:
ParseException

shift_expr

public final void shift_expr()
                      throws ParseException
Throws:
ParseException

arith_expr

public final void arith_expr()
                      throws ParseException
Throws:
ParseException

term

public final void term()
                throws ParseException
Throws:
ParseException

factor

public final void factor()
                  throws ParseException
Throws:
ParseException

power

public final void power()
                 throws ParseException
Throws:
ParseException

atomtrailer

public final void atomtrailer()
                       throws ParseException
Throws:
ParseException

atom

public final void atom()
                throws ParseException
Throws:
ParseException

lambdef

public final void lambdef()
                   throws ParseException
Throws:
ParseException

subscriptlist

public final void subscriptlist()
                         throws ParseException
Throws:
ParseException

subscript

public final void subscript()
                     throws ParseException
Throws:
ParseException

slice

public final void slice()
                 throws ParseException
Throws:
ParseException

Colon

public final void Colon()
                 throws ParseException
Throws:
ParseException

Comma

public final void Comma()
                 throws ParseException
Throws:
ParseException

exprlist

public final void exprlist()
                    throws ParseException
Throws:
ParseException

SmartTestList

public final void SmartTestList()
                         throws ParseException
Throws:
ParseException

testlist

public final void testlist()
                    throws ParseException
Throws:
ParseException

dictmaker

public final void dictmaker()
                     throws ParseException
Throws:
ParseException

listmaker

public final void listmaker()
                     throws ParseException
Throws:
ParseException

list_iter

public final void list_iter()
                     throws ParseException
Throws:
ParseException

list_for

public final void list_for()
                    throws ParseException
Throws:
ParseException

list_if

public final void list_if()
                   throws ParseException
Throws:
ParseException

classdef

public final void classdef()
                    throws ParseException
Throws:
ParseException

arglist

public final void arglist()
                   throws ParseException
Throws:
ParseException

normalargs

public final void normalargs()
                      throws ParseException
Throws:
ParseException

ExtraArgValueList

public final void ExtraArgValueList()
                             throws ParseException
Throws:
ParseException

ExtraKeywordValueList

public final void ExtraKeywordValueList()
                                 throws ParseException
Throws:
ParseException

argument

public final void argument()
                    throws ParseException
Throws:
ParseException

Number

public final void Number()
                  throws ParseException
Throws:
ParseException

Complex

public final void Complex()
                   throws ParseException
Throws:
ParseException

Name

public final void Name()
                throws ParseException
Throws:
ParseException

String

public final void String()
                  throws ParseException
Throws:
ParseException

AnyName

public final void AnyName()
                   throws ParseException
Throws:
ParseException

ReInit

public void ReInit(CharStream stream)

ReInit

public void ReInit(PythonGrammarTokenManager tm)

getNextToken

public final Token getNextToken()

getToken

public final Token getToken(int index)

generateParseException

public ParseException generateParseException()

enable_tracing

public final void enable_tracing()

disable_tracing

public final void disable_tracing()