diff --git a/plugins/org.python.pydev.ast/src/org/python/pydev/ast/adapters/context/AbstractContextVisitor.java b/plugins/org.python.pydev.ast/src/org/python/pydev/ast/adapters/context/AbstractContextVisitor.java index 8ec7cc97b4..09205a2842 100644 --- a/plugins/org.python.pydev.ast/src/org/python/pydev/ast/adapters/context/AbstractContextVisitor.java +++ b/plugins/org.python.pydev.ast/src/org/python/pydev/ast/adapters/context/AbstractContextVisitor.java @@ -14,12 +14,12 @@ * Contributors: * Fabio Zadrozny - initial implementation ******************************************************************************/ -/* +/* * Copyright (C) 2006, 2007 Dennis Hunziker, Ueli Kistler * Copyright (C) 2007 Reto Schuettel, Robin Stocker * * IFS Institute for Software, HSR Rapperswil, Switzerland - * + * */ package org.python.pydev.ast.adapters.context; @@ -162,6 +162,9 @@ public void traverse(FunctionDef node) throws Exception { visit(node.decs); } visit(node.name); + if (node.type_params != null) { + visit(node.type_params); + } visit(node.args); visit(node.body); } diff --git a/plugins/org.python.pydev.ast/src/org/python/pydev/ast/adapters/visitors/FindDuplicatesVisitor.java b/plugins/org.python.pydev.ast/src/org/python/pydev/ast/adapters/visitors/FindDuplicatesVisitor.java index 3cbde8189f..fd0742387f 100644 --- a/plugins/org.python.pydev.ast/src/org/python/pydev/ast/adapters/visitors/FindDuplicatesVisitor.java +++ b/plugins/org.python.pydev.ast/src/org/python/pydev/ast/adapters/visitors/FindDuplicatesVisitor.java @@ -61,6 +61,7 @@ import org.python.pydev.parser.jython.ast.NamedExpr; import org.python.pydev.parser.jython.ast.NonLocal; import org.python.pydev.parser.jython.ast.Num; +import org.python.pydev.parser.jython.ast.ParamSpec; import org.python.pydev.parser.jython.ast.Pass; import org.python.pydev.parser.jython.ast.Print; import org.python.pydev.parser.jython.ast.Raise; @@ -76,6 +77,9 @@ import org.python.pydev.parser.jython.ast.Suite; import org.python.pydev.parser.jython.ast.TryExcept; import org.python.pydev.parser.jython.ast.TryFinally; +import org.python.pydev.parser.jython.ast.TypeParamsSuite; +import org.python.pydev.parser.jython.ast.TypeVar; +import org.python.pydev.parser.jython.ast.TypeVarTuple; import org.python.pydev.parser.jython.ast.UnaryOp; import org.python.pydev.parser.jython.ast.VisitorIF; import org.python.pydev.parser.jython.ast.While; @@ -846,4 +850,40 @@ public Object visitMatchKeyVal(MatchKeyVal node) throws Exception { } return null; } + + @Override + public Object visitTypeVar(TypeVar node) throws Exception { + boolean ret = unhandled_node(node); + if (ret) { + traverse(node); + } + return null; + } + + @Override + public Object visitParamSpec(ParamSpec node) throws Exception { + boolean ret = unhandled_node(node); + if (ret) { + traverse(node); + } + return null; + } + + @Override + public Object visitTypeVarTuple(TypeVarTuple node) throws Exception { + boolean ret = unhandled_node(node); + if (ret) { + traverse(node); + } + return null; + } + + @Override + public Object visitTypeParamsSuite(TypeParamsSuite node) throws Exception { + boolean ret = unhandled_node(node); + if (ret) { + traverse(node); + } + return null; + } } diff --git a/plugins/org.python.pydev.ast/src/org/python/pydev/ast/adapters/visitors/selection/SelectionExtenderVisitor.java b/plugins/org.python.pydev.ast/src/org/python/pydev/ast/adapters/visitors/selection/SelectionExtenderVisitor.java index e53eca3884..c85d39418c 100644 --- a/plugins/org.python.pydev.ast/src/org/python/pydev/ast/adapters/visitors/selection/SelectionExtenderVisitor.java +++ b/plugins/org.python.pydev.ast/src/org/python/pydev/ast/adapters/visitors/selection/SelectionExtenderVisitor.java @@ -306,6 +306,9 @@ private Object visitAliasType(aliasType node) throws Exception { @Override public Object visitFunctionDef(FunctionDef node) throws Exception { visit(node.name); + if (node.type_params != null) { + visit(node.type_params); + } visit(node.args); visit(node.body); extendLast(node); @@ -316,6 +319,9 @@ public Object visitFunctionDef(FunctionDef node) throws Exception { @Override public Object visitClassDef(ClassDef node) throws Exception { visit(node.name); + if (node.type_params != null) { + node.type_params.accept(this); + } visit(node.bases); visit(node.body); extendLast(node); diff --git a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/fastparser/FastDefinitionsParser.java b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/fastparser/FastDefinitionsParser.java index d1fcc43fe5..9232063087 100644 --- a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/fastparser/FastDefinitionsParser.java +++ b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/fastparser/FastDefinitionsParser.java @@ -587,7 +587,8 @@ private void startClass(String name, int startClassRow, int startClassCol, int n nameTok.beginLine = startClassRow; nameTok.beginColumn = nameCol; - ClassDef classDef = new ClassDef(nameTok, null, null, null, null, null, null); + ClassDef classDef = new ClassDef(nameTok, null, null, null, null, null, null, + null); classDef.beginLine = startClassRow; classDef.beginColumn = startClassCol; diff --git a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/fastparser/FastParser.java b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/fastparser/FastParser.java index 436f159123..cf702e9e08 100644 --- a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/fastparser/FastParser.java +++ b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/fastparser/FastParser.java @@ -336,7 +336,8 @@ private FunctionDef createFunctionDef(int lastReturnedLine, NameTok nameTok, int } private ClassDef createClassDef(int lastReturnedLine, NameTok nameTok, int matchedCol) { - ClassDef classDef = new ClassDef(nameTok, PyAstFactory.EMPTY_EXPR_TYPE, PyAstFactory.EMPTY_STMT_TYPE, null, + ClassDef classDef = new ClassDef(nameTok, null, PyAstFactory.EMPTY_EXPR_TYPE, + PyAstFactory.EMPTY_STMT_TYPE, null, null, null, null); classDef.beginLine = lastReturnedLine + 1; diff --git a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar30/TreeBuilder30.java b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar30/TreeBuilder30.java index 6087da342e..8339005a7f 100644 --- a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar30/TreeBuilder30.java +++ b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar30/TreeBuilder30.java @@ -266,7 +266,7 @@ public final SimpleNode onCloseNode(SimpleNode n, int arity) throws Exception { exprType[] bases = makeExprs(nodeArity); nameTok = makeNameTok(NameTok.ClassName); //decorator is always null at this point... it's decorated later on - ClassDef classDef = new ClassDef(nameTok, bases, body, null, + ClassDef classDef = new ClassDef(nameTok, null, bases, body, null, classDefKeywords.toArray(new keywordType[classDefKeywords.size()]), starargs, kwargs); addSpecialsAndClearOriginal(suite, classDef); diff --git a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar310/TreeBuilder310.java b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar310/TreeBuilder310.java index 7111487bec..f43df36764 100644 --- a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar310/TreeBuilder310.java +++ b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar310/TreeBuilder310.java @@ -283,7 +283,7 @@ public final SimpleNode onCloseNode(SimpleNode n, int arity) throws Exception { exprType[] bases = makeExprs(nodeArity); nameTok = makeNameTok(NameTok.ClassName); //decorator is always null at this point... it's decorated later on - ClassDef classDef = new ClassDef(nameTok, bases, body, null, + ClassDef classDef = new ClassDef(nameTok, null, bases, body, null, classDefKeywords.toArray(new keywordType[classDefKeywords.size()]), starargs, kwargs); addSpecialsAndClearOriginal(suite, classDef); diff --git a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar311/TreeBuilder311.java b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar311/TreeBuilder311.java index 6f43a47819..010c33c07f 100644 --- a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar311/TreeBuilder311.java +++ b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar311/TreeBuilder311.java @@ -283,7 +283,7 @@ public final SimpleNode onCloseNode(SimpleNode n, int arity) throws Exception { exprType[] bases = makeExprs(nodeArity); nameTok = makeNameTok(NameTok.ClassName); //decorator is always null at this point... it's decorated later on - ClassDef classDef = new ClassDef(nameTok, bases, body, null, + ClassDef classDef = new ClassDef(nameTok, null, bases, body, null, classDefKeywords.toArray(new keywordType[classDefKeywords.size()]), starargs, kwargs); addSpecialsAndClearOriginal(suite, classDef); diff --git a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar311/grammar310 b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar311/grammar310 deleted file mode 100644 index 21f7e1a891..0000000000 --- a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar311/grammar310 +++ /dev/null @@ -1,207 +0,0 @@ -# Grammar for Python - -# NOTE WELL: You should also follow all the steps listed at -# https://devguide.python.org/grammar/ - -# Start symbols for the grammar: -# single_input is a single interactive statement; -# file_input is a module or sequence of commands read from an input file; -# eval_input is the input for the eval() functions. -# func_type_input is a PEP 484 Python 2 function type comment -# NB: compound_stmt in single_input is followed by extra NEWLINE! -# NB: due to the way TYPE_COMMENT is tokenized it will always be followed by a NEWLINE -single_input: NEWLINE | simple_stmt | compound_stmt NEWLINE -file_input: (NEWLINE | stmt)* ENDMARKER -eval_input: testlist NEWLINE* ENDMARKER - -decorator: '@' dotted_name [ '(' [arglist] ')' ] NEWLINE -decorators: decorator+ -decorated: decorators (classdef | funcdef | async_funcdef) - -async_funcdef: ASYNC funcdef -funcdef: 'def' NAME parameters ['->' test] ':' [TYPE_COMMENT] func_body_suite - -parameters: '(' [typedargslist] ')' - -# The following definition for typedarglist is equivalent to this set of rules: -# -# arguments = argument (',' [TYPE_COMMENT] argument)* -# argument = tfpdef ['=' test] -# kwargs = '**' tfpdef [','] [TYPE_COMMENT] -# args = '*' [tfpdef] -# kwonly_kwargs = (',' [TYPE_COMMENT] argument)* (TYPE_COMMENT | [',' [TYPE_COMMENT] [kwargs]]) -# args_kwonly_kwargs = args kwonly_kwargs | kwargs -# poskeyword_args_kwonly_kwargs = arguments ( TYPE_COMMENT | [',' [TYPE_COMMENT] [args_kwonly_kwargs]]) -# typedargslist_no_posonly = poskeyword_args_kwonly_kwargs | args_kwonly_kwargs -# typedarglist = (arguments ',' [TYPE_COMMENT] '/' [',' [[TYPE_COMMENT] typedargslist_no_posonly]])|(typedargslist_no_posonly)" -# -# It needs to be fully expanded to allow our LL(1) parser to work on it. - -typedargslist: ( - (tfpdef ['=' test] (',' [TYPE_COMMENT] tfpdef ['=' test])* ',' [TYPE_COMMENT] '/' [',' [ [TYPE_COMMENT] tfpdef ['=' test] ( - ',' [TYPE_COMMENT] tfpdef ['=' test])* (TYPE_COMMENT | [',' [TYPE_COMMENT] [ - '*' [tfpdef] (',' [TYPE_COMMENT] tfpdef ['=' test])* (TYPE_COMMENT | [',' [TYPE_COMMENT] ['**' tfpdef [','] [TYPE_COMMENT]]]) - | '**' tfpdef [','] [TYPE_COMMENT]]]) - | '*' [tfpdef] (',' [TYPE_COMMENT] tfpdef ['=' test])* (TYPE_COMMENT | [',' [TYPE_COMMENT] ['**' tfpdef [','] [TYPE_COMMENT]]]) - | '**' tfpdef [','] [TYPE_COMMENT]]] ) -| (tfpdef ['=' test] (',' [TYPE_COMMENT] tfpdef ['=' test])* (TYPE_COMMENT | [',' [TYPE_COMMENT] [ - '*' [tfpdef] (',' [TYPE_COMMENT] tfpdef ['=' test])* (TYPE_COMMENT | [',' [TYPE_COMMENT] ['**' tfpdef [','] [TYPE_COMMENT]]]) - | '**' tfpdef [','] [TYPE_COMMENT]]]) - | '*' [tfpdef] (',' [TYPE_COMMENT] tfpdef ['=' test])* (TYPE_COMMENT | [',' [TYPE_COMMENT] ['**' tfpdef [','] [TYPE_COMMENT]]]) - | '**' tfpdef [','] [TYPE_COMMENT]) -) -tfpdef: NAME [':' test] - -# The following definition for varargslist is equivalent to this set of rules: -# -# arguments = argument (',' argument )* -# argument = vfpdef ['=' test] -# kwargs = '**' vfpdef [','] -# args = '*' [vfpdef] -# kwonly_kwargs = (',' argument )* [',' [kwargs]] -# args_kwonly_kwargs = args kwonly_kwargs | kwargs -# poskeyword_args_kwonly_kwargs = arguments [',' [args_kwonly_kwargs]] -# vararglist_no_posonly = poskeyword_args_kwonly_kwargs | args_kwonly_kwargs -# varargslist = arguments ',' '/' [','[(vararglist_no_posonly)]] | (vararglist_no_posonly) -# -# It needs to be fully expanded to allow our LL(1) parser to work on it. - -varargslist: vfpdef ['=' test ](',' vfpdef ['=' test])* ',' '/' [',' [ (vfpdef ['=' test] (',' vfpdef ['=' test])* [',' [ - '*' [vfpdef] (',' vfpdef ['=' test])* [',' ['**' vfpdef [',']]] - | '**' vfpdef [',']]] - | '*' [vfpdef] (',' vfpdef ['=' test])* [',' ['**' vfpdef [',']]] - | '**' vfpdef [',']) ]] | (vfpdef ['=' test] (',' vfpdef ['=' test])* [',' [ - '*' [vfpdef] (',' vfpdef ['=' test])* [',' ['**' vfpdef [',']]] - | '**' vfpdef [',']]] - | '*' [vfpdef] (',' vfpdef ['=' test])* [',' ['**' vfpdef [',']]] - | '**' vfpdef [','] -) -vfpdef: NAME - -stmt: simple_stmt | compound_stmt -simple_stmt: small_stmt (';' small_stmt)* [';'] NEWLINE -small_stmt: (expr_stmt | del_stmt | pass_stmt | flow_stmt | - import_stmt | global_stmt | nonlocal_stmt | assert_stmt) -expr_stmt: testlist_star_expr (annassign | augassign (yield_expr|testlist) | - [('=' (yield_expr|testlist_star_expr))+ [TYPE_COMMENT]] ) -annassign: ':' test ['=' (yield_expr|testlist_star_expr)] -testlist_star_expr: (test|star_expr) (',' (test|star_expr))* [','] -augassign: ('+=' | '-=' | '*=' | '@=' | '/=' | '%=' | '&=' | '|=' | '^=' | - '<<=' | '>>=' | '**=' | '//=') -# For normal and annotated assignments, additional restrictions enforced by the interpreter -del_stmt: 'del' exprlist -pass_stmt: 'pass' -flow_stmt: break_stmt | continue_stmt | return_stmt | raise_stmt | yield_stmt -break_stmt: 'break' -continue_stmt: 'continue' -return_stmt: 'return' [testlist_star_expr] -yield_stmt: yield_expr -raise_stmt: 'raise' [test ['from' test]] -import_stmt: import_name | import_from -import_name: 'import' dotted_as_names -# note below: the ('.' | '...') is necessary because '...' is tokenized as ELLIPSIS -import_from: ('from' (('.' | '...')* dotted_name | ('.' | '...')+) - 'import' ('*' | '(' import_as_names ')' | import_as_names)) -import_as_name: NAME ['as' NAME] -dotted_as_name: dotted_name ['as' NAME] -import_as_names: import_as_name (',' import_as_name)* [','] -dotted_as_names: dotted_as_name (',' dotted_as_name)* -dotted_name: NAME ('.' NAME)* -global_stmt: 'global' NAME (',' NAME)* -nonlocal_stmt: 'nonlocal' NAME (',' NAME)* -assert_stmt: 'assert' test [',' test] - -compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | with_stmt | funcdef | classdef | decorated | async_stmt -async_stmt: ASYNC (funcdef | with_stmt | for_stmt) -if_stmt: 'if' namedexpr_test ':' suite ('elif' namedexpr_test ':' suite)* ['else' ':' suite] -while_stmt: 'while' namedexpr_test ':' suite ['else' ':' suite] -for_stmt: 'for' exprlist 'in' testlist ':' [TYPE_COMMENT] suite ['else' ':' suite] -try_stmt: ('try' ':' suite - ((except_clause ':' suite)+ - ['else' ':' suite] - ['finally' ':' suite] | - 'finally' ':' suite)) -with_stmt: 'with' with_item (',' with_item)* ':' [TYPE_COMMENT] suite -with_item: test ['as' expr] -# NB compile.c makes sure that the default except clause is last -except_clause: 'except' [test ['as' NAME]] -suite: simple_stmt | NEWLINE INDENT stmt+ DEDENT - -namedexpr_test: test [':=' test] -test: or_test ['if' or_test 'else' test] | lambdef -test_nocond: or_test | lambdef_nocond -lambdef: 'lambda' [varargslist] ':' test -lambdef_nocond: 'lambda' [varargslist] ':' test_nocond -or_test: and_test ('or' and_test)* -and_test: not_test ('and' not_test)* -not_test: 'not' not_test | comparison -comparison: expr (comp_op expr)* -# <> isn't actually a valid comparison operator in Python. It's here for the -# sake of a __future__ import described in PEP 401 (which really works :-) -comp_op: '<'|'>'|'=='|'>='|'<='|'<>'|'!='|'in'|'not' 'in'|'is'|'is' 'not' -star_expr: '*' expr -expr: xor_expr ('|' xor_expr)* -xor_expr: and_expr ('^' and_expr)* -and_expr: shift_expr ('&' shift_expr)* -shift_expr: arith_expr (('<<'|'>>') arith_expr)* -arith_expr: term (('+'|'-') term)* -term: factor (('*'|'@'|'/'|'%'|'//') factor)* -factor: ('+'|'-'|'~') factor | power -power: atom_expr ['**' factor] -atom_expr: [AWAIT] atom trailer* -atom: ('(' [yield_expr|testlist_comp] ')' | - '[' [testlist_comp] ']' | - '{' [dictorsetmaker] '}' | - NAME | NUMBER | STRING+ | '...' | 'None' | 'True' | 'False') -testlist_comp: (namedexpr_test|star_expr) ( comp_for | (',' (namedexpr_test|star_expr))* [','] ) -trailer: '(' [arglist] ')' | '[' subscriptlist ']' | '.' NAME -subscriptlist: subscript (',' subscript)* [','] -subscript: test | [test] ':' [test] [sliceop] -sliceop: ':' [test] -exprlist: (expr|star_expr) (',' (expr|star_expr))* [','] -testlist: test (',' test)* [','] -dictorsetmaker: ( ((test ':' test | '**' expr) - (comp_for | (',' (test ':' test | '**' expr))* [','])) | - ((test | star_expr) - (comp_for | (',' (test | star_expr))* [','])) ) - -classdef: 'class' NAME ['(' [arglist] ')'] ':' suite - -arglist: argument (',' argument)* [','] - -# The reason that keywords are test nodes instead of NAME is that using NAME -# results in an ambiguity. ast.c makes sure it's a NAME. -# "test '=' test" is really "keyword '=' test", but we have no such token. -# These need to be in a single rule to avoid grammar that is ambiguous -# to our LL(1) parser. Even though 'test' includes '*expr' in star_expr, -# we explicitly match '*' here, too, to give it proper precedence. -# Illegal combinations and orderings are blocked in ast.c: -# multiple (test comp_for) arguments are blocked; keyword unpackings -# that precede iterable unpackings are blocked; etc. -argument: ( test [comp_for] | - test ':=' test | - test '=' test | - '**' test | - '*' test ) - -comp_iter: comp_for | comp_if -sync_comp_for: 'for' exprlist 'in' or_test [comp_iter] -comp_for: [ASYNC] sync_comp_for -comp_if: 'if' test_nocond [comp_iter] - -# not used in grammar, but may appear in "node" passed from Parser to Compiler -encoding_decl: NAME - -yield_expr: 'yield' [yield_arg] -yield_arg: 'from' test | testlist_star_expr - -# the TYPE_COMMENT in suites is only parsed for funcdefs, -# but can't go elsewhere due to ambiguity -func_body_suite: simple_stmt | NEWLINE [TYPE_COMMENT NEWLINE] INDENT stmt+ DEDENT - -func_type_input: func_type NEWLINE* ENDMARKER -func_type: '(' [typelist] ')' '->' test -# typelist is a modified typedargslist (see above) -typelist: (test (',' test)* [',' - ['*' [test] (',' test)* [',' '**' test] | '**' test]] - | '*' [test] (',' test)* [',' '**' test] | '**' test) diff --git a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar311/grammar311 b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar311/grammar311 new file mode 100644 index 0000000000..00c4c803d9 --- /dev/null +++ b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar311/grammar311 @@ -0,0 +1,861 @@ +# PEG grammar for Python + + + +# ========================= START OF THE GRAMMAR ========================= + +# General grammatical elements and rules: +# +# * Strings with double quotes (") denote SOFT KEYWORDS +# * Strings with single quotes (') denote KEYWORDS +# * Upper case names (NAME) denote tokens in the Grammar/Tokens file +# * Rule names starting with "invalid_" are used for specialized syntax errors +# - These rules are NOT used in the first pass of the parser. +# - Only if the first pass fails to parse, a second pass including the invalid +# rules will be executed. +# - If the parser fails in the second phase with a generic syntax error, the +# location of the generic failure of the first pass will be used (this avoids +# reporting incorrect locations due to the invalid rules). +# - The order of the alternatives involving invalid rules matter +# (like any rule in PEG). +# +# Grammar Syntax (see PEP 617 for more information): +# +# rule_name: expression +# Optionally, a type can be included right after the rule name, which +# specifies the return type of the C or Python function corresponding to the +# rule: +# rule_name[return_type]: expression +# If the return type is omitted, then a void * is returned in C and an Any in +# Python. +# e1 e2 +# Match e1, then match e2. +# e1 | e2 +# Match e1 or e2. +# The first alternative can also appear on the line after the rule name for +# formatting purposes. In that case, a | must be used before the first +# alternative, like so: +# rule_name[return_type]: +# | first_alt +# | second_alt +# ( e ) +# Match e (allows also to use other operators in the group like '(e)*') +# [ e ] or e? +# Optionally match e. +# e* +# Match zero or more occurrences of e. +# e+ +# Match one or more occurrences of e. +# s.e+ +# Match one or more occurrences of e, separated by s. The generated parse tree +# does not include the separator. This is otherwise identical to (e (s e)*). +# &e +# Succeed if e can be parsed, without consuming any input. +# !e +# Fail if e can be parsed, without consuming any input. +# ~ +# Commit to the current alternative, even if it fails to parse. +# + +# STARTING RULES +# ============== + +file: [statements] ENDMARKER +interactive: statement_newline +eval: expressions NEWLINE* ENDMARKER +func_type: '(' [type_expressions] ')' '->' expression NEWLINE* ENDMARKER +fstring: star_expressions + +# GENERAL STATEMENTS +# ================== + +statements: statement+ + +statement: compound_stmt | simple_stmts + +statement_newline: + | compound_stmt NEWLINE + | simple_stmts + | NEWLINE + | ENDMARKER + +simple_stmts: + | simple_stmt !';' NEWLINE # Not needed, there for speedup + | ';'.simple_stmt+ [';'] NEWLINE + +# NOTE: assignment MUST precede expression, else parsing a simple assignment +# will throw a SyntaxError. +simple_stmt: + | assignment + | star_expressions + | return_stmt + | import_stmt + | raise_stmt + | 'pass' + | del_stmt + | yield_stmt + | assert_stmt + | 'break' + | 'continue' + | global_stmt + | nonlocal_stmt + +compound_stmt: + | function_def + | if_stmt + | class_def + | with_stmt + | for_stmt + | try_stmt + | while_stmt + | match_stmt + +# SIMPLE STATEMENTS +# ================= + +# NOTE: annotated_rhs may start with 'yield'; yield_expr must start with 'yield' +assignment: + | NAME ':' expression ['=' annotated_rhs ] + | ('(' single_target ')' + | single_subscript_attribute_target) ':' expression ['=' annotated_rhs ] + | (star_targets '=' )+ (yield_expr | star_expressions) !'=' [TYPE_COMMENT] + | single_target augassign ~ (yield_expr | star_expressions) + +annotated_rhs: yield_expr | star_expressions + +augassign: + | '+=' + | '-=' + | '*=' + | '@=' + | '/=' + | '%=' + | '&=' + | '|=' + | '^=' + | '<<=' + | '>>=' + | '**=' + | '//=' + +return_stmt: + | 'return' [star_expressions] + +raise_stmt: + | 'raise' expression ['from' expression ] + | 'raise' + +global_stmt: 'global' ','.NAME+ + +nonlocal_stmt: 'nonlocal' ','.NAME+ + +del_stmt: + | 'del' del_targets &(';' | NEWLINE) + +yield_stmt: yield_expr + +assert_stmt: 'assert' expression [',' expression ] + +import_stmt: import_name | import_from + +# Import statements +# ----------------- + +import_name: 'import' dotted_as_names +# note below: the ('.' | '...') is necessary because '...' is tokenized as ELLIPSIS +import_from: + | 'from' ('.' | '...')* dotted_name 'import' import_from_targets + | 'from' ('.' | '...')+ 'import' import_from_targets +import_from_targets: + | '(' import_from_as_names [','] ')' + | import_from_as_names !',' + | '*' +import_from_as_names: + | ','.import_from_as_name+ +import_from_as_name: + | NAME ['as' NAME ] +dotted_as_names: + | ','.dotted_as_name+ +dotted_as_name: + | dotted_name ['as' NAME ] +dotted_name: + | dotted_name '.' NAME + | NAME + +# COMPOUND STATEMENTS +# =================== + +# Common elements +# --------------- + +block: + | NEWLINE INDENT statements DEDENT + | simple_stmts + +decorators: ('@' named_expression NEWLINE )+ + +# Class definitions +# ----------------- + +class_def: + | decorators class_def_raw + | class_def_raw + +class_def_raw: + | 'class' NAME ['(' [arguments] ')' ] ':' block + +# Function definitions +# -------------------- + +function_def: + | decorators function_def_raw + | function_def_raw + +function_def_raw: + | 'def' NAME '(' [params] ')' ['->' expression ] ':' [func_type_comment] block + | ASYNC 'def' NAME '(' [params] ')' ['->' expression ] ':' [func_type_comment] block + +# Function parameters +# ------------------- + +params: + | parameters + +parameters: + | slash_no_default param_no_default* param_with_default* [star_etc] + | slash_with_default param_with_default* [star_etc] + | param_no_default+ param_with_default* [star_etc] + | param_with_default+ [star_etc] + | star_etc + +# Some duplication here because we can't write (',' | &')'), +# which is because we don't support empty alternatives (yet). + +slash_no_default: + | param_no_default+ '/' ',' + | param_no_default+ '/' &')' +slash_with_default: + | param_no_default* param_with_default+ '/' ',' + | param_no_default* param_with_default+ '/' &')' + +star_etc: + | '*' param_no_default param_maybe_default* [kwds] + | '*' param_no_default_star_annotation param_maybe_default* [kwds] + | '*' ',' param_maybe_default+ [kwds] + | kwds + +kwds: + | '**' param_no_default + +# One parameter. This *includes* a following comma and type comment. +# +# There are three styles: +# - No default +# - With default +# - Maybe with default +# +# There are two alternative forms of each, to deal with type comments: +# - Ends in a comma followed by an optional type comment +# - No comma, optional type comment, must be followed by close paren +# The latter form is for a final parameter without trailing comma. +# + +param_no_default: + | param ',' TYPE_COMMENT? + | param TYPE_COMMENT? &')' +param_no_default_star_annotation: + | param_star_annotation ',' TYPE_COMMENT? + | param_star_annotation TYPE_COMMENT? &')' +param_with_default: + | param default ',' TYPE_COMMENT? + | param default TYPE_COMMENT? &')' +param_maybe_default: + | param default? ',' TYPE_COMMENT? + | param default? TYPE_COMMENT? &')' +param: NAME annotation? +param_star_annotation: NAME star_annotation +annotation: ':' expression +star_annotation: ':' star_expression +default: '=' expression | invalid_default + +# If statement +# ------------ + +if_stmt: + | 'if' named_expression ':' block elif_stmt + | 'if' named_expression ':' block [else_block] +elif_stmt: + | 'elif' named_expression ':' block elif_stmt + | 'elif' named_expression ':' block [else_block] +else_block: + | 'else' ':' block + +# While statement +# --------------- + +while_stmt: + | 'while' named_expression ':' block [else_block] + +# For statement +# ------------- + +for_stmt: + | 'for' star_targets 'in' ~ star_expressions ':' [TYPE_COMMENT] block [else_block] + | ASYNC 'for' star_targets 'in' ~ star_expressions ':' [TYPE_COMMENT] block [else_block] + +# With statement +# -------------- + +with_stmt: + | 'with' '(' ','.with_item+ ','? ')' ':' block + | 'with' ','.with_item+ ':' [TYPE_COMMENT] block + | ASYNC 'with' '(' ','.with_item+ ','? ')' ':' block + | ASYNC 'with' ','.with_item+ ':' [TYPE_COMMENT] block + +with_item: + | expression 'as' star_target &(',' | ')' | ':') + | expression + +# Try statement +# ------------- + +try_stmt: + | 'try' ':' block finally_block + | 'try' ':' block except_block+ [else_block] [finally_block] + | 'try' ':' block except_star_block+ [else_block] [finally_block] + + +# Except statement +# ---------------- + +except_block: + | 'except' expression ['as' NAME ] ':' block + | 'except' ':' block +except_star_block: + | 'except' '*' expression ['as' NAME ] ':' block +finally_block: + | 'finally' ':' block + +# Match statement +# --------------- + +match_stmt: + | "match" subject_expr ':' NEWLINE INDENT case_block+ DEDENT + +subject_expr: + | star_named_expression ',' star_named_expressions? + | named_expression + +case_block: + | "case" patterns guard? ':' block + +guard: 'if' named_expression + +patterns: + | open_sequence_pattern + | pattern + +pattern: + | as_pattern + | or_pattern + +as_pattern: + | or_pattern 'as' pattern_capture_target + +or_pattern: + | '|'.closed_pattern+ + +closed_pattern: + | literal_pattern + | capture_pattern + | wildcard_pattern + | value_pattern + | group_pattern + | sequence_pattern + | mapping_pattern + | class_pattern + +# Literal patterns are used for equality and identity constraints +literal_pattern: + | signed_number !('+' | '-') + | complex_number + | strings + | 'None' + | 'True' + | 'False' + +# Literal expressions are used to restrict permitted mapping pattern keys +literal_expr: + | signed_number !('+' | '-') + | complex_number + | strings + | 'None' + | 'True' + | 'False' + +complex_number: + | signed_real_number '+' imaginary_number + | signed_real_number '-' imaginary_number + +signed_number: + | NUMBER + | '-' NUMBER + +signed_real_number: + | real_number + | '-' real_number + +real_number: + | NUMBER + +imaginary_number: + | NUMBER + +capture_pattern: + | pattern_capture_target + +pattern_capture_target: + | !"_" NAME !('.' | '(' | '=') + +wildcard_pattern: + | "_" + +value_pattern: + | attr !('.' | '(' | '=') + +attr: + | name_or_attr '.' NAME + +name_or_attr: + | attr + | NAME + +group_pattern: + | '(' pattern ')' + +sequence_pattern: + | '[' maybe_sequence_pattern? ']' + | '(' open_sequence_pattern? ')' + +open_sequence_pattern: + | maybe_star_pattern ',' maybe_sequence_pattern? + +maybe_sequence_pattern: + | ','.maybe_star_pattern+ ','? + +maybe_star_pattern: + | star_pattern + | pattern + +star_pattern: + | '*' pattern_capture_target + | '*' wildcard_pattern + +mapping_pattern: + | '{' '}' + | '{' double_star_pattern ','? '}' + | '{' items_pattern ',' double_star_pattern ','? '}' + | '{' items_pattern ','? '}' + +items_pattern: + | ','.key_value_pattern+ + +key_value_pattern: + | (literal_expr | attr) ':' pattern + +double_star_pattern: + | '**' pattern_capture_target + +class_pattern: + | name_or_attr '(' ')' + | name_or_attr '(' positional_patterns ','? ')' + | name_or_attr '(' keyword_patterns ','? ')' + | name_or_attr '(' positional_patterns ',' keyword_patterns ','? ')' + +positional_patterns: + | ','.pattern+ + +keyword_patterns: + | ','.keyword_pattern+ + +keyword_pattern: + | NAME '=' pattern + +# EXPRESSIONS +# ----------- + +expressions: + | expression (',' expression )+ [','] + | expression ',' + | expression + +expression: + | disjunction 'if' disjunction 'else' expression + | disjunction + | lambdef + +yield_expr: + | 'yield' 'from' expression + | 'yield' [star_expressions] + +star_expressions: + | star_expression (',' star_expression )+ [','] + | star_expression ',' + | star_expression + +star_expression: + | '*' bitwise_or + | expression + +star_named_expressions: ','.star_named_expression+ [','] + +star_named_expression: + | '*' bitwise_or + | named_expression + +assignment_expression: + | NAME ':=' ~ expression + +named_expression: + | assignment_expression + | expression !':=' + +disjunction: + | conjunction ('or' conjunction )+ + | conjunction + +conjunction: + | inversion ('and' inversion )+ + | inversion + +inversion: + | 'not' inversion + | comparison + +# Comparison operators +# -------------------- + +comparison: + | bitwise_or compare_op_bitwise_or_pair+ + | bitwise_or + +compare_op_bitwise_or_pair: + | eq_bitwise_or + | noteq_bitwise_or + | lte_bitwise_or + | lt_bitwise_or + | gte_bitwise_or + | gt_bitwise_or + | notin_bitwise_or + | in_bitwise_or + | isnot_bitwise_or + | is_bitwise_or + +eq_bitwise_or: '==' bitwise_or +noteq_bitwise_or: + | ('!=' ) bitwise_or +lte_bitwise_or: '<=' bitwise_or +lt_bitwise_or: '<' bitwise_or +gte_bitwise_or: '>=' bitwise_or +gt_bitwise_or: '>' bitwise_or +notin_bitwise_or: 'not' 'in' bitwise_or +in_bitwise_or: 'in' bitwise_or +isnot_bitwise_or: 'is' 'not' bitwise_or +is_bitwise_or: 'is' bitwise_or + +# Bitwise operators +# ----------------- + +bitwise_or: + | bitwise_or '|' bitwise_xor + | bitwise_xor + +bitwise_xor: + | bitwise_xor '^' bitwise_and + | bitwise_and + +bitwise_and: + | bitwise_and '&' shift_expr + | shift_expr + +shift_expr: + | shift_expr '<<' sum + | shift_expr '>>' sum + | sum + +# Arithmetic operators +# -------------------- + +sum: + | sum '+' term + | sum '-' term + | term + +term: + | term '*' factor + | term '/' factor + | term '//' factor + | term '%' factor + | term '@' factor + | factor + +factor: + | '+' factor + | '-' factor + | '~' factor + | power + +power: + | await_primary '**' factor + | await_primary + +# Primary elements +# ---------------- + +# Primary elements are things like "obj.something.something", "obj[something]", "obj(something)", "obj" ... + +await_primary: + | AWAIT primary + | primary + +primary: + | primary '.' NAME + | primary genexp + | primary '(' [arguments] ')' + | primary '[' slices ']' + | atom + +slices: + | slice !',' + | ','.(slice | starred_expression)+ [','] + +slice: + | [expression] ':' [expression] [':' [expression] ] + | named_expression + +atom: + | NAME + | 'True' + | 'False' + | 'None' + | strings + | NUMBER + | (tuple | group | genexp) + | (list | listcomp) + | (dict | set | dictcomp | setcomp) + | '...' + +group: + | '(' (yield_expr | named_expression) ')' + +# Lambda functions +# ---------------- + +lambdef: + | 'lambda' [lambda_params] ':' expression + +lambda_params: + | lambda_parameters + +# lambda_parameters etc. duplicates parameters but without annotations +# or type comments, and if there's no comma after a parameter, we expect +# a colon, not a close parenthesis. (For more, see parameters above.) +# +lambda_parameters: + | lambda_slash_no_default lambda_param_no_default* lambda_param_with_default* [lambda_star_etc] + | lambda_slash_with_default lambda_param_with_default* [lambda_star_etc] + | lambda_param_no_default+ lambda_param_with_default* [lambda_star_etc] + | lambda_param_with_default+ [lambda_star_etc] + | lambda_star_etc + +lambda_slash_no_default: + | lambda_param_no_default+ '/' ',' + | lambda_param_no_default+ '/' &':' + +lambda_slash_with_default: + | lambda_param_no_default* lambda_param_with_default+ '/' ',' + | lambda_param_no_default* lambda_param_with_default+ '/' &':' + +lambda_star_etc: + | '*' lambda_param_no_default lambda_param_maybe_default* [lambda_kwds] + | '*' ',' lambda_param_maybe_default+ [lambda_kwds] + | lambda_kwds + +lambda_kwds: + | '**' lambda_param_no_default + +lambda_param_no_default: + | lambda_param ',' + | lambda_param &':' +lambda_param_with_default: + | lambda_param default ',' + | lambda_param default &':' +lambda_param_maybe_default: + | lambda_param default? ',' + | lambda_param default? &':' +lambda_param: NAME + +# LITERALS +# ======== + +strings: STRING+ + +list: + | '[' [star_named_expressions] ']' + +tuple: + | '(' [star_named_expression ',' [star_named_expressions] ] ')' + +set: '{' star_named_expressions '}' + +# Dicts +# ----- + +dict: + | '{' [double_starred_kvpairs] '}' + +double_starred_kvpairs: ','.double_starred_kvpair+ [','] + +double_starred_kvpair: + | '**' bitwise_or + | kvpair + +kvpair: expression ':' expression + +# Comprehensions & Generators +# --------------------------- + +for_if_clauses: + | for_if_clause+ + +for_if_clause: + | ASYNC 'for' star_targets 'in' ~ disjunction ('if' disjunction )* + | 'for' star_targets 'in' ~ disjunction ('if' disjunction )* + +listcomp: + | '[' named_expression for_if_clauses ']' + +setcomp: + | '{' named_expression for_if_clauses '}' + +genexp: + | '(' ( assignment_expression | expression !':=') for_if_clauses ')' + +dictcomp: + | '{' kvpair for_if_clauses '}' + +# FUNCTION CALL ARGUMENTS +# ======================= + +arguments: + | args [','] &')' + +args: + | ','.(starred_expression | ( assignment_expression | expression !':=') !'=')+ [',' kwargs ] + | kwargs + +kwargs: + | ','.kwarg_or_starred+ ',' ','.kwarg_or_double_starred+ + | ','.kwarg_or_starred+ + | ','.kwarg_or_double_starred+ + +starred_expression: + | '*' expression + | '*' + +kwarg_or_starred: + | NAME '=' expression + | starred_expression + +kwarg_or_double_starred: + | NAME '=' expression + | '**' expression + +# ASSIGNMENT TARGETS +# ================== + +# Generic targets +# --------------- + +# NOTE: star_targets may contain *bitwise_or, targets may not. +star_targets: + | star_target !',' + | star_target (',' star_target )* [','] + +star_targets_list_seq: ','.star_target+ [','] + +star_targets_tuple_seq: + | star_target (',' star_target )+ [','] + | star_target ',' + +star_target: + | '*' (!'*' star_target) + | target_with_star_atom + +target_with_star_atom: + | t_primary '.' NAME !t_lookahead + | t_primary '[' slices ']' !t_lookahead + | star_atom + +star_atom: + | NAME + | '(' target_with_star_atom ')' + | '(' [star_targets_tuple_seq] ')' + | '[' [star_targets_list_seq] ']' + +single_target: + | single_subscript_attribute_target + | NAME + | '(' single_target ')' + +single_subscript_attribute_target: + | t_primary '.' NAME !t_lookahead + | t_primary '[' slices ']' !t_lookahead + +t_primary: + | t_primary '.' NAME &t_lookahead + | t_primary '[' slices ']' &t_lookahead + | t_primary genexp &t_lookahead + | t_primary '(' [arguments] ')' &t_lookahead + | atom &t_lookahead + +t_lookahead: '(' | '[' | '.' + +# Targets for del statements +# -------------------------- + +del_targets: ','.del_target+ [','] + +del_target: + | t_primary '.' NAME !t_lookahead + | t_primary '[' slices ']' !t_lookahead + | del_t_atom + +del_t_atom: + | NAME + | '(' del_target ')' + | '(' [del_targets] ')' + | '[' [del_targets] ']' + +# TYPING ELEMENTS +# --------------- + +# type_expressions allow */** but ignore them +type_expressions: + | ','.expression+ ',' '*' expression ',' '**' expression + | ','.expression+ ',' '*' expression + | ','.expression+ ',' '**' expression + | '*' expression ',' '**' expression + | '*' expression + | '**' expression + | ','.expression+ + +func_type_comment: + | NEWLINE TYPE_COMMENT &(NEWLINE INDENT) # Must be followed by indented block + | TYPE_COMMENT + +# ========================= END OF THE GRAMMAR =========================== + + + +# ========================= START OF INVALID RULES ======================= diff --git a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar312/PythonGrammar312.java b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar312/PythonGrammar312.java index 54541c44ba..767116c1ee 100644 --- a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar312/PythonGrammar312.java +++ b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar312/PythonGrammar312.java @@ -345,7 +345,7 @@ final public Expr eval_input() throws ParseException { throw new Error("Missing return statement in function"); } -//funcdef: 'def' NAME parameters ['->' test] ':' suite +//funcdef: 'def' NAME [type_params] parameters ['->' test] ':' suite final public void funcdef() throws ParseException { /*@bgen(jjtree) funcdef */ SimpleNode jjtn000 = builder.openNode( JJTFUNCDEF); @@ -356,43 +356,51 @@ final public void funcdef() throws ParseException { jj_consume_token(DEF); this.markLastAsSuiteStart(); Name(); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LBRACKET: + type_params(); + break; + default: + jj_la1[3] = jj_gen; + ; + } parameters(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case MINUS_GREATER: - grammarActions.addSpecialToken("->", STRATEGY_BEFORE_NEXT); + grammarActions.addSpecialToken("->", STRATEGY_BEFORE_NEXT); jj_consume_token(MINUS_GREATER); - SimpleNode jjtn001 = builder.openNode( JJTFUNCDEF_RETURN_ANNOTTATION); - boolean jjtc001 = true; - jjtree.openNodeScope(jjtn001); - jjtreeOpenNodeScope(jjtn001); + SimpleNode jjtn001 = builder.openNode( JJTFUNCDEF_RETURN_ANNOTTATION); + boolean jjtc001 = true; + jjtree.openNodeScope(jjtn001); + jjtreeOpenNodeScope(jjtn001); try { test(); } catch (Throwable jjte001) { - if (jjtc001) { - jjtree.clearNodeScope(jjtn001); - jjtc001 = false; - } else { - jjtree.popNode(); - } - if (jjte001 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte001;} - } - if (jjte001 instanceof ParseException) { - {if (true) throw (ParseException)jjte001;} - } - {if (true) throw (Error)jjte001;} + if (jjtc001) { + jjtree.clearNodeScope(jjtn001); + jjtc001 = false; + } else { + jjtree.popNode(); + } + if (jjte001 instanceof RuntimeException) { + {if (true) throw (RuntimeException)jjte001;} + } + if (jjte001 instanceof ParseException) { + {if (true) throw (ParseException)jjte001;} + } + {if (true) throw (Error)jjte001;} } finally { - if (jjtc001) { - jjtree.closeNodeScope(jjtn001, true); - jjtreeCloseNodeScope(jjtn001); - } + if (jjtc001) { + jjtree.closeNodeScope(jjtn001, true); + jjtreeCloseNodeScope(jjtn001); + } } break; default: - jj_la1[3] = jj_gen; + jj_la1[4] = jj_gen; ; } - ISpecialStr s = grammarActions.findTokenAndAdd(":"); if(s != null){grammarActions.markEndDefColon(s, jjtn000);} + ISpecialStr s = grammarActions.findTokenAndAdd(":"); if(s != null){grammarActions.markEndDefColon(s, jjtn000);} jj_consume_token(COLON); suite(); } catch (Throwable jjte000) { @@ -478,7 +486,7 @@ final public void decorators() throws ParseException { arglist(); break; default: - jj_la1[4] = jj_gen; + jj_la1[5] = jj_gen; ; } try { @@ -489,7 +497,7 @@ final public void decorators() throws ParseException { } break; default: - jj_la1[5] = jj_gen; + jj_la1[6] = jj_gen; ; } try { @@ -502,7 +510,7 @@ final public void decorators() throws ParseException { ; break; default: - jj_la1[6] = jj_gen; + jj_la1[7] = jj_gen; break label_3; } } @@ -560,6 +568,200 @@ final public void begin_decorator() throws ParseException { } } +// type_params: '[' type_param_seq ']' + final public void type_params() throws ParseException { + /*@bgen(jjtree) type_params */ + SimpleNode jjtn000 = builder.openNode( JJTTYPE_PARAMS); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); + jjtreeOpenNodeScope(jjtn000); + try { + grammarActions.findTokenAndAdd("["); + jj_consume_token(LBRACKET); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case MULTIPLY: + case POWER: + case MATCH: + case CASE: + case NAME: + type_param_seq(); + break; + default: + jj_la1[8] = jj_gen; + ; + } + grammarActions.findTokenAndAdd("]"); + jj_consume_token(RBRACKET); + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + {if (true) throw (RuntimeException)jjte000;} + } + if (jjte000 instanceof ParseException) { + {if (true) throw (ParseException)jjte000;} + } + {if (true) throw (Error)jjte000;} + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + jjtreeCloseNodeScope(jjtn000); + } + } + } + +// type_param_seq: ','.type_param+ [','] + final public void type_param_seq() throws ParseException { + type_param(); + label_4: + while (true) { + if (jj_2_1(2)) { + ; + } else { + break label_4; + } + grammarActions.findTokenAndAdd(","); + jj_consume_token(COMMA); + type_param(); + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: + grammarActions.findTokenAndAdd(","); + jj_consume_token(COMMA); + break; + default: + jj_la1[9] = jj_gen; + ; + } + } + +// type_param: +// | NAME [type_param_bound] //TypeVar +// | '*' NAME //TypeVarTuple +// | '**' NAME //ParamSpec + final public void type_param() throws ParseException { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case MATCH: + case CASE: + case NAME: + type_var(); + break; + case MULTIPLY: + type_var_tuple(); + break; + case POWER: + type_var_param_spec(); + break; + default: + jj_la1[10] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + + final public void type_var() throws ParseException { + /*@bgen(jjtree) type_var */ + SimpleNode jjtn000 = builder.openNode( JJTTYPE_VAR); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); + jjtreeOpenNodeScope(jjtn000); + try { + Name(); + if (jj_2_2(2)) { + jj_consume_token(COLON); + grammarActions.addSpecialToken(":", STRATEGY_BEFORE_NEXT); + test(); + } else { + ; + } + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + {if (true) throw (RuntimeException)jjte000;} + } + if (jjte000 instanceof ParseException) { + {if (true) throw (ParseException)jjte000;} + } + {if (true) throw (Error)jjte000;} + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + jjtreeCloseNodeScope(jjtn000); + } + } + } + + final public void type_var_tuple() throws ParseException { + /*@bgen(jjtree) type_var_tuple */ + SimpleNode jjtn000 = builder.openNode( JJTTYPE_VAR_TUPLE); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); + jjtreeOpenNodeScope(jjtn000); + try { + jj_consume_token(MULTIPLY); + Name(); + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + {if (true) throw (RuntimeException)jjte000;} + } + if (jjte000 instanceof ParseException) { + {if (true) throw (ParseException)jjte000;} + } + {if (true) throw (Error)jjte000;} + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + jjtreeCloseNodeScope(jjtn000); + } + } + } + + final public void type_var_param_spec() throws ParseException { + /*@bgen(jjtree) type_var_param_spec */ + SimpleNode jjtn000 = builder.openNode( JJTTYPE_VAR_PARAM_SPEC); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); + jjtreeOpenNodeScope(jjtn000); + try { + jj_consume_token(POWER); + Name(); + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + {if (true) throw (RuntimeException)jjte000;} + } + if (jjte000 instanceof ParseException) { + {if (true) throw (ParseException)jjte000;} + } + {if (true) throw (Error)jjte000;} + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + jjtreeCloseNodeScope(jjtn000); + } + } + } + //parameters: '(' [typedargslist] ')' final public void parameters() throws ParseException { grammarActions.findTokenAndAdd("("); @@ -573,7 +775,7 @@ final public void parameters() throws ParseException { typedargslist(); break; default: - jj_la1[7] = jj_gen; + jj_la1[11] = jj_gen; ; } try { @@ -630,12 +832,12 @@ final public void typedargslist() throws ParseException { case CASE: case NAME: defaultarg2(); - label_4: + label_5: while (true) { - if (jj_2_1(2)) { + if (jj_2_3(2)) { ; } else { - break label_4; + break label_5; } grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); @@ -649,12 +851,12 @@ final public void typedargslist() throws ParseException { defaultarg2(); break; default: - jj_la1[8] = jj_gen; + jj_la1[12] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } - if (jj_2_3(2)) { + if (jj_2_5(2)) { grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -663,12 +865,12 @@ final public void typedargslist() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case MULTIPLY: ExtraArgList2(); - label_5: + label_6: while (true) { - if (jj_2_2(2)) { + if (jj_2_4(2)) { ; } else { - break label_5; + break label_6; } grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); @@ -687,17 +889,17 @@ final public void typedargslist() throws ParseException { jj_consume_token(COMMA); break; default: - jj_la1[9] = jj_gen; + jj_la1[13] = jj_gen; ; } break; default: - jj_la1[10] = jj_gen; + jj_la1[14] = jj_gen; ; } break; default: - jj_la1[11] = jj_gen; + jj_la1[15] = jj_gen; ; } break; @@ -709,18 +911,18 @@ final public void typedargslist() throws ParseException { jj_consume_token(COMMA); break; default: - jj_la1[12] = jj_gen; + jj_la1[16] = jj_gen; ; } break; default: - jj_la1[13] = jj_gen; + jj_la1[17] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; default: - jj_la1[14] = jj_gen; + jj_la1[18] = jj_gen; ; } } else { @@ -729,18 +931,18 @@ final public void typedargslist() throws ParseException { break; case MULTIPLY: ExtraArgList2(); - label_6: + label_7: while (true) { - if (jj_2_4(2)) { + if (jj_2_6(2)) { ; } else { - break label_6; + break label_7; } grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); onlykeywordarg2(); } - if (jj_2_5(2)) { + if (jj_2_7(2)) { grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -752,12 +954,12 @@ final public void typedargslist() throws ParseException { jj_consume_token(COMMA); break; default: - jj_la1[15] = jj_gen; + jj_la1[19] = jj_gen; ; } break; default: - jj_la1[16] = jj_gen; + jj_la1[20] = jj_gen; ; } } else { @@ -772,12 +974,12 @@ final public void typedargslist() throws ParseException { jj_consume_token(COMMA); break; default: - jj_la1[17] = jj_gen; + jj_la1[21] = jj_gen; ; } break; default: - jj_la1[18] = jj_gen; + jj_la1[22] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -800,7 +1002,7 @@ final public void ExtraArgList2() throws ParseException { tfpdef(); break; default: - jj_la1[19] = jj_gen; + jj_la1[23] = jj_gen; ; } } catch (Throwable jjte000) { @@ -874,7 +1076,7 @@ final public void defaultarg2() throws ParseException { test(); break; default: - jj_la1[20] = jj_gen; + jj_la1[24] = jj_gen; ; } } catch (Throwable jjte000) { @@ -915,7 +1117,7 @@ final public void onlykeywordarg2() throws ParseException { test(); break; default: - jj_la1[21] = jj_gen; + jj_la1[25] = jj_gen; ; } } catch (Throwable jjte000) { @@ -949,7 +1151,7 @@ final public void tfpdef() throws ParseException { jjtreeOpenNodeScope(jjtn000); try { Name(); - if (jj_2_6(2)) { + if (jj_2_8(2)) { jj_consume_token(COLON); grammarActions.addSpecialToken(":", STRATEGY_BEFORE_NEXT); test(); @@ -1034,12 +1236,12 @@ final public void varargslist() throws ParseException { case CASE: case NAME: defaultarg(); - label_7: + label_8: while (true) { - if (jj_2_7(2)) { + if (jj_2_9(2)) { ; } else { - break label_7; + break label_8; } grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); @@ -1054,12 +1256,12 @@ final public void varargslist() throws ParseException { defaultarg(); break; default: - jj_la1[22] = jj_gen; + jj_la1[26] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } - if (jj_2_9(2)) { + if (jj_2_11(2)) { grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -1068,12 +1270,12 @@ final public void varargslist() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case MULTIPLY: ExtraArgList(); - label_8: + label_9: while (true) { - if (jj_2_8(2)) { + if (jj_2_10(2)) { ; } else { - break label_8; + break label_9; } grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); @@ -1093,17 +1295,17 @@ final public void varargslist() throws ParseException { jj_consume_token(COMMA); break; default: - jj_la1[23] = jj_gen; + jj_la1[27] = jj_gen; ; } break; default: - jj_la1[24] = jj_gen; + jj_la1[28] = jj_gen; ; } break; default: - jj_la1[25] = jj_gen; + jj_la1[29] = jj_gen; ; } break; @@ -1115,18 +1317,18 @@ final public void varargslist() throws ParseException { jj_consume_token(COMMA); break; default: - jj_la1[26] = jj_gen; + jj_la1[30] = jj_gen; ; } break; default: - jj_la1[27] = jj_gen; + jj_la1[31] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; default: - jj_la1[28] = jj_gen; + jj_la1[32] = jj_gen; ; } } else { @@ -1135,18 +1337,18 @@ final public void varargslist() throws ParseException { break; case MULTIPLY: ExtraArgList(); - label_9: + label_10: while (true) { - if (jj_2_10(2)) { + if (jj_2_12(2)) { ; } else { - break label_9; + break label_10; } grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); onlykeywordarg(); } - if (jj_2_11(2)) { + if (jj_2_13(2)) { grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -1159,12 +1361,12 @@ final public void varargslist() throws ParseException { jj_consume_token(COMMA); break; default: - jj_la1[29] = jj_gen; + jj_la1[33] = jj_gen; ; } break; default: - jj_la1[30] = jj_gen; + jj_la1[34] = jj_gen; ; } } else { @@ -1179,12 +1381,12 @@ final public void varargslist() throws ParseException { jj_consume_token(COMMA); break; default: - jj_la1[31] = jj_gen; + jj_la1[35] = jj_gen; ; } break; default: - jj_la1[32] = jj_gen; + jj_la1[36] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1206,7 +1408,7 @@ final public void ExtraArgList() throws ParseException { Name(); break; default: - jj_la1[33] = jj_gen; + jj_la1[37] = jj_gen; ; } } catch (Throwable jjte000) { @@ -1250,7 +1452,7 @@ final public void ExtraKeywordList() throws ParseException { jj_consume_token(MULTIPLY); break; default: - jj_la1[34] = jj_gen; + jj_la1[38] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1292,7 +1494,7 @@ final public void onlykeywordarg() throws ParseException { test(); break; default: - jj_la1[35] = jj_gen; + jj_la1[39] = jj_gen; ; } } catch (Throwable jjte000) { @@ -1332,7 +1534,7 @@ final public void defaultarg() throws ParseException { test(); break; default: - jj_la1[36] = jj_gen; + jj_la1[40] = jj_gen; ; } } catch (Throwable jjte000) { @@ -1378,7 +1580,7 @@ final public void fpdef() throws ParseException { } break; default: - jj_la1[37] = jj_gen; + jj_la1[41] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1393,12 +1595,12 @@ final public void fplist() throws ParseException { jjtreeOpenNodeScope(jjtn000); try { fpdef(); - label_10: + label_11: while (true) { - if (jj_2_12(2)) { + if (jj_2_14(2)) { ; } else { - break label_10; + break label_11; } grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); @@ -1409,7 +1611,7 @@ final public void fplist() throws ParseException { Comma(); break; default: - jj_la1[38] = jj_gen; + jj_la1[42] = jj_gen; ; } } catch (Throwable jjte000) { @@ -1436,9 +1638,9 @@ final public void fplist() throws ParseException { //stmt: simple_stmt | compound_stmt final public void stmt() throws ParseException { - if (jj_2_13(2)) { + if (jj_2_15(2)) { async_stmt(); - } else if (jj_2_14(2147483647)) { + } else if (jj_2_16(2147483647)) { match_stmt(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -1504,7 +1706,7 @@ final public void stmt() throws ParseException { non_async_stmt(); break; default: - jj_la1[39] = jj_gen; + jj_la1[43] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1581,7 +1783,7 @@ final public void non_async_stmt() throws ParseException { } break; default: - jj_la1[40] = jj_gen; + jj_la1[44] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1590,12 +1792,12 @@ final public void non_async_stmt() throws ParseException { //simple_stmt: small_stmt (';' small_stmt)* [';'] NEWLINE final public void simple_stmt() throws ParseException { small_stmt(); - label_11: + label_12: while (true) { - if (jj_2_15(2)) { + if (jj_2_17(2)) { ; } else { - break label_11; + break label_12; } temporaryToken = jj_consume_token(SEMICOLON); grammarActions.addSpecialToken(temporaryToken); @@ -1607,7 +1809,7 @@ final public void simple_stmt() throws ParseException { grammarActions.addSpecialToken(temporaryToken); break; default: - jj_la1[41] = jj_gen; + jj_la1[45] = jj_gen; ; } try { @@ -1692,7 +1894,7 @@ final public void small_stmt() throws ParseException { grammarActions.addToPeek(temporaryToken, false); break; default: - jj_la1[42] = jj_gen; + jj_la1[46] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1787,7 +1989,7 @@ final public void expr_stmt() throws ParseException { SmartTestList(); break; default: - jj_la1[43] = jj_gen; + jj_la1[47] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1864,7 +2066,7 @@ final public void expr_stmt() throws ParseException { SmartTestList(); break; default: - jj_la1[44] = jj_gen; + jj_la1[48] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1941,7 +2143,7 @@ final public void expr_stmt() throws ParseException { SmartTestList(); break; default: - jj_la1[45] = jj_gen; + jj_la1[49] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -2018,7 +2220,7 @@ final public void expr_stmt() throws ParseException { SmartTestList(); break; default: - jj_la1[46] = jj_gen; + jj_la1[50] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -2095,7 +2297,7 @@ final public void expr_stmt() throws ParseException { SmartTestList(); break; default: - jj_la1[47] = jj_gen; + jj_la1[51] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -2172,7 +2374,7 @@ final public void expr_stmt() throws ParseException { SmartTestList(); break; default: - jj_la1[48] = jj_gen; + jj_la1[52] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -2249,7 +2451,7 @@ final public void expr_stmt() throws ParseException { SmartTestList(); break; default: - jj_la1[49] = jj_gen; + jj_la1[53] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -2326,7 +2528,7 @@ final public void expr_stmt() throws ParseException { SmartTestList(); break; default: - jj_la1[50] = jj_gen; + jj_la1[54] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -2403,7 +2605,7 @@ final public void expr_stmt() throws ParseException { SmartTestList(); break; default: - jj_la1[51] = jj_gen; + jj_la1[55] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -2480,7 +2682,7 @@ final public void expr_stmt() throws ParseException { SmartTestList(); break; default: - jj_la1[52] = jj_gen; + jj_la1[56] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -2557,7 +2759,7 @@ final public void expr_stmt() throws ParseException { SmartTestList(); break; default: - jj_la1[53] = jj_gen; + jj_la1[57] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -2634,7 +2836,7 @@ final public void expr_stmt() throws ParseException { SmartTestList(); break; default: - jj_la1[54] = jj_gen; + jj_la1[58] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -2711,7 +2913,7 @@ final public void expr_stmt() throws ParseException { SmartTestList(); break; default: - jj_la1[55] = jj_gen; + jj_la1[59] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -2737,21 +2939,21 @@ final public void expr_stmt() throws ParseException { } break; default: - jj_la1[58] = jj_gen; + jj_la1[62] = jj_gen; SimpleNode jjtn015 = builder.openNode( JJTEXPR_STMT); boolean jjtc015 = true; jjtree.openNodeScope(jjtn015); jjtreeOpenNodeScope(jjtn015); try { - label_12: + label_13: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EQUAL: ; break; default: - jj_la1[56] = jj_gen; - break label_12; + jj_la1[60] = jj_gen; + break label_13; } jj_consume_token(EQUAL); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -2802,7 +3004,7 @@ final public void expr_stmt() throws ParseException { grammarActions.popStarExpr(); break; default: - jj_la1[57] = jj_gen; + jj_la1[61] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -2882,13 +3084,13 @@ final public void annassign() throws ParseException { testlist(); break; default: - jj_la1[59] = jj_gen; + jj_la1[63] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; default: - jj_la1[60] = jj_gen; + jj_la1[64] = jj_gen; ; } } @@ -3016,7 +3218,7 @@ final public void flow_stmt() throws ParseException { raise_stmt(); break; default: - jj_la1[61] = jj_gen; + jj_la1[65] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -3076,7 +3278,7 @@ final public void return_stmt() throws ParseException { grammarActions.popStarExpr(); break; default: - jj_la1[62] = jj_gen; + jj_la1[66] = jj_gen; ; } } catch (Throwable jjte000) { @@ -3206,7 +3408,7 @@ final public void yield_expr() throws ParseException { isYieldFrom = yield_arg(); break; default: - jj_la1[63] = jj_gen; + jj_la1[67] = jj_gen; ; } jjtree.closeNodeScope(jjtn000, true); @@ -3290,7 +3492,7 @@ final public boolean yield_arg() throws ParseException { isYieldFrom=false; break; default: - jj_la1[64] = jj_gen; + jj_la1[68] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -3356,12 +3558,12 @@ final public void raise_stmt() throws ParseException { test(); break; default: - jj_la1[65] = jj_gen; + jj_la1[69] = jj_gen; ; } break; default: - jj_la1[66] = jj_gen; + jj_la1[70] = jj_gen; ; } } catch (Throwable jjte000) { @@ -3403,7 +3605,7 @@ final public void import_stmt() throws ParseException { ImportFrom(); break; default: - jj_la1[67] = jj_gen; + jj_la1[71] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -3420,15 +3622,15 @@ final public Import Import() throws ParseException { jjtreeOpenNodeScope(jjtn000); try { dotted_as_name(); - label_13: + label_14: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: - jj_la1[68] = jj_gen; - break label_13; + jj_la1[72] = jj_gen; + break label_14; } grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); @@ -3470,15 +3672,15 @@ final public void ImportFrom() throws ParseException { jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000);int level=0; int state=0;String fromName=null;String importName=null; try { - label_14: + label_15: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOT: ; break; default: - jj_la1[69] = jj_gen; - break label_14; + jj_la1[73] = jj_gen; + break label_15; } jj_consume_token(DOT); level++;markLastImportLevelPos(); @@ -3490,7 +3692,7 @@ final public void ImportFrom() throws ParseException { fromName = dotted_name(); break; default: - jj_la1[70] = jj_gen; + jj_la1[74] = jj_gen; ; } if(fromName==null && level==0){{if (true) throw new ParseException("Expecting to find '.' or name in import.");}} @@ -3506,15 +3708,15 @@ final public void ImportFrom() throws ParseException { case NAME: importName = import_as_name(); if(fromName != null && fromName.equals("__future__"))handleFutureImports(importName); - label_15: + label_16: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: - jj_la1[71] = jj_gen; - break label_15; + jj_la1[75] = jj_gen; + break label_16; } grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); @@ -3528,15 +3730,15 @@ final public void ImportFrom() throws ParseException { grammarActions.addSpecialToken(temporaryToken, STRATEGY_BEFORE_NEXT); importName = import_as_name(); if(fromName != null && fromName.equals("__future__"))handleFutureImports(importName); - label_16: + label_17: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: - jj_la1[72] = jj_gen; - break label_16; + jj_la1[76] = jj_gen; + break label_17; } if(state!=0){ {if (true) throw new ParseException("Invalid syntax: 2 commas cannot be grouped.", getToken(1));} @@ -3553,7 +3755,7 @@ final public void ImportFrom() throws ParseException { if(fromName != null && fromName.equals("__future__"))handleFutureImports(importName); break; default: - jj_la1[73] = jj_gen; + jj_la1[77] = jj_gen; ; } } @@ -3565,7 +3767,7 @@ final public void ImportFrom() throws ParseException { } break; default: - jj_la1[74] = jj_gen; + jj_la1[78] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -3611,7 +3813,7 @@ final public void dotted_as_name() throws ParseException { Name(); break; default: - jj_la1[75] = jj_gen; + jj_la1[79] = jj_gen; ; } } catch (Throwable jjte000) { @@ -3646,15 +3848,15 @@ final public String dotted_name() throws ParseException { try { t = Name(); sb.append(t.image); - label_17: + label_18: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOT: ; break; default: - jj_la1[76] = jj_gen; - break label_17; + jj_la1[80] = jj_gen; + break label_18; } jj_consume_token(DOT); t = Name(); @@ -3703,7 +3905,7 @@ final public String import_as_name() throws ParseException { Name(); break; default: - jj_la1[77] = jj_gen; + jj_la1[81] = jj_gen; ; } jjtree.closeNodeScope(jjtn000, true); @@ -3744,15 +3946,15 @@ final public void global_stmt() throws ParseException { temporaryToken = jj_consume_token(GLOBAL); grammarActions.addSpecialToken(temporaryToken, STRATEGY_BEFORE_NEXT); Name(); - label_18: + label_19: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: - jj_la1[78] = jj_gen; - break label_18; + jj_la1[82] = jj_gen; + break label_19; } grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); @@ -3791,12 +3993,12 @@ final public void nonlocal_stmt() throws ParseException { jj_consume_token(NONLOCAL); grammarActions.addSpecialToken("nonlocal ", STRATEGY_BEFORE_NEXT); Name(); - label_19: + label_20: while (true) { - if (jj_2_16(2)) { + if (jj_2_18(2)) { ; } else { - break label_19; + break label_20; } grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); @@ -3808,7 +4010,7 @@ final public void nonlocal_stmt() throws ParseException { jj_consume_token(COMMA); break; default: - jj_la1[79] = jj_gen; + jj_la1[83] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -3819,7 +4021,7 @@ final public void nonlocal_stmt() throws ParseException { testlist(); break; default: - jj_la1[80] = jj_gen; + jj_la1[84] = jj_gen; ; } } catch (Throwable jjte000) { @@ -3860,7 +4062,7 @@ final public void assert_stmt() throws ParseException { test(); break; default: - jj_la1[81] = jj_gen; + jj_la1[85] = jj_gen; ; } } catch (Throwable jjte000) { @@ -3916,7 +4118,7 @@ final public void compound_stmt() throws ParseException { match_stmt(); break; default: - jj_la1[82] = jj_gen; + jj_la1[86] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -3939,7 +4141,7 @@ final public void match_stmt() throws ParseException { handleNoNewline(e); } jj_consume_token(INDENT); - label_20: + label_21: while (true) { case_block(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -3947,8 +4149,8 @@ final public void match_stmt() throws ParseException { ; break; default: - jj_la1[83] = jj_gen; - break label_20; + jj_la1[87] = jj_gen; + break label_21; } } jj_consume_token(DEDENT); @@ -3993,7 +4195,7 @@ final public void subject_expr() throws ParseException { star_named_expr(); break; default: - jj_la1[84] = jj_gen; + jj_la1[88] = jj_gen; ; } break; @@ -4038,7 +4240,7 @@ final public void subject_expr() throws ParseException { namedexpr_test(); break; default: - jj_la1[85] = jj_gen; + jj_la1[89] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -4073,7 +4275,7 @@ final public void star_named_expr() throws ParseException { jj_consume_token(POWER); break; default: - jj_la1[86] = jj_gen; + jj_la1[90] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -4095,7 +4297,7 @@ final public void case_block() throws ParseException { guard(); break; default: - jj_la1[87] = jj_gen; + jj_la1[91] = jj_gen; ; } grammarActions.findTokenAndAdd(":"); @@ -4131,15 +4333,15 @@ final public void open_sequence_pattern() throws ParseException { jjtreeOpenNodeScope(jjtn000); try { maybe_star_pattern(); - label_21: + label_22: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: - jj_la1[88] = jj_gen; - break label_21; + jj_la1[92] = jj_gen; + break label_22; } grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); @@ -4151,7 +4353,7 @@ final public void open_sequence_pattern() throws ParseException { jj_consume_token(COMMA); break; default: - jj_la1[89] = jj_gen; + jj_la1[93] = jj_gen; ; } } catch (Throwable jjte000) { @@ -4217,7 +4419,7 @@ final public void maybe_star_pattern() throws ParseException { pattern(); break; default: - jj_la1[90] = jj_gen; + jj_la1[94] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -4267,7 +4469,7 @@ final public void pattern() throws ParseException { as_pattern(); break; default: - jj_la1[91] = jj_gen; + jj_la1[95] = jj_gen; ; } } catch (Throwable jjte000) { @@ -4306,15 +4508,15 @@ final public void or_pattern() throws ParseException { jjtreeOpenNodeScope(jjtn000); try { closed_pattern(); - label_22: + label_23: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case OR: ; break; default: - jj_la1[92] = jj_gen; - break label_22; + jj_la1[96] = jj_gen; + break label_23; } jj_consume_token(OR); closed_pattern(); @@ -4387,7 +4589,7 @@ final public void closed_pattern() throws ParseException { class_pattern(); break; default: - jj_la1[93] = jj_gen; + jj_la1[97] = jj_gen; ; } break; @@ -4399,7 +4601,7 @@ final public void closed_pattern() throws ParseException { mapping_pattern(); break; default: - jj_la1[94] = jj_gen; + jj_la1[98] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -4505,13 +4707,13 @@ final public void literal_pattern() throws ParseException { } break; default: - jj_la1[95] = jj_gen; + jj_la1[99] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; default: - jj_la1[96] = jj_gen; + jj_la1[100] = jj_gen; ; } break; @@ -4576,7 +4778,7 @@ final public void literal_pattern() throws ParseException { } break; default: - jj_la1[97] = jj_gen; + jj_la1[101] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -4671,7 +4873,7 @@ final public void signed_number() throws ParseException { } break; default: - jj_la1[98] = jj_gen; + jj_la1[102] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -4726,12 +4928,12 @@ final public void class_pattern() throws ParseException { jj_consume_token(COMMA); break; default: - jj_la1[99] = jj_gen; + jj_la1[103] = jj_gen; ; } break; default: - jj_la1[100] = jj_gen; + jj_la1[104] = jj_gen; ; } jj_consume_token(RPAREN); @@ -4771,16 +4973,16 @@ final public void attr() throws ParseException { pattern(); break; default: - jj_la1[102] = jj_gen; - label_23: + jj_la1[106] = jj_gen; + label_24: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOT: ; break; default: - jj_la1[101] = jj_gen; - break label_23; + jj_la1[105] = jj_gen; + break label_24; } jj_consume_token(DOT); Name(); @@ -4810,15 +5012,15 @@ final public void attr() throws ParseException { final public void pattern_arguments() throws ParseException { pattern(); - label_24: + label_25: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: - jj_la1[103] = jj_gen; - break label_24; + jj_la1[107] = jj_gen; + break label_25; } grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); @@ -4835,7 +5037,7 @@ final public void sequence_pattern() throws ParseException { tuple_pattern(); break; default: - jj_la1[104] = jj_gen; + jj_la1[108] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -4888,7 +5090,7 @@ final public void list_pattern() throws ParseException { open_sequence_pattern(); break; default: - jj_la1[105] = jj_gen; + jj_la1[109] = jj_gen; ; } grammarActions.addSpecialToken("]",STRATEGY_ADD_AFTER_PREV); @@ -4962,7 +5164,7 @@ final public void tuple_pattern() throws ParseException { open_sequence_pattern(); break; default: - jj_la1[106] = jj_gen; + jj_la1[110] = jj_gen; ; } grammarActions.addSpecialToken(")",STRATEGY_ADD_AFTER_PREV); @@ -5032,7 +5234,7 @@ final public void mapping_pattern() throws ParseException { items_pattern(); break; default: - jj_la1[107] = jj_gen; + jj_la1[111] = jj_gen; ; } jj_consume_token(RBRACE); @@ -5060,15 +5262,15 @@ final public void mapping_pattern() throws ParseException { final public void items_pattern() throws ParseException { key_value_pattern(); - label_25: + label_26: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: - jj_la1[108] = jj_gen; - break label_25; + jj_la1[112] = jj_gen; + break label_26; } grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); @@ -5080,7 +5282,7 @@ final public void items_pattern() throws ParseException { jj_consume_token(COMMA); break; default: - jj_la1[109] = jj_gen; + jj_la1[113] = jj_gen; ; } } @@ -5159,7 +5361,7 @@ final public void key_value_pattern() throws ParseException { attr(); break; default: - jj_la1[110] = jj_gen; + jj_la1[114] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -5171,7 +5373,7 @@ final public void key_value_pattern() throws ParseException { double_star_pattern(); break; default: - jj_la1[111] = jj_gen; + jj_la1[115] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -5223,7 +5425,7 @@ final public void async_stmt() throws ParseException { for_stmt(); break; default: - jj_la1[112] = jj_gen; + jj_la1[116] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -5247,15 +5449,15 @@ final public void if_stmt() throws ParseException { grammarActions.findTokenAndAdd(":"); jj_consume_token(COLON); suite(); - label_26: + label_27: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ELIF: ; break; default: - jj_la1[113] = jj_gen; - break label_26; + jj_la1[117] = jj_gen; + break label_27; } begin_elif_stmt(); namedexpr_test(); @@ -5270,7 +5472,7 @@ final public void if_stmt() throws ParseException { grammarActions.addToPeek(elseToks[0], false, Suite.class);grammarActions.addToPeek(elseToks[1], false, Suite.class); break; default: - jj_la1[114] = jj_gen; + jj_la1[118] = jj_gen; ; } } catch (Throwable jjte000) { @@ -5310,7 +5512,7 @@ final public void namedexpr_test() throws ParseException { test(); break; default: - jj_la1[115] = jj_gen; + jj_la1[119] = jj_gen; ; } } catch (Throwable jjte000) { @@ -5375,7 +5577,7 @@ final public void while_stmt() throws ParseException { grammarActions.addToPeek(elseToks[0], false, Suite.class);grammarActions.addToPeek(elseToks[1], false, Suite.class); break; default: - jj_la1[116] = jj_gen; + jj_la1[120] = jj_gen; ; } } catch (Throwable jjte000) { @@ -5469,7 +5671,7 @@ final public void for_stmt() throws ParseException { suite(); break; default: - jj_la1[117] = jj_gen; + jj_la1[121] = jj_gen; ; } } catch (Throwable jjte000) { @@ -5523,7 +5725,7 @@ final public void try_stmt() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EXCEPT_MULTIPLY: case EXCEPT: - label_27: + label_28: while (true) { except_clause(tryNode); i++; @@ -5533,8 +5735,8 @@ final public void try_stmt() throws ParseException { ; break; default: - jj_la1[118] = jj_gen; - break label_27; + jj_la1[122] = jj_gen; + break label_28; } } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -5558,7 +5760,7 @@ final public void try_stmt() throws ParseException { } break; default: - jj_la1[119] = jj_gen; + jj_la1[123] = jj_gen; ; } SimpleNode jjtn003 = builder.openNode( JJTTRY_STMT); @@ -5587,7 +5789,7 @@ final public void try_stmt() throws ParseException { } break; default: - jj_la1[120] = jj_gen; + jj_la1[124] = jj_gen; ; } } catch (Throwable jjte003) { @@ -5641,7 +5843,7 @@ final public void try_stmt() throws ParseException { } break; default: - jj_la1[121] = jj_gen; + jj_la1[125] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -5724,7 +5926,7 @@ final public void except_clause(SimpleNode tryNode) throws ParseException { this.grammarActions.addToPeek("except*",false); break; default: - jj_la1[122] = jj_gen; + jj_la1[126] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -5775,12 +5977,12 @@ final public void except_clause(SimpleNode tryNode) throws ParseException { test(); break; default: - jj_la1[123] = jj_gen; + jj_la1[127] = jj_gen; ; } break; default: - jj_la1[124] = jj_gen; + jj_la1[128] = jj_gen; ; } grammarActions.findTokenAndAdd(":"); @@ -5850,17 +6052,17 @@ final public void with_stmt() throws ParseException { try { jj_consume_token(WITH); grammarActions.addSpecialToken("with ", STRATEGY_BEFORE_NEXT); - if (jj_2_17(2147483647)) { + if (jj_2_19(2147483647)) { with_item(); - label_28: + label_29: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: - jj_la1[125] = jj_gen; - break label_28; + jj_la1[129] = jj_gen; + break label_29; } grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); @@ -5871,15 +6073,15 @@ final public void with_stmt() throws ParseException { case LPAREN: jj_consume_token(LPAREN); with_item(); - label_29: + label_30: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: - jj_la1[126] = jj_gen; - break label_29; + jj_la1[130] = jj_gen; + break label_30; } grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); @@ -5888,7 +6090,7 @@ final public void with_stmt() throws ParseException { jj_consume_token(RPAREN); break; default: - jj_la1[127] = jj_gen; + jj_la1[131] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -5935,7 +6137,7 @@ final public void with_item() throws ParseException { expr(); break; default: - jj_la1[128] = jj_gen; + jj_la1[132] = jj_gen; ; } } catch (Throwable jjte000) { @@ -6034,7 +6236,7 @@ final public void suite() throws ParseException { } catch (ParseException e) { handleErrorInIndent(e); } - label_30: + label_31: while (true) { try { stmt(); @@ -6105,8 +6307,8 @@ final public void suite() throws ParseException { ; break; default: - jj_la1[129] = jj_gen; - break label_30; + jj_la1[133] = jj_gen; + break label_31; } } try { @@ -6118,7 +6320,7 @@ final public void suite() throws ParseException { case INDENT: jj_consume_token(INDENT); handleNoNewlineInSuiteFound(); - label_31: + label_32: while (true) { try { stmt(); @@ -6189,8 +6391,8 @@ final public void suite() throws ParseException { ; break; default: - jj_la1[130] = jj_gen; - break label_31; + jj_la1[134] = jj_gen; + break label_32; } } try { @@ -6200,7 +6402,7 @@ final public void suite() throws ParseException { } break; default: - jj_la1[131] = jj_gen; + jj_la1[135] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -6286,12 +6488,12 @@ final public void test() throws ParseException { if_exp(); break; default: - jj_la1[132] = jj_gen; + jj_la1[136] = jj_gen; ; } break; default: - jj_la1[133] = jj_gen; + jj_la1[137] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -6363,7 +6565,7 @@ final public void test_nocond() throws ParseException { lambdef_nocond(); break; default: - jj_la1[134] = jj_gen; + jj_la1[138] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -6414,15 +6616,15 @@ final public void or_test() throws ParseException { jjtreeOpenNodeScope(jjtn000); try { and_test(); - label_32: + label_33: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case OR_BOOL: ; break; default: - jj_la1[135] = jj_gen; - break label_32; + jj_la1[139] = jj_gen; + break label_33; } jj_consume_token(OR_BOOL); and_test(); @@ -6458,15 +6660,15 @@ final public void and_test() throws ParseException { jjtreeOpenNodeScope(jjtn000); try { not_test(); - label_33: + label_34: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AND_BOOL: ; break; default: - jj_la1[136] = jj_gen; - break label_33; + jj_la1[140] = jj_gen; + break label_34; } jj_consume_token(AND_BOOL); not_test(); @@ -6564,7 +6766,7 @@ final public void not_test() throws ParseException { comparison(); break; default: - jj_la1[137] = jj_gen; + jj_la1[141] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -6578,7 +6780,7 @@ final public void comparison() throws ParseException { jjtreeOpenNodeScope(jjtn001); try { expr(); - label_34: + label_35: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case GREATER: @@ -6593,8 +6795,8 @@ final public void comparison() throws ParseException { ; break; default: - jj_la1[138] = jj_gen; - break label_34; + jj_la1[142] = jj_gen; + break label_35; } comp_op(); expr(); @@ -6738,8 +6940,8 @@ final public void comp_op() throws ParseException { } break; default: - jj_la1[139] = jj_gen; - if (jj_2_18(2)) { + jj_la1[143] = jj_gen; + if (jj_2_20(2)) { jj_consume_token(IS); SimpleNode jjtn009 = builder.openNode( JJTIS_NOT_CMP); boolean jjtc009 = true; @@ -6770,7 +6972,7 @@ final public void comp_op() throws ParseException { } break; default: - jj_la1[140] = jj_gen; + jj_la1[144] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -6781,15 +6983,15 @@ final public void comp_op() throws ParseException { //expr: xor_expr ('|' xor_expr)* final public void expr() throws ParseException { xor_expr(); - label_35: + label_36: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case OR: ; break; default: - jj_la1[141] = jj_gen; - break label_35; + jj_la1[145] = jj_gen; + break label_36; } jj_consume_token(OR); SimpleNode jjtn001 = builder.openNode( JJTOR_2OP); @@ -6824,15 +7026,15 @@ final public void expr() throws ParseException { //xor_expr: and_expr ('^' and_expr)* final public void xor_expr() throws ParseException { and_expr(); - label_36: + label_37: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case XOR: ; break; default: - jj_la1[142] = jj_gen; - break label_36; + jj_la1[146] = jj_gen; + break label_37; } jj_consume_token(XOR); SimpleNode jjtn001 = builder.openNode( JJTXOR_2OP); @@ -6867,15 +7069,15 @@ final public void xor_expr() throws ParseException { //and_expr: shift_expr ('&' shift_expr)* final public void and_expr() throws ParseException { shift_expr(); - label_37: + label_38: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AND: ; break; default: - jj_la1[143] = jj_gen; - break label_37; + jj_la1[147] = jj_gen; + break label_38; } jj_consume_token(AND); SimpleNode jjtn001 = builder.openNode( JJTAND_2OP); @@ -6910,7 +7112,7 @@ final public void and_expr() throws ParseException { //shift_expr: arith_expr (('<<'|'>>') arith_expr)* final public void shift_expr() throws ParseException { arith_expr(); - label_38: + label_39: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LSHIFT: @@ -6918,8 +7120,8 @@ final public void shift_expr() throws ParseException { ; break; default: - jj_la1[144] = jj_gen; - break label_38; + jj_la1[148] = jj_gen; + break label_39; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LSHIFT: @@ -6981,7 +7183,7 @@ final public void shift_expr() throws ParseException { } break; default: - jj_la1[145] = jj_gen; + jj_la1[149] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -6991,7 +7193,7 @@ final public void shift_expr() throws ParseException { //arith_expr: term (('+'|'-') term)* final public void arith_expr() throws ParseException { term(); - label_39: + label_40: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: @@ -6999,8 +7201,8 @@ final public void arith_expr() throws ParseException { ; break; default: - jj_la1[146] = jj_gen; - break label_39; + jj_la1[150] = jj_gen; + break label_40; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: @@ -7062,7 +7264,7 @@ final public void arith_expr() throws ParseException { } break; default: - jj_la1[147] = jj_gen; + jj_la1[151] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -7072,7 +7274,7 @@ final public void arith_expr() throws ParseException { //term: factor (('*'|'@'|'/'|'%'|'//') factor)* final public void term() throws ParseException { factor(); - label_40: + label_41: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case MULTIPLY: @@ -7083,8 +7285,8 @@ final public void term() throws ParseException { ; break; default: - jj_la1[148] = jj_gen; - break label_40; + jj_la1[152] = jj_gen; + break label_41; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case MULTIPLY: @@ -7233,7 +7435,7 @@ final public void term() throws ParseException { } break; default: - jj_la1[149] = jj_gen; + jj_la1[153] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -7366,7 +7568,7 @@ final public void factor() throws ParseException { power(); break; default: - jj_la1[150] = jj_gen; + jj_la1[154] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -7377,12 +7579,12 @@ final public void factor() throws ParseException { //power: atom_expr ['**' factor] final public void power() throws ParseException { atom_expr(); - label_41: + label_42: while (true) { - if (jj_2_19(2)) { + if (jj_2_21(2)) { ; } else { - break label_41; + break label_42; } jj_consume_token(POWER); SimpleNode jjtn001 = builder.openNode( JJTPOW_2OP); @@ -7453,7 +7655,7 @@ final public void atom_expr() throws ParseException { case TRIPLE_USTRING: case TRIPLE_USTRING2: atom(); - label_42: + label_43: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: @@ -7462,14 +7664,14 @@ final public void atom_expr() throws ParseException { ; break; default: - jj_la1[151] = jj_gen; - break label_42; + jj_la1[155] = jj_gen; + break label_43; } trailer(); } break; default: - jj_la1[152] = jj_gen; + jj_la1[156] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -7484,7 +7686,7 @@ final public void await_atom_expr() throws ParseException { try { spStr = jj_consume_token(AWAIT); atom(); - label_43: + label_44: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: @@ -7493,8 +7695,8 @@ final public void await_atom_expr() throws ParseException { ; break; default: - jj_la1[153] = jj_gen; - break label_43; + jj_la1[157] = jj_gen; + break label_44; } trailer(); } @@ -7580,7 +7782,7 @@ final public void trailer() throws ParseException { arglist(); break; default: - jj_la1[154] = jj_gen; + jj_la1[158] = jj_gen; ; } jj_consume_token(RPAREN); @@ -7676,7 +7878,7 @@ final public void trailer() throws ParseException { } break; default: - jj_la1[155] = jj_gen; + jj_la1[159] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -7688,7 +7890,7 @@ final public void trailer() throws ParseException { // NAME | NUMBER | STRING+ | '...' | 'None' | 'True' | 'False') final public void atom() throws ParseException { Object spStr;Object spStr2; - if (jj_2_20(2)) { + if (jj_2_22(2)) { SimpleNode jjtn001 = builder.openNode( JJTTUPLE); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); @@ -7705,7 +7907,7 @@ final public void atom() throws ParseException { } } grammarActions.addToPeek(spStr, false); grammarActions.addToPeek(spStr2, true); - } else if (jj_2_21(2)) { + } else if (jj_2_23(2)) { SimpleNode jjtn002 = builder.openNode( JJTTUPLE); boolean jjtc002 = true; jjtree.openNodeScope(jjtn002); @@ -7759,7 +7961,7 @@ final public void atom() throws ParseException { testlist_comp(); break; default: - jj_la1[156] = jj_gen; + jj_la1[160] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -7839,7 +8041,7 @@ final public void atom() throws ParseException { testlist_comp(); break; default: - jj_la1[157] = jj_gen; + jj_la1[161] = jj_gen; ; } spStr2 = grammarActions.createSpecialStr("]", false); @@ -7918,7 +8120,7 @@ final public void atom() throws ParseException { dictorsetmaker(); break; default: - jj_la1[158] = jj_gen; + jj_la1[162] = jj_gen; ; } spStr2 = grammarActions.createSpecialStr("}", false); @@ -8033,7 +8235,7 @@ final public void atom() throws ParseException { case TRIPLE_USTRING: case TRIPLE_USTRING2: String(); - label_44: + label_45: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SINGLE_STRING: @@ -8055,8 +8257,8 @@ final public void atom() throws ParseException { ; break; default: - jj_la1[159] = jj_gen; - break label_44; + jj_la1[163] = jj_gen; + break label_45; } SimpleNode jjtn009 = builder.openNode( JJTSTRJOIN); boolean jjtc009 = true; @@ -8087,7 +8289,7 @@ final public void atom() throws ParseException { } break; default: - jj_la1[160] = jj_gen; + jj_la1[164] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -8115,7 +8317,7 @@ final public void lambdef() throws ParseException { hasArgs=true; break; default: - jj_la1[161] = jj_gen; + jj_la1[165] = jj_gen; ; } temporaryToken=grammarActions.createSpecialStr(":"); @@ -8167,7 +8369,7 @@ final public void lambdef_nocond() throws ParseException { hasArgs=true; break; default: - jj_la1[162] = jj_gen; + jj_la1[166] = jj_gen; ; } temporaryToken=grammarActions.createSpecialStr(":"); @@ -8207,12 +8409,12 @@ final public void subscriptlist() throws ParseException { jjtreeOpenNodeScope(jjtn001); try { subscript(); - label_45: + label_46: while (true) { - if (jj_2_22(2)) { + if (jj_2_24(2)) { ; } else { - break label_45; + break label_46; } grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); @@ -8223,7 +8425,7 @@ final public void subscriptlist() throws ParseException { Comma(); break; default: - jj_la1[163] = jj_gen; + jj_la1[167] = jj_gen; ; } } catch (Throwable jjte001) { @@ -8315,7 +8517,7 @@ final public void subscript() throws ParseException { slice(); break; default: - jj_la1[164] = jj_gen; + jj_la1[168] = jj_gen; ; } } catch (Throwable jjte002) { @@ -8368,7 +8570,7 @@ final public void subscript() throws ParseException { } break; default: - jj_la1[165] = jj_gen; + jj_la1[169] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -8419,7 +8621,7 @@ final public void slice() throws ParseException { test(); break; default: - jj_la1[166] = jj_gen; + jj_la1[170] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -8467,12 +8669,12 @@ final public void slice() throws ParseException { test(); break; default: - jj_la1[167] = jj_gen; + jj_la1[171] = jj_gen; ; } break; default: - jj_la1[168] = jj_gen; + jj_la1[172] = jj_gen; ; } } @@ -8560,16 +8762,16 @@ final public void exprlist() throws ParseException { star_expr(); break; default: - jj_la1[169] = jj_gen; + jj_la1[173] = jj_gen; jj_consume_token(-1); throw new ParseException(); } - label_46: + label_47: while (true) { - if (jj_2_23(2)) { + if (jj_2_25(2)) { ; } else { - break label_46; + break label_47; } grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); @@ -8616,7 +8818,7 @@ final public void exprlist() throws ParseException { star_expr(); break; default: - jj_la1[170] = jj_gen; + jj_la1[174] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -8626,7 +8828,7 @@ final public void exprlist() throws ParseException { Comma(); break; default: - jj_la1[171] = jj_gen; + jj_la1[175] = jj_gen; ; } } catch (Throwable jjte001) { @@ -8659,12 +8861,12 @@ final public void SmartTestList() throws ParseException { jjtreeOpenNodeScope(jjtn001); try { test(); - label_47: + label_48: while (true) { - if (jj_2_24(2)) { + if (jj_2_26(2)) { ; } else { - break label_47; + break label_48; } grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); @@ -8675,7 +8877,7 @@ final public void SmartTestList() throws ParseException { Comma(); break; default: - jj_la1[172] = jj_gen; + jj_la1[176] = jj_gen; ; } } catch (Throwable jjte001) { @@ -8703,12 +8905,12 @@ final public void SmartTestList() throws ParseException { //testlist: test (',' test)* [','] final public void testlist() throws ParseException { test(); - label_48: + label_49: while (true) { - if (jj_2_25(2)) { + if (jj_2_27(2)) { ; } else { - break label_48; + break label_49; } grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); @@ -8720,7 +8922,7 @@ final public void testlist() throws ParseException { jj_consume_token(COMMA); break; default: - jj_la1[173] = jj_gen; + jj_la1[177] = jj_gen; ; } } @@ -8777,16 +8979,16 @@ final public void testlist_star_expr() throws ParseException { star_expr(); break; default: - jj_la1[174] = jj_gen; + jj_la1[178] = jj_gen; jj_consume_token(-1); throw new ParseException(); } - label_49: + label_50: while (true) { - if (jj_2_26(2)) { + if (jj_2_28(2)) { ; } else { - break label_49; + break label_50; } grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); @@ -8835,7 +9037,7 @@ final public void testlist_star_expr() throws ParseException { star_expr(); break; default: - jj_la1[175] = jj_gen; + jj_la1[179] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -8845,7 +9047,7 @@ final public void testlist_star_expr() throws ParseException { Comma(); break; default: - jj_la1[176] = jj_gen; + jj_la1[180] = jj_gen; ; } } catch (Throwable jjte001) { @@ -8971,13 +9173,13 @@ final public void dictorsetmaker() throws ParseException { comp_for(); break; default: - jj_la1[179] = jj_gen; - label_50: + jj_la1[183] = jj_gen; + label_51: while (true) { - if (jj_2_27(2)) { + if (jj_2_29(2)) { ; } else { - break label_50; + break label_51; } grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); @@ -9030,7 +9232,7 @@ final public void dictorsetmaker() throws ParseException { expr(); break; default: - jj_la1[177] = jj_gen; + jj_la1[181] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -9041,14 +9243,14 @@ final public void dictorsetmaker() throws ParseException { jj_consume_token(COMMA); break; default: - jj_la1[178] = jj_gen; + jj_la1[182] = jj_gen; ; } } break; default: - jj_la1[182] = jj_gen; - if (jj_2_29(2)) { + jj_la1[186] = jj_gen; + if (jj_2_31(2)) { comp_for(); } else { SimpleNode jjtn001 = builder.openNode( JJTSET); @@ -9056,12 +9258,12 @@ final public void dictorsetmaker() throws ParseException { jjtree.openNodeScope(jjtn001); jjtreeOpenNodeScope(jjtn001); try { - label_51: + label_52: while (true) { - if (jj_2_28(2)) { + if (jj_2_30(2)) { ; } else { - break label_51; + break label_52; } grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); @@ -9112,7 +9314,7 @@ final public void dictorsetmaker() throws ParseException { grammarActions.popStarExpr(); break; default: - jj_la1[180] = jj_gen; + jj_la1[184] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -9144,7 +9346,7 @@ final public void dictorsetmaker() throws ParseException { jj_consume_token(COMMA); break; default: - jj_la1[181] = jj_gen; + jj_la1[185] = jj_gen; ; } } @@ -9158,13 +9360,13 @@ final public void dictorsetmaker() throws ParseException { comp_for(); break; default: - jj_la1[185] = jj_gen; - label_52: + jj_la1[189] = jj_gen; + label_53: while (true) { - if (jj_2_30(2)) { + if (jj_2_32(2)) { ; } else { - break label_52; + break label_53; } grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); @@ -9217,7 +9419,7 @@ final public void dictorsetmaker() throws ParseException { expr(); break; default: - jj_la1[183] = jj_gen; + jj_la1[187] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -9228,7 +9430,7 @@ final public void dictorsetmaker() throws ParseException { jj_consume_token(COMMA); break; default: - jj_la1[184] = jj_gen; + jj_la1[188] = jj_gen; ; } } @@ -9237,7 +9439,7 @@ final public void dictorsetmaker() throws ParseException { grammarActions.pushStarExpr(Starred.Load); star_expr(); grammarActions.popStarExpr(); - if (jj_2_32(2)) { + if (jj_2_34(2)) { comp_for(); } else { SimpleNode jjtn002 = builder.openNode( JJTSET); @@ -9245,12 +9447,12 @@ final public void dictorsetmaker() throws ParseException { jjtree.openNodeScope(jjtn002); jjtreeOpenNodeScope(jjtn002); try { - label_53: + label_54: while (true) { - if (jj_2_31(2)) { + if (jj_2_33(2)) { ; } else { - break label_53; + break label_54; } grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); @@ -9301,7 +9503,7 @@ final public void dictorsetmaker() throws ParseException { grammarActions.popStarExpr(); break; default: - jj_la1[186] = jj_gen; + jj_la1[190] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -9333,12 +9535,12 @@ final public void dictorsetmaker() throws ParseException { jj_consume_token(COMMA); break; default: - jj_la1[187] = jj_gen; + jj_la1[191] = jj_gen; ; } break; default: - jj_la1[188] = jj_gen; + jj_la1[192] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -9393,12 +9595,12 @@ final public void testlist_comp() throws ParseException { grammarActions.popStarExpr(); break; default: - jj_la1[189] = jj_gen; + jj_la1[193] = jj_gen; jj_consume_token(-1); throw new ParseException(); } - if (jj_2_34(2)) { - label_54: + if (jj_2_36(2)) { + label_55: while (true) { comp_for(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -9407,17 +9609,17 @@ final public void testlist_comp() throws ParseException { ; break; default: - jj_la1[190] = jj_gen; - break label_54; + jj_la1[194] = jj_gen; + break label_55; } } } else { - label_55: + label_56: while (true) { - if (jj_2_33(2)) { + if (jj_2_35(2)) { ; } else { - break label_55; + break label_56; } grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); @@ -9468,7 +9670,7 @@ final public void testlist_comp() throws ParseException { grammarActions.popStarExpr(); break; default: - jj_la1[191] = jj_gen; + jj_la1[195] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -9483,7 +9685,7 @@ final public void testlist_comp() throws ParseException { Comma(); break; default: - jj_la1[192] = jj_gen; + jj_la1[196] = jj_gen; ; } } catch (Throwable jjte001) { @@ -9520,7 +9722,7 @@ final public void comp_iter() throws ParseException { comp_if(); break; default: - jj_la1[193] = jj_gen; + jj_la1[197] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -9539,7 +9741,7 @@ final public void comp_for() throws ParseException { jj_consume_token(ASYNC); break; default: - jj_la1[194] = jj_gen; + jj_la1[198] = jj_gen; ; } grammarActions.findTokenAndAdd("for"); @@ -9557,7 +9759,7 @@ final public void comp_for() throws ParseException { comp_iter(); break; default: - jj_la1[195] = jj_gen; + jj_la1[199] = jj_gen; ; } } catch (Throwable jjte000) { @@ -9594,7 +9796,7 @@ final public void comp_if() throws ParseException { comp_iter(); break; default: - jj_la1[196] = jj_gen; + jj_la1[200] = jj_gen; ; } } @@ -9619,7 +9821,7 @@ final public void decorated() throws ParseException { async_funcdef(); break; default: - jj_la1[197] = jj_gen; + jj_la1[201] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -9656,7 +9858,7 @@ final public void async_funcdef() throws ParseException { } } -//classdef: 'class' NAME ['(' [arglist] ')'] ':' suite +//classdef: 'class' NAME [type_params] ['(' [arglist] ')'] ':' suite final public void classdef() throws ParseException { /*@bgen(jjtree) classdef */ SimpleNode jjtn000 = builder.openNode( JJTCLASSDEF); @@ -9668,10 +9870,18 @@ final public void classdef() throws ParseException { this.markLastAsSuiteStart(); Name(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LBRACKET: + type_params(); + break; + default: + jj_la1[202] = jj_gen; + ; + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: - temporaryToken=grammarActions.createSpecialStr("("); + temporaryToken=grammarActions.createSpecialStr("("); jj_consume_token(LPAREN); - grammarActions.addSpecialToken(temporaryToken, STRATEGY_ADD_AFTER_PREV); + grammarActions.addSpecialToken(temporaryToken, STRATEGY_ADD_AFTER_PREV); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: case LBRACE: @@ -9716,21 +9926,21 @@ final public void classdef() throws ParseException { arglist(); break; default: - jj_la1[198] = jj_gen; + jj_la1[203] = jj_gen; ; } try { - grammarActions.findTokenAndAdd(")"); + grammarActions.findTokenAndAdd(")"); jj_consume_token(RPAREN); } catch (ParseException e) { - handleRParensNearButNotCurrent(e); + handleRParensNearButNotCurrent(e); } break; default: - jj_la1[199] = jj_gen; + jj_la1[204] = jj_gen; ; } - ISpecialStr s = grammarActions.findTokenAndAdd(":"); if(s != null){grammarActions.markEndDefColon(s, jjtn000);} + ISpecialStr s = grammarActions.findTokenAndAdd(":"); if(s != null){grammarActions.markEndDefColon(s, jjtn000);} jj_consume_token(COLON); suite(); } catch (Throwable jjte000) { @@ -9758,12 +9968,12 @@ final public void classdef() throws ParseException { // arglist: argument (',' argument)* [','] final public void arglist() throws ParseException { argument(); - label_56: + label_57: while (true) { - if (jj_2_35(2)) { + if (jj_2_37(2)) { ; } else { - break label_56; + break label_57; } grammarActions.findTokenAndAdd(","); jj_consume_token(COMMA); @@ -9775,7 +9985,7 @@ final public void arglist() throws ParseException { jj_consume_token(COMMA); break; default: - jj_la1[200] = jj_gen; + jj_la1[205] = jj_gen; ; } } @@ -9864,9 +10074,9 @@ final public void argument() throws ParseException { jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); try { - if (jj_2_37(2)) { + if (jj_2_39(2)) { test(); - if (jj_2_36(2)) { + if (jj_2_38(2)) { Keyword(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { @@ -9875,14 +10085,14 @@ final public void argument() throws ParseException { test(); break; default: - jj_la1[202] = jj_gen; + jj_la1[207] = jj_gen; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case FOR: case ASYNC: comp_for(); break; default: - jj_la1[201] = jj_gen; + jj_la1[206] = jj_gen; ; } } @@ -9896,7 +10106,7 @@ final public void argument() throws ParseException { ExtraArgValueList(); break; default: - jj_la1[203] = jj_gen; + jj_la1[208] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -10012,7 +10222,7 @@ final public void Number() throws ParseException { break; default: - jj_la1[204] = jj_gen; + jj_la1[209] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -10059,7 +10269,7 @@ final public Token Name() throws ParseException { t = jj_consume_token(CASE); break; default: - jj_la1[205] = jj_gen; + jj_la1[210] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -10387,7 +10597,7 @@ final public void String() throws ParseException { } break; default: - jj_la1[206] = jj_gen; + jj_la1[211] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -10652,1427 +10862,1229 @@ private boolean jj_2_37(int xla) { finally { jj_save(36, xla); } } - private boolean jj_3R_126() { - if (jj_3R_158()) return true; - return false; + private boolean jj_2_38(int xla) { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_38(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(37, xla); } } - private boolean jj_3R_125() { - if (jj_scan_token(NOT)) return true; - if (jj_3R_72()) return true; - return false; + private boolean jj_2_39(int xla) { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_39(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(38, xla); } } - private boolean jj_3R_316() { - if (jj_scan_token(FLOORDIVIDE)) return true; - if (jj_3R_72()) return true; + private boolean jj_3R_105() { + if (jj_3R_149()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3_4()) { jj_scanpos = xsp; break; } + } + xsp = jj_scanpos; + if (jj_3R_537()) jj_scanpos = xsp; return false; } - private boolean jj_3R_124() { - if (jj_scan_token(MINUS)) return true; - if (jj_3R_72()) return true; + private boolean jj_3R_62() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_105()) { + jj_scanpos = xsp; + if (jj_3R_106()) return true; + } return false; } - private boolean jj_3R_315() { - if (jj_scan_token(MODULO)) return true; - if (jj_3R_72()) return true; + private boolean jj_3R_489() { + if (jj_3R_107()) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_505()) jj_scanpos = xsp; return false; } - private boolean jj_3R_123() { - if (jj_scan_token(PLUS)) return true; - if (jj_3R_72()) return true; + private boolean jj_3R_137() { + if (jj_3R_170()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_191()) { jj_scanpos = xsp; break; } + } return false; } - private boolean jj_3R_72() { + private boolean jj_3R_488() { + if (jj_3R_149()) return true; Token xsp; - xsp = jj_scanpos; - if (jj_3R_123()) { - jj_scanpos = xsp; - if (jj_3R_124()) { - jj_scanpos = xsp; - if (jj_3R_125()) { - jj_scanpos = xsp; - if (jj_3R_126()) return true; - } - } + while (true) { + xsp = jj_scanpos; + if (jj_3_6()) { jj_scanpos = xsp; break; } } + xsp = jj_scanpos; + if (jj_3_7()) jj_scanpos = xsp; return false; } - private boolean jj_3R_314() { - if (jj_scan_token(DIVIDE)) return true; - if (jj_3R_72()) return true; + private boolean jj_3R_333() { + if (jj_scan_token(IS)) return true; return false; } - private boolean jj_3R_313() { - if (jj_scan_token(AT)) return true; - if (jj_3R_72()) return true; + private boolean jj_3_20() { + if (jj_scan_token(IS)) return true; + if (jj_scan_token(NOT_BOOL)) return true; return false; } - private boolean jj_3R_312() { - if (jj_scan_token(MULTIPLY)) return true; - if (jj_3R_72()) return true; + private boolean jj_3R_332() { + if (jj_scan_token(NOT_BOOL)) return true; + if (jj_scan_token(IN)) return true; return false; } - private boolean jj_3R_259() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_312()) { - jj_scanpos = xsp; - if (jj_3R_313()) { - jj_scanpos = xsp; - if (jj_3R_314()) { - jj_scanpos = xsp; - if (jj_3R_315()) { - jj_scanpos = xsp; - if (jj_3R_316()) return true; - } - } - } - } + private boolean jj_3R_331() { + if (jj_scan_token(IN)) return true; return false; } - private boolean jj_3_6() { - if (jj_scan_token(COLON)) return true; - if (jj_3R_61()) return true; + private boolean jj_3R_330() { + if (jj_scan_token(NOTEQUAL)) return true; return false; } - private boolean jj_3R_513() { - if (jj_scan_token(EQUAL)) return true; - if (jj_3R_61()) return true; + private boolean jj_3R_329() { + if (jj_scan_token(EQLESS)) return true; return false; } - private boolean jj_3R_246() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_260()) { - jj_scanpos = xsp; - if (jj_3R_261()) return true; - } + private boolean jj_3R_504() { + if (jj_scan_token(COMMA)) return true; return false; } - private boolean jj_3R_260() { - if (jj_scan_token(PLUS)) return true; - if (jj_3R_240()) return true; + private boolean jj_3R_328() { + if (jj_scan_token(EQGREATER)) return true; return false; } - private boolean jj_3R_97() { - if (jj_3R_70()) return true; + private boolean jj_3_5() { + if (jj_scan_token(COMMA)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3_6()) jj_scanpos = xsp; + if (jj_3R_62()) jj_scanpos = xsp; return false; } - private boolean jj_3R_230() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_247()) { - jj_scanpos = xsp; - if (jj_3R_248()) return true; - } + private boolean jj_3R_327() { + if (jj_scan_token(EQEQUAL)) return true; return false; } - private boolean jj_3R_240() { - if (jj_3R_72()) return true; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_259()) { jj_scanpos = xsp; break; } - } + private boolean jj_3R_326() { + if (jj_scan_token(GREATER)) return true; return false; } - private boolean jj_3R_247() { - if (jj_scan_token(LSHIFT)) return true; - if (jj_3R_221()) return true; + private boolean jj_3R_259() { + if (jj_3R_292()) return true; + if (jj_3R_137()) return true; return false; } - private boolean jj_3R_524() { - if (jj_scan_token(COMMA)) return true; + private boolean jj_3R_325() { + if (jj_scan_token(LESS)) return true; return false; } - private boolean jj_3R_503() { - if (jj_scan_token(EQUAL)) return true; - if (jj_3R_61()) return true; + private boolean jj_3R_292() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_325()) { + jj_scanpos = xsp; + if (jj_3R_326()) { + jj_scanpos = xsp; + if (jj_3R_327()) { + jj_scanpos = xsp; + if (jj_3R_328()) { + jj_scanpos = xsp; + if (jj_3R_329()) { + jj_scanpos = xsp; + if (jj_3R_330()) { + jj_scanpos = xsp; + if (jj_3R_331()) { + jj_scanpos = xsp; + if (jj_3R_332()) { + jj_scanpos = xsp; + if (jj_3_20()) { + jj_scanpos = xsp; + if (jj_3R_333()) return true; + } + } + } + } + } + } + } + } + } return false; } - private boolean jj_3R_261() { - if (jj_scan_token(MINUS)) return true; - if (jj_3R_240()) return true; + private boolean jj_3R_487() { + if (jj_3R_103()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3_3()) { jj_scanpos = xsp; break; } + } + xsp = jj_scanpos; + if (jj_3_5()) jj_scanpos = xsp; return false; } - private boolean jj_3R_58() { - if (jj_3R_97()) return true; + private boolean jj_3R_465() { Token xsp; xsp = jj_scanpos; - if (jj_3R_513()) jj_scanpos = xsp; + if (jj_3R_487()) { + jj_scanpos = xsp; + if (jj_3R_488()) { + jj_scanpos = xsp; + if (jj_3R_489()) return true; + } + } return false; } - private boolean jj_3R_218() { - if (jj_scan_token(AND)) return true; - if (jj_3R_207()) return true; + private boolean jj_3R_217() { + if (jj_scan_token(AND_BOOL)) return true; + if (jj_3R_198()) return true; return false; } - private boolean jj_3R_221() { - if (jj_3R_240()) return true; + private boolean jj_3R_233() { + if (jj_3R_137()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_246()) { jj_scanpos = xsp; break; } + if (jj_3R_259()) { jj_scanpos = xsp; break; } } return false; } - private boolean jj_3R_491() { - if (jj_scan_token(COMMA)) return true; - return false; - } - - private boolean jj_3R_96() { - if (jj_3R_97()) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_503()) jj_scanpos = xsp; + private boolean jj_3R_175() { + if (jj_3R_197()) return true; return false; } - private boolean jj_3_4() { - if (jj_scan_token(COMMA)) return true; - if (jj_3R_58()) return true; + private boolean jj_3R_196() { + if (jj_scan_token(OR_BOOL)) return true; + if (jj_3R_176()) return true; return false; } - private boolean jj_3R_204() { - if (jj_scan_token(XOR)) return true; - if (jj_3R_186()) return true; + private boolean jj_3R_198() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_218()) { + jj_scanpos = xsp; + if (jj_3R_219()) return true; + } return false; } - private boolean jj_3R_248() { - if (jj_scan_token(RSHIFT)) return true; - if (jj_3R_221()) return true; + private boolean jj_3R_218() { + if (jj_scan_token(NOT_BOOL)) return true; + if (jj_3R_198()) return true; return false; } - private boolean jj_3R_207() { - if (jj_3R_221()) return true; + private boolean jj_3R_176() { + if (jj_3R_198()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_230()) { jj_scanpos = xsp; break; } + if (jj_3R_217()) { jj_scanpos = xsp; break; } } return false; } - private boolean jj_3R_100() { - if (jj_scan_token(POWER)) return true; - if (jj_3R_97()) return true; - return false; - } - - private boolean jj_3R_183() { - if (jj_scan_token(OR)) return true; - if (jj_3R_162()) return true; - return false; - } - - private boolean jj_3R_211() { - if (jj_3R_225()) return true; + private boolean jj_3R_566() { + if (jj_3R_567()) return true; return false; } - private boolean jj_3R_186() { - if (jj_3R_207()) return true; + private boolean jj_3R_148() { + if (jj_3R_176()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_218()) { jj_scanpos = xsp; break; } + if (jj_3R_196()) { jj_scanpos = xsp; break; } } return false; } - private boolean jj_3R_523() { - if (jj_scan_token(COMMA)) return true; + private boolean jj_3R_102() { + if (jj_3R_148()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_532()) jj_scanpos = xsp; + if (jj_3R_175()) jj_scanpos = xsp; return false; } - private boolean jj_3R_139() { - if (jj_scan_token(MULTIPLY)) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_504()) jj_scanpos = xsp; + private boolean jj_3R_197() { + if (jj_scan_token(IF)) return true; + if (jj_3R_148()) return true; + if (jj_scan_token(ELSE)) return true; + if (jj_3R_59()) return true; return false; } - private boolean jj_3_2() { - if (jj_scan_token(COMMA)) return true; - if (jj_3R_58()) return true; + private boolean jj_3R_565() { + if (jj_3R_148()) return true; return false; } - private boolean jj_3_1() { - if (jj_scan_token(COMMA)) return true; + private boolean jj_3R_563() { Token xsp; xsp = jj_scanpos; - if (jj_scan_token(31)) { + if (jj_3R_565()) { jj_scanpos = xsp; - if (jj_3R_57()) return true; + if (jj_3R_566()) return true; } return false; } - private boolean jj_3R_99() { - if (jj_3R_100()) return true; + private boolean jj_3R_59() { Token xsp; xsp = jj_scanpos; - if (jj_3R_524()) jj_scanpos = xsp; - return false; - } - - private boolean jj_3R_162() { - if (jj_3R_186()) return true; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_204()) { jj_scanpos = xsp; break; } + if (jj_3R_101()) { + jj_scanpos = xsp; + if (jj_3R_102()) return true; } return false; } - private boolean jj_3R_98() { - if (jj_3R_139()) return true; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3_2()) { jj_scanpos = xsp; break; } - } - xsp = jj_scanpos; - if (jj_3R_523()) jj_scanpos = xsp; + private boolean jj_3R_101() { + if (jj_3R_147()) return true; return false; } - private boolean jj_3R_59() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_98()) { - jj_scanpos = xsp; - if (jj_3R_99()) return true; - } + private boolean jj_3R_404() { + if (jj_scan_token(MINUS_GREATER)) return true; + if (jj_3R_59()) return true; return false; } - private boolean jj_3R_476() { - if (jj_3R_100()) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_491()) jj_scanpos = xsp; + private boolean jj_3R_224() { + if (jj_3R_237()) return true; return false; } - private boolean jj_3R_132() { - if (jj_3R_162()) return true; + private boolean jj_3R_206() { + if (jj_scan_token(INDENT)) return true; Token xsp; + if (jj_3R_224()) return true; while (true) { xsp = jj_scanpos; - if (jj_3R_183()) { jj_scanpos = xsp; break; } + if (jj_3R_224()) { jj_scanpos = xsp; break; } } + if (jj_scan_token(DEDENT)) return true; return false; } - private boolean jj_3R_475() { - if (jj_3R_139()) return true; + private boolean jj_3R_437() { + if (jj_3R_465()) return true; + return false; + } + + private boolean jj_3R_403() { + if (jj_scan_token(LPAREN)) return true; Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3_4()) { jj_scanpos = xsp; break; } - } xsp = jj_scanpos; - if (jj_3_5()) jj_scanpos = xsp; + if (jj_3R_437()) jj_scanpos = xsp; + if (jj_scan_token(RPAREN)) return true; return false; } - private boolean jj_3R_325() { - if (jj_scan_token(IS)) return true; + private boolean jj_3R_146() { + if (jj_scan_token(POWER)) return true; + if (jj_3R_72()) return true; return false; } - private boolean jj_3_18() { - if (jj_scan_token(IS)) return true; - if (jj_scan_token(NOT_BOOL)) return true; + private boolean jj_3R_223() { + if (jj_3R_237()) return true; return false; } - private boolean jj_3R_324() { - if (jj_scan_token(NOT_BOOL)) return true; - if (jj_scan_token(IN)) return true; + private boolean jj_3_2() { + if (jj_scan_token(COLON)) return true; + if (jj_3R_59()) return true; return false; } - private boolean jj_3R_323() { - if (jj_scan_token(IN)) return true; + private boolean jj_3R_205() { + if (jj_scan_token(NEWLINE)) return true; + if (jj_scan_token(INDENT)) return true; + Token xsp; + if (jj_3R_223()) return true; + while (true) { + xsp = jj_scanpos; + if (jj_3R_223()) { jj_scanpos = xsp; break; } + } + if (jj_scan_token(DEDENT)) return true; return false; } - private boolean jj_3R_322() { - if (jj_scan_token(NOTEQUAL)) return true; + private boolean jj_3R_145() { + if (jj_scan_token(MULTIPLY)) return true; + if (jj_3R_72()) return true; return false; } - private boolean jj_3R_321() { - if (jj_scan_token(EQLESS)) return true; + private boolean jj_3R_204() { + if (jj_3R_222()) return true; return false; } - private boolean jj_3R_320() { - if (jj_scan_token(EQGREATER)) return true; + private boolean jj_3R_439() { + if (jj_scan_token(COMMA)) return true; + if (jj_3R_73()) return true; return false; } - private boolean jj_3_3() { - if (jj_scan_token(COMMA)) return true; + private boolean jj_3R_144() { + if (jj_3R_72()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_59()) jj_scanpos = xsp; + if (jj_3_2()) jj_scanpos = xsp; return false; } - private boolean jj_3R_319() { - if (jj_scan_token(EQEQUAL)) return true; + private boolean jj_3R_438() { + if (jj_scan_token(COMMA)) return true; + if (jj_3R_73()) return true; return false; } - private boolean jj_3R_318() { - if (jj_scan_token(GREATER)) return true; - return false; - } + private boolean jj_3R_127() { + if (jj_scan_token(AS)) return true; + if (jj_3R_137()) return true; + return false; + } - private boolean jj_3R_251() { - if (jj_3R_284()) return true; - if (jj_3R_132()) return true; + private boolean jj_3R_402() { + if (jj_3R_436()) return true; return false; } - private boolean jj_3R_317() { - if (jj_scan_token(LESS)) return true; + private boolean jj_3_19() { + if (jj_3R_73()) return true; return false; } - private boolean jj_3R_284() { + private boolean jj_3R_181() { Token xsp; xsp = jj_scanpos; - if (jj_3R_317()) { - jj_scanpos = xsp; - if (jj_3R_318()) { - jj_scanpos = xsp; - if (jj_3R_319()) { - jj_scanpos = xsp; - if (jj_3R_320()) { - jj_scanpos = xsp; - if (jj_3R_321()) { - jj_scanpos = xsp; - if (jj_3R_322()) { - jj_scanpos = xsp; - if (jj_3R_323()) { - jj_scanpos = xsp; - if (jj_3R_324()) { + if (jj_3R_204()) { jj_scanpos = xsp; - if (jj_3_18()) { + if (jj_3R_205()) { jj_scanpos = xsp; - if (jj_3R_325()) return true; - } - } - } - } - } - } - } + if (jj_3R_206()) return true; } } return false; } - private boolean jj_3R_474() { - if (jj_3R_96()) return true; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3_1()) { jj_scanpos = xsp; break; } - } - xsp = jj_scanpos; - if (jj_3_3()) jj_scanpos = xsp; + private boolean jj_3R_100() { + if (jj_3R_146()) return true; return false; } - private boolean jj_3R_454() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_474()) { - jj_scanpos = xsp; - if (jj_3R_475()) { - jj_scanpos = xsp; - if (jj_3R_476()) return true; - } - } + private boolean jj_3_1() { + if (jj_scan_token(COMMA)) return true; + if (jj_3R_58()) return true; return false; } - private boolean jj_3R_209() { - if (jj_scan_token(AND_BOOL)) return true; - if (jj_3R_190()) return true; + private boolean jj_3R_99() { + if (jj_3R_145()) return true; return false; } - private boolean jj_3R_225() { - if (jj_3R_132()) return true; + private boolean jj_3R_406() { + if (jj_scan_token(LPAREN)) return true; + if (jj_3R_73()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_251()) { jj_scanpos = xsp; break; } + if (jj_3R_439()) { jj_scanpos = xsp; break; } } + if (jj_scan_token(RPAREN)) return true; return false; } - private boolean jj_3R_167() { - if (jj_3R_189()) return true; - return false; - } - - private boolean jj_3R_188() { - if (jj_scan_token(OR_BOOL)) return true; - if (jj_3R_168()) return true; + private boolean jj_3R_73() { + if (jj_3R_59()) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_127()) jj_scanpos = xsp; return false; } - private boolean jj_3R_395() { - if (jj_scan_token(MINUS_GREATER)) return true; - if (jj_3R_61()) return true; + private boolean jj_3R_98() { + if (jj_3R_144()) return true; return false; } - private boolean jj_3R_190() { + private boolean jj_3R_58() { Token xsp; xsp = jj_scanpos; - if (jj_3R_210()) { + if (jj_3R_98()) { jj_scanpos = xsp; - if (jj_3R_211()) return true; + if (jj_3R_99()) { + jj_scanpos = xsp; + if (jj_3R_100()) return true; + } } return false; } - private boolean jj_3R_210() { - if (jj_scan_token(NOT_BOOL)) return true; - if (jj_3R_190()) return true; - return false; - } - - private boolean jj_3R_168() { - if (jj_3R_190()) return true; + private boolean jj_3R_405() { + if (jj_3R_73()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_209()) { jj_scanpos = xsp; break; } + if (jj_3R_438()) { jj_scanpos = xsp; break; } } return false; } - private boolean jj_3R_552() { - if (jj_3R_553()) return true; + private boolean jj_3R_510() { + if (jj_scan_token(LPAREN)) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_523()) jj_scanpos = xsp; + if (jj_scan_token(RPAREN)) return true; return false; } - private boolean jj_3R_141() { - if (jj_3R_168()) return true; + private boolean jj_3R_486() { + if (jj_3R_58()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_188()) { jj_scanpos = xsp; break; } + if (jj_3_1()) { jj_scanpos = xsp; break; } } + xsp = jj_scanpos; + if (jj_3R_504()) jj_scanpos = xsp; return false; } - private boolean jj_3R_102() { - if (jj_3R_141()) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_167()) jj_scanpos = xsp; + private boolean jj_3R_464() { + if (jj_3R_486()) return true; return false; } - private boolean jj_3R_189() { - if (jj_scan_token(IF)) return true; - if (jj_3R_141()) return true; - if (jj_scan_token(ELSE)) return true; - if (jj_3R_61()) return true; + private boolean jj_3R_436() { + if (jj_scan_token(LBRACKET)) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_464()) jj_scanpos = xsp; + if (jj_scan_token(RBRACKET)) return true; return false; } - private boolean jj_3R_551() { - if (jj_3R_141()) return true; + private boolean jj_3R_509() { + if (jj_scan_token(AT)) return true; + if (jj_3R_140()) return true; return false; } - private boolean jj_3R_549() { + private boolean jj_3R_154() { + if (jj_scan_token(WITH)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_551()) { + if (jj_3R_405()) { jj_scanpos = xsp; - if (jj_3R_552()) return true; + if (jj_3R_406()) return true; } + if (jj_scan_token(COLON)) return true; + if (jj_3R_181()) return true; return false; } - private boolean jj_3R_61() { + private boolean jj_3R_497() { + if (jj_3R_509()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_101()) { - jj_scanpos = xsp; - if (jj_3R_102()) return true; - } + if (jj_3R_510()) jj_scanpos = xsp; + if (jj_scan_token(NEWLINE)) return true; return false; } - private boolean jj_3R_101() { - if (jj_3R_140()) return true; + private boolean jj_3R_531() { + if (jj_scan_token(AS)) return true; + if (jj_3R_59()) return true; return false; } - private boolean jj_3R_496() { - if (jj_scan_token(LPAREN)) return true; + private boolean jj_3R_475() { Token xsp; - xsp = jj_scanpos; - if (jj_3R_509()) jj_scanpos = xsp; - if (jj_scan_token(RPAREN)) return true; + if (jj_3R_497()) return true; + while (true) { + xsp = jj_scanpos; + if (jj_3R_497()) { jj_scanpos = xsp; break; } + } return false; } - private boolean jj_3R_216() { - if (jj_3R_229()) return true; + private boolean jj_3R_530() { + if (jj_scan_token(EXCEPT_MULTIPLY)) return true; return false; } - private boolean jj_3R_198() { - if (jj_scan_token(INDENT)) return true; + private boolean jj_3R_521() { + if (jj_3R_59()) return true; Token xsp; - if (jj_3R_216()) return true; - while (true) { - xsp = jj_scanpos; - if (jj_3R_216()) { jj_scanpos = xsp; break; } - } - if (jj_scan_token(DEDENT)) return true; + xsp = jj_scanpos; + if (jj_3R_531()) jj_scanpos = xsp; return false; } - private boolean jj_3R_427() { - if (jj_3R_454()) return true; + private boolean jj_3R_529() { + if (jj_scan_token(EXCEPT)) return true; return false; } - private boolean jj_3R_394() { - if (jj_scan_token(LPAREN)) return true; + private boolean jj_3R_153() { + if (jj_scan_token(DEF)) return true; + if (jj_3R_72()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_427()) jj_scanpos = xsp; - if (jj_scan_token(RPAREN)) return true; + if (jj_3R_402()) jj_scanpos = xsp; + if (jj_3R_403()) return true; + xsp = jj_scanpos; + if (jj_3R_404()) jj_scanpos = xsp; + if (jj_scan_token(COLON)) return true; + if (jj_3R_181()) return true; return false; } - private boolean jj_3R_215() { - if (jj_3R_229()) return true; + private boolean jj_3R_520() { + if (jj_3R_530()) return true; return false; } - private boolean jj_3R_495() { - if (jj_scan_token(AT)) return true; - if (jj_3R_135()) return true; + private boolean jj_3R_519() { + if (jj_3R_529()) return true; return false; } - private boolean jj_3R_197() { - if (jj_scan_token(NEWLINE)) return true; - if (jj_scan_token(INDENT)) return true; + private boolean jj_3R_506() { Token xsp; - if (jj_3R_215()) return true; - while (true) { - xsp = jj_scanpos; - if (jj_3R_215()) { jj_scanpos = xsp; break; } + xsp = jj_scanpos; + if (jj_3R_519()) { + jj_scanpos = xsp; + if (jj_3R_520()) return true; } - if (jj_scan_token(DEDENT)) return true; + xsp = jj_scanpos; + if (jj_3R_521()) jj_scanpos = xsp; + if (jj_scan_token(COLON)) return true; + if (jj_3R_181()) return true; return false; } - private boolean jj_3R_484() { - if (jj_3R_495()) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_496()) jj_scanpos = xsp; - if (jj_scan_token(NEWLINE)) return true; + private boolean jj_3R_495() { + if (jj_scan_token(FINALLY)) return true; + if (jj_scan_token(COLON)) return true; return false; } - private boolean jj_3R_196() { - if (jj_3R_214()) return true; + private boolean jj_3R_507() { + if (jj_scan_token(ELSE)) return true; + if (jj_scan_token(COLON)) return true; return false; } - private boolean jj_3R_463() { - Token xsp; - if (jj_3R_484()) return true; - while (true) { - xsp = jj_scanpos; - if (jj_3R_484()) { jj_scanpos = xsp; break; } - } + private boolean jj_3R_472() { + if (jj_3R_495()) return true; + if (jj_3R_181()) return true; return false; } - private boolean jj_3R_429() { - if (jj_scan_token(COMMA)) return true; - if (jj_3R_71()) return true; + private boolean jj_3R_470() { + if (jj_scan_token(TRY)) return true; + if (jj_scan_token(COLON)) return true; return false; } - private boolean jj_3R_428() { - if (jj_scan_token(COMMA)) return true; - if (jj_3R_71()) return true; + private boolean jj_3R_494() { + if (jj_3R_495()) return true; + if (jj_3R_181()) return true; return false; } - private boolean jj_3R_122() { - if (jj_scan_token(AS)) return true; - if (jj_3R_132()) return true; + private boolean jj_3R_493() { + if (jj_3R_507()) return true; + if (jj_3R_181()) return true; return false; } - private boolean jj_3_17() { - if (jj_3R_71()) return true; + private boolean jj_3R_492() { + if (jj_3R_506()) return true; return false; } - private boolean jj_3R_173() { + private boolean jj_3R_471() { Token xsp; - xsp = jj_scanpos; - if (jj_3R_196()) { - jj_scanpos = xsp; - if (jj_3R_197()) { - jj_scanpos = xsp; - if (jj_3R_198()) return true; - } + if (jj_3R_492()) return true; + while (true) { + xsp = jj_scanpos; + if (jj_3R_492()) { jj_scanpos = xsp; break; } } + xsp = jj_scanpos; + if (jj_3R_493()) jj_scanpos = xsp; + xsp = jj_scanpos; + if (jj_3R_494()) jj_scanpos = xsp; return false; } - private boolean jj_3R_145() { - if (jj_scan_token(DEF)) return true; - if (jj_3R_70()) return true; - if (jj_3R_394()) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_395()) jj_scanpos = xsp; - if (jj_scan_token(COLON)) return true; - if (jj_3R_173()) return true; + private boolean jj_3R_459() { + if (jj_scan_token(COMMA)) return true; return false; } - private boolean jj_3R_397() { - if (jj_scan_token(LPAREN)) return true; - if (jj_3R_71()) return true; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_429()) { jj_scanpos = xsp; break; } - } - if (jj_scan_token(RPAREN)) return true; - return false; - } - - private boolean jj_3R_71() { - if (jj_3R_61()) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_122()) jj_scanpos = xsp; - return false; - } - - private boolean jj_3R_396() { - if (jj_3R_71()) return true; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_428()) { jj_scanpos = xsp; break; } - } - return false; - } - - private boolean jj_3R_146() { - if (jj_scan_token(WITH)) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_396()) { - jj_scanpos = xsp; - if (jj_3R_397()) return true; - } - if (jj_scan_token(COLON)) return true; - if (jj_3R_173()) return true; - return false; - } - - private boolean jj_3R_517() { - if (jj_scan_token(AS)) return true; - if (jj_3R_61()) return true; - return false; - } - - private boolean jj_3R_516() { - if (jj_scan_token(EXCEPT_MULTIPLY)) return true; - return false; - } - - private boolean jj_3R_507() { - if (jj_3R_61()) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_517()) jj_scanpos = xsp; - return false; - } - - private boolean jj_3R_515() { - if (jj_scan_token(EXCEPT)) return true; - return false; - } - - private boolean jj_3R_506() { - if (jj_3R_516()) return true; - return false; - } - - private boolean jj_3R_505() { - if (jj_3R_515()) return true; - return false; - } - - private boolean jj_3R_492() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_505()) { - jj_scanpos = xsp; - if (jj_3R_506()) return true; - } - xsp = jj_scanpos; - if (jj_3R_507()) jj_scanpos = xsp; - if (jj_scan_token(COLON)) return true; - if (jj_3R_173()) return true; - return false; - } - - private boolean jj_3R_482() { - if (jj_scan_token(FINALLY)) return true; - if (jj_scan_token(COLON)) return true; - return false; - } - - private boolean jj_3R_493() { - if (jj_scan_token(ELSE)) return true; - if (jj_scan_token(COLON)) return true; - return false; - } - - private boolean jj_3R_461() { - if (jj_3R_482()) return true; - if (jj_3R_173()) return true; - return false; - } - - private boolean jj_3R_459() { - if (jj_scan_token(TRY)) return true; - if (jj_scan_token(COLON)) return true; - return false; - } - - private boolean jj_3R_481() { - if (jj_3R_482()) return true; - if (jj_3R_173()) return true; - return false; - } - - private boolean jj_3R_480() { - if (jj_3R_493()) return true; - if (jj_3R_173()) return true; - return false; - } - - private boolean jj_3R_479() { - if (jj_3R_492()) return true; - return false; - } - - private boolean jj_3R_460() { - Token xsp; - if (jj_3R_479()) return true; - while (true) { - xsp = jj_scanpos; - if (jj_3R_479()) { jj_scanpos = xsp; break; } - } - xsp = jj_scanpos; - if (jj_3R_480()) jj_scanpos = xsp; - xsp = jj_scanpos; - if (jj_3R_481()) jj_scanpos = xsp; - return false; - } - - private boolean jj_3R_449() { - if (jj_scan_token(COMMA)) return true; - return false; - } - - private boolean jj_3R_433() { - if (jj_3R_459()) return true; - if (jj_3R_173()) return true; + private boolean jj_3R_443() { + if (jj_3R_470()) return true; + if (jj_3R_181()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_460()) { + if (jj_3R_471()) { jj_scanpos = xsp; - if (jj_3R_461()) return true; + if (jj_3R_472()) return true; } return false; } - private boolean jj_3R_430() { + private boolean jj_3R_440() { if (jj_scan_token(ELSE)) return true; if (jj_scan_token(COLON)) return true; return false; } - private boolean jj_3R_398() { - if (jj_3R_430()) return true; - if (jj_3R_173()) return true; + private boolean jj_3R_407() { + if (jj_3R_440()) return true; + if (jj_3R_181()) return true; return false; } - private boolean jj_3R_147() { + private boolean jj_3R_155() { if (jj_scan_token(FOR)) return true; - if (jj_3R_134()) return true; + if (jj_3R_139()) return true; if (jj_scan_token(IN)) return true; - if (jj_3R_381()) return true; + if (jj_3R_389()) return true; if (jj_scan_token(COLON)) return true; - if (jj_3R_173()) return true; + if (jj_3R_181()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_398()) jj_scanpos = xsp; + if (jj_3R_407()) jj_scanpos = xsp; return false; } - private boolean jj_3R_111() { - if (jj_3R_147()) return true; + private boolean jj_3R_116() { + if (jj_3R_155()) return true; return false; } - private boolean jj_3R_478() { + private boolean jj_3R_491() { if (jj_scan_token(ELSE)) return true; if (jj_scan_token(COLON)) return true; return false; } - private boolean jj_3R_457() { + private boolean jj_3R_468() { if (jj_scan_token(WHILE)) return true; return false; } - private boolean jj_3R_458() { - if (jj_3R_478()) return true; - if (jj_3R_173()) return true; + private boolean jj_3R_469() { + if (jj_3R_491()) return true; + if (jj_3R_181()) return true; return false; } - private boolean jj_3R_432() { - if (jj_3R_457()) return true; - if (jj_3R_135()) return true; + private boolean jj_3R_442() { + if (jj_3R_468()) return true; + if (jj_3R_140()) return true; if (jj_scan_token(COLON)) return true; - if (jj_3R_173()) return true; + if (jj_3R_181()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_458()) jj_scanpos = xsp; + if (jj_3R_469()) jj_scanpos = xsp; return false; } - private boolean jj_3R_306() { + private boolean jj_3R_314() { if (jj_scan_token(EQUAL)) return true; - if (jj_3R_363()) return true; + if (jj_3R_371()) return true; return false; } - private boolean jj_3R_110() { - if (jj_3R_146()) return true; + private boolean jj_3R_115() { + if (jj_3R_154()) return true; return false; } - private boolean jj_3R_191() { + private boolean jj_3R_199() { if (jj_scan_token(COLONEQUAL)) return true; - if (jj_3R_61()) return true; + if (jj_3R_59()) return true; return false; } - private boolean jj_3R_444() { - if (jj_3R_171()) return true; + private boolean jj_3R_454() { + if (jj_3R_179()) return true; return false; } - private boolean jj_3R_477() { + private boolean jj_3R_490() { if (jj_scan_token(ELIF)) return true; return false; } - private boolean jj_3R_456() { - if (jj_3R_478()) return true; - if (jj_3R_173()) return true; + private boolean jj_3R_467() { + if (jj_3R_491()) return true; + if (jj_3R_181()) return true; return false; } - private boolean jj_3R_135() { - if (jj_3R_61()) return true; + private boolean jj_3R_140() { + if (jj_3R_59()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_191()) jj_scanpos = xsp; + if (jj_3R_199()) jj_scanpos = xsp; return false; } - private boolean jj_3R_455() { - if (jj_3R_477()) return true; - if (jj_3R_135()) return true; + private boolean jj_3R_466() { + if (jj_3R_490()) return true; + if (jj_3R_140()) return true; if (jj_scan_token(COLON)) return true; - if (jj_3R_173()) return true; + if (jj_3R_181()) return true; return false; } - private boolean jj_3R_109() { - if (jj_3R_145()) return true; + private boolean jj_3R_114() { + if (jj_3R_153()) return true; return false; } - private boolean jj_3R_431() { + private boolean jj_3R_441() { if (jj_scan_token(IF)) return true; - if (jj_3R_135()) return true; + if (jj_3R_140()) return true; if (jj_scan_token(COLON)) return true; - if (jj_3R_173()) return true; + if (jj_3R_181()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_455()) { jj_scanpos = xsp; break; } + if (jj_3R_466()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; - if (jj_3R_456()) jj_scanpos = xsp; + if (jj_3R_467()) jj_scanpos = xsp; return false; } - private boolean jj_3R_67() { + private boolean jj_3R_69() { if (jj_scan_token(ASYNC)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_109()) { + if (jj_3R_114()) { jj_scanpos = xsp; - if (jj_3R_110()) { + if (jj_3R_115()) { jj_scanpos = xsp; - if (jj_3R_111()) return true; + if (jj_3R_116()) return true; } } return false; } - private boolean jj_3R_448() { + private boolean jj_3R_458() { if (jj_scan_token(COMMA)) return true; - if (jj_3R_447()) return true; + if (jj_3R_457()) return true; return false; } - private boolean jj_3R_113() { - if (jj_3R_150()) return true; + private boolean jj_3R_118() { + if (jj_3R_158()) return true; return false; } - private boolean jj_3R_195() { + private boolean jj_3R_203() { if (jj_scan_token(IF)) return true; - if (jj_3R_135()) return true; + if (jj_3R_140()) return true; return false; } - private boolean jj_3R_490() { + private boolean jj_3R_503() { if (jj_scan_token(POWER)) return true; - if (jj_3R_70()) return true; + if (jj_3R_72()) return true; return false; } - private boolean jj_3R_489() { - if (jj_3R_327()) return true; + private boolean jj_3R_502() { + if (jj_3R_335()) return true; return false; } - private boolean jj_3R_471() { - if (jj_3R_490()) return true; + private boolean jj_3R_483() { + if (jj_3R_503()) return true; return false; } - private boolean jj_3R_305() { + private boolean jj_3R_313() { if (jj_scan_token(COMMA)) return true; return false; } - private boolean jj_3R_488() { - if (jj_3R_326()) return true; + private boolean jj_3R_501() { + if (jj_3R_334()) return true; return false; } - private boolean jj_3R_470() { + private boolean jj_3R_482() { Token xsp; xsp = jj_scanpos; - if (jj_3R_488()) { + if (jj_3R_501()) { jj_scanpos = xsp; - if (jj_3R_489()) return true; + if (jj_3R_502()) return true; } if (jj_scan_token(COLON)) return true; - if (jj_3R_227()) return true; + if (jj_3R_235()) return true; return false; } - private boolean jj_3R_447() { + private boolean jj_3R_457() { Token xsp; xsp = jj_scanpos; - if (jj_3R_470()) { + if (jj_3R_482()) { jj_scanpos = xsp; - if (jj_3R_471()) return true; + if (jj_3R_483()) return true; } return false; } - private boolean jj_3R_378() { - if (jj_3R_416()) return true; + private boolean jj_3R_386() { + if (jj_3R_425()) return true; return false; } - private boolean jj_3R_416() { - if (jj_3R_447()) return true; + private boolean jj_3R_425() { + if (jj_3R_457()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_448()) { jj_scanpos = xsp; break; } + if (jj_3R_458()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; - if (jj_3R_449()) jj_scanpos = xsp; + if (jj_3R_459()) jj_scanpos = xsp; return false; } - private boolean jj_3R_446() { - if (jj_3R_227()) return true; + private boolean jj_3R_456() { + if (jj_3R_235()) return true; return false; } - private boolean jj_3R_330() { + private boolean jj_3R_338() { if (jj_scan_token(LBRACE)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_378()) jj_scanpos = xsp; + if (jj_3R_386()) jj_scanpos = xsp; if (jj_scan_token(RBRACE)) return true; return false; } - private boolean jj_3R_469() { - if (jj_3R_171()) return true; + private boolean jj_3R_496() { + if (jj_3R_508()) return true; return false; } - private boolean jj_3R_445() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_469()) jj_scanpos = xsp; + private boolean jj_3R_481() { + if (jj_3R_179()) return true; return false; } - private boolean jj_3R_194() { + private boolean jj_3R_455() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_481()) jj_scanpos = xsp; + return false; + } + + private boolean jj_3R_202() { if (jj_scan_token(COMMA)) return true; return false; } - private boolean jj_3R_443() { + private boolean jj_3R_453() { if (jj_scan_token(COMMA)) return true; return false; } - private boolean jj_3R_415() { + private boolean jj_3R_424() { if (jj_scan_token(LPAREN)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_445()) { + if (jj_3R_455()) { jj_scanpos = xsp; - if (jj_3R_446()) return true; + if (jj_3R_456()) return true; } if (jj_scan_token(RPAREN)) return true; return false; } - private boolean jj_3R_468() { + private boolean jj_3R_480() { if (jj_scan_token(COMMA)) return true; - if (jj_3R_227()) return true; + if (jj_3R_235()) return true; return false; } - private boolean jj_3R_414() { + private boolean jj_3R_423() { if (jj_scan_token(LBRACKET)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_444()) jj_scanpos = xsp; + if (jj_3R_454()) jj_scanpos = xsp; if (jj_scan_token(RBRACKET)) return true; return false; } - private boolean jj_3R_377() { - if (jj_3R_415()) return true; - return false; - } - - private boolean jj_3R_483() { - if (jj_3R_494()) return true; + private boolean jj_3R_385() { + if (jj_3R_424()) return true; return false; } - private boolean jj_3R_407() { - if (jj_3R_68()) return true; + private boolean jj_3R_416() { + if (jj_3R_70()) return true; return false; } - private boolean jj_3R_376() { - if (jj_3R_414()) return true; + private boolean jj_3R_384() { + if (jj_3R_423()) return true; return false; } - private boolean jj_3R_329() { + private boolean jj_3R_337() { Token xsp; xsp = jj_scanpos; - if (jj_3R_376()) { + if (jj_3R_384()) { jj_scanpos = xsp; - if (jj_3R_377()) return true; + if (jj_3R_385()) return true; } return false; } - private boolean jj_3R_412() { + private boolean jj_3R_421() { if (jj_scan_token(DOT)) return true; - if (jj_3R_70()) return true; + if (jj_3R_72()) return true; return false; } - private boolean jj_3R_442() { - if (jj_3R_227()) return true; + private boolean jj_3R_452() { + if (jj_3R_235()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_468()) { jj_scanpos = xsp; break; } + if (jj_3R_480()) { jj_scanpos = xsp; break; } } return false; } - private boolean jj_3R_374() { + private boolean jj_3R_382() { Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_412()) { jj_scanpos = xsp; break; } + if (jj_3R_421()) { jj_scanpos = xsp; break; } } return false; } - private boolean jj_3R_413() { - if (jj_3R_442()) return true; + private boolean jj_3R_422() { + if (jj_3R_452()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_443()) jj_scanpos = xsp; + if (jj_3R_453()) jj_scanpos = xsp; return false; } - private boolean jj_3R_373() { + private boolean jj_3R_381() { if (jj_scan_token(EQUAL)) return true; - if (jj_3R_227()) return true; + if (jj_3R_235()) return true; return false; } - private boolean jj_3R_327() { - if (jj_3R_70()) return true; + private boolean jj_3R_335() { + if (jj_3R_72()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_373()) { + if (jj_3R_381()) { jj_scanpos = xsp; - if (jj_3R_374()) return true; + if (jj_3R_382()) return true; } return false; } - private boolean jj_3R_406() { - if (jj_3R_435()) return true; + private boolean jj_3R_415() { + if (jj_3R_445()) return true; return false; } - private boolean jj_3R_172() { - if (jj_3R_195()) return true; + private boolean jj_3R_180() { + if (jj_3R_203()) return true; return false; } - private boolean jj_3R_540() { - if (jj_3R_544()) return true; + private boolean jj_3R_554() { + if (jj_3R_558()) return true; return false; } - private boolean jj_3R_375() { + private boolean jj_3R_383() { if (jj_scan_token(LPAREN)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_413()) jj_scanpos = xsp; + if (jj_3R_422()) jj_scanpos = xsp; if (jj_scan_token(RPAREN)) return true; return false; } - private boolean jj_3R_439() { + private boolean jj_3R_449() { if (jj_scan_token(MINUS)) return true; - if (jj_3R_249()) return true; + if (jj_3R_257()) return true; return false; } - private boolean jj_3R_437() { - if (jj_3R_249()) return true; + private boolean jj_3R_447() { + if (jj_3R_257()) return true; return false; } - private boolean jj_3R_410() { + private boolean jj_3R_419() { Token xsp; xsp = jj_scanpos; - if (jj_3R_437()) { + if (jj_3R_447()) { jj_scanpos = xsp; - if (jj_3R_438()) { + if (jj_3R_448()) { jj_scanpos = xsp; - if (jj_3R_439()) return true; + if (jj_3R_449()) return true; } } return false; } - private boolean jj_3R_438() { + private boolean jj_3R_448() { if (jj_scan_token(PLUS)) return true; - if (jj_3R_249()) return true; + if (jj_3R_257()) return true; return false; } - private boolean jj_3R_304() { + private boolean jj_3R_312() { if (jj_scan_token(COMMA)) return true; - if (jj_3R_70()) return true; + if (jj_3R_72()) return true; return false; } - private boolean jj_3R_170() { - if (jj_3R_169()) return true; + private boolean jj_3R_178() { + if (jj_3R_177()) return true; return false; } - private boolean jj_3R_372() { + private boolean jj_3R_380() { if (jj_scan_token(NONE)) return true; return false; } - private boolean jj_3R_405() { - if (jj_3R_434()) return true; + private boolean jj_3R_414() { + if (jj_3R_444()) return true; return false; } - private boolean jj_3R_371() { + private boolean jj_3R_379() { if (jj_scan_token(TRUE)) return true; return false; } - private boolean jj_3R_441() { + private boolean jj_3R_451() { if (jj_scan_token(MINUS)) return true; - if (jj_3R_410()) return true; + if (jj_3R_419()) return true; return false; } - private boolean jj_3R_370() { + private boolean jj_3R_378() { if (jj_scan_token(FALSE)) return true; return false; } - private boolean jj_3R_369() { - if (jj_3R_250()) return true; + private boolean jj_3R_377() { + if (jj_3R_258()) return true; return false; } - private boolean jj_3R_440() { + private boolean jj_3R_450() { if (jj_scan_token(PLUS)) return true; - if (jj_3R_410()) return true; + if (jj_3R_419()) return true; return false; } - private boolean jj_3R_411() { + private boolean jj_3R_420() { Token xsp; xsp = jj_scanpos; - if (jj_3R_440()) { + if (jj_3R_450()) { jj_scanpos = xsp; - if (jj_3R_441()) return true; + if (jj_3R_451()) return true; } return false; } - private boolean jj_3R_253() { + private boolean jj_3R_261() { if (jj_scan_token(OR)) return true; - if (jj_3R_252()) return true; + if (jj_3R_260()) return true; return false; } - private boolean jj_3_16() { + private boolean jj_3_18() { if (jj_scan_token(COMMA)) return true; - if (jj_3R_70()) return true; + if (jj_3R_72()) return true; return false; } - private boolean jj_3R_328() { - if (jj_3R_375()) return true; + private boolean jj_3R_336() { + if (jj_3R_383()) return true; return false; } - private boolean jj_3R_368() { - if (jj_3R_410()) return true; + private boolean jj_3R_376() { + if (jj_3R_419()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_411()) jj_scanpos = xsp; + if (jj_3R_420()) jj_scanpos = xsp; return false; } - private boolean jj_3R_326() { + private boolean jj_3R_334() { Token xsp; xsp = jj_scanpos; - if (jj_3R_368()) { + if (jj_3R_376()) { jj_scanpos = xsp; - if (jj_3R_369()) { + if (jj_3R_377()) { jj_scanpos = xsp; - if (jj_3R_370()) { + if (jj_3R_378()) { jj_scanpos = xsp; - if (jj_3R_371()) { + if (jj_3R_379()) { jj_scanpos = xsp; - if (jj_3R_372()) return true; + if (jj_3R_380()) return true; } } } @@ -12080,254 +12092,254 @@ private boolean jj_3R_326() { return false; } - private boolean jj_3R_404() { - if (jj_3R_145()) return true; + private boolean jj_3R_413() { + if (jj_3R_153()) return true; return false; } - private boolean jj_3R_288() { - if (jj_3R_330()) return true; + private boolean jj_3R_296() { + if (jj_3R_338()) return true; return false; } - private boolean jj_3R_287() { - if (jj_3R_329()) return true; + private boolean jj_3R_295() { + if (jj_3R_337()) return true; return false; } - private boolean jj_3R_286() { - if (jj_3R_327()) return true; + private boolean jj_3R_294() { + if (jj_3R_335()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_328()) jj_scanpos = xsp; + if (jj_3R_336()) jj_scanpos = xsp; return false; } - private boolean jj_3R_252() { + private boolean jj_3R_260() { Token xsp; xsp = jj_scanpos; - if (jj_3R_285()) { + if (jj_3R_293()) { jj_scanpos = xsp; - if (jj_3R_286()) { + if (jj_3R_294()) { jj_scanpos = xsp; - if (jj_3R_287()) { + if (jj_3R_295()) { jj_scanpos = xsp; - if (jj_3R_288()) return true; + if (jj_3R_296()) return true; } } } return false; } - private boolean jj_3R_285() { - if (jj_3R_326()) return true; + private boolean jj_3R_293() { + if (jj_3R_334()) return true; return false; } - private boolean jj_3R_242() { - if (jj_3R_254()) return true; + private boolean jj_3R_250() { + if (jj_3R_262()) return true; return false; } - private boolean jj_3R_531() { + private boolean jj_3R_545() { if (jj_scan_token(COMMA)) return true; return false; } - private boolean jj_3R_241() { - if (jj_3R_252()) return true; + private boolean jj_3R_249() { + if (jj_3R_260()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_253()) { jj_scanpos = xsp; break; } + if (jj_3R_261()) { jj_scanpos = xsp; break; } } return false; } - private boolean jj_3R_254() { + private boolean jj_3R_262() { if (jj_scan_token(AS)) return true; - if (jj_3R_70()) return true; + if (jj_3R_72()) return true; return false; } - private boolean jj_3R_403() { - if (jj_3R_146()) return true; + private boolean jj_3R_412() { + if (jj_3R_154()) return true; return false; } - private boolean jj_3R_193() { + private boolean jj_3R_201() { if (jj_scan_token(COMMA)) return true; - if (jj_3R_192()) return true; + if (jj_3R_200()) return true; return false; } - private boolean jj_3R_421() { + private boolean jj_3R_430() { if (jj_scan_token(FROM)) return true; - if (jj_3R_61()) return true; + if (jj_3R_59()) return true; return false; } - private boolean jj_3R_283() { + private boolean jj_3R_291() { if (jj_scan_token(TRIPLE_FSTRING2)) return true; return false; } - private boolean jj_3R_282() { + private boolean jj_3R_290() { if (jj_scan_token(TRIPLE_FSTRING)) return true; return false; } - private boolean jj_3R_281() { + private boolean jj_3R_289() { if (jj_scan_token(SINGLE_FSTRING2)) return true; return false; } - private boolean jj_3R_536() { + private boolean jj_3R_550() { if (jj_scan_token(COMMA)) return true; return false; } - private boolean jj_3R_227() { - if (jj_3R_241()) return true; + private boolean jj_3R_235() { + if (jj_3R_249()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_242()) jj_scanpos = xsp; + if (jj_3R_250()) jj_scanpos = xsp; return false; } - private boolean jj_3R_280() { + private boolean jj_3R_288() { if (jj_scan_token(SINGLE_FSTRING)) return true; return false; } - private boolean jj_3R_279() { + private boolean jj_3R_287() { if (jj_scan_token(TRIPLE_BSTRING2)) return true; return false; } - private boolean jj_3R_278() { + private boolean jj_3R_286() { if (jj_scan_token(TRIPLE_BSTRING)) return true; return false; } - private boolean jj_3R_385() { - if (jj_3R_61()) return true; + private boolean jj_3R_393() { + if (jj_3R_59()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_421()) jj_scanpos = xsp; + if (jj_3R_430()) jj_scanpos = xsp; return false; } - private boolean jj_3R_277() { + private boolean jj_3R_285() { if (jj_scan_token(SINGLE_BSTRING2)) return true; return false; } - private boolean jj_3R_276() { + private boolean jj_3R_284() { if (jj_scan_token(SINGLE_BSTRING)) return true; return false; } - private boolean jj_3R_226() { + private boolean jj_3R_234() { if (jj_scan_token(MULTIPLY)) return true; - if (jj_3R_70()) return true; + if (jj_3R_72()) return true; return false; } - private boolean jj_3R_275() { + private boolean jj_3R_283() { if (jj_scan_token(TRIPLE_USTRING2)) return true; return false; } - private boolean jj_3R_402() { - if (jj_3R_433()) return true; + private boolean jj_3R_411() { + if (jj_3R_443()) return true; return false; } - private boolean jj_3R_274() { + private boolean jj_3R_282() { if (jj_scan_token(TRIPLE_USTRING)) return true; return false; } - private boolean jj_3R_273() { + private boolean jj_3R_281() { if (jj_scan_token(SINGLE_USTRING2)) return true; return false; } - private boolean jj_3R_213() { - if (jj_3R_227()) return true; + private boolean jj_3R_221() { + if (jj_3R_235()) return true; return false; } - private boolean jj_3R_272() { + private boolean jj_3R_280() { if (jj_scan_token(SINGLE_USTRING)) return true; return false; } - private boolean jj_3R_271() { + private boolean jj_3R_279() { if (jj_scan_token(TRIPLE_STRING2)) return true; return false; } - private boolean jj_3R_270() { + private boolean jj_3R_278() { if (jj_scan_token(TRIPLE_STRING)) return true; return false; } - private boolean jj_3R_192() { + private boolean jj_3R_200() { Token xsp; xsp = jj_scanpos; - if (jj_3R_212()) { + if (jj_3R_220()) { jj_scanpos = xsp; - if (jj_3R_213()) return true; + if (jj_3R_221()) return true; } return false; } - private boolean jj_3R_212() { - if (jj_3R_226()) return true; + private boolean jj_3R_220() { + if (jj_3R_234()) return true; return false; } - private boolean jj_3R_269() { + private boolean jj_3R_277() { if (jj_scan_token(SINGLE_STRING2)) return true; return false; } - private boolean jj_3R_250() { + private boolean jj_3R_258() { Token xsp; xsp = jj_scanpos; - if (jj_3R_268()) { + if (jj_3R_276()) { jj_scanpos = xsp; - if (jj_3R_269()) { + if (jj_3R_277()) { jj_scanpos = xsp; - if (jj_3R_270()) { + if (jj_3R_278()) { jj_scanpos = xsp; - if (jj_3R_271()) { + if (jj_3R_279()) { jj_scanpos = xsp; - if (jj_3R_272()) { + if (jj_3R_280()) { jj_scanpos = xsp; - if (jj_3R_273()) { + if (jj_3R_281()) { jj_scanpos = xsp; - if (jj_3R_274()) { + if (jj_3R_282()) { jj_scanpos = xsp; - if (jj_3R_275()) { + if (jj_3R_283()) { jj_scanpos = xsp; - if (jj_3R_276()) { + if (jj_3R_284()) { jj_scanpos = xsp; - if (jj_3R_277()) { + if (jj_3R_285()) { jj_scanpos = xsp; - if (jj_3R_278()) { + if (jj_3R_286()) { jj_scanpos = xsp; - if (jj_3R_279()) { + if (jj_3R_287()) { jj_scanpos = xsp; - if (jj_3R_280()) { + if (jj_3R_288()) { jj_scanpos = xsp; - if (jj_3R_281()) { + if (jj_3R_289()) { jj_scanpos = xsp; - if (jj_3R_282()) { + if (jj_3R_290()) { jj_scanpos = xsp; - if (jj_3R_283()) return true; + if (jj_3R_291()) return true; } } } @@ -12346,118 +12358,118 @@ private boolean jj_3R_250() { return false; } - private boolean jj_3R_268() { + private boolean jj_3R_276() { if (jj_scan_token(SINGLE_STRING)) return true; return false; } - private boolean jj_3R_171() { - if (jj_3R_192()) return true; + private boolean jj_3R_179() { + if (jj_3R_200()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_193()) { jj_scanpos = xsp; break; } + if (jj_3R_201()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; - if (jj_3R_194()) jj_scanpos = xsp; + if (jj_3R_202()) jj_scanpos = xsp; return false; } - private boolean jj_3R_150() { + private boolean jj_3R_158() { if (jj_scan_token(CASE)) return true; - if (jj_3R_171()) return true; + if (jj_3R_179()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_172()) jj_scanpos = xsp; + if (jj_3R_180()) jj_scanpos = xsp; if (jj_scan_token(COLON)) return true; - if (jj_3R_173()) return true; + if (jj_3R_181()) return true; return false; } - private boolean jj_3R_401() { - if (jj_3R_147()) return true; + private boolean jj_3R_410() { + if (jj_3R_155()) return true; return false; } - private boolean jj_3R_169() { + private boolean jj_3R_177() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(30)) { jj_scanpos = xsp; if (jj_scan_token(33)) return true; } - if (jj_3R_135()) return true; + if (jj_3R_140()) return true; return false; } - private boolean jj_3R_148() { - if (jj_3R_169()) return true; + private boolean jj_3R_156() { + if (jj_3R_177()) return true; if (jj_scan_token(COMMA)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_170()) jj_scanpos = xsp; + if (jj_3R_178()) jj_scanpos = xsp; return false; } - private boolean jj_3R_112() { + private boolean jj_3R_117() { Token xsp; xsp = jj_scanpos; - if (jj_3R_148()) { + if (jj_3R_156()) { jj_scanpos = xsp; - if (jj_3R_149()) return true; + if (jj_3R_157()) return true; } return false; } - private boolean jj_3R_149() { - if (jj_3R_135()) return true; + private boolean jj_3R_157() { + if (jj_3R_140()) return true; return false; } - private boolean jj_3R_138() { - if (jj_3R_84()) return true; + private boolean jj_3R_143() { + if (jj_3R_86()) return true; return false; } - private boolean jj_3R_95() { + private boolean jj_3R_97() { Token xsp; xsp = jj_scanpos; - if (jj_3R_138()) jj_scanpos = xsp; + if (jj_3R_143()) jj_scanpos = xsp; return false; } - private boolean jj_3R_68() { + private boolean jj_3R_70() { if (jj_scan_token(MATCH)) return true; - if (jj_3R_112()) return true; + if (jj_3R_117()) return true; if (jj_scan_token(COLON)) return true; if (jj_scan_token(NEWLINE)) return true; if (jj_scan_token(INDENT)) return true; Token xsp; - if (jj_3R_113()) return true; + if (jj_3R_118()) return true; while (true) { xsp = jj_scanpos; - if (jj_3R_113()) { jj_scanpos = xsp; break; } + if (jj_3R_118()) { jj_scanpos = xsp; break; } } if (jj_scan_token(DEDENT)) return true; return false; } - private boolean jj_3R_453() { - if (jj_3R_424()) return true; + private boolean jj_3R_463() { + if (jj_3R_433()) return true; return false; } - private boolean jj_3R_400() { - if (jj_3R_432()) return true; + private boolean jj_3R_409() { + if (jj_3R_442()) return true; return false; } - private boolean jj_3R_508() { + private boolean jj_3R_522() { if (jj_scan_token(COMMA)) return true; return false; } - private boolean jj_3R_70() { + private boolean jj_3R_72() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(101)) { @@ -12470,41 +12482,41 @@ private boolean jj_3R_70() { return false; } - private boolean jj_3R_537() { + private boolean jj_3R_551() { if (jj_scan_token(COMMA)) return true; return false; } - private boolean jj_3R_541() { + private boolean jj_3R_555() { if (jj_scan_token(COMMA)) return true; return false; } - private boolean jj_3R_399() { - if (jj_3R_431()) return true; + private boolean jj_3R_408() { + if (jj_3R_441()) return true; return false; } - private boolean jj_3R_364() { + private boolean jj_3R_372() { Token xsp; xsp = jj_scanpos; - if (jj_3R_399()) { + if (jj_3R_408()) { jj_scanpos = xsp; - if (jj_3R_400()) { + if (jj_3R_409()) { jj_scanpos = xsp; - if (jj_3R_401()) { + if (jj_3R_410()) { jj_scanpos = xsp; - if (jj_3R_402()) { + if (jj_3R_411()) { jj_scanpos = xsp; - if (jj_3R_403()) { + if (jj_3R_412()) { jj_scanpos = xsp; - if (jj_3R_404()) { + if (jj_3R_413()) { jj_scanpos = xsp; - if (jj_3R_405()) { + if (jj_3R_414()) { jj_scanpos = xsp; - if (jj_3R_406()) { + if (jj_3R_415()) { jj_scanpos = xsp; - if (jj_3R_407()) return true; + if (jj_3R_416()) return true; } } } @@ -12516,134 +12528,143 @@ private boolean jj_3R_364() { return false; } - private boolean jj_3R_307() { + private boolean jj_3R_315() { if (jj_scan_token(COMMA)) return true; - if (jj_3R_61()) return true; + if (jj_3R_59()) return true; return false; } - private boolean jj_3R_94() { + private boolean jj_3R_96() { if (jj_scan_token(COLONEQUAL)) return true; - if (jj_3R_61()) return true; + if (jj_3R_59()) return true; return false; } - private boolean jj_3R_267() { + private boolean jj_3R_275() { if (jj_scan_token(COMPLEX)) return true; return false; } - private boolean jj_3R_255() { - if (jj_3R_61()) return true; + private boolean jj_3R_263() { + if (jj_3R_59()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_307()) jj_scanpos = xsp; + if (jj_3R_315()) jj_scanpos = xsp; return false; } - private boolean jj_3R_266() { + private boolean jj_3R_274() { if (jj_scan_token(FLOAT)) return true; return false; } - private boolean jj_3R_265() { + private boolean jj_3R_273() { if (jj_scan_token(DECNUMBER)) return true; return false; } - private boolean jj_3R_452() { + private boolean jj_3R_462() { if (jj_scan_token(AS)) return true; - if (jj_3R_70()) return true; + if (jj_3R_72()) return true; return false; } - private boolean jj_3R_157() { + private boolean jj_3R_165() { if (jj_scan_token(NONLOCAL)) return true; - if (jj_3R_70()) return true; + if (jj_3R_72()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3_16()) { jj_scanpos = xsp; break; } + if (jj_3_18()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; - if (jj_3R_305()) jj_scanpos = xsp; + if (jj_3R_313()) jj_scanpos = xsp; xsp = jj_scanpos; - if (jj_3R_306()) jj_scanpos = xsp; + if (jj_3R_314()) jj_scanpos = xsp; return false; } - private boolean jj_3R_264() { + private boolean jj_3R_272() { if (jj_scan_token(OCTNUMBER)) return true; return false; } - private boolean jj_3R_156() { + private boolean jj_3R_474() { + if (jj_scan_token(LPAREN)) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_496()) jj_scanpos = xsp; + if (jj_scan_token(RPAREN)) return true; + return false; + } + + private boolean jj_3R_164() { if (jj_scan_token(GLOBAL)) return true; - if (jj_3R_70()) return true; + if (jj_3R_72()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_304()) { jj_scanpos = xsp; break; } + if (jj_3R_312()) { jj_scanpos = xsp; break; } } return false; } - private boolean jj_3R_86() { + private boolean jj_3R_88() { if (jj_scan_token(POWER)) return true; - if (jj_3R_132()) return true; + if (jj_3R_137()) return true; return false; } - private boolean jj_3R_389() { - if (jj_3R_422()) return true; + private boolean jj_3R_397() { + if (jj_3R_431()) return true; return false; } - private boolean jj_3R_423() { + private boolean jj_3R_432() { if (jj_scan_token(AS)) return true; - if (jj_3R_70()) return true; + if (jj_3R_72()) return true; return false; } - private boolean jj_3R_81() { + private boolean jj_3R_83() { if (jj_scan_token(POWER)) return true; - if (jj_3R_132()) return true; + if (jj_3R_137()) return true; return false; } - private boolean jj_3R_263() { + private boolean jj_3R_271() { if (jj_scan_token(BINNUMBER)) return true; return false; } - private boolean jj_3R_424() { - if (jj_3R_70()) return true; + private boolean jj_3R_433() { + if (jj_3R_72()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_452()) jj_scanpos = xsp; + if (jj_3R_462()) jj_scanpos = xsp; return false; } - private boolean jj_3R_451() { + private boolean jj_3R_461() { if (jj_scan_token(DOT)) return true; - if (jj_3R_70()) return true; + if (jj_3R_72()) return true; return false; } - private boolean jj_3R_249() { + private boolean jj_3R_257() { Token xsp; xsp = jj_scanpos; - if (jj_3R_262()) { + if (jj_3R_270()) { jj_scanpos = xsp; - if (jj_3R_263()) { + if (jj_3R_271()) { jj_scanpos = xsp; - if (jj_3R_264()) { + if (jj_3R_272()) { jj_scanpos = xsp; - if (jj_3R_265()) { + if (jj_3R_273()) { jj_scanpos = xsp; - if (jj_3R_266()) { + if (jj_3R_274()) { jj_scanpos = xsp; - if (jj_3R_267()) return true; + if (jj_3R_275()) return true; } } } @@ -12652,735 +12673,733 @@ private boolean jj_3R_249() { return false; } - private boolean jj_3R_262() { + private boolean jj_3R_270() { if (jj_scan_token(HEXNUMBER)) return true; return false; } - private boolean jj_3R_422() { - if (jj_3R_70()) return true; + private boolean jj_3R_431() { + if (jj_3R_72()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_451()) { jj_scanpos = xsp; break; } + if (jj_3R_461()) { jj_scanpos = xsp; break; } } return false; } - private boolean jj_3_36() { - if (jj_3R_93()) return true; + private boolean jj_3_38() { + if (jj_3R_95()) return true; return false; } - private boolean jj_3R_462() { - if (jj_scan_token(LPAREN)) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_483()) jj_scanpos = xsp; - if (jj_scan_token(RPAREN)) return true; + private boolean jj_3R_473() { + if (jj_3R_436()) return true; return false; } - private boolean jj_3R_386() { - if (jj_3R_422()) return true; + private boolean jj_3R_394() { + if (jj_3R_431()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_423()) jj_scanpos = xsp; + if (jj_3R_432()) jj_scanpos = xsp; return false; } - private boolean jj_3R_93() { + private boolean jj_3R_95() { if (jj_scan_token(EQUAL)) return true; - if (jj_3R_61()) return true; + if (jj_3R_59()) return true; return false; } - private boolean jj_3R_137() { - if (jj_3R_166()) return true; + private boolean jj_3R_142() { + if (jj_3R_174()) return true; return false; } - private boolean jj_3R_136() { - if (jj_3R_165()) return true; + private boolean jj_3R_141() { + if (jj_3R_173()) return true; return false; } - private boolean jj_3R_88() { - if (jj_3R_133()) return true; + private boolean jj_3R_90() { + if (jj_3R_138()) return true; return false; } - private boolean jj_3R_426() { + private boolean jj_3R_435() { if (jj_scan_token(COMMA)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_453()) jj_scanpos = xsp; + if (jj_3R_463()) jj_scanpos = xsp; return false; } - private boolean jj_3R_550() { - if (jj_3R_544()) return true; + private boolean jj_3R_564() { + if (jj_3R_558()) return true; return false; } - private boolean jj_3R_392() { + private boolean jj_3R_400() { if (jj_scan_token(LPAREN)) return true; - if (jj_3R_424()) return true; + if (jj_3R_433()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_426()) { jj_scanpos = xsp; break; } + if (jj_3R_435()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RPAREN)) return true; return false; } - private boolean jj_3_37() { - if (jj_3R_61()) return true; + private boolean jj_3_39() { + if (jj_3R_59()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3_36()) { + if (jj_3_38()) { jj_scanpos = xsp; - if (jj_3R_94()) { + if (jj_3R_96()) { jj_scanpos = xsp; - if (jj_3R_95()) return true; + if (jj_3R_97()) return true; } } return false; } - private boolean jj_3R_425() { + private boolean jj_3R_434() { if (jj_scan_token(COMMA)) return true; - if (jj_3R_424()) return true; + if (jj_3R_433()) return true; return false; } - private boolean jj_3R_92() { + private boolean jj_3R_94() { Token xsp; xsp = jj_scanpos; - if (jj_3_37()) { + if (jj_3_39()) { jj_scanpos = xsp; - if (jj_3R_136()) { + if (jj_3R_141()) { jj_scanpos = xsp; - if (jj_3R_137()) return true; + if (jj_3R_142()) return true; } } return false; } - private boolean jj_3R_87() { - if (jj_3R_61()) return true; + private boolean jj_3R_89() { + if (jj_3R_59()) return true; return false; } - private boolean jj_3R_83() { - if (jj_3R_133()) return true; + private boolean jj_3R_85() { + if (jj_3R_138()) return true; return false; } - private boolean jj_3R_391() { - if (jj_3R_424()) return true; + private boolean jj_3R_399() { + if (jj_3R_433()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_425()) { jj_scanpos = xsp; break; } + if (jj_3R_434()) { jj_scanpos = xsp; break; } } return false; } - private boolean jj_3R_390() { + private boolean jj_3R_398() { if (jj_scan_token(MULTIPLY)) return true; return false; } - private boolean jj_3R_82() { - if (jj_3R_61()) return true; + private boolean jj_3R_84() { + if (jj_3R_59()) return true; return false; } - private boolean jj_3R_387() { + private boolean jj_3R_395() { if (jj_scan_token(COMMA)) return true; - if (jj_3R_386()) return true; + if (jj_3R_394()) return true; return false; } - private boolean jj_3_35() { + private boolean jj_3_37() { if (jj_scan_token(COMMA)) return true; - if (jj_3R_92()) return true; + if (jj_3R_94()) return true; return false; } - private boolean jj_3R_466() { - if (jj_3R_485()) return true; + private boolean jj_3R_478() { + if (jj_3R_498()) return true; return false; } - private boolean jj_3R_388() { + private boolean jj_3R_396() { if (jj_scan_token(DOT)) return true; return false; } - private boolean jj_3R_362() { + private boolean jj_3R_370() { Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_388()) { jj_scanpos = xsp; break; } + if (jj_3R_396()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; - if (jj_3R_389()) jj_scanpos = xsp; + if (jj_3R_397()) jj_scanpos = xsp; if (jj_scan_token(IMPORT)) return true; xsp = jj_scanpos; - if (jj_3R_390()) { + if (jj_3R_398()) { jj_scanpos = xsp; - if (jj_3R_391()) { + if (jj_3R_399()) { jj_scanpos = xsp; - if (jj_3R_392()) return true; + if (jj_3R_400()) return true; } } return false; } - private boolean jj_3R_165() { + private boolean jj_3R_173() { if (jj_scan_token(POWER)) return true; - if (jj_3R_61()) return true; + if (jj_3R_59()) return true; return false; } - private boolean jj_3R_166() { + private boolean jj_3R_174() { if (jj_scan_token(MULTIPLY)) return true; - if (jj_3R_61()) return true; + if (jj_3R_59()) return true; return false; } - private boolean jj_3R_465() { - if (jj_3R_145()) return true; + private boolean jj_3R_477() { + if (jj_3R_153()) return true; return false; } - private boolean jj_3R_494() { - if (jj_3R_92()) return true; + private boolean jj_3R_508() { + if (jj_3R_94()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3_35()) { jj_scanpos = xsp; break; } + if (jj_3_37()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; - if (jj_3R_508()) jj_scanpos = xsp; + if (jj_3R_522()) jj_scanpos = xsp; return false; } - private boolean jj_3R_361() { - if (jj_3R_386()) return true; + private boolean jj_3R_369() { + if (jj_3R_394()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_387()) { jj_scanpos = xsp; break; } + if (jj_3R_395()) { jj_scanpos = xsp; break; } } return false; } - private boolean jj_3R_182() { + private boolean jj_3R_190() { if (jj_scan_token(FROM)) return true; - if (jj_3R_362()) return true; + if (jj_3R_370()) return true; return false; } - private boolean jj_3R_85() { - if (jj_3R_61()) return true; + private boolean jj_3R_87() { + if (jj_3R_59()) return true; if (jj_scan_token(COLON)) return true; - if (jj_3R_61()) return true; + if (jj_3R_59()) return true; return false; } - private boolean jj_3R_434() { + private boolean jj_3R_444() { if (jj_scan_token(CLASS)) return true; - if (jj_3R_70()) return true; + if (jj_3R_72()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_462()) jj_scanpos = xsp; + if (jj_3R_473()) jj_scanpos = xsp; + xsp = jj_scanpos; + if (jj_3R_474()) jj_scanpos = xsp; if (jj_scan_token(COLON)) return true; - if (jj_3R_173()) return true; + if (jj_3R_181()) return true; return false; } - private boolean jj_3R_181() { + private boolean jj_3R_189() { if (jj_scan_token(IMPORT)) return true; - if (jj_3R_361()) return true; + if (jj_3R_369()) return true; return false; } - private boolean jj_3_33() { + private boolean jj_3_35() { if (jj_scan_token(COMMA)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_89()) { + if (jj_3R_91()) { jj_scanpos = xsp; - if (jj_3R_90()) return true; + if (jj_3R_92()) return true; } return false; } - private boolean jj_3R_518() { + private boolean jj_3R_532() { Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3_33()) { jj_scanpos = xsp; break; } + if (jj_3_35()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; - if (jj_3R_525()) jj_scanpos = xsp; + if (jj_3R_539()) jj_scanpos = xsp; return false; } - private boolean jj_3R_80() { - if (jj_3R_61()) return true; - if (jj_scan_token(COLON)) return true; - if (jj_3R_61()) return true; + private boolean jj_3R_92() { + if (jj_3R_138()) return true; return false; } - private boolean jj_3R_90() { - if (jj_3R_133()) return true; + private boolean jj_3R_82() { + if (jj_3R_59()) return true; + if (jj_scan_token(COLON)) return true; + if (jj_3R_59()) return true; return false; } - private boolean jj_3R_464() { - if (jj_3R_434()) return true; + private boolean jj_3R_476() { + if (jj_3R_444()) return true; return false; } - private boolean jj_3R_155() { + private boolean jj_3R_163() { Token xsp; xsp = jj_scanpos; - if (jj_3R_181()) { + if (jj_3R_189()) { jj_scanpos = xsp; - if (jj_3R_182()) return true; + if (jj_3R_190()) return true; } return false; } - private boolean jj_3R_331() { - if (jj_3R_379()) return true; + private boolean jj_3R_339() { + if (jj_3R_387()) return true; return false; } - private boolean jj_3R_485() { + private boolean jj_3R_498() { if (jj_scan_token(ASYNC)) return true; - if (jj_3R_145()) return true; + if (jj_3R_153()) return true; return false; } - private boolean jj_3R_203() { + private boolean jj_3R_211() { if (jj_scan_token(RAISE)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_385()) jj_scanpos = xsp; + if (jj_3R_393()) jj_scanpos = xsp; return false; } - private boolean jj_3R_473() { - if (jj_3R_174()) return true; + private boolean jj_3R_485() { + if (jj_3R_182()) return true; return false; } - private boolean jj_3R_472() { + private boolean jj_3R_484() { if (jj_scan_token(FROM)) return true; - if (jj_3R_61()) return true; + if (jj_3R_59()) return true; return false; } - private boolean jj_3R_91() { - if (jj_3R_84()) return true; + private boolean jj_3R_93() { + if (jj_3R_86()) return true; return false; } - private boolean jj_3R_435() { - if (jj_3R_463()) return true; + private boolean jj_3R_445() { + if (jj_3R_475()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_464()) { + if (jj_3R_476()) { jj_scanpos = xsp; - if (jj_3R_465()) { + if (jj_3R_477()) { jj_scanpos = xsp; - if (jj_3R_466()) return true; + if (jj_3R_478()) return true; } } return false; } - private boolean jj_3R_89() { - if (jj_3R_135()) return true; + private boolean jj_3R_91() { + if (jj_3R_140()) return true; return false; } - private boolean jj_3R_547() { - if (jj_3R_548()) return true; + private boolean jj_3R_561() { + if (jj_3R_562()) return true; return false; } - private boolean jj_3R_525() { - if (jj_3R_379()) return true; + private boolean jj_3R_539() { + if (jj_3R_387()) return true; return false; } - private boolean jj_3R_360() { - if (jj_3R_379()) return true; + private boolean jj_3R_368() { + if (jj_3R_387()) return true; return false; } - private boolean jj_3R_548() { + private boolean jj_3R_562() { if (jj_scan_token(IF)) return true; - if (jj_3R_549()) return true; + if (jj_3R_563()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_550()) jj_scanpos = xsp; + if (jj_3R_564()) jj_scanpos = xsp; return false; } - private boolean jj_3R_79() { - if (jj_3R_133()) return true; + private boolean jj_3R_81() { + if (jj_3R_138()) return true; return false; } - private boolean jj_3R_450() { + private boolean jj_3R_460() { Token xsp; xsp = jj_scanpos; - if (jj_3R_472()) { + if (jj_3R_484()) { jj_scanpos = xsp; - if (jj_3R_473()) return true; + if (jj_3R_485()) return true; } return false; } - private boolean jj_3R_530() { + private boolean jj_3R_544() { Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3_31()) { jj_scanpos = xsp; break; } + if (jj_3_33()) { jj_scanpos = xsp; break; } } return false; } - private boolean jj_3_31() { + private boolean jj_3_33() { if (jj_scan_token(COMMA)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_87()) { + if (jj_3R_89()) { jj_scanpos = xsp; - if (jj_3R_88()) return true; + if (jj_3R_90()) return true; } return false; } - private boolean jj_3R_419() { - if (jj_3R_450()) return true; + private boolean jj_3R_428() { + if (jj_3R_460()) return true; return false; } - private boolean jj_3R_84() { + private boolean jj_3R_86() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(77)) jj_scanpos = xsp; if (jj_scan_token(FOR)) return true; - if (jj_3R_134()) return true; + if (jj_3R_139()) return true; if (jj_scan_token(IN)) return true; - if (jj_3R_141()) return true; + if (jj_3R_148()) return true; xsp = jj_scanpos; - if (jj_3R_540()) jj_scanpos = xsp; + if (jj_3R_554()) jj_scanpos = xsp; return false; } - private boolean jj_3R_311() { + private boolean jj_3R_319() { if (jj_scan_token(COMMA)) return true; return false; } - private boolean jj_3_34() { + private boolean jj_3_36() { Token xsp; - if (jj_3R_91()) return true; + if (jj_3R_93()) return true; while (true) { xsp = jj_scanpos; - if (jj_3R_91()) { jj_scanpos = xsp; break; } + if (jj_3R_93()) { jj_scanpos = xsp; break; } } return false; } - private boolean jj_3R_78() { - if (jj_3R_61()) return true; + private boolean jj_3R_80() { + if (jj_3R_59()) return true; return false; } - private boolean jj_3R_546() { - if (jj_3R_84()) return true; + private boolean jj_3R_560() { + if (jj_3R_86()) return true; return false; } - private boolean jj_3R_544() { + private boolean jj_3R_558() { Token xsp; xsp = jj_scanpos; - if (jj_3R_546()) { + if (jj_3R_560()) { jj_scanpos = xsp; - if (jj_3R_547()) return true; + if (jj_3R_561()) return true; } return false; } - private boolean jj_3R_160() { - if (jj_3R_133()) return true; + private boolean jj_3R_168() { + if (jj_3R_138()) return true; return false; } - private boolean jj_3R_159() { - if (jj_3R_135()) return true; + private boolean jj_3R_167() { + if (jj_3R_140()) return true; return false; } - private boolean jj_3R_535() { + private boolean jj_3R_549() { Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3_28()) { jj_scanpos = xsp; break; } + if (jj_3_30()) { jj_scanpos = xsp; break; } } return false; } - private boolean jj_3_28() { + private boolean jj_3_30() { if (jj_scan_token(COMMA)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_82()) { + if (jj_3R_84()) { jj_scanpos = xsp; - if (jj_3R_83()) return true; + if (jj_3R_85()) return true; } return false; } - private boolean jj_3R_77() { - if (jj_3R_133()) return true; + private boolean jj_3R_79() { + if (jj_3R_138()) return true; return false; } - private boolean jj_3R_127() { + private boolean jj_3R_132() { if (jj_scan_token(YIELD)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_419()) jj_scanpos = xsp; + if (jj_3R_428()) jj_scanpos = xsp; return false; } - private boolean jj_3R_128() { + private boolean jj_3R_133() { Token xsp; xsp = jj_scanpos; - if (jj_3R_159()) { + if (jj_3R_167()) { jj_scanpos = xsp; - if (jj_3R_160()) return true; + if (jj_3R_168()) return true; } xsp = jj_scanpos; - if (jj_3_34()) { + if (jj_3_36()) { jj_scanpos = xsp; - if (jj_3R_518()) return true; + if (jj_3R_532()) return true; } return false; } - private boolean jj_3R_393() { + private boolean jj_3R_401() { if (jj_scan_token(COMMA)) return true; return false; } - private boolean jj_3R_76() { - if (jj_3R_132()) return true; + private boolean jj_3R_78() { + if (jj_3R_137()) return true; return false; } - private boolean jj_3R_420() { - if (jj_3R_379()) return true; + private boolean jj_3R_429() { + if (jj_3R_387()) return true; return false; } - private boolean jj_3R_384() { - if (jj_3R_174()) return true; + private boolean jj_3R_392() { + if (jj_3R_182()) return true; return false; } - private boolean jj_3R_202() { - if (jj_3R_127()) return true; + private boolean jj_3R_210() { + if (jj_3R_132()) return true; return false; } - private boolean jj_3R_65() { - if (jj_3R_106()) return true; + private boolean jj_3R_67() { + if (jj_3R_111()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_311()) jj_scanpos = xsp; + if (jj_3R_319()) jj_scanpos = xsp; return false; } - private boolean jj_3R_217() { + private boolean jj_3R_225() { if (jj_scan_token(RETURN)) return true; return false; } - private boolean jj_3_32() { - if (jj_3R_84()) return true; + private boolean jj_3_34() { + if (jj_3R_86()) return true; return false; } - private boolean jj_3R_418() { - if (jj_3R_363()) return true; + private boolean jj_3R_427() { + if (jj_3R_371()) return true; return false; } - private boolean jj_3R_201() { - if (jj_3R_217()) return true; + private boolean jj_3R_209() { + if (jj_3R_225()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_384()) jj_scanpos = xsp; + if (jj_3R_392()) jj_scanpos = xsp; return false; } - private boolean jj_3_30() { + private boolean jj_3_32() { if (jj_scan_token(COMMA)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_85()) { + if (jj_3R_87()) { jj_scanpos = xsp; - if (jj_3R_86()) return true; + if (jj_3R_88()) return true; } return false; } - private boolean jj_3R_529() { + private boolean jj_3R_543() { Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3_30()) { jj_scanpos = xsp; break; } + if (jj_3_32()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; - if (jj_3R_537()) jj_scanpos = xsp; + if (jj_3R_551()) jj_scanpos = xsp; return false; } - private boolean jj_3R_521() { - if (jj_3R_133()) return true; + private boolean jj_3R_535() { + if (jj_3R_138()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3_32()) { + if (jj_3_34()) { jj_scanpos = xsp; - if (jj_3R_530()) return true; + if (jj_3R_544()) return true; } xsp = jj_scanpos; - if (jj_3R_531()) jj_scanpos = xsp; + if (jj_3R_545()) jj_scanpos = xsp; return false; } - private boolean jj_3R_528() { - if (jj_3R_84()) return true; + private boolean jj_3R_542() { + if (jj_3R_86()) return true; return false; } - private boolean jj_3_27() { + private boolean jj_3_29() { if (jj_scan_token(COMMA)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_80()) { + if (jj_3R_82()) { jj_scanpos = xsp; - if (jj_3R_81()) return true; + if (jj_3R_83()) return true; } return false; } - private boolean jj_3R_534() { + private boolean jj_3R_548() { Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3_27()) { jj_scanpos = xsp; break; } + if (jj_3_29()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; - if (jj_3R_541()) jj_scanpos = xsp; + if (jj_3R_555()) jj_scanpos = xsp; return false; } - private boolean jj_3R_522() { - if (jj_3R_379()) return true; + private boolean jj_3R_536() { + if (jj_3R_387()) return true; return false; } - private boolean jj_3_29() { - if (jj_3R_84()) return true; + private boolean jj_3_31() { + if (jj_3R_86()) return true; return false; } - private boolean jj_3R_533() { - if (jj_3R_84()) return true; + private boolean jj_3R_547() { + if (jj_3R_86()) return true; return false; } - private boolean jj_3R_527() { + private boolean jj_3R_541() { Token xsp; xsp = jj_scanpos; - if (jj_3_29()) { + if (jj_3_31()) { jj_scanpos = xsp; - if (jj_3R_535()) return true; + if (jj_3R_549()) return true; } xsp = jj_scanpos; - if (jj_3R_536()) jj_scanpos = xsp; + if (jj_3R_550()) jj_scanpos = xsp; return false; } - private boolean jj_3R_180() { - if (jj_3R_203()) return true; + private boolean jj_3R_188() { + if (jj_3R_211()) return true; return false; } - private boolean jj_3R_179() { - if (jj_3R_202()) return true; + private boolean jj_3R_187() { + if (jj_3R_210()) return true; return false; } - private boolean jj_3R_520() { + private boolean jj_3R_534() { if (jj_scan_token(POWER)) return true; - if (jj_3R_132()) return true; + if (jj_3R_137()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_528()) { + if (jj_3R_542()) { jj_scanpos = xsp; - if (jj_3R_529()) return true; + if (jj_3R_543()) return true; } return false; } - private boolean jj_3R_417() { - if (jj_3R_127()) return true; + private boolean jj_3R_426() { + if (jj_3R_132()) return true; return false; } - private boolean jj_3R_178() { - if (jj_3R_201()) return true; + private boolean jj_3R_186() { + if (jj_3R_209()) return true; return false; } - private boolean jj_3R_383() { - if (jj_3R_174()) return true; + private boolean jj_3R_391() { + if (jj_3R_182()) return true; return false; } - private boolean jj_3R_177() { + private boolean jj_3R_185() { if (jj_scan_token(CONTINUE)) return true; return false; } - private boolean jj_3R_154() { + private boolean jj_3R_162() { Token xsp; xsp = jj_scanpos; - if (jj_3R_176()) { + if (jj_3R_184()) { jj_scanpos = xsp; - if (jj_3R_177()) { + if (jj_3R_185()) { jj_scanpos = xsp; - if (jj_3R_178()) { + if (jj_3R_186()) { jj_scanpos = xsp; - if (jj_3R_179()) { + if (jj_3R_187()) { jj_scanpos = xsp; - if (jj_3R_180()) return true; + if (jj_3R_188()) return true; } } } @@ -13388,502 +13407,502 @@ private boolean jj_3R_154() { return false; } - private boolean jj_3R_176() { + private boolean jj_3R_184() { if (jj_scan_token(BREAK)) return true; return false; } - private boolean jj_3R_358() { - if (jj_3R_381()) return true; + private boolean jj_3R_366() { + if (jj_3R_389()) return true; return false; } - private boolean jj_3R_356() { - if (jj_3R_381()) return true; + private boolean jj_3R_364() { + if (jj_3R_389()) return true; return false; } - private boolean jj_3R_354() { - if (jj_3R_381()) return true; + private boolean jj_3R_362() { + if (jj_3R_389()) return true; return false; } - private boolean jj_3R_352() { - if (jj_3R_381()) return true; + private boolean jj_3R_360() { + if (jj_3R_389()) return true; return false; } - private boolean jj_3R_350() { - if (jj_3R_381()) return true; + private boolean jj_3R_358() { + if (jj_3R_389()) return true; return false; } - private boolean jj_3R_348() { - if (jj_3R_381()) return true; + private boolean jj_3R_356() { + if (jj_3R_389()) return true; return false; } - private boolean jj_3R_380() { + private boolean jj_3R_388() { if (jj_scan_token(EQUAL)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_417()) { + if (jj_3R_426()) { jj_scanpos = xsp; - if (jj_3R_418()) return true; + if (jj_3R_427()) return true; } return false; } - private boolean jj_3R_346() { - if (jj_3R_381()) return true; + private boolean jj_3R_354() { + if (jj_3R_389()) return true; return false; } - private boolean jj_3R_153() { + private boolean jj_3R_161() { if (jj_scan_token(PASS)) return true; return false; } - private boolean jj_3R_344() { - if (jj_3R_381()) return true; + private boolean jj_3R_352() { + if (jj_3R_389()) return true; return false; } - private boolean jj_3R_342() { - if (jj_3R_381()) return true; + private boolean jj_3R_350() { + if (jj_3R_389()) return true; return false; } - private boolean jj_3R_526() { + private boolean jj_3R_540() { if (jj_scan_token(COLON)) return true; - if (jj_3R_61()) return true; + if (jj_3R_59()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_533()) { + if (jj_3R_547()) { jj_scanpos = xsp; - if (jj_3R_534()) return true; + if (jj_3R_548()) return true; } return false; } - private boolean jj_3R_340() { - if (jj_3R_381()) return true; + private boolean jj_3R_348() { + if (jj_3R_389()) return true; return false; } - private boolean jj_3R_338() { - if (jj_3R_381()) return true; + private boolean jj_3R_346() { + if (jj_3R_389()) return true; return false; } - private boolean jj_3R_336() { - if (jj_3R_381()) return true; + private boolean jj_3R_344() { + if (jj_3R_389()) return true; return false; } - private boolean jj_3R_382() { - if (jj_3R_127()) return true; + private boolean jj_3R_390() { + if (jj_3R_132()) return true; return false; } - private boolean jj_3R_334() { - if (jj_3R_381()) return true; + private boolean jj_3R_342() { + if (jj_3R_389()) return true; return false; } - private boolean jj_3R_357() { - if (jj_3R_127()) return true; + private boolean jj_3R_365() { + if (jj_3R_132()) return true; return false; } - private boolean jj_3R_175() { + private boolean jj_3R_183() { if (jj_scan_token(DEL)) return true; return false; } - private boolean jj_3R_355() { - if (jj_3R_127()) return true; + private boolean jj_3R_363() { + if (jj_3R_132()) return true; return false; } - private boolean jj_3R_353() { - if (jj_3R_127()) return true; + private boolean jj_3R_361() { + if (jj_3R_132()) return true; return false; } - private boolean jj_3R_351() { - if (jj_3R_127()) return true; + private boolean jj_3R_359() { + if (jj_3R_132()) return true; return false; } - private boolean jj_3R_152() { - if (jj_3R_175()) return true; - if (jj_3R_134()) return true; + private boolean jj_3R_160() { + if (jj_3R_183()) return true; + if (jj_3R_139()) return true; return false; } - private boolean jj_3R_349() { - if (jj_3R_127()) return true; + private boolean jj_3R_357() { + if (jj_3R_132()) return true; return false; } - private boolean jj_3R_347() { - if (jj_3R_127()) return true; + private boolean jj_3R_355() { + if (jj_3R_132()) return true; return false; } - private boolean jj_3R_345() { - if (jj_3R_127()) return true; + private boolean jj_3R_353() { + if (jj_3R_132()) return true; return false; } - private boolean jj_3R_519() { - if (jj_3R_61()) return true; + private boolean jj_3R_533() { + if (jj_3R_59()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_526()) { + if (jj_3R_540()) { jj_scanpos = xsp; - if (jj_3R_527()) return true; + if (jj_3R_541()) return true; } return false; } - private boolean jj_3R_510() { + private boolean jj_3R_524() { Token xsp; xsp = jj_scanpos; - if (jj_3R_519()) { + if (jj_3R_533()) { jj_scanpos = xsp; - if (jj_3R_520()) { + if (jj_3R_534()) { jj_scanpos = xsp; - if (jj_3R_521()) return true; + if (jj_3R_535()) return true; } } return false; } - private boolean jj_3R_343() { - if (jj_3R_127()) return true; + private boolean jj_3R_351() { + if (jj_3R_132()) return true; return false; } - private boolean jj_3_26() { + private boolean jj_3_28() { if (jj_scan_token(COMMA)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_78()) { + if (jj_3R_80()) { jj_scanpos = xsp; - if (jj_3R_79()) return true; + if (jj_3R_81()) return true; } return false; } - private boolean jj_3R_341() { - if (jj_3R_127()) return true; + private boolean jj_3R_349() { + if (jj_3R_132()) return true; return false; } - private boolean jj_3R_339() { - if (jj_3R_127()) return true; + private boolean jj_3R_347() { + if (jj_3R_132()) return true; return false; } - private boolean jj_3R_332() { + private boolean jj_3R_340() { if (jj_scan_token(COLON)) return true; - if (jj_3R_61()) return true; + if (jj_3R_59()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_380()) jj_scanpos = xsp; + if (jj_3R_388()) jj_scanpos = xsp; return false; } - private boolean jj_3R_337() { - if (jj_3R_127()) return true; + private boolean jj_3R_345() { + if (jj_3R_132()) return true; return false; } - private boolean jj_3R_335() { - if (jj_3R_127()) return true; + private boolean jj_3R_343() { + if (jj_3R_132()) return true; return false; } - private boolean jj_3R_333() { - if (jj_3R_127()) return true; + private boolean jj_3R_341() { + if (jj_3R_132()) return true; return false; } - private boolean jj_3R_359() { + private boolean jj_3R_367() { if (jj_scan_token(EQUAL)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_382()) { + if (jj_3R_390()) { jj_scanpos = xsp; - if (jj_3R_383()) return true; + if (jj_3R_391()) return true; } return false; } - private boolean jj_3R_303() { + private boolean jj_3R_311() { Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_359()) { jj_scanpos = xsp; break; } + if (jj_3R_367()) { jj_scanpos = xsp; break; } } return false; } - private boolean jj_3R_408() { - if (jj_3R_379()) return true; + private boolean jj_3R_417() { + if (jj_3R_387()) return true; return false; } - private boolean jj_3R_302() { + private boolean jj_3R_310() { if (jj_scan_token(POWEREQ)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_357()) { + if (jj_3R_365()) { jj_scanpos = xsp; - if (jj_3R_358()) return true; + if (jj_3R_366()) return true; } return false; } - private boolean jj_3R_301() { + private boolean jj_3R_309() { if (jj_scan_token(RSHIFTEQ)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_355()) { + if (jj_3R_363()) { jj_scanpos = xsp; - if (jj_3R_356()) return true; + if (jj_3R_364()) return true; } return false; } - private boolean jj_3R_300() { + private boolean jj_3R_308() { if (jj_scan_token(LSHIFTEQ)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_353()) { + if (jj_3R_361()) { jj_scanpos = xsp; - if (jj_3R_354()) return true; + if (jj_3R_362()) return true; } return false; } - private boolean jj_3R_299() { + private boolean jj_3R_307() { if (jj_scan_token(XOREQ)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_351()) { + if (jj_3R_359()) { jj_scanpos = xsp; - if (jj_3R_352()) return true; + if (jj_3R_360()) return true; } return false; } - private boolean jj_3R_298() { + private boolean jj_3R_306() { if (jj_scan_token(OREQ)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_349()) { + if (jj_3R_357()) { jj_scanpos = xsp; - if (jj_3R_350()) return true; + if (jj_3R_358()) return true; } return false; } - private boolean jj_3_23() { + private boolean jj_3_25() { if (jj_scan_token(COMMA)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_76()) { + if (jj_3R_78()) { jj_scanpos = xsp; - if (jj_3R_77()) return true; + if (jj_3R_79()) return true; } return false; } - private boolean jj_3R_200() { - if (jj_3R_133()) return true; + private boolean jj_3R_208() { + if (jj_3R_138()) return true; return false; } - private boolean jj_3_11() { - if (jj_scan_token(COMMA)) return true; + private boolean jj_3R_305() { + if (jj_scan_token(ANDEQ)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_65()) jj_scanpos = xsp; + if (jj_3R_355()) { + jj_scanpos = xsp; + if (jj_3R_356()) return true; + } return false; } - private boolean jj_3R_297() { - if (jj_scan_token(ANDEQ)) return true; + private boolean jj_3_13() { + if (jj_scan_token(COMMA)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_347()) { - jj_scanpos = xsp; - if (jj_3R_348()) return true; - } + if (jj_3R_67()) jj_scanpos = xsp; return false; } - private boolean jj_3R_296() { + private boolean jj_3R_304() { if (jj_scan_token(MODULOEQ)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_345()) { + if (jj_3R_353()) { jj_scanpos = xsp; - if (jj_3R_346()) return true; + if (jj_3R_354()) return true; } return false; } - private boolean jj_3R_295() { + private boolean jj_3R_303() { if (jj_scan_token(FLOORDIVIDEEQ)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_343()) { + if (jj_3R_351()) { jj_scanpos = xsp; - if (jj_3R_344()) return true; + if (jj_3R_352()) return true; } return false; } - private boolean jj_3R_294() { + private boolean jj_3R_302() { if (jj_scan_token(DIVIDEEQ)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_341()) { + if (jj_3R_349()) { jj_scanpos = xsp; - if (jj_3R_342()) return true; + if (jj_3R_350()) return true; } return false; } - private boolean jj_3R_545() { - if (jj_3R_61()) return true; + private boolean jj_3R_559() { + if (jj_3R_59()) return true; return false; } - private boolean jj_3R_293() { + private boolean jj_3R_301() { if (jj_scan_token(DOTEQ)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_339()) { + if (jj_3R_347()) { jj_scanpos = xsp; - if (jj_3R_340()) return true; + if (jj_3R_348()) return true; } return false; } - private boolean jj_3R_292() { + private boolean jj_3R_300() { if (jj_scan_token(MULTIPLYEQ)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_337()) { + if (jj_3R_345()) { jj_scanpos = xsp; - if (jj_3R_338()) return true; + if (jj_3R_346()) return true; } return false; } - private boolean jj_3R_133() { + private boolean jj_3R_138() { if (jj_scan_token(MULTIPLY)) return true; - if (jj_3R_132()) return true; + if (jj_3R_137()) return true; return false; } - private boolean jj_3R_291() { + private boolean jj_3R_299() { if (jj_scan_token(MINUSEQ)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_335()) { + if (jj_3R_343()) { jj_scanpos = xsp; - if (jj_3R_336()) return true; + if (jj_3R_344()) return true; } return false; } - private boolean jj_3_25() { + private boolean jj_3_27() { if (jj_scan_token(COMMA)) return true; - if (jj_3R_61()) return true; + if (jj_3R_59()) return true; return false; } - private boolean jj_3R_199() { - if (jj_3R_61()) return true; + private boolean jj_3R_207() { + if (jj_3R_59()) return true; return false; } - private boolean jj_3R_290() { + private boolean jj_3R_298() { if (jj_scan_token(PLUSEQ)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_333()) { + if (jj_3R_341()) { jj_scanpos = xsp; - if (jj_3R_334()) return true; + if (jj_3R_342()) return true; } return false; } - private boolean jj_3R_289() { - if (jj_3R_332()) return true; + private boolean jj_3R_297() { + if (jj_3R_340()) return true; return false; } - private boolean jj_3R_174() { + private boolean jj_3R_182() { Token xsp; xsp = jj_scanpos; - if (jj_3R_199()) { + if (jj_3R_207()) { jj_scanpos = xsp; - if (jj_3R_200()) return true; + if (jj_3R_208()) return true; } while (true) { xsp = jj_scanpos; - if (jj_3_26()) { jj_scanpos = xsp; break; } + if (jj_3_28()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; - if (jj_3R_331()) jj_scanpos = xsp; + if (jj_3R_339()) jj_scanpos = xsp; return false; } - private boolean jj_3R_379() { + private boolean jj_3R_387() { if (jj_scan_token(COMMA)) return true; return false; } - private boolean jj_3R_151() { - if (jj_3R_174()) return true; + private boolean jj_3R_159() { + if (jj_3R_182()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_289()) { + if (jj_3R_297()) { jj_scanpos = xsp; - if (jj_3R_290()) { + if (jj_3R_298()) { jj_scanpos = xsp; - if (jj_3R_291()) { + if (jj_3R_299()) { jj_scanpos = xsp; - if (jj_3R_292()) { + if (jj_3R_300()) { jj_scanpos = xsp; - if (jj_3R_293()) { + if (jj_3R_301()) { jj_scanpos = xsp; - if (jj_3R_294()) { + if (jj_3R_302()) { jj_scanpos = xsp; - if (jj_3R_295()) { + if (jj_3R_303()) { jj_scanpos = xsp; - if (jj_3R_296()) { + if (jj_3R_304()) { jj_scanpos = xsp; - if (jj_3R_297()) { + if (jj_3R_305()) { jj_scanpos = xsp; - if (jj_3R_298()) { + if (jj_3R_306()) { jj_scanpos = xsp; - if (jj_3R_299()) { + if (jj_3R_307()) { jj_scanpos = xsp; - if (jj_3R_300()) { + if (jj_3R_308()) { jj_scanpos = xsp; - if (jj_3R_301()) { + if (jj_3R_309()) { jj_scanpos = xsp; - if (jj_3R_302()) { + if (jj_3R_310()) { jj_scanpos = xsp; - if (jj_3R_303()) return true; + if (jj_3R_311()) return true; } } } @@ -13901,171 +13920,171 @@ private boolean jj_3R_151() { return false; } - private boolean jj_3_24() { + private boolean jj_3_26() { if (jj_scan_token(COMMA)) return true; - if (jj_3R_61()) return true; + if (jj_3R_59()) return true; return false; } - private boolean jj_3R_185() { + private boolean jj_3R_193() { if (jj_scan_token(COLON)) return true; return false; } - private boolean jj_3R_543() { - if (jj_3R_185()) return true; + private boolean jj_3R_557() { + if (jj_3R_193()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_545()) jj_scanpos = xsp; + if (jj_3R_559()) jj_scanpos = xsp; return false; } - private boolean jj_3R_164() { - if (jj_3R_133()) return true; + private boolean jj_3R_172() { + if (jj_3R_138()) return true; return false; } - private boolean jj_3R_363() { - if (jj_3R_61()) return true; + private boolean jj_3R_371() { + if (jj_3R_59()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3_25()) { jj_scanpos = xsp; break; } + if (jj_3_27()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; - if (jj_3R_393()) jj_scanpos = xsp; + if (jj_3R_401()) jj_scanpos = xsp; return false; } - private boolean jj_3R_514() { + private boolean jj_3R_528() { if (jj_scan_token(COMMA)) return true; return false; } - private boolean jj_3R_381() { - if (jj_3R_61()) return true; + private boolean jj_3R_389() { + if (jj_3R_59()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3_24()) { jj_scanpos = xsp; break; } + if (jj_3_26()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; - if (jj_3R_420()) jj_scanpos = xsp; + if (jj_3R_429()) jj_scanpos = xsp; return false; } - private boolean jj_3R_144() { + private boolean jj_3R_152() { if (jj_scan_token(MULTIPLY)) return true; if (jj_scan_token(MULTIPLY)) return true; return false; } - private boolean jj_3R_62() { - if (jj_3R_103()) return true; + private boolean jj_3R_64() { + if (jj_3R_108()) return true; return false; } - private boolean jj_3R_258() { - if (jj_3R_70()) return true; + private boolean jj_3R_266() { + if (jj_3R_72()) return true; return false; } - private boolean jj_3R_436() { + private boolean jj_3R_446() { if (jj_scan_token(COMMA)) return true; return false; } - private boolean jj_3R_121() { + private boolean jj_3R_126() { if (jj_scan_token(ASSERT)) return true; - if (jj_3R_255()) return true; + if (jj_3R_263()) return true; return false; } - private boolean jj_3R_120() { - if (jj_3R_157()) return true; + private boolean jj_3R_125() { + if (jj_3R_165()) return true; return false; } - private boolean jj_3R_163() { - if (jj_3R_132()) return true; + private boolean jj_3R_171() { + if (jj_3R_137()) return true; return false; } - private boolean jj_3R_119() { - if (jj_3R_156()) return true; + private boolean jj_3R_124() { + if (jj_3R_164()) return true; return false; } - private boolean jj_3R_134() { + private boolean jj_3R_139() { Token xsp; xsp = jj_scanpos; - if (jj_3R_163()) { + if (jj_3R_171()) { jj_scanpos = xsp; - if (jj_3R_164()) return true; + if (jj_3R_172()) return true; } while (true) { xsp = jj_scanpos; - if (jj_3_23()) { jj_scanpos = xsp; break; } + if (jj_3_25()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; - if (jj_3R_360()) jj_scanpos = xsp; + if (jj_3R_368()) jj_scanpos = xsp; return false; } - private boolean jj_3R_542() { - if (jj_3R_61()) return true; + private boolean jj_3R_556() { + if (jj_3R_59()) return true; return false; } - private boolean jj_3R_118() { - if (jj_3R_155()) return true; + private boolean jj_3R_123() { + if (jj_3R_163()) return true; return false; } - private boolean jj_3_15() { + private boolean jj_3_17() { if (jj_scan_token(SEMICOLON)) return true; - if (jj_3R_69()) return true; + if (jj_3R_71()) return true; return false; } - private boolean jj_3R_117() { - if (jj_3R_154()) return true; + private boolean jj_3R_122() { + if (jj_3R_162()) return true; return false; } - private boolean jj_3R_116() { - if (jj_3R_153()) return true; + private boolean jj_3R_121() { + if (jj_3R_161()) return true; return false; } - private boolean jj_3R_115() { - if (jj_3R_152()) return true; + private boolean jj_3R_120() { + if (jj_3R_160()) return true; return false; } - private boolean jj_3R_114() { - if (jj_3R_151()) return true; + private boolean jj_3R_119() { + if (jj_3R_159()) return true; return false; } - private boolean jj_3R_69() { + private boolean jj_3R_71() { Token xsp; xsp = jj_scanpos; - if (jj_3R_114()) { + if (jj_3R_119()) { jj_scanpos = xsp; - if (jj_3R_115()) { + if (jj_3R_120()) { jj_scanpos = xsp; - if (jj_3R_116()) { + if (jj_3R_121()) { jj_scanpos = xsp; - if (jj_3R_117()) { + if (jj_3R_122()) { jj_scanpos = xsp; - if (jj_3R_118()) { + if (jj_3R_123()) { jj_scanpos = xsp; - if (jj_3R_119()) { + if (jj_3R_124()) { jj_scanpos = xsp; - if (jj_3R_120()) { + if (jj_3R_125()) { jj_scanpos = xsp; - if (jj_3R_121()) return true; + if (jj_3R_126()) return true; } } } @@ -14076,499 +14095,499 @@ private boolean jj_3R_69() { return false; } - private boolean jj_3R_538() { - if (jj_3R_161()) return true; + private boolean jj_3R_552() { + if (jj_3R_169()) return true; return false; } - private boolean jj_3_22() { + private boolean jj_3_24() { if (jj_scan_token(COMMA)) return true; - if (jj_3R_75()) return true; + if (jj_3R_77()) return true; return false; } - private boolean jj_3R_161() { - if (jj_3R_185()) return true; + private boolean jj_3R_169() { + if (jj_3R_193()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_542()) jj_scanpos = xsp; + if (jj_3R_556()) jj_scanpos = xsp; xsp = jj_scanpos; - if (jj_3R_543()) jj_scanpos = xsp; + if (jj_3R_557()) jj_scanpos = xsp; return false; } - private boolean jj_3R_228() { + private boolean jj_3R_236() { if (jj_scan_token(SEMICOLON)) return true; return false; } - private boolean jj_3R_131() { - if (jj_3R_161()) return true; + private boolean jj_3R_136() { + if (jj_3R_169()) return true; return false; } - private boolean jj_3R_130() { - if (jj_3R_61()) return true; + private boolean jj_3R_135() { + if (jj_3R_59()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_538()) jj_scanpos = xsp; + if (jj_3R_552()) jj_scanpos = xsp; return false; } - private boolean jj_3R_214() { - if (jj_3R_69()) return true; + private boolean jj_3R_222() { + if (jj_3R_71()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3_15()) { jj_scanpos = xsp; break; } + if (jj_3_17()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; - if (jj_3R_228()) jj_scanpos = xsp; + if (jj_3R_236()) jj_scanpos = xsp; if (jj_scan_token(NEWLINE)) return true; return false; } - private boolean jj_3R_129() { + private boolean jj_3R_134() { if (jj_scan_token(DOT)) return true; if (jj_scan_token(DOT)) return true; if (jj_scan_token(DOT)) return true; return false; } - private boolean jj_3R_75() { + private boolean jj_3R_77() { Token xsp; xsp = jj_scanpos; - if (jj_3R_129()) { + if (jj_3R_134()) { jj_scanpos = xsp; - if (jj_3R_130()) { + if (jj_3R_135()) { jj_scanpos = xsp; - if (jj_3R_131()) return true; + if (jj_3R_136()) return true; } } return false; } - private boolean jj_3R_60() { - if (jj_3R_100()) return true; + private boolean jj_3R_63() { + if (jj_3R_107()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_514()) jj_scanpos = xsp; + if (jj_3R_528()) jj_scanpos = xsp; return false; } - private boolean jj_3R_409() { - if (jj_3R_106()) return true; + private boolean jj_3R_418() { + if (jj_3R_111()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_436()) jj_scanpos = xsp; + if (jj_3R_446()) jj_scanpos = xsp; return false; } - private boolean jj_3R_512() { - if (jj_3R_75()) return true; + private boolean jj_3R_526() { + if (jj_3R_77()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3_22()) { jj_scanpos = xsp; break; } + if (jj_3_24()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; - if (jj_3R_522()) jj_scanpos = xsp; + if (jj_3R_536()) jj_scanpos = xsp; return false; } - private boolean jj_3R_554() { - if (jj_3R_208()) return true; + private boolean jj_3R_568() { + if (jj_3R_216()) return true; return false; } - private boolean jj_3R_309() { - if (jj_3R_364()) return true; + private boolean jj_3R_317() { + if (jj_3R_372()) return true; return false; } - private boolean jj_3_14() { - if (jj_3R_68()) return true; + private boolean jj_3_16() { + if (jj_3R_70()) return true; return false; } - private boolean jj_3R_308() { - if (jj_3R_214()) return true; + private boolean jj_3R_316() { + if (jj_3R_222()) return true; return false; } - private boolean jj_3R_256() { + private boolean jj_3R_264() { Token xsp; xsp = jj_scanpos; - if (jj_3R_308()) { + if (jj_3R_316()) { jj_scanpos = xsp; - if (jj_3R_309()) return true; + if (jj_3R_317()) return true; } return false; } - private boolean jj_3R_244() { - if (jj_3R_256()) return true; + private boolean jj_3R_252() { + if (jj_3R_264()) return true; return false; } - private boolean jj_3R_553() { + private boolean jj_3R_567() { if (jj_scan_token(LAMBDA)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_554()) jj_scanpos = xsp; + if (jj_3R_568()) jj_scanpos = xsp; if (jj_scan_token(COLON)) return true; - if (jj_3R_549()) return true; + if (jj_3R_563()) return true; return false; } - private boolean jj_3R_187() { - if (jj_3R_208()) return true; + private boolean jj_3R_195() { + if (jj_3R_216()) return true; return false; } - private boolean jj_3R_243() { - if (jj_3R_68()) return true; + private boolean jj_3R_251() { + if (jj_3R_70()) return true; return false; } - private boolean jj_3R_499() { - if (jj_3R_250()) return true; + private boolean jj_3R_513() { + if (jj_3R_258()) return true; return false; } - private boolean jj_3_13() { - if (jj_3R_67()) return true; + private boolean jj_3_15() { + if (jj_3R_69()) return true; return false; } - private boolean jj_3R_229() { + private boolean jj_3R_237() { Token xsp; xsp = jj_scanpos; - if (jj_3_13()) { + if (jj_3_15()) { jj_scanpos = xsp; - if (jj_3R_243()) { + if (jj_3R_251()) { jj_scanpos = xsp; - if (jj_3R_244()) return true; + if (jj_3R_252()) return true; } } return false; } - private boolean jj_3R_140() { + private boolean jj_3R_147() { if (jj_scan_token(LAMBDA)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_187()) jj_scanpos = xsp; + if (jj_3R_195()) jj_scanpos = xsp; if (jj_scan_token(COLON)) return true; - if (jj_3R_61()) return true; + if (jj_3R_59()) return true; return false; } - private boolean jj_3_12() { + private boolean jj_3_14() { if (jj_scan_token(COMMA)) return true; - if (jj_3R_66()) return true; + if (jj_3R_68()) return true; return false; } - private boolean jj_3R_367() { + private boolean jj_3R_375() { if (jj_scan_token(COMMA)) return true; return false; } - private boolean jj_3R_239() { - if (jj_3R_250()) return true; + private boolean jj_3R_247() { + if (jj_3R_258()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_499()) { jj_scanpos = xsp; break; } + if (jj_3R_513()) { jj_scanpos = xsp; break; } } return false; } - private boolean jj_3R_238() { - if (jj_3R_249()) return true; + private boolean jj_3R_246() { + if (jj_3R_257()) return true; return false; } - private boolean jj_3R_108() { + private boolean jj_3R_113() { if (jj_scan_token(LPAREN)) return true; - if (jj_3R_365()) return true; + if (jj_3R_373()) return true; if (jj_scan_token(RPAREN)) return true; return false; } - private boolean jj_3R_236() { + private boolean jj_3R_244() { if (jj_scan_token(DOT)) return true; if (jj_scan_token(DOT)) return true; if (jj_scan_token(DOT)) return true; return false; } - private boolean jj_3R_237() { - if (jj_3R_70()) return true; + private boolean jj_3R_245() { + if (jj_3R_72()) return true; return false; } - private boolean jj_3R_235() { + private boolean jj_3R_243() { if (jj_scan_token(NONE)) return true; return false; } - private boolean jj_3R_74() { - if (jj_3R_128()) return true; + private boolean jj_3R_76() { + if (jj_3R_133()) return true; return false; } - private boolean jj_3R_234() { + private boolean jj_3R_242() { if (jj_scan_token(TRUE)) return true; return false; } - private boolean jj_3R_233() { + private boolean jj_3R_241() { if (jj_scan_token(FALSE)) return true; return false; } - private boolean jj_3R_365() { - if (jj_3R_66()) return true; + private boolean jj_3R_373() { + if (jj_3R_68()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3_12()) { jj_scanpos = xsp; break; } + if (jj_3_14()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; - if (jj_3R_408()) jj_scanpos = xsp; + if (jj_3R_417()) jj_scanpos = xsp; return false; } - private boolean jj_3R_245() { + private boolean jj_3R_253() { if (jj_scan_token(COMMA)) return true; return false; } - private boolean jj_3R_257() { + private boolean jj_3R_265() { if (jj_scan_token(EQUAL)) return true; - if (jj_3R_61()) return true; + if (jj_3R_59()) return true; return false; } - private boolean jj_3R_498() { - if (jj_3R_510()) return true; + private boolean jj_3R_512() { + if (jj_3R_524()) return true; return false; } - private boolean jj_3R_310() { + private boolean jj_3R_318() { if (jj_scan_token(EQUAL)) return true; - if (jj_3R_61()) return true; + if (jj_3R_59()) return true; return false; } - private boolean jj_3R_232() { + private boolean jj_3R_240() { if (jj_scan_token(LBRACE)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_498()) jj_scanpos = xsp; + if (jj_3R_512()) jj_scanpos = xsp; if (jj_scan_token(RBRACE)) return true; return false; } - private boolean jj_3R_107() { - if (jj_3R_70()) return true; + private boolean jj_3R_112() { + if (jj_3R_72()) return true; return false; } - private boolean jj_3_10() { + private boolean jj_3_12() { if (jj_scan_token(COMMA)) return true; - if (jj_3R_63()) return true; + if (jj_3R_65()) return true; return false; } - private boolean jj_3R_66() { + private boolean jj_3R_68() { Token xsp; xsp = jj_scanpos; - if (jj_3R_107()) { + if (jj_3R_112()) { jj_scanpos = xsp; - if (jj_3R_108()) return true; + if (jj_3R_113()) return true; } return false; } - private boolean jj_3R_497() { - if (jj_3R_128()) return true; + private boolean jj_3R_511() { + if (jj_3R_133()) return true; return false; } - private boolean jj_3R_103() { - if (jj_3R_66()) return true; + private boolean jj_3R_108() { + if (jj_3R_68()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_257()) jj_scanpos = xsp; + if (jj_3R_265()) jj_scanpos = xsp; return false; } - private boolean jj_3R_231() { + private boolean jj_3R_239() { if (jj_scan_token(LBRACKET)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_497()) jj_scanpos = xsp; + if (jj_3R_511()) jj_scanpos = xsp; if (jj_scan_token(RBRACKET)) return true; return false; } - private boolean jj_3R_63() { - if (jj_3R_66()) return true; + private boolean jj_3R_65() { + if (jj_3R_68()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_310()) jj_scanpos = xsp; + if (jj_3R_318()) jj_scanpos = xsp; return false; } - private boolean jj_3R_366() { + private boolean jj_3R_374() { if (jj_scan_token(COMMA)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_409()) jj_scanpos = xsp; + if (jj_3R_418()) jj_scanpos = xsp; return false; } - private boolean jj_3R_73() { - if (jj_3R_127()) return true; + private boolean jj_3R_75() { + if (jj_3R_132()) return true; return false; } - private boolean jj_3R_143() { + private boolean jj_3R_151() { if (jj_scan_token(POWER)) return true; return false; } - private boolean jj_3R_106() { + private boolean jj_3R_111() { Token xsp; xsp = jj_scanpos; - if (jj_3R_143()) { + if (jj_3R_151()) { jj_scanpos = xsp; - if (jj_3R_144()) return true; + if (jj_3R_152()) return true; } - if (jj_3R_70()) return true; + if (jj_3R_72()) return true; return false; } - private boolean jj_3_8() { + private boolean jj_3_10() { if (jj_scan_token(COMMA)) return true; - if (jj_3R_63()) return true; + if (jj_3R_65()) return true; return false; } - private boolean jj_3R_105() { - if (jj_3R_106()) return true; + private boolean jj_3R_110() { + if (jj_3R_111()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_367()) jj_scanpos = xsp; + if (jj_3R_375()) jj_scanpos = xsp; return false; } - private boolean jj_3_7() { + private boolean jj_3_9() { if (jj_scan_token(COMMA)) return true; Token xsp; xsp = jj_scanpos; if (jj_scan_token(31)) { jj_scanpos = xsp; - if (jj_3R_62()) return true; + if (jj_3R_64()) return true; } return false; } - private boolean jj_3R_142() { + private boolean jj_3R_150() { if (jj_scan_token(MULTIPLY)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_258()) jj_scanpos = xsp; + if (jj_3R_266()) jj_scanpos = xsp; return false; } - private boolean jj_3_21() { + private boolean jj_3_23() { if (jj_scan_token(LPAREN)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_73()) { + if (jj_3R_75()) { jj_scanpos = xsp; - if (jj_3R_74()) return true; + if (jj_3R_76()) return true; } if (jj_scan_token(RPAREN)) return true; return false; } - private boolean jj_3R_104() { - if (jj_3R_142()) return true; + private boolean jj_3R_109() { + if (jj_3R_150()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3_8()) { jj_scanpos = xsp; break; } + if (jj_3_10()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; - if (jj_3R_366()) jj_scanpos = xsp; + if (jj_3R_374()) jj_scanpos = xsp; return false; } - private boolean jj_3R_64() { + private boolean jj_3R_66() { Token xsp; xsp = jj_scanpos; - if (jj_3R_104()) { + if (jj_3R_109()) { jj_scanpos = xsp; - if (jj_3R_105()) return true; + if (jj_3R_110()) return true; } return false; } - private boolean jj_3R_224() { - if (jj_3R_106()) return true; + private boolean jj_3R_232() { + if (jj_3R_111()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_245()) jj_scanpos = xsp; + if (jj_3R_253()) jj_scanpos = xsp; return false; } - private boolean jj_3R_223() { - if (jj_3R_142()) return true; + private boolean jj_3R_231() { + if (jj_3R_150()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3_10()) { jj_scanpos = xsp; break; } + if (jj_3_12()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; - if (jj_3_11()) jj_scanpos = xsp; + if (jj_3_13()) jj_scanpos = xsp; return false; } - private boolean jj_3_20() { + private boolean jj_3_22() { if (jj_scan_token(LPAREN)) return true; if (jj_scan_token(RPAREN)) return true; return false; } - private boolean jj_3R_220() { + private boolean jj_3R_228() { Token xsp; xsp = jj_scanpos; - if (jj_3_20()) { + if (jj_3_22()) { jj_scanpos = xsp; - if (jj_3_21()) { + if (jj_3_23()) { jj_scanpos = xsp; - if (jj_3R_231()) { + if (jj_3R_239()) { jj_scanpos = xsp; - if (jj_3R_232()) { + if (jj_3R_240()) { jj_scanpos = xsp; - if (jj_3R_233()) { + if (jj_3R_241()) { jj_scanpos = xsp; - if (jj_3R_234()) { + if (jj_3R_242()) { jj_scanpos = xsp; - if (jj_3R_235()) { + if (jj_3R_243()) { jj_scanpos = xsp; - if (jj_3R_236()) { + if (jj_3R_244()) { jj_scanpos = xsp; - if (jj_3R_237()) { + if (jj_3R_245()) { jj_scanpos = xsp; - if (jj_3R_238()) { + if (jj_3R_246()) { jj_scanpos = xsp; - if (jj_3R_239()) return true; + if (jj_3R_247()) return true; } } } @@ -14582,173 +14601,483 @@ private boolean jj_3R_220() { return false; } - private boolean jj_3_5() { + private boolean jj_3_7() { if (jj_scan_token(COMMA)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_60()) jj_scanpos = xsp; + if (jj_3R_63()) jj_scanpos = xsp; return false; } - private boolean jj_3_9() { + private boolean jj_3_11() { if (jj_scan_token(COMMA)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_64()) jj_scanpos = xsp; + if (jj_3R_66()) jj_scanpos = xsp; return false; } - private boolean jj_3R_502() { + private boolean jj_3R_516() { if (jj_scan_token(DOT)) return true; - if (jj_3R_70()) return true; + if (jj_3R_72()) return true; return false; } - private boolean jj_3R_486() { - if (jj_3R_487()) return true; + private boolean jj_3R_499() { + if (jj_3R_500()) return true; return false; } - private boolean jj_3R_208() { + private boolean jj_3R_216() { Token xsp; xsp = jj_scanpos; - if (jj_3R_222()) { + if (jj_3R_230()) { jj_scanpos = xsp; - if (jj_3R_223()) { + if (jj_3R_231()) { jj_scanpos = xsp; - if (jj_3R_224()) return true; + if (jj_3R_232()) return true; } } return false; } - private boolean jj_3R_222() { - if (jj_3R_103()) return true; + private boolean jj_3R_230() { + if (jj_3R_108()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3_7()) { jj_scanpos = xsp; break; } + if (jj_3_9()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; - if (jj_3_9()) jj_scanpos = xsp; + if (jj_3_11()) jj_scanpos = xsp; return false; } - private boolean jj_3R_501() { + private boolean jj_3R_515() { if (jj_scan_token(LBRACKET)) return true; - if (jj_3R_512()) return true; + if (jj_3R_526()) return true; if (jj_scan_token(RBRACKET)) return true; return false; } - private boolean jj_3R_504() { - if (jj_3R_97()) return true; + private boolean jj_3R_518() { + if (jj_3R_104()) return true; return false; } - private boolean jj_3R_511() { - if (jj_3R_494()) return true; + private boolean jj_3R_525() { + if (jj_3R_508()) return true; return false; } - private boolean jj_3R_57() { - if (jj_3R_96()) return true; + private boolean jj_3R_60() { + if (jj_3R_103()) return true; return false; } - private boolean jj_3R_539() { + private boolean jj_3R_553() { if (jj_scan_token(COMMA)) return true; return false; } - private boolean jj_3R_500() { + private boolean jj_3R_514() { if (jj_scan_token(LPAREN)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_511()) jj_scanpos = xsp; + if (jj_3R_525()) jj_scanpos = xsp; if (jj_scan_token(RPAREN)) return true; return false; } - private boolean jj_3R_487() { + private boolean jj_3R_500() { Token xsp; xsp = jj_scanpos; - if (jj_3R_500()) { + if (jj_3R_514()) { jj_scanpos = xsp; - if (jj_3R_501()) { + if (jj_3R_515()) { jj_scanpos = xsp; - if (jj_3R_502()) return true; + if (jj_3R_516()) return true; } } return false; } - private boolean jj_3R_467() { - if (jj_3R_487()) return true; + private boolean jj_3R_479() { + if (jj_3R_500()) return true; return false; } - private boolean jj_3R_219() { + private boolean jj_3R_227() { if (jj_scan_token(AWAIT)) return true; - if (jj_3R_220()) return true; + if (jj_3R_228()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_486()) { jj_scanpos = xsp; break; } + if (jj_3R_499()) { jj_scanpos = xsp; break; } } return false; } - private boolean jj_3R_509() { - if (jj_3R_494()) return true; + private boolean jj_3_21() { + if (jj_scan_token(POWER)) return true; + if (jj_3R_74()) return true; return false; } - private boolean jj_3_19() { - if (jj_scan_token(POWER)) return true; + private boolean jj_3R_214() { + if (jj_3R_228()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_479()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_546() { + if (jj_3R_107()) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_553()) jj_scanpos = xsp; + return false; + } + + private boolean jj_3R_192() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_213()) { + jj_scanpos = xsp; + if (jj_3R_214()) return true; + } + return false; + } + + private boolean jj_3R_213() { + if (jj_3R_227()) return true; + return false; + } + + private boolean jj_3R_166() { + if (jj_3R_192()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3_21()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_131() { + if (jj_3R_166()) return true; + return false; + } + + private boolean jj_3R_130() { + if (jj_scan_token(NOT)) return true; + if (jj_3R_74()) return true; + return false; + } + + private boolean jj_3R_324() { + if (jj_scan_token(FLOORDIVIDE)) return true; + if (jj_3R_74()) return true; + return false; + } + + private boolean jj_3R_129() { + if (jj_scan_token(MINUS)) return true; + if (jj_3R_74()) return true; + return false; + } + + private boolean jj_3R_323() { + if (jj_scan_token(MODULO)) return true; + if (jj_3R_74()) return true; + return false; + } + + private boolean jj_3R_128() { + if (jj_scan_token(PLUS)) return true; + if (jj_3R_74()) return true; + return false; + } + + private boolean jj_3R_74() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_128()) { + jj_scanpos = xsp; + if (jj_3R_129()) { + jj_scanpos = xsp; + if (jj_3R_130()) { + jj_scanpos = xsp; + if (jj_3R_131()) return true; + } + } + } + return false; + } + + private boolean jj_3R_322() { + if (jj_scan_token(DIVIDE)) return true; + if (jj_3R_74()) return true; + return false; + } + + private boolean jj_3R_321() { + if (jj_scan_token(AT)) return true; + if (jj_3R_74()) return true; + return false; + } + + private boolean jj_3R_320() { + if (jj_scan_token(MULTIPLY)) return true; + if (jj_3R_74()) return true; + return false; + } + + private boolean jj_3R_267() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_320()) { + jj_scanpos = xsp; + if (jj_3R_321()) { + jj_scanpos = xsp; + if (jj_3R_322()) { + jj_scanpos = xsp; + if (jj_3R_323()) { + jj_scanpos = xsp; + if (jj_3R_324()) return true; + } + } + } + } + return false; + } + + private boolean jj_3_8() { + if (jj_scan_token(COLON)) return true; + if (jj_3R_59()) return true; + return false; + } + + private boolean jj_3R_527() { + if (jj_scan_token(EQUAL)) return true; + if (jj_3R_59()) return true; + return false; + } + + private boolean jj_3R_254() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_268()) { + jj_scanpos = xsp; + if (jj_3R_269()) return true; + } + return false; + } + + private boolean jj_3R_268() { + if (jj_scan_token(PLUS)) return true; + if (jj_3R_248()) return true; + return false; + } + + private boolean jj_3R_104() { if (jj_3R_72()) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3_8()) jj_scanpos = xsp; return false; } - private boolean jj_3R_206() { - if (jj_3R_220()) return true; + private boolean jj_3R_238() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_255()) { + jj_scanpos = xsp; + if (jj_3R_256()) return true; + } + return false; + } + + private boolean jj_3R_248() { + if (jj_3R_74()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_467()) { jj_scanpos = xsp; break; } + if (jj_3R_267()) { jj_scanpos = xsp; break; } } return false; } - private boolean jj_3R_532() { - if (jj_3R_100()) return true; + private boolean jj_3R_255() { + if (jj_scan_token(LSHIFT)) return true; + if (jj_3R_229()) return true; + return false; + } + + private boolean jj_3R_538() { + if (jj_scan_token(COMMA)) return true; + return false; + } + + private boolean jj_3R_517() { + if (jj_scan_token(EQUAL)) return true; + if (jj_3R_59()) return true; + return false; + } + + private boolean jj_3R_269() { + if (jj_scan_token(MINUS)) return true; + if (jj_3R_248()) return true; + return false; + } + + private boolean jj_3R_61() { + if (jj_3R_104()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_539()) jj_scanpos = xsp; + if (jj_3R_527()) jj_scanpos = xsp; return false; } - private boolean jj_3R_184() { + private boolean jj_3R_226() { + if (jj_scan_token(AND)) return true; + if (jj_3R_215()) return true; + return false; + } + + private boolean jj_3R_229() { + if (jj_3R_248()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_254()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_505() { + if (jj_scan_token(COMMA)) return true; + return false; + } + + private boolean jj_3R_523() { + if (jj_3R_508()) return true; + return false; + } + + private boolean jj_3R_103() { + if (jj_3R_104()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_205()) { + if (jj_3R_517()) jj_scanpos = xsp; + return false; + } + + private boolean jj_3_6() { + if (jj_scan_token(COMMA)) return true; + if (jj_3R_61()) return true; + return false; + } + + private boolean jj_3R_212() { + if (jj_scan_token(XOR)) return true; + if (jj_3R_194()) return true; + return false; + } + + private boolean jj_3R_256() { + if (jj_scan_token(RSHIFT)) return true; + if (jj_3R_229()) return true; + return false; + } + + private boolean jj_3R_215() { + if (jj_3R_229()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_238()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_107() { + if (jj_scan_token(POWER)) return true; + if (jj_3R_104()) return true; + return false; + } + + private boolean jj_3R_191() { + if (jj_scan_token(OR)) return true; + if (jj_3R_170()) return true; + return false; + } + + private boolean jj_3R_219() { + if (jj_3R_233()) return true; + return false; + } + + private boolean jj_3R_194() { + if (jj_3R_215()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_226()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_537() { + if (jj_scan_token(COMMA)) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_546()) jj_scanpos = xsp; + return false; + } + + private boolean jj_3R_149() { + if (jj_scan_token(MULTIPLY)) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_518()) jj_scanpos = xsp; + return false; + } + + private boolean jj_3_4() { + if (jj_scan_token(COMMA)) return true; + if (jj_3R_61()) return true; + return false; + } + + private boolean jj_3_3() { + if (jj_scan_token(COMMA)) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(31)) { jj_scanpos = xsp; - if (jj_3R_206()) return true; + if (jj_3R_60()) return true; } return false; } - private boolean jj_3R_205() { - if (jj_3R_219()) return true; + private boolean jj_3R_106() { + if (jj_3R_107()) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_538()) jj_scanpos = xsp; return false; } - private boolean jj_3R_158() { - if (jj_3R_184()) return true; + private boolean jj_3R_170() { + if (jj_3R_194()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3_19()) { jj_scanpos = xsp; break; } + if (jj_3R_212()) { jj_scanpos = xsp; break; } } return false; } @@ -14763,7 +15092,7 @@ private boolean jj_3R_158() { private Token jj_scanpos, jj_lastpos; private int jj_la; private int jj_gen; - final private int[] jj_la1 = new int[207]; + final private int[] jj_la1 = new int[212]; static private int[] jj_la1_0; static private int[] jj_la1_1; static private int[] jj_la1_2; @@ -14779,24 +15108,24 @@ private boolean jj_3R_158() { jj_la1_init_5(); } private static void jj_la1_init_0() { - jj_la1_0 = new int[] {0x5a2a0040,0x5a2a0040,0x40,0x20000000,0x5a2a0000,0x20000,0x0,0x40000000,0x80000000,0x1000000,0x0,0x1000000,0x1000000,0x40000000,0x40000000,0x1000000,0x0,0x1000000,0x40000000,0x0,0x0,0x0,0x80020000,0x1000000,0x40000000,0x1000000,0x1000000,0x40000000,0x40000000,0x1000000,0x40000000,0x1000000,0x40020000,0x0,0x40000000,0x0,0x0,0x20000,0x1000000,0x5a2a0000,0x5a2a0000,0x800000,0x5a2a0000,0x1a2a0000,0x1a2a0000,0x1a2a0000,0x1a2a0000,0x1a2a0000,0x1a2a0000,0x1a2a0000,0x1a2a0000,0x1a2a0000,0x1a2a0000,0x1a2a0000,0x1a2a0000,0x1a2a0000,0x0,0x5a2a0000,0x4000000,0x1a2a0000,0x0,0x0,0x5a2a0000,0x5a2a0000,0x5a2a0000,0x0,0x1a2a0000,0x0,0x1000000,0x2000000,0x0,0x1000000,0x1000000,0x0,0x40020000,0x0,0x2000000,0x0,0x1000000,0x1000000,0x0,0x1000000,0x0,0x0,0x40000000,0x5a2a0000,0x40000000,0x0,0x1000000,0x1000000,0x582a0000,0x0,0x0,0x20000,0x182a0000,0x18000000,0x18000000,0x18000000,0x18000000,0x1000000,0x182a0000,0x2000000,0x0,0x1000000,0x220000,0x582a0000,0x582a0000,0x18000000,0x1000000,0x1000000,0x18000000,0x18000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1a2a0000,0x1000000,0x1000000,0x20000,0x0,0x5a2a0000,0x5a2a0000,0x5a2a4040,0x0,0x1a2a0000,0x1a2a0000,0x0,0x0,0x1a2a0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18000000,0x18000000,0xc0000000,0xc0000000,0x1a2a0000,0x2220000,0x22a0000,0x2220000,0x5a2a0000,0x2220000,0x5a2a0000,0x5a2a0000,0x5a2a0000,0x0,0x2280000,0x40020000,0x40020000,0x1000000,0x4000000,0x1e2a0000,0x1a2a0000,0x1a2a0000,0x4000000,0x5a2a0000,0x5a2a0000,0x1000000,0x1000000,0x1000000,0x5a2a0000,0x5a2a0000,0x1000000,0x1a2a0000,0x1000000,0x0,0x5a2a0000,0x1000000,0x4000000,0x1a2a0000,0x1000000,0x0,0x5a2a0000,0x1000000,0x5a2a0000,0x5a2a0000,0x0,0x5a2a0000,0x1000000,0x0,0x0,0x0,0x0,0x0,0x5a2a0000,0x20000,0x1000000,0x0,0x0,0x40000000,0x0,0x0,0x0,}; + jj_la1_0 = new int[] {0x5a2a0040,0x5a2a0040,0x40,0x200000,0x20000000,0x5a2a0000,0x20000,0x0,0x40000000,0x1000000,0x40000000,0x40000000,0x80000000,0x1000000,0x0,0x1000000,0x1000000,0x40000000,0x40000000,0x1000000,0x0,0x1000000,0x40000000,0x0,0x0,0x0,0x80020000,0x1000000,0x40000000,0x1000000,0x1000000,0x40000000,0x40000000,0x1000000,0x40000000,0x1000000,0x40020000,0x0,0x40000000,0x0,0x0,0x20000,0x1000000,0x5a2a0000,0x5a2a0000,0x800000,0x5a2a0000,0x1a2a0000,0x1a2a0000,0x1a2a0000,0x1a2a0000,0x1a2a0000,0x1a2a0000,0x1a2a0000,0x1a2a0000,0x1a2a0000,0x1a2a0000,0x1a2a0000,0x1a2a0000,0x1a2a0000,0x0,0x5a2a0000,0x4000000,0x1a2a0000,0x0,0x0,0x5a2a0000,0x5a2a0000,0x5a2a0000,0x0,0x1a2a0000,0x0,0x1000000,0x2000000,0x0,0x1000000,0x1000000,0x0,0x40020000,0x0,0x2000000,0x0,0x1000000,0x1000000,0x0,0x1000000,0x0,0x0,0x40000000,0x5a2a0000,0x40000000,0x0,0x1000000,0x1000000,0x582a0000,0x0,0x0,0x20000,0x182a0000,0x18000000,0x18000000,0x18000000,0x18000000,0x1000000,0x182a0000,0x2000000,0x0,0x1000000,0x220000,0x582a0000,0x582a0000,0x18000000,0x1000000,0x1000000,0x18000000,0x18000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1a2a0000,0x1000000,0x1000000,0x20000,0x0,0x5a2a0000,0x5a2a0000,0x5a2a4040,0x0,0x1a2a0000,0x1a2a0000,0x0,0x0,0x1a2a0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18000000,0x18000000,0xc0000000,0xc0000000,0x1a2a0000,0x2220000,0x22a0000,0x2220000,0x5a2a0000,0x2220000,0x5a2a0000,0x5a2a0000,0x5a2a0000,0x0,0x2280000,0x40020000,0x40020000,0x1000000,0x4000000,0x1e2a0000,0x1a2a0000,0x1a2a0000,0x4000000,0x5a2a0000,0x5a2a0000,0x1000000,0x1000000,0x1000000,0x5a2a0000,0x5a2a0000,0x1000000,0x1a2a0000,0x1000000,0x0,0x5a2a0000,0x1000000,0x4000000,0x1a2a0000,0x1000000,0x0,0x5a2a0000,0x1000000,0x5a2a0000,0x5a2a0000,0x0,0x5a2a0000,0x1000000,0x0,0x0,0x0,0x0,0x0,0x200000,0x5a2a0000,0x20000,0x1000000,0x0,0x0,0x40000000,0x0,0x0,0x0,}; } private static void jj_la1_init_1() { - jj_la1_1 = new int[] {0x20,0x20,0x0,0x0,0x22,0x0,0x0,0x2,0x0,0x0,0x2,0x0,0x0,0x2,0x2,0x0,0x2,0x0,0x2,0x0,0x200,0x200,0x0,0x0,0x2,0x0,0x0,0x2,0x2,0x0,0x2,0x0,0x2,0x0,0x2,0x200,0x200,0x0,0x0,0x20,0x20,0x0,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x200,0x20,0x1fff0000,0x20,0x200,0x0,0x20,0x20,0x20,0x0,0x20,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200,0x0,0x0,0x0,0x2,0x22,0x2,0x0,0x0,0x0,0x0,0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x20000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20,0x0,0x0,0x0,0x0,0x20,0x20,0x20,0x0,0x20,0x20,0x40000000,0x80000000,0x20,0xfc00,0xfc00,0x0,0x80,0x40,0x100,0xc,0xc,0x0,0x0,0x11,0x11,0x20,0x0,0x0,0x0,0x22,0x0,0x20,0x20,0x22,0x0,0x0,0x2,0x2,0x0,0x0,0x20,0x20,0x20,0x0,0x20,0x20,0x0,0x0,0x0,0x20,0x20,0x0,0x22,0x0,0x0,0x20,0x0,0x0,0x22,0x0,0x0,0x20,0x0,0x22,0x20,0x0,0x20,0x0,0x0,0x0,0x0,0x0,0x0,0x22,0x0,0x0,0x0,0x20000000,0x2,0x0,0x0,0x0,}; + jj_la1_1 = new int[] {0x20,0x20,0x0,0x0,0x0,0x22,0x0,0x0,0x2,0x0,0x2,0x2,0x0,0x0,0x2,0x0,0x0,0x2,0x2,0x0,0x2,0x0,0x2,0x0,0x200,0x200,0x0,0x0,0x2,0x0,0x0,0x2,0x2,0x0,0x2,0x0,0x2,0x0,0x2,0x200,0x200,0x0,0x0,0x20,0x20,0x0,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x200,0x20,0x1fff0000,0x20,0x200,0x0,0x20,0x20,0x20,0x0,0x20,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200,0x0,0x0,0x0,0x2,0x22,0x2,0x0,0x0,0x0,0x0,0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x20000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20,0x0,0x0,0x0,0x0,0x20,0x20,0x20,0x0,0x20,0x20,0x40000000,0x80000000,0x20,0xfc00,0xfc00,0x0,0x80,0x40,0x100,0xc,0xc,0x0,0x0,0x11,0x11,0x20,0x0,0x0,0x0,0x22,0x0,0x20,0x20,0x22,0x0,0x0,0x2,0x2,0x0,0x0,0x20,0x20,0x20,0x0,0x20,0x20,0x0,0x0,0x0,0x20,0x20,0x0,0x22,0x0,0x0,0x20,0x0,0x0,0x22,0x0,0x0,0x20,0x0,0x22,0x20,0x0,0x20,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x22,0x0,0x0,0x0,0x20000000,0x2,0x0,0x0,0x0,}; } private static void jj_la1_init_2() { - jj_la1_2 = new int[] {0xdffef399,0xdffef399,0x0,0x0,0x80004009,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xdffed399,0xdffed399,0x0,0x9ffe4009,0x80204009,0x80204009,0x80204009,0x80204009,0x80204009,0x80204009,0x80204009,0x80204009,0x80204009,0x80204009,0x80204009,0x80204009,0x80204009,0x0,0x80204009,0x0,0x80204009,0x0,0x23c0000,0x80004009,0x80804009,0x80804009,0x800000,0x80004009,0xc00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000000,0x0,0x20000000,0x0,0x0,0x0,0x0,0x40009390,0x0,0x0,0x80004009,0x0,0x10,0x0,0x0,0x80000000,0x20000000,0x0,0x0,0x80000000,0x0,0x0,0x80000000,0x0,0x0,0x80000000,0x0,0x0,0x0,0x0,0x80000000,0x80000000,0x80000000,0x0,0x0,0x80000000,0x80000000,0x40001100,0x40,0x20,0x0,0x20,0x20,0xc00,0x20,0x10000,0x10c00,0xc00,0x20000000,0x80004009,0x0,0x0,0x0,0x20000000,0xdffef399,0xdffef399,0x9ffe4009,0x10,0x80004009,0x80004009,0x0,0x0,0x80004001,0x7,0x5,0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80004000,0x0,0x80004000,0x0,0x80004009,0x0,0x80204009,0x80004009,0x80004009,0x0,0x80000000,0x0,0x0,0x0,0x0,0x80004009,0x80004009,0x80004009,0x0,0x80004000,0x80004000,0x0,0x0,0x0,0x80004009,0x80004009,0x0,0x80004009,0x0,0x2100,0x80004009,0x0,0x0,0x80004009,0x0,0x2100,0x80004009,0x0,0x80004009,0x80004009,0x2100,0x80004009,0x0,0x2110,0x2000,0x2110,0x2110,0xb000,0x80004009,0x0,0x0,0x2100,0x0,0x0,0x0,0x0,0x0,}; + jj_la1_2 = new int[] {0xdffef399,0xdffef399,0x0,0x0,0x0,0x80004009,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xdffed399,0xdffed399,0x0,0x9ffe4009,0x80204009,0x80204009,0x80204009,0x80204009,0x80204009,0x80204009,0x80204009,0x80204009,0x80204009,0x80204009,0x80204009,0x80204009,0x80204009,0x0,0x80204009,0x0,0x80204009,0x0,0x23c0000,0x80004009,0x80804009,0x80804009,0x800000,0x80004009,0xc00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000000,0x0,0x20000000,0x0,0x0,0x0,0x0,0x40009390,0x0,0x0,0x80004009,0x0,0x10,0x0,0x0,0x80000000,0x20000000,0x0,0x0,0x80000000,0x0,0x0,0x80000000,0x0,0x0,0x80000000,0x0,0x0,0x0,0x0,0x80000000,0x80000000,0x80000000,0x0,0x0,0x80000000,0x80000000,0x40001100,0x40,0x20,0x0,0x20,0x20,0xc00,0x20,0x10000,0x10c00,0xc00,0x20000000,0x80004009,0x0,0x0,0x0,0x20000000,0xdffef399,0xdffef399,0x9ffe4009,0x10,0x80004009,0x80004009,0x0,0x0,0x80004001,0x7,0x5,0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80004000,0x0,0x80004000,0x0,0x80004009,0x0,0x80204009,0x80004009,0x80004009,0x0,0x80000000,0x0,0x0,0x0,0x0,0x80004009,0x80004009,0x80004009,0x0,0x80004000,0x80004000,0x0,0x0,0x0,0x80004009,0x80004009,0x0,0x80004009,0x0,0x2100,0x80004009,0x0,0x0,0x80004009,0x0,0x2100,0x80004009,0x0,0x80004009,0x80004009,0x2100,0x80004009,0x0,0x2110,0x2000,0x2110,0x2110,0xb000,0x0,0x80004009,0x0,0x0,0x2100,0x0,0x0,0x0,0x0,0x0,}; } private static void jj_la1_init_3() { - jj_la1_3 = new int[] {0x1fbf,0x1fbf,0x0,0x0,0x1fbb,0x0,0x4,0x38,0x38,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x38,0x38,0x0,0x0,0x38,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x38,0x38,0x0,0x0,0x0,0x38,0x0,0x1fbf,0x1fbf,0x0,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x0,0x1fbb,0x0,0x1fbb,0x0,0x0,0x1fbb,0x1fbb,0x1fbb,0x0,0x1fbb,0x0,0x0,0x0,0x38,0x0,0x0,0x38,0x38,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc,0x10,0x0,0x1fbb,0x0,0x0,0x0,0x0,0x1fbb,0x0,0x0,0x0,0x1fbb,0x0,0x0,0x1f83,0x1f80,0x0,0x1fbb,0x0,0x0,0x0,0x0,0x1fbb,0x1fbb,0x1fbb,0x0,0x0,0x1fbb,0x1fbb,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1fbb,0x0,0x0,0x0,0x0,0x1fbf,0x1fbf,0x1fbb,0x0,0x1fbb,0x1fbb,0x0,0x0,0x1fbb,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4,0x4,0x1fbb,0x0,0x1fbb,0x0,0x1fbb,0x0,0x1fbb,0x1fbb,0x1fbb,0x0,0x1fbb,0x38,0x38,0x0,0x0,0x1fbb,0x1fbb,0x1fbb,0x0,0x1fbb,0x1fbb,0x0,0x0,0x0,0x1fbb,0x1fbb,0x0,0x1fbb,0x0,0x0,0x1fbb,0x0,0x0,0x1fbb,0x0,0x0,0x1fbb,0x0,0x1fbb,0x1fbb,0x0,0x1fbb,0x0,0x0,0x0,0x0,0x0,0x0,0x1fbb,0x0,0x0,0x0,0x0,0x0,0x1f80,0x38,0x0,}; + jj_la1_3 = new int[] {0x1fbf,0x1fbf,0x0,0x0,0x0,0x1fbb,0x0,0x4,0x38,0x0,0x38,0x38,0x38,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x38,0x38,0x0,0x0,0x38,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x38,0x38,0x0,0x0,0x0,0x38,0x0,0x1fbf,0x1fbf,0x0,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x1fbb,0x0,0x1fbb,0x0,0x1fbb,0x0,0x0,0x1fbb,0x1fbb,0x1fbb,0x0,0x1fbb,0x0,0x0,0x0,0x38,0x0,0x0,0x38,0x38,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc,0x10,0x0,0x1fbb,0x0,0x0,0x0,0x0,0x1fbb,0x0,0x0,0x0,0x1fbb,0x0,0x0,0x1f83,0x1f80,0x0,0x1fbb,0x0,0x0,0x0,0x0,0x1fbb,0x1fbb,0x1fbb,0x0,0x0,0x1fbb,0x1fbb,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1fbb,0x0,0x0,0x0,0x0,0x1fbf,0x1fbf,0x1fbb,0x0,0x1fbb,0x1fbb,0x0,0x0,0x1fbb,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4,0x4,0x1fbb,0x0,0x1fbb,0x0,0x1fbb,0x0,0x1fbb,0x1fbb,0x1fbb,0x0,0x1fbb,0x38,0x38,0x0,0x0,0x1fbb,0x1fbb,0x1fbb,0x0,0x1fbb,0x1fbb,0x0,0x0,0x0,0x1fbb,0x1fbb,0x0,0x1fbb,0x0,0x0,0x1fbb,0x0,0x0,0x1fbb,0x0,0x0,0x1fbb,0x0,0x1fbb,0x1fbb,0x0,0x1fbb,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1fbb,0x0,0x0,0x0,0x0,0x0,0x1f80,0x38,0x0,}; } private static void jj_la1_init_4() { - jj_la1_4 = new int[] {0x7fff80,0x7fff80,0x0,0x0,0x7fff80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7fff80,0x7fff80,0x0,0x7fff80,0x7fff80,0x7fff80,0x7fff80,0x7fff80,0x7fff80,0x7fff80,0x7fff80,0x7fff80,0x7fff80,0x7fff80,0x7fff80,0x7fff80,0x7fff80,0x0,0x7fff80,0x0,0x7fff80,0x0,0x0,0x7fff80,0x7fff80,0x7fff80,0x0,0x7fff80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7fff80,0x0,0x0,0x0,0x0,0x7fff80,0x0,0x0,0x0,0x7fff80,0x0,0x0,0x7fff80,0x0,0x0,0x7fff80,0x0,0x0,0x0,0x0,0x7fff80,0x7fff80,0x7fff80,0x0,0x0,0x7fff80,0x7fff80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7fff80,0x0,0x0,0x0,0x0,0x7fff80,0x7fff80,0x7fff80,0x0,0x7fff80,0x7fff80,0x0,0x0,0x7fff80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7fff80,0x0,0x7fff80,0x0,0x7fff80,0x0,0x7fff80,0x7fff80,0x7fff80,0x7fff80,0x7fff80,0x0,0x0,0x0,0x0,0x7fff80,0x7fff80,0x7fff80,0x0,0x7fff80,0x7fff80,0x0,0x0,0x0,0x7fff80,0x7fff80,0x0,0x7fff80,0x0,0x0,0x7fff80,0x0,0x0,0x7fff80,0x0,0x0,0x7fff80,0x0,0x7fff80,0x7fff80,0x0,0x7fff80,0x0,0x0,0x0,0x0,0x0,0x0,0x7fff80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7fff80,}; + jj_la1_4 = new int[] {0x7fff80,0x7fff80,0x0,0x0,0x0,0x7fff80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7fff80,0x7fff80,0x0,0x7fff80,0x7fff80,0x7fff80,0x7fff80,0x7fff80,0x7fff80,0x7fff80,0x7fff80,0x7fff80,0x7fff80,0x7fff80,0x7fff80,0x7fff80,0x7fff80,0x0,0x7fff80,0x0,0x7fff80,0x0,0x0,0x7fff80,0x7fff80,0x7fff80,0x0,0x7fff80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7fff80,0x0,0x0,0x0,0x0,0x7fff80,0x0,0x0,0x0,0x7fff80,0x0,0x0,0x7fff80,0x0,0x0,0x7fff80,0x0,0x0,0x0,0x0,0x7fff80,0x7fff80,0x7fff80,0x0,0x0,0x7fff80,0x7fff80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7fff80,0x0,0x0,0x0,0x0,0x7fff80,0x7fff80,0x7fff80,0x0,0x7fff80,0x7fff80,0x0,0x0,0x7fff80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7fff80,0x0,0x7fff80,0x0,0x7fff80,0x0,0x7fff80,0x7fff80,0x7fff80,0x7fff80,0x7fff80,0x0,0x0,0x0,0x0,0x7fff80,0x7fff80,0x7fff80,0x0,0x7fff80,0x7fff80,0x0,0x0,0x0,0x7fff80,0x7fff80,0x0,0x7fff80,0x0,0x0,0x7fff80,0x0,0x0,0x7fff80,0x0,0x0,0x7fff80,0x0,0x7fff80,0x7fff80,0x0,0x7fff80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7fff80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7fff80,}; } private static void jj_la1_init_5() { - jj_la1_5 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; + jj_la1_5 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; } - final private JJCalls[] jj_2_rtns = new JJCalls[37]; + final private JJCalls[] jj_2_rtns = new JJCalls[39]; private boolean jj_rescan = false; private int jj_gc = 0; @@ -14808,7 +15137,7 @@ public PythonGrammar312(boolean generateTree, FastCharStream stream) { token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 207; i++) jj_la1[i] = -1; + for (int i = 0; i < 212; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } @@ -14823,7 +15152,7 @@ public PythonGrammar312(boolean generateTree, PythonGrammar312TokenManager tm) { token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 207; i++) jj_la1[i] = -1; + for (int i = 0; i < 212; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } @@ -14943,7 +15272,7 @@ public ParseException generateParseException() { la1tokens[jj_kind] = true; jj_kind = -1; } - for (int i = 0; i < 207; i++) { + for (int i = 0; i < 212; i++) { if (jj_la1[i] == jj_gen) { for (int j = 0; j < 32; j++) { if ((jj_la1_0[i] & (1< basesAsList = new ArrayList<>(); + TypeParamsSuite typeParamsSuite = null; + for (int i = nodeArity - 1; i >= 0; i--) { + lastPop = stack.popNode(); + if (lastPop instanceof TypeParamsSuite) { + typeParamsSuite = (TypeParamsSuite) lastPop; + } else { + basesAsList.add((exprType) lastPop); + } + } + Collections.reverse(basesAsList); + nameTok = makeNameTok(NameTok.ClassName); + exprType[] bases = basesAsList.toArray(new exprType[0]); //decorator is always null at this point... it's decorated later on - ClassDef classDef = new ClassDef(nameTok, bases, body, null, + ClassDef classDef = new ClassDef(nameTok, typeParamsSuite, bases, body, null, classDefKeywords.toArray(new keywordType[classDefKeywords.size()]), starargs, kwargs); addSpecialsAndClearOriginal(suite, classDef); @@ -689,7 +706,7 @@ public final SimpleNode onCloseNode(SimpleNode n, int arity) throws Exception { Collections.reverse(lst); return new MatchMapping(lst.toArray(new patternType[0]), rest); } - addAndReportException(MatchKeyVal.class.getName()); + addAndReportException(MatchMapping.class.getName()); return new MatchMapping(new patternType[0], null); case JJTLIST_PATTERN: @@ -716,7 +733,7 @@ public final SimpleNode onCloseNode(SimpleNode n, int arity) throws Exception { return new MatchValue(attr); } } - addAndReportException(Attribute.class.getName()); + addAndReportException(MatchValue.class.getName()); return getDefaultInvalidExpr(); case JJTCLASS_PATTERN: @@ -756,7 +773,7 @@ public final SimpleNode onCloseNode(SimpleNode n, int arity) throws Exception { Name name = makeName(Name.Store); return new Starred(name, name.ctx); } - addAndReportException(SimpleNode.class.getName()); + addAndReportException(Starred.class.getName()); return new Starred(getDefaultInvalidExpr(), 0); case JJTOPEN_SEQUENCE_PATTERN: @@ -776,8 +793,34 @@ public final SimpleNode onCloseNode(SimpleNode n, int arity) throws Exception { } return new MatchSequence(patterns, 0); } - addAndReportException(SimpleNode.class.getName()); + addAndReportException(MatchSequence.class.getName()); return new MatchSequence(new patternType[0], 0); + case JJTTYPE_VAR: + exprType bound = null; + exprType defaultValue = null; + if (arity >= 3) { + defaultValue = (exprType) stack.popNode(); + } + + if (arity >= 2) { + bound = (exprType) stack.popNode(); + } + return new TypeVar(makeNameTok(NameTok.TypeVarName), bound, defaultValue); + + case JJTTYPE_VAR_PARAM_SPEC: + return new ParamSpec(makeNameTok(NameTok.TypeVarName), null); + + case JJTTYPE_VAR_TUPLE: + return new TypeVarTuple(makeNameTok(NameTok.TypeVarName), null); + + case JJTTYPE_PARAMS: + java.util.List typeParams = new ArrayList<>(); + while (arity > 0) { + arity--; + typeParams.add((type_paramType) stack.popNode()); + } + Collections.reverse(typeParams); + return new TypeParamsSuite(typeParams.toArray(new type_paramType[0])); default: Log.log(("Error at TreeBuilder: default not treated:" + n.getId())); diff --git a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar312/grammar312 b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar312/grammar312 new file mode 100644 index 0000000000..3569672c64 --- /dev/null +++ b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar312/grammar312 @@ -0,0 +1,898 @@ + PEG grammar for Python + + + +# ========================= START OF THE GRAMMAR ========================= + +# General grammatical elements and rules: +# +# * Strings with double quotes (") denote SOFT KEYWORDS +# * Strings with single quotes (') denote KEYWORDS +# * Upper case names (NAME) denote tokens in the Grammar/Tokens file +# * Rule names starting with "invalid_" are used for specialized syntax errors +# - These rules are NOT used in the first pass of the parser. +# - Only if the first pass fails to parse, a second pass including the invalid +# rules will be executed. +# - If the parser fails in the second phase with a generic syntax error, the +# location of the generic failure of the first pass will be used (this avoids +# reporting incorrect locations due to the invalid rules). +# - The order of the alternatives involving invalid rules matter +# (like any rule in PEG). +# +# Grammar Syntax (see PEP 617 for more information): +# +# rule_name: expression +# Optionally, a type can be included right after the rule name, which +# specifies the return type of the C or Python function corresponding to the +# rule: +# rule_name[return_type]: expression +# If the return type is omitted, then a void * is returned in C and an Any in +# Python. +# e1 e2 +# Match e1, then match e2. +# e1 | e2 +# Match e1 or e2. +# The first alternative can also appear on the line after the rule name for +# formatting purposes. In that case, a | must be used before the first +# alternative, like so: +# rule_name[return_type]: +# | first_alt +# | second_alt +# ( e ) +# Match e (allows also to use other operators in the group like '(e)*') +# [ e ] or e? +# Optionally match e. +# e* +# Match zero or more occurrences of e. +# e+ +# Match one or more occurrences of e. +# s.e+ +# Match one or more occurrences of e, separated by s. The generated parse tree +# does not include the separator. This is otherwise identical to (e (s e)*). +# &e +# Succeed if e can be parsed, without consuming any input. +# !e +# Fail if e can be parsed, without consuming any input. +# ~ +# Commit to the current alternative, even if it fails to parse. +# + +# STARTING RULES +# ============== + +file: [statements] ENDMARKER +interactive: statement_newline +eval: expressions NEWLINE* ENDMARKER +func_type: '(' [type_expressions] ')' '->' expression NEWLINE* ENDMARKER + +# GENERAL STATEMENTS +# ================== + +statements: statement+ + +statement: compound_stmt | simple_stmts + +statement_newline: + | compound_stmt NEWLINE + | simple_stmts + | NEWLINE + | ENDMARKER + +simple_stmts: + | simple_stmt !';' NEWLINE # Not needed, there for speedup + | ';'.simple_stmt+ [';'] NEWLINE + +# NOTE: assignment MUST precede expression, else parsing a simple assignment +# will throw a SyntaxError. +simple_stmt: + | assignment + | type_alias + | star_expressions + | return_stmt + | import_stmt + | raise_stmt + | 'pass' + | del_stmt + | yield_stmt + | assert_stmt + | 'break' + | 'continue' + | global_stmt + | nonlocal_stmt + +compound_stmt: + | function_def + | if_stmt + | class_def + | with_stmt + | for_stmt + | try_stmt + | while_stmt + | match_stmt + +# SIMPLE STATEMENTS +# ================= + +# NOTE: annotated_rhs may start with 'yield'; yield_expr must start with 'yield' +assignment: + | NAME ':' expression ['=' annotated_rhs ] + | ('(' single_target ')' + | single_subscript_attribute_target) ':' expression ['=' annotated_rhs ] + | (star_targets '=' )+ (yield_expr | star_expressions) !'=' [TYPE_COMMENT] + | single_target augassign ~ (yield_expr | star_expressions) + +annotated_rhs: yield_expr | star_expressions + +augassign: + | '+=' + | '-=' + | '*=' + | '@=' + | '/=' + | '%=' + | '&=' + | '|=' + | '^=' + | '<<=' + | '>>=' + | '**=' + | '//=' + +return_stmt: + | 'return' [star_expressions] + +raise_stmt: + | 'raise' expression ['from' expression ] + | 'raise' + +global_stmt: 'global' ','.NAME+ + +nonlocal_stmt: 'nonlocal' ','.NAME+ + +del_stmt: + | 'del' del_targets &(';' | NEWLINE) + +yield_stmt: yield_expr + +assert_stmt: 'assert' expression [',' expression ] + +import_stmt: + | import_name + | import_from + +# Import statements +# ----------------- + +import_name: 'import' dotted_as_names +# note below: the ('.' | '...') is necessary because '...' is tokenized as ELLIPSIS +import_from: + | 'from' ('.' | '...')* dotted_name 'import' import_from_targets + | 'from' ('.' | '...')+ 'import' import_from_targets +import_from_targets: + | '(' import_from_as_names [','] ')' + | import_from_as_names !',' + | '*' +import_from_as_names: + | ','.import_from_as_name+ +import_from_as_name: + | NAME ['as' NAME ] +dotted_as_names: + | ','.dotted_as_name+ +dotted_as_name: + | dotted_name ['as' NAME ] +dotted_name: + | dotted_name '.' NAME + | NAME + +# COMPOUND STATEMENTS +# =================== + +# Common elements +# --------------- + +block: + | NEWLINE INDENT statements DEDENT + | simple_stmts + +decorators: ('@' named_expression NEWLINE )+ + +# Class definitions +# ----------------- + +class_def: + | decorators class_def_raw + | class_def_raw + +class_def_raw: + | 'class' NAME [type_params] ['(' [arguments] ')' ] ':' block + +# Function definitions +# -------------------- + +function_def: + | decorators function_def_raw + | function_def_raw + +function_def_raw: + | 'def' NAME [type_params] '(' [params] ')' ['->' expression ] ':' [func_type_comment] block + | ASYNC 'def' NAME [type_params] '(' [params] ')' ['->' expression ] ':' [func_type_comment] block + +# Function parameters +# ------------------- + +params: + | parameters + +parameters: + | slash_no_default param_no_default* param_with_default* [star_etc] + | slash_with_default param_with_default* [star_etc] + | param_no_default+ param_with_default* [star_etc] + | param_with_default+ [star_etc] + | star_etc + +# Some duplication here because we can't write (',' | &')'), +# which is because we don't support empty alternatives (yet). + +slash_no_default: + | param_no_default+ '/' ',' + | param_no_default+ '/' &')' +slash_with_default: + | param_no_default* param_with_default+ '/' ',' + | param_no_default* param_with_default+ '/' &')' + +star_etc: + | '*' param_no_default param_maybe_default* [kwds] + | '*' param_no_default_star_annotation param_maybe_default* [kwds] + | '*' ',' param_maybe_default+ [kwds] + | kwds + +kwds: + | '**' param_no_default + +# One parameter. This *includes* a following comma and type comment. +# +# There are three styles: +# - No default +# - With default +# - Maybe with default +# +# There are two alternative forms of each, to deal with type comments: +# - Ends in a comma followed by an optional type comment +# - No comma, optional type comment, must be followed by close paren +# The latter form is for a final parameter without trailing comma. +# + +param_no_default: + | param ',' TYPE_COMMENT? + | param TYPE_COMMENT? &')' +param_no_default_star_annotation: + | param_star_annotation ',' TYPE_COMMENT? + | param_star_annotation TYPE_COMMENT? &')' +param_with_default: + | param default ',' TYPE_COMMENT? + | param default TYPE_COMMENT? &')' +param_maybe_default: + | param default? ',' TYPE_COMMENT? + | param default? TYPE_COMMENT? &')' +param: NAME annotation? +param_star_annotation: NAME star_annotation +annotation: ':' expression +star_annotation: ':' star_expression +default: '=' expression | invalid_default + +# If statement +# ------------ + +if_stmt: + | 'if' named_expression ':' block elif_stmt + | 'if' named_expression ':' block [else_block] +elif_stmt: + | 'elif' named_expression ':' block elif_stmt + | 'elif' named_expression ':' block [else_block] +else_block: + | 'else' ':' block + +# While statement +# --------------- + +while_stmt: + | 'while' named_expression ':' block [else_block] + +# For statement +# ------------- + +for_stmt: + | 'for' star_targets 'in' ~ star_expressions ':' [TYPE_COMMENT] block [else_block] + | ASYNC 'for' star_targets 'in' ~ star_expressions ':' [TYPE_COMMENT] block [else_block] + +# With statement +# -------------- + +with_stmt: + | 'with' '(' ','.with_item+ ','? ')' ':' block + | 'with' ','.with_item+ ':' [TYPE_COMMENT] block + | ASYNC 'with' '(' ','.with_item+ ','? ')' ':' block + | ASYNC 'with' ','.with_item+ ':' [TYPE_COMMENT] block + +with_item: + | expression 'as' star_target &(',' | ')' | ':') + | expression + +# Try statement +# ------------- + +try_stmt: + | 'try' ':' block finally_block + | 'try' ':' block except_block+ [else_block] [finally_block] + | 'try' ':' block except_star_block+ [else_block] [finally_block] + + +# Except statement +# ---------------- + +except_block: + | 'except' expression ['as' NAME ] ':' block + | 'except' ':' block +except_star_block: + | 'except' '*' expression ['as' NAME ] ':' block +finally_block: + | 'finally' ':' block + +# Match statement +# --------------- + +match_stmt: + | "match" subject_expr ':' NEWLINE INDENT case_block+ DEDENT + +subject_expr: + | star_named_expression ',' star_named_expressions? + | named_expression + +case_block: + | "case" patterns guard? ':' block + +guard: 'if' named_expression + +patterns: + | open_sequence_pattern + | pattern + +pattern: + | as_pattern + | or_pattern + +as_pattern: + | or_pattern 'as' pattern_capture_target + +or_pattern: + | '|'.closed_pattern+ + +closed_pattern: + | literal_pattern + | capture_pattern + | wildcard_pattern + | value_pattern + | group_pattern + | sequence_pattern + | mapping_pattern + | class_pattern + +# Literal patterns are used for equality and identity constraints +literal_pattern: + | signed_number !('+' | '-') + | complex_number + | strings + | 'None' + | 'True' + | 'False' + +# Literal expressions are used to restrict permitted mapping pattern keys +literal_expr: + | signed_number !('+' | '-') + | complex_number + | strings + | 'None' + | 'True' + | 'False' + +complex_number: + | signed_real_number '+' imaginary_number + | signed_real_number '-' imaginary_number + +signed_number: + | NUMBER + | '-' NUMBER + +signed_real_number: + | real_number + | '-' real_number + +real_number: + | NUMBER + +imaginary_number: + | NUMBER + +capture_pattern: + | pattern_capture_target + +pattern_capture_target: + | !"_" NAME !('.' | '(' | '=') + +wildcard_pattern: + | "_" + +value_pattern: + | attr !('.' | '(' | '=') + +attr: + | name_or_attr '.' NAME + +name_or_attr: + | attr + | NAME + +group_pattern: + | '(' pattern ')' + +sequence_pattern: + | '[' maybe_sequence_pattern? ']' + | '(' open_sequence_pattern? ')' + +open_sequence_pattern: + | maybe_star_pattern ',' maybe_sequence_pattern? + +maybe_sequence_pattern: + | ','.maybe_star_pattern+ ','? + +maybe_star_pattern: + | star_pattern + | pattern + +star_pattern: + | '*' pattern_capture_target + | '*' wildcard_pattern + +mapping_pattern: + | '{' '}' + | '{' double_star_pattern ','? '}' + | '{' items_pattern ',' double_star_pattern ','? '}' + | '{' items_pattern ','? '}' + +items_pattern: + | ','.key_value_pattern+ + +key_value_pattern: + | (literal_expr | attr) ':' pattern + +double_star_pattern: + | '**' pattern_capture_target + +class_pattern: + | name_or_attr '(' ')' + | name_or_attr '(' positional_patterns ','? ')' + | name_or_attr '(' keyword_patterns ','? ')' + | name_or_attr '(' positional_patterns ',' keyword_patterns ','? ')' + +positional_patterns: + | ','.pattern+ + +keyword_patterns: + | ','.keyword_pattern+ + +keyword_pattern: + | NAME '=' pattern + +# Type statement +# --------------- + +type_alias: + | "type" NAME [type_params] '=' expression + +# Type parameter declaration +# -------------------------- + +type_params: '[' type_param_seq ']' + +type_param_seq: ','.type_param+ [','] + +type_param: + | NAME [type_param_bound] + | '*' NAME + | '**' NAME + +type_param_bound: ':' expression + +# EXPRESSIONS +# ----------- + +expressions: + | expression (',' expression )+ [','] + | expression ',' + | expression + +expression: + | disjunction 'if' disjunction 'else' expression + | disjunction + | lambdef + +yield_expr: + | 'yield' 'from' expression + | 'yield' [star_expressions] + +star_expressions: + | star_expression (',' star_expression )+ [','] + | star_expression ',' + | star_expression + +star_expression: + | '*' bitwise_or + | expression + +star_named_expressions: ','.star_named_expression+ [','] + +star_named_expression: + | '*' bitwise_or + | named_expression + +assignment_expression: + | NAME ':=' ~ expression + +named_expression: + | assignment_expression + | expression !':=' + +disjunction: + | conjunction ('or' conjunction )+ + | conjunction + +conjunction: + | inversion ('and' inversion )+ + | inversion + +inversion: + | 'not' inversion + | comparison + +# Comparison operators +# -------------------- + +comparison: + | bitwise_or compare_op_bitwise_or_pair+ + | bitwise_or + +compare_op_bitwise_or_pair: + | eq_bitwise_or + | noteq_bitwise_or + | lte_bitwise_or + | lt_bitwise_or + | gte_bitwise_or + | gt_bitwise_or + | notin_bitwise_or + | in_bitwise_or + | isnot_bitwise_or + | is_bitwise_or + +eq_bitwise_or: '==' bitwise_or +noteq_bitwise_or: + | ('!=' ) bitwise_or +lte_bitwise_or: '<=' bitwise_or +lt_bitwise_or: '<' bitwise_or +gte_bitwise_or: '>=' bitwise_or +gt_bitwise_or: '>' bitwise_or +notin_bitwise_or: 'not' 'in' bitwise_or +in_bitwise_or: 'in' bitwise_or +isnot_bitwise_or: 'is' 'not' bitwise_or +is_bitwise_or: 'is' bitwise_or + +# Bitwise operators +# ----------------- + +bitwise_or: + | bitwise_or '|' bitwise_xor + | bitwise_xor + +bitwise_xor: + | bitwise_xor '^' bitwise_and + | bitwise_and + +bitwise_and: + | bitwise_and '&' shift_expr + | shift_expr + +shift_expr: + | shift_expr '<<' sum + | shift_expr '>>' sum + | sum + +# Arithmetic operators +# -------------------- + +sum: + | sum '+' term + | sum '-' term + | term + +term: + | term '*' factor + | term '/' factor + | term '//' factor + | term '%' factor + | term '@' factor + | factor + +factor: + | '+' factor + | '-' factor + | '~' factor + | power + +power: + | await_primary '**' factor + | await_primary + +# Primary elements +# ---------------- + +# Primary elements are things like "obj.something.something", "obj[something]", "obj(something)", "obj" ... + +await_primary: + | AWAIT primary + | primary + +primary: + | primary '.' NAME + | primary genexp + | primary '(' [arguments] ')' + | primary '[' slices ']' + | atom + +slices: + | slice !',' + | ','.(slice | starred_expression)+ [','] + +slice: + | [expression] ':' [expression] [':' [expression] ] + | named_expression + +atom: + | NAME + | 'True' + | 'False' + | 'None' + | strings + | NUMBER + | (tuple | group | genexp) + | (list | listcomp) + | (dict | set | dictcomp | setcomp) + | '...' + +group: + | '(' (yield_expr | named_expression) ')' + +# Lambda functions +# ---------------- + +lambdef: + | 'lambda' [lambda_params] ':' expression + +lambda_params: + | lambda_parameters + +# lambda_parameters etc. duplicates parameters but without annotations +# or type comments, and if there's no comma after a parameter, we expect +# a colon, not a close parenthesis. (For more, see parameters above.) +# +lambda_parameters: + | lambda_slash_no_default lambda_param_no_default* lambda_param_with_default* [lambda_star_etc] + | lambda_slash_with_default lambda_param_with_default* [lambda_star_etc] + | lambda_param_no_default+ lambda_param_with_default* [lambda_star_etc] + | lambda_param_with_default+ [lambda_star_etc] + | lambda_star_etc + +lambda_slash_no_default: + | lambda_param_no_default+ '/' ',' + | lambda_param_no_default+ '/' &':' + +lambda_slash_with_default: + | lambda_param_no_default* lambda_param_with_default+ '/' ',' + | lambda_param_no_default* lambda_param_with_default+ '/' &':' + +lambda_star_etc: + | '*' lambda_param_no_default lambda_param_maybe_default* [lambda_kwds] + | '*' ',' lambda_param_maybe_default+ [lambda_kwds] + | lambda_kwds + +lambda_kwds: + | '**' lambda_param_no_default + +lambda_param_no_default: + | lambda_param ',' + | lambda_param &':' +lambda_param_with_default: + | lambda_param default ',' + | lambda_param default &':' +lambda_param_maybe_default: + | lambda_param default? ',' + | lambda_param default? &':' +lambda_param: NAME + +# LITERALS +# ======== + +fstring_middle: + | fstring_replacement_field + | FSTRING_MIDDLE +fstring_replacement_field: + | '{' (yield_expr | star_expressions) '='? [fstring_conversion] [fstring_full_format_spec] '}' +fstring_conversion: + | "!" NAME +fstring_full_format_spec: + | ':' fstring_format_spec* +fstring_format_spec: + | FSTRING_MIDDLE + | fstring_replacement_field +fstring: + | FSTRING_START fstring_middle* FSTRING_END + +string: STRING +strings: (fstring|string)+ + +list: + | '[' [star_named_expressions] ']' + +tuple: + | '(' [star_named_expression ',' [star_named_expressions] ] ')' + +set: '{' star_named_expressions '}' + +# Dicts +# ----- + +dict: + | '{' [double_starred_kvpairs] '}' + +double_starred_kvpairs: ','.double_starred_kvpair+ [','] + +double_starred_kvpair: + | '**' bitwise_or + | kvpair + +kvpair: expression ':' expression + +# Comprehensions & Generators +# --------------------------- + +for_if_clauses: + | for_if_clause+ + +for_if_clause: + | ASYNC 'for' star_targets 'in' ~ disjunction ('if' disjunction )* + | 'for' star_targets 'in' ~ disjunction ('if' disjunction )* + +listcomp: + | '[' named_expression for_if_clauses ']' + +setcomp: + | '{' named_expression for_if_clauses '}' + +genexp: + | '(' ( assignment_expression | expression !':=') for_if_clauses ')' + +dictcomp: + | '{' kvpair for_if_clauses '}' + +# FUNCTION CALL ARGUMENTS +# ======================= + +arguments: + | args [','] &')' + +args: + | ','.(starred_expression | ( assignment_expression | expression !':=') !'=')+ [',' kwargs ] + | kwargs + +kwargs: + | ','.kwarg_or_starred+ ',' ','.kwarg_or_double_starred+ + | ','.kwarg_or_starred+ + | ','.kwarg_or_double_starred+ + +starred_expression: + | '*' expression + +kwarg_or_starred: + | NAME '=' expression + | starred_expression + +kwarg_or_double_starred: + | NAME '=' expression + | '**' expression + +# ASSIGNMENT TARGETS +# ================== + +# Generic targets +# --------------- + +# NOTE: star_targets may contain *bitwise_or, targets may not. +star_targets: + | star_target !',' + | star_target (',' star_target )* [','] + +star_targets_list_seq: ','.star_target+ [','] + +star_targets_tuple_seq: + | star_target (',' star_target )+ [','] + | star_target ',' + +star_target: + | '*' (!'*' star_target) + | target_with_star_atom + +target_with_star_atom: + | t_primary '.' NAME !t_lookahead + | t_primary '[' slices ']' !t_lookahead + | star_atom + +star_atom: + | NAME + | '(' target_with_star_atom ')' + | '(' [star_targets_tuple_seq] ')' + | '[' [star_targets_list_seq] ']' + +single_target: + | single_subscript_attribute_target + | NAME + | '(' single_target ')' + +single_subscript_attribute_target: + | t_primary '.' NAME !t_lookahead + | t_primary '[' slices ']' !t_lookahead + +t_primary: + | t_primary '.' NAME &t_lookahead + | t_primary '[' slices ']' &t_lookahead + | t_primary genexp &t_lookahead + | t_primary '(' [arguments] ')' &t_lookahead + | atom &t_lookahead + +t_lookahead: '(' | '[' | '.' + +# Targets for del statements +# -------------------------- + +del_targets: ','.del_target+ [','] + +del_target: + | t_primary '.' NAME !t_lookahead + | t_primary '[' slices ']' !t_lookahead + | del_t_atom + +del_t_atom: + | NAME + | '(' del_target ')' + | '(' [del_targets] ')' + | '[' [del_targets] ']' + +# TYPING ELEMENTS +# --------------- + +# type_expressions allow */** but ignore them +type_expressions: + | ','.expression+ ',' '*' expression ',' '**' expression + | ','.expression+ ',' '*' expression + | ','.expression+ ',' '**' expression + | '*' expression ',' '**' expression + | '*' expression + | '**' expression + | ','.expression+ + +func_type_comment: + | NEWLINE TYPE_COMMENT &(NEWLINE INDENT) # Must be followed by indented block + | TYPE_COMMENT + +# ========================= END OF THE GRAMMAR =========================== + + + +# ========================= START OF INVALID RULES ======================= diff --git a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar312/grammar313 b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar312/grammar313 new file mode 100644 index 0000000000..a96a789849 --- /dev/null +++ b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar312/grammar313 @@ -0,0 +1,905 @@ +# PEG grammar for Python + + + +# ========================= START OF THE GRAMMAR ========================= + +# General grammatical elements and rules: +# +# * Strings with double quotes (") denote SOFT KEYWORDS +# * Strings with single quotes (') denote KEYWORDS +# * Upper case names (NAME) denote tokens in the Grammar/Tokens file +# * Rule names starting with "invalid_" are used for specialized syntax errors +# - These rules are NOT used in the first pass of the parser. +# - Only if the first pass fails to parse, a second pass including the invalid +# rules will be executed. +# - If the parser fails in the second phase with a generic syntax error, the +# location of the generic failure of the first pass will be used (this avoids +# reporting incorrect locations due to the invalid rules). +# - The order of the alternatives involving invalid rules matter +# (like any rule in PEG). +# +# Grammar Syntax (see PEP 617 for more information): +# +# rule_name: expression +# Optionally, a type can be included right after the rule name, which +# specifies the return type of the C or Python function corresponding to the +# rule: +# rule_name[return_type]: expression +# If the return type is omitted, then a void * is returned in C and an Any in +# Python. +# e1 e2 +# Match e1, then match e2. +# e1 | e2 +# Match e1 or e2. +# The first alternative can also appear on the line after the rule name for +# formatting purposes. In that case, a | must be used before the first +# alternative, like so: +# rule_name[return_type]: +# | first_alt +# | second_alt +# ( e ) +# Match e (allows also to use other operators in the group like '(e)*') +# [ e ] or e? +# Optionally match e. +# e* +# Match zero or more occurrences of e. +# e+ +# Match one or more occurrences of e. +# s.e+ +# Match one or more occurrences of e, separated by s. The generated parse tree +# does not include the separator. This is otherwise identical to (e (s e)*). +# &e +# Succeed if e can be parsed, without consuming any input. +# !e +# Fail if e can be parsed, without consuming any input. +# ~ +# Commit to the current alternative, even if it fails to parse. +# &&e +# Eager parse e. The parser will not backtrack and will immediately +# fail with SyntaxError if e cannot be parsed. +# + +# STARTING RULES +# ============== + +file: [statements] ENDMARKER +interactive: statement_newline +eval: expressions NEWLINE* ENDMARKER +func_type: '(' [type_expressions] ')' '->' expression NEWLINE* ENDMARKER + +# GENERAL STATEMENTS +# ================== + +statements: statement+ + +statement: compound_stmt | simple_stmts + +statement_newline: + | compound_stmt NEWLINE + | simple_stmts + | NEWLINE + | ENDMARKER + +simple_stmts: + | simple_stmt !';' NEWLINE # Not needed, there for speedup + | ';'.simple_stmt+ [';'] NEWLINE + +# NOTE: assignment MUST precede expression, else parsing a simple assignment +# will throw a SyntaxError. +simple_stmt: + | assignment + | type_alias + | star_expressions + | return_stmt + | import_stmt + | raise_stmt + | 'pass' + | del_stmt + | yield_stmt + | assert_stmt + | 'break' + | 'continue' + | global_stmt + | nonlocal_stmt + +compound_stmt: + | function_def + | if_stmt + | class_def + | with_stmt + | for_stmt + | try_stmt + | while_stmt + | match_stmt + +# SIMPLE STATEMENTS +# ================= + +# NOTE: annotated_rhs may start with 'yield'; yield_expr must start with 'yield' +assignment: + | NAME ':' expression ['=' annotated_rhs ] + | ('(' single_target ')' + | single_subscript_attribute_target) ':' expression ['=' annotated_rhs ] + | (star_targets '=' )+ (yield_expr | star_expressions) !'=' [TYPE_COMMENT] + | single_target augassign ~ (yield_expr | star_expressions) + +annotated_rhs: yield_expr | star_expressions + +augassign: + | '+=' + | '-=' + | '*=' + | '@=' + | '/=' + | '%=' + | '&=' + | '|=' + | '^=' + | '<<=' + | '>>=' + | '**=' + | '//=' + +return_stmt: + | 'return' [star_expressions] + +raise_stmt: + | 'raise' expression ['from' expression ] + | 'raise' + +global_stmt: 'global' ','.NAME+ + +nonlocal_stmt: 'nonlocal' ','.NAME+ + +del_stmt: + | 'del' del_targets &(';' | NEWLINE) + +yield_stmt: yield_expr + +assert_stmt: 'assert' expression [',' expression ] + +import_stmt: + | import_name + | import_from + +# Import statements +# ----------------- + +import_name: 'import' dotted_as_names +# note below: the ('.' | '...') is necessary because '...' is tokenized as ELLIPSIS +import_from: + | 'from' ('.' | '...')* dotted_name 'import' import_from_targets + | 'from' ('.' | '...')+ 'import' import_from_targets +import_from_targets: + | '(' import_from_as_names [','] ')' + | import_from_as_names !',' + | '*' +import_from_as_names: + | ','.import_from_as_name+ +import_from_as_name: + | NAME ['as' NAME ] +dotted_as_names: + | ','.dotted_as_name+ +dotted_as_name: + | dotted_name ['as' NAME ] +dotted_name: + | dotted_name '.' NAME + | NAME + +# COMPOUND STATEMENTS +# =================== + +# Common elements +# --------------- + +block: + | NEWLINE INDENT statements DEDENT + | simple_stmts + +decorators: ('@' named_expression NEWLINE )+ + +# Class definitions +# ----------------- + +class_def: + | decorators class_def_raw + | class_def_raw + +class_def_raw: + | 'class' NAME [type_params] ['(' [arguments] ')' ] ':' block + +# Function definitions +# -------------------- + +function_def: + | decorators function_def_raw + | function_def_raw + +function_def_raw: + | 'def' NAME [type_params] '(' [params] ')' ['->' expression ] ':' [func_type_comment] block + | 'async' 'def' NAME [type_params] '(' [params] ')' ['->' expression ] ':' [func_type_comment] block + +# Function parameters +# ------------------- + +params: + | parameters + +parameters: + | slash_no_default param_no_default* param_with_default* [star_etc] + | slash_with_default param_with_default* [star_etc] + | param_no_default+ param_with_default* [star_etc] + | param_with_default+ [star_etc] + | star_etc + +# Some duplication here because we can't write (',' | &')'), +# which is because we don't support empty alternatives (yet). + +slash_no_default: + | param_no_default+ '/' ',' + | param_no_default+ '/' &')' +slash_with_default: + | param_no_default* param_with_default+ '/' ',' + | param_no_default* param_with_default+ '/' &')' + +star_etc: + | '*' param_no_default param_maybe_default* [kwds] + | '*' param_no_default_star_annotation param_maybe_default* [kwds] + | '*' ',' param_maybe_default+ [kwds] + | kwds + +kwds: + | '**' param_no_default + +# One parameter. This *includes* a following comma and type comment. +# +# There are three styles: +# - No default +# - With default +# - Maybe with default +# +# There are two alternative forms of each, to deal with type comments: +# - Ends in a comma followed by an optional type comment +# - No comma, optional type comment, must be followed by close paren +# The latter form is for a final parameter without trailing comma. +# + +param_no_default: + | param ',' TYPE_COMMENT? + | param TYPE_COMMENT? &')' +param_no_default_star_annotation: + | param_star_annotation ',' TYPE_COMMENT? + | param_star_annotation TYPE_COMMENT? &')' +param_with_default: + | param default ',' TYPE_COMMENT? + | param default TYPE_COMMENT? &')' +param_maybe_default: + | param default? ',' TYPE_COMMENT? + | param default? TYPE_COMMENT? &')' +param: NAME annotation? +param_star_annotation: NAME star_annotation +annotation: ':' expression +star_annotation: ':' star_expression +default: '=' expression | invalid_default + +# If statement +# ------------ + +if_stmt: + | 'if' named_expression ':' block elif_stmt + | 'if' named_expression ':' block [else_block] +elif_stmt: + | 'elif' named_expression ':' block elif_stmt + | 'elif' named_expression ':' block [else_block] +else_block: + | 'else' ':' block + +# While statement +# --------------- + +while_stmt: + | 'while' named_expression ':' block [else_block] + +# For statement +# ------------- + +for_stmt: + | 'for' star_targets 'in' ~ star_expressions ':' [TYPE_COMMENT] block [else_block] + | 'async' 'for' star_targets 'in' ~ star_expressions ':' [TYPE_COMMENT] block [else_block] + +# With statement +# -------------- + +with_stmt: + | 'with' '(' ','.with_item+ ','? ')' ':' [TYPE_COMMENT] block + | 'with' ','.with_item+ ':' [TYPE_COMMENT] block + | 'async' 'with' '(' ','.with_item+ ','? ')' ':' block + | 'async' 'with' ','.with_item+ ':' [TYPE_COMMENT] block + +with_item: + | expression 'as' star_target &(',' | ')' | ':') + | expression + +# Try statement +# ------------- + +try_stmt: + | 'try' ':' block finally_block + | 'try' ':' block except_block+ [else_block] [finally_block] + | 'try' ':' block except_star_block+ [else_block] [finally_block] + + +# Except statement +# ---------------- + +except_block: + | 'except' expression ['as' NAME ] ':' block + | 'except' ':' block +except_star_block: + | 'except' '*' expression ['as' NAME ] ':' block +finally_block: + | 'finally' ':' block + +# Match statement +# --------------- + +match_stmt: + | "match" subject_expr ':' NEWLINE INDENT case_block+ DEDENT + +subject_expr: + | star_named_expression ',' star_named_expressions? + | named_expression + +case_block: + | "case" patterns guard? ':' block + +guard: 'if' named_expression + +patterns: + | open_sequence_pattern + | pattern + +pattern: + | as_pattern + | or_pattern + +as_pattern: + | or_pattern 'as' pattern_capture_target + +or_pattern: + | '|'.closed_pattern+ + +closed_pattern: + | literal_pattern + | capture_pattern + | wildcard_pattern + | value_pattern + | group_pattern + | sequence_pattern + | mapping_pattern + | class_pattern + +# Literal patterns are used for equality and identity constraints +literal_pattern: + | signed_number !('+' | '-') + | complex_number + | strings + | 'None' + | 'True' + | 'False' + +# Literal expressions are used to restrict permitted mapping pattern keys +literal_expr: + | signed_number !('+' | '-') + | complex_number + | strings + | 'None' + | 'True' + | 'False' + +complex_number: + | signed_real_number '+' imaginary_number + | signed_real_number '-' imaginary_number + +signed_number: + | NUMBER + | '-' NUMBER + +signed_real_number: + | real_number + | '-' real_number + +real_number: + | NUMBER + +imaginary_number: + | NUMBER + +capture_pattern: + | pattern_capture_target + +pattern_capture_target: + | !"_" NAME !('.' | '(' | '=') + +wildcard_pattern: + | "_" + +value_pattern: + | attr !('.' | '(' | '=') + +attr: + | name_or_attr '.' NAME + +name_or_attr: + | attr + | NAME + +group_pattern: + | '(' pattern ')' + +sequence_pattern: + | '[' maybe_sequence_pattern? ']' + | '(' open_sequence_pattern? ')' + +open_sequence_pattern: + | maybe_star_pattern ',' maybe_sequence_pattern? + +maybe_sequence_pattern: + | ','.maybe_star_pattern+ ','? + +maybe_star_pattern: + | star_pattern + | pattern + +star_pattern: + | '*' pattern_capture_target + | '*' wildcard_pattern + +mapping_pattern: + | '{' '}' + | '{' double_star_pattern ','? '}' + | '{' items_pattern ',' double_star_pattern ','? '}' + | '{' items_pattern ','? '}' + +items_pattern: + | ','.key_value_pattern+ + +key_value_pattern: + | (literal_expr | attr) ':' pattern + +double_star_pattern: + | '**' pattern_capture_target + +class_pattern: + | name_or_attr '(' ')' + | name_or_attr '(' positional_patterns ','? ')' + | name_or_attr '(' keyword_patterns ','? ')' + | name_or_attr '(' positional_patterns ',' keyword_patterns ','? ')' + +positional_patterns: + | ','.pattern+ + +keyword_patterns: + | ','.keyword_pattern+ + +keyword_pattern: + | NAME '=' pattern + +# Type statement +# --------------- + +type_alias: + | "type" NAME [type_params] '=' expression + +# Type parameter declaration +# -------------------------- + +type_params: + | invalid_type_params + | '[' type_param_seq ']' + +type_param_seq: ','.type_param+ [','] + +type_param: + | NAME [type_param_bound] [type_param_default] + | '*' NAME [type_param_starred_default] + | '**' NAME [type_param_default] + +type_param_bound: ':' expression +type_param_default: '=' expression +type_param_starred_default: '=' star_expression + +# EXPRESSIONS +# ----------- + +expressions: + | expression (',' expression )+ [','] + | expression ',' + | expression + +expression: + | disjunction 'if' disjunction 'else' expression + | disjunction + | lambdef + +yield_expr: + | 'yield' 'from' expression + | 'yield' [star_expressions] + +star_expressions: + | star_expression (',' star_expression )+ [','] + | star_expression ',' + | star_expression + +star_expression: + | '*' bitwise_or + | expression + +star_named_expressions: ','.star_named_expression+ [','] + +star_named_expression: + | '*' bitwise_or + | named_expression + +assignment_expression: + | NAME ':=' ~ expression + +named_expression: + | assignment_expression + | expression !':=' + +disjunction: + | conjunction ('or' conjunction )+ + | conjunction + +conjunction: + | inversion ('and' inversion )+ + | inversion + +inversion: + | 'not' inversion + | comparison + +# Comparison operators +# -------------------- + +comparison: + | bitwise_or compare_op_bitwise_or_pair+ + | bitwise_or + +compare_op_bitwise_or_pair: + | eq_bitwise_or + | noteq_bitwise_or + | lte_bitwise_or + | lt_bitwise_or + | gte_bitwise_or + | gt_bitwise_or + | notin_bitwise_or + | in_bitwise_or + | isnot_bitwise_or + | is_bitwise_or + +eq_bitwise_or: '==' bitwise_or +noteq_bitwise_or: + | ('!=' ) bitwise_or +lte_bitwise_or: '<=' bitwise_or +lt_bitwise_or: '<' bitwise_or +gte_bitwise_or: '>=' bitwise_or +gt_bitwise_or: '>' bitwise_or +notin_bitwise_or: 'not' 'in' bitwise_or +in_bitwise_or: 'in' bitwise_or +isnot_bitwise_or: 'is' 'not' bitwise_or +is_bitwise_or: 'is' bitwise_or + +# Bitwise operators +# ----------------- + +bitwise_or: + | bitwise_or '|' bitwise_xor + | bitwise_xor + +bitwise_xor: + | bitwise_xor '^' bitwise_and + | bitwise_and + +bitwise_and: + | bitwise_and '&' shift_expr + | shift_expr + +shift_expr: + | shift_expr '<<' sum + | shift_expr '>>' sum + | sum + +# Arithmetic operators +# -------------------- + +sum: + | sum '+' term + | sum '-' term + | term + +term: + | term '*' factor + | term '/' factor + | term '//' factor + | term '%' factor + | term '@' factor + | factor + +factor: + | '+' factor + | '-' factor + | '~' factor + | power + +power: + | await_primary '**' factor + | await_primary + +# Primary elements +# ---------------- + +# Primary elements are things like "obj.something.something", "obj[something]", "obj(something)", "obj" ... + +await_primary: + | 'await' primary + | primary + +primary: + | primary '.' NAME + | primary genexp + | primary '(' [arguments] ')' + | primary '[' slices ']' + | atom + +slices: + | slice !',' + | ','.(slice | starred_expression)+ [','] + +slice: + | [expression] ':' [expression] [':' [expression] ] + | named_expression + +atom: + | NAME + | 'True' + | 'False' + | 'None' + | strings + | NUMBER + | (tuple | group | genexp) + | (list | listcomp) + | (dict | set | dictcomp | setcomp) + | '...' + +group: + | '(' (yield_expr | named_expression) ')' + +# Lambda functions +# ---------------- + +lambdef: + | 'lambda' [lambda_params] ':' expression + +lambda_params: + | lambda_parameters + +# lambda_parameters etc. duplicates parameters but without annotations +# or type comments, and if there's no comma after a parameter, we expect +# a colon, not a close parenthesis. (For more, see parameters above.) +# +lambda_parameters: + | lambda_slash_no_default lambda_param_no_default* lambda_param_with_default* [lambda_star_etc] + | lambda_slash_with_default lambda_param_with_default* [lambda_star_etc] + | lambda_param_no_default+ lambda_param_with_default* [lambda_star_etc] + | lambda_param_with_default+ [lambda_star_etc] + | lambda_star_etc + +lambda_slash_no_default: + | lambda_param_no_default+ '/' ',' + | lambda_param_no_default+ '/' &':' + +lambda_slash_with_default: + | lambda_param_no_default* lambda_param_with_default+ '/' ',' + | lambda_param_no_default* lambda_param_with_default+ '/' &':' + +lambda_star_etc: + | '*' lambda_param_no_default lambda_param_maybe_default* [lambda_kwds] + | '*' ',' lambda_param_maybe_default+ [lambda_kwds] + | lambda_kwds + +lambda_kwds: + | '**' lambda_param_no_default + +lambda_param_no_default: + | lambda_param ',' + | lambda_param &':' +lambda_param_with_default: + | lambda_param default ',' + | lambda_param default &':' +lambda_param_maybe_default: + | lambda_param default? ',' + | lambda_param default? &':' +lambda_param: NAME + +# LITERALS +# ======== + +fstring_middle: + | fstring_replacement_field + | FSTRING_MIDDLE +fstring_replacement_field: + | '{' annotated_rhs '='? [fstring_conversion] [fstring_full_format_spec] '}' +fstring_conversion: + | "!" NAME +fstring_full_format_spec: + | ':' fstring_format_spec* +fstring_format_spec: + | FSTRING_MIDDLE + | fstring_replacement_field +fstring: + | FSTRING_START fstring_middle* FSTRING_END + +string: STRING +strings: (fstring|string)+ + +list: + | '[' [star_named_expressions] ']' + +tuple: + | '(' [star_named_expression ',' [star_named_expressions] ] ')' + +set: '{' star_named_expressions '}' + +# Dicts +# ----- + +dict: + | '{' [double_starred_kvpairs] '}' + +double_starred_kvpairs: ','.double_starred_kvpair+ [','] + +double_starred_kvpair: + | '**' bitwise_or + | kvpair + +kvpair: expression ':' expression + +# Comprehensions & Generators +# --------------------------- + +for_if_clauses: + | for_if_clause+ + +for_if_clause: + | 'async' 'for' star_targets 'in' ~ disjunction ('if' disjunction )* + | 'for' star_targets 'in' ~ disjunction ('if' disjunction )* + +listcomp: + | '[' named_expression for_if_clauses ']' + +setcomp: + | '{' named_expression for_if_clauses '}' + +genexp: + | '(' ( assignment_expression | expression !':=') for_if_clauses ')' + +dictcomp: + | '{' kvpair for_if_clauses '}' + +# FUNCTION CALL ARGUMENTS +# ======================= + +arguments: + | args [','] &')' + +args: + | ','.(starred_expression | ( assignment_expression | expression !':=') !'=')+ [',' kwargs ] + | kwargs + +kwargs: + | ','.kwarg_or_starred+ ',' ','.kwarg_or_double_starred+ + | ','.kwarg_or_starred+ + | ','.kwarg_or_double_starred+ + +starred_expression: + | '*' expression + +kwarg_or_starred: + | NAME '=' expression + | starred_expression + +kwarg_or_double_starred: + | NAME '=' expression + | '**' expression + +# ASSIGNMENT TARGETS +# ================== + +# Generic targets +# --------------- + +# NOTE: star_targets may contain *bitwise_or, targets may not. +star_targets: + | star_target !',' + | star_target (',' star_target )* [','] + +star_targets_list_seq: ','.star_target+ [','] + +star_targets_tuple_seq: + | star_target (',' star_target )+ [','] + | star_target ',' + +star_target: + | '*' (!'*' star_target) + | target_with_star_atom + +target_with_star_atom: + | t_primary '.' NAME !t_lookahead + | t_primary '[' slices ']' !t_lookahead + | star_atom + +star_atom: + | NAME + | '(' target_with_star_atom ')' + | '(' [star_targets_tuple_seq] ')' + | '[' [star_targets_list_seq] ']' + +single_target: + | single_subscript_attribute_target + | NAME + | '(' single_target ')' + +single_subscript_attribute_target: + | t_primary '.' NAME !t_lookahead + | t_primary '[' slices ']' !t_lookahead + +t_primary: + | t_primary '.' NAME &t_lookahead + | t_primary '[' slices ']' &t_lookahead + | t_primary genexp &t_lookahead + | t_primary '(' [arguments] ')' &t_lookahead + | atom &t_lookahead + +t_lookahead: '(' | '[' | '.' + +# Targets for del statements +# -------------------------- + +del_targets: ','.del_target+ [','] + +del_target: + | t_primary '.' NAME !t_lookahead + | t_primary '[' slices ']' !t_lookahead + | del_t_atom + +del_t_atom: + | NAME + | '(' del_target ')' + | '(' [del_targets] ')' + | '[' [del_targets] ']' + +# TYPING ELEMENTS +# --------------- + +# type_expressions allow */** but ignore them +type_expressions: + | ','.expression+ ',' '*' expression ',' '**' expression + | ','.expression+ ',' '*' expression + | ','.expression+ ',' '**' expression + | '*' expression ',' '**' expression + | '*' expression + | '**' expression + | ','.expression+ + +func_type_comment: + | NEWLINE TYPE_COMMENT &(NEWLINE INDENT) # Must be followed by indented block + | TYPE_COMMENT + +# ========================= END OF THE GRAMMAR =========================== + + + +# ========================= START OF INVALID RULES ======================= diff --git a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar312/python.jjt b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar312/python.jjt index d10e42fac4..f1c486a8f2 100644 --- a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar312/python.jjt +++ b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar312/python.jjt @@ -628,10 +628,10 @@ Expr eval_input(): {} } -//funcdef: 'def' NAME parameters ['->' test] ':' suite +//funcdef: 'def' NAME [type_params] parameters ['->' test] ':' suite void funcdef(): {} { - {this.markLastAsSuiteStart();} Name() parameters() [{grammarActions.addSpecialToken("->", STRATEGY_BEFORE_NEXT);} test()#funcdef_return_annottation] {ISpecialStr s = grammarActions.findTokenAndAdd(":"); if(s != null){grammarActions.markEndDefColon(s, jjtThis);}} + {this.markLastAsSuiteStart();} Name() [type_params()] parameters() [{grammarActions.addSpecialToken("->", STRATEGY_BEFORE_NEXT);} test()#funcdef_return_annottation] {ISpecialStr s = grammarActions.findTokenAndAdd(":"); if(s != null){grammarActions.markEndDefColon(s, jjtThis);}} suite() } @@ -649,6 +649,49 @@ void begin_decorator(): {} { temporaryToken= {grammarActions.addSpecialToken(temporaryToken, STRATEGY_BEFORE_NEXT);} namedexpr_test() } +// type_params: '[' type_param_seq ']' +void type_params(): {} +{ {grammarActions.findTokenAndAdd("[");} + [type_param_seq()] + {grammarActions.findTokenAndAdd("]");} +} + +// type_param_seq: ','.type_param+ [','] + +void type_param_seq() #void: {} +{ + type_param() (LOOKAHEAD(2){grammarActions.findTokenAndAdd(",");} type_param())* [{grammarActions.findTokenAndAdd(",");}] +} + + +// type_param: +// | NAME [type_param_bound] //TypeVar +// | '*' NAME //TypeVarTuple +// | '**' NAME //ParamSpec +void type_param() #void: {} +{ + type_var() + | type_var_tuple() + | type_var_param_spec() + +} + +void type_var(): {} +{ + Name() [LOOKAHEAD(2) {grammarActions.addSpecialToken(":", STRATEGY_BEFORE_NEXT);} test()] +} + +void type_var_tuple(): {} +{ + Name() +} + +void type_var_param_spec(): {} +{ + Name() +} + + //parameters: '(' [typedargslist] ')' void parameters() #void: {} { {grammarActions.findTokenAndAdd("(");} @@ -1777,10 +1820,10 @@ void async_funcdef() #void : {} } } -//classdef: 'class' NAME ['(' [arglist] ')'] ':' suite +//classdef: 'class' NAME [type_params] ['(' [arglist] ')'] ':' suite void classdef(): {Token spStr;Token spStr2;} { - {this.markLastAsSuiteStart();} Name() [{temporaryToken=grammarActions.createSpecialStr("(");} {grammarActions.addSpecialToken(temporaryToken, STRATEGY_ADD_AFTER_PREV);} [arglist()] try{{grammarActions.findTokenAndAdd(")");} }catch(ParseException e){handleRParensNearButNotCurrent(e);} ] {ISpecialStr s = grammarActions.findTokenAndAdd(":"); if(s != null){grammarActions.markEndDefColon(s, jjtThis);}} + {this.markLastAsSuiteStart();} Name() [type_params()] [{temporaryToken=grammarActions.createSpecialStr("(");} {grammarActions.addSpecialToken(temporaryToken, STRATEGY_ADD_AFTER_PREV);} [arglist()] try{{grammarActions.findTokenAndAdd(")");} }catch(ParseException e){handleRParensNearButNotCurrent(e);} ] {ISpecialStr s = grammarActions.findTokenAndAdd(":"); if(s != null){grammarActions.markEndDefColon(s, jjtThis);}} suite() } diff --git a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar312/python.jjt_template b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar312/python.jjt_template index 0373ee0787..dcda30b900 100644 --- a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar312/python.jjt_template +++ b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar312/python.jjt_template @@ -499,10 +499,10 @@ Expr eval_input(): {} } -//funcdef: 'def' NAME parameters ['->' test] ':' suite +//funcdef: 'def' NAME [type_params] parameters ['->' test] ':' suite void funcdef(): {} { - $DEF_START parameters() [{grammarActions.addSpecialToken("->", STRATEGY_BEFORE_NEXT);} test()#funcdef_return_annottation] $COLON_END_DEF + $DEF_START [type_params()] parameters() [{grammarActions.addSpecialToken("->", STRATEGY_BEFORE_NEXT);} test()#funcdef_return_annottation] $COLON_END_DEF suite() } @@ -520,6 +520,49 @@ void begin_decorator(): {} { $AT namedexpr_test() } +// type_params: '[' type_param_seq ']' +void type_params(): {} +{ {grammarActions.findTokenAndAdd("[");} + [type_param_seq()] + {grammarActions.findTokenAndAdd("]");} +} + +// type_param_seq: ','.type_param+ [','] + +void type_param_seq() #void: {} +{ + type_param() (LOOKAHEAD(2){grammarActions.findTokenAndAdd(",");} type_param())* [{grammarActions.findTokenAndAdd(",");}] +} + + +// type_param: +// | NAME [type_param_bound] //TypeVar +// | '*' NAME //TypeVarTuple +// | '**' NAME //ParamSpec +void type_param() #void: {} +{ + type_var() + | type_var_tuple() + | type_var_param_spec() + +} + +void type_var(): {} +{ + Name() [LOOKAHEAD(2) {grammarActions.addSpecialToken(":", STRATEGY_BEFORE_NEXT);} test()] +} + +void type_var_tuple(): {} +{ + Name() +} + +void type_var_param_spec(): {} +{ + Name() +} + + //parameters: '(' [typedargslist] ')' void parameters() #void: {} { $LPAREN2 @@ -1535,10 +1578,10 @@ void async_funcdef() #void : {} } } -//classdef: 'class' NAME ['(' [arglist] ')'] ':' suite +//classdef: 'class' NAME [type_params] ['(' [arglist] ')'] ':' suite void classdef(): {Token spStr;Token spStr2;} { - $START_CLASS [$LPAREN3 [arglist()] $RPAREN ] $COLON_END_DEF + $START_CLASS [type_params()] [$LPAREN3 [arglist()] $RPAREN ] $COLON_END_DEF suite() } diff --git a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar36/TreeBuilder36.java b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar36/TreeBuilder36.java index 77e6efb924..3e3c46e7d7 100644 --- a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar36/TreeBuilder36.java +++ b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar36/TreeBuilder36.java @@ -266,7 +266,7 @@ public final SimpleNode onCloseNode(SimpleNode n, int arity) throws Exception { exprType[] bases = makeExprs(nodeArity); nameTok = makeNameTok(NameTok.ClassName); //decorator is always null at this point... it's decorated later on - ClassDef classDef = new ClassDef(nameTok, bases, body, null, + ClassDef classDef = new ClassDef(nameTok, null, bases, body, null, classDefKeywords.toArray(new keywordType[classDefKeywords.size()]), starargs, kwargs); addSpecialsAndClearOriginal(suite, classDef); diff --git a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar38/TreeBuilder38.java b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar38/TreeBuilder38.java index 4c1551deb5..e62260ea51 100644 --- a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar38/TreeBuilder38.java +++ b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammar38/TreeBuilder38.java @@ -268,7 +268,7 @@ public final SimpleNode onCloseNode(SimpleNode n, int arity) throws Exception { exprType[] bases = makeExprs(nodeArity); nameTok = makeNameTok(NameTok.ClassName); //decorator is always null at this point... it's decorated later on - ClassDef classDef = new ClassDef(nameTok, bases, body, null, + ClassDef classDef = new ClassDef(nameTok, null, bases, body, null, classDefKeywords.toArray(new keywordType[classDefKeywords.size()]), starargs, kwargs); addSpecialsAndClearOriginal(suite, classDef); diff --git a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammarcommon/AbstractTreeBuilder.java b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammarcommon/AbstractTreeBuilder.java index 29447dd061..d7aba9484c 100644 --- a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammarcommon/AbstractTreeBuilder.java +++ b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammarcommon/AbstractTreeBuilder.java @@ -43,6 +43,7 @@ import org.python.pydev.parser.jython.ast.Str; import org.python.pydev.parser.jython.ast.StrJoin; import org.python.pydev.parser.jython.ast.Suite; +import org.python.pydev.parser.jython.ast.TypeParamsSuite; import org.python.pydev.parser.jython.ast.UnaryOp; import org.python.pydev.parser.jython.ast.With; import org.python.pydev.parser.jython.ast.WithItem; @@ -162,7 +163,7 @@ public final SimpleNode openNode(final int id) { break; case JJTFUNCDEF: - ret = new FunctionDef(null, null, null, null, null, false); + ret = new FunctionDef(null, null, null, null, null, null, false); break; case JJTBEGIN_DECORATOR: @@ -862,9 +863,15 @@ public final FunctionDef closeFuncDef(int arity, SimpleNode n) throws Exception addSpecialsAndClearOriginal(funcDefReturnAnn, actualReturnAnnotation); } argumentsType arguments = makeArguments(arity - 1); + SimpleNode node = stack.peekNode(); + TypeParamsSuite typeParams = null; + if (node instanceof TypeParamsSuite) { + typeParams = (TypeParamsSuite) stack.popNode(); + } NameTok nameTok = makeNameTok(NameTok.FunctionName); //decorator is always null at this point... it's decorated later on FunctionDef funcDef = (FunctionDef) n; + funcDef.type_params = typeParams; funcDef.name = nameTok; funcDef.args = arguments; funcDef.body = body; @@ -883,6 +890,9 @@ public argumentsType makeArguments(int l) throws Exception { ArrayList list = new ArrayList(); for (int i = l - 1; i >= 0; i--) { + if (stack.peekNode() instanceof TypeParamsSuite) { + break; + } SimpleNode popped = stack.popNode(); try { if (popped.getId() == JJTEXTRAKEYWORDLIST) { diff --git a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammarcommon/ITreeConstants.java b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammarcommon/ITreeConstants.java index ed74ec4e96..684a3cf2a3 100644 --- a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammarcommon/ITreeConstants.java +++ b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/grammarcommon/ITreeConstants.java @@ -168,4 +168,8 @@ public interface ITreeConstants { public static final int JJTTUPLE_PATTERN = 660; public static final int JJTBEGIN_EXCEPT_MULTIPLY_CLAUSE = 661; public static final int JJTLITERAL_PATTERN = 662; + public static final int JJTTYPE_PARAMS = 663; + public static final int JJTTYPE_VAR = 664; + public static final int JJTTYPE_VAR_TUPLE = 665; + public static final int JJTTYPE_VAR_PARAM_SPEC = 666; } diff --git a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/jython/ast/ClassDef.java b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/jython/ast/ClassDef.java index b4d05b5ebe..74d80d1ba5 100644 --- a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/jython/ast/ClassDef.java +++ b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/jython/ast/ClassDef.java @@ -7,6 +7,7 @@ public final class ClassDef extends stmtType { public NameTokType name; + public type_params_suiteType type_params; public exprType[] bases; public stmtType[] body; public decoratorsType[] decs; @@ -18,9 +19,11 @@ public final class ClassDef extends stmtType { // Hack: nor anything else besides being a marker token). public ISpecialStr colonDefEnd; - public ClassDef(NameTokType name, exprType[] bases, stmtType[] body, decoratorsType[] decs, - keywordType[] keywords, exprType starargs, exprType kwargs) { + public ClassDef(NameTokType name, type_params_suiteType type_params, exprType[] bases, + stmtType[] body, decoratorsType[] decs, keywordType[] keywords, exprType starargs, exprType + kwargs) { this.name = name; + this.type_params = type_params; this.bases = bases; this.body = body; this.decs = decs; @@ -34,6 +37,7 @@ public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((name == null) ? 0 : name.hashCode()); + result = prime * result + ((type_params == null) ? 0 : type_params.hashCode()); result = prime * result + Arrays.hashCode(bases); result = prime * result + Arrays.hashCode(body); result = prime * result + Arrays.hashCode(decs); @@ -51,6 +55,8 @@ public boolean equals(Object obj) { ClassDef other = (ClassDef) obj; if (name == null) { if (other.name != null) return false;} else if (!name.equals(other.name)) return false; + if (type_params == null) { if (other.type_params != null) return false;} + else if (!type_params.equals(other.type_params)) return false; if (!Arrays.equals(bases, other.bases)) return false; if (!Arrays.equals(body, other.body)) return false; if (!Arrays.equals(decs, other.decs)) return false; @@ -107,7 +113,8 @@ public ClassDef createCopy(boolean copyComments) { new3 = this.keywords; } ClassDef temp = new ClassDef(name!=null?(NameTokType)name.createCopy(copyComments):null, - new0, new1, new2, new3, starargs!=null?(exprType)starargs.createCopy(copyComments):null, + type_params!=null?(type_params_suiteType)type_params.createCopy(copyComments):null, new0, + new1, new2, new3, starargs!=null?(exprType)starargs.createCopy(copyComments):null, kwargs!=null?(exprType)kwargs.createCopy(copyComments):null); temp.beginLine = this.beginLine; temp.beginColumn = this.beginColumn; @@ -136,6 +143,9 @@ public String toString() { sb.append("name="); sb.append(dumpThis(this.name)); sb.append(", "); + sb.append("type_params="); + sb.append(dumpThis(this.type_params)); + sb.append(", "); sb.append("bases="); sb.append(dumpThis(this.bases)); sb.append(", "); @@ -167,6 +177,9 @@ public void traverse(VisitorIF visitor) throws Exception { if (name != null) { name.accept(visitor); } + if (type_params != null) { + type_params.accept(visitor); + } if (bases != null) { for (int i = 0; i < bases.length; i++) { if (bases[i] != null) { diff --git a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/jython/ast/FunctionDef.java b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/jython/ast/FunctionDef.java index b656d183be..3c988f5645 100644 --- a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/jython/ast/FunctionDef.java +++ b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/jython/ast/FunctionDef.java @@ -8,6 +8,7 @@ public final class FunctionDef extends stmtType { public decoratorsType[] decs; public NameTokType name; + public type_params_suiteType type_params; public argumentsType args; public exprType returns; public stmtType[] body; @@ -17,10 +18,11 @@ public final class FunctionDef extends stmtType { // Hack: nor anything else besides being a marker token). public ISpecialStr colonDefEnd; - public FunctionDef(decoratorsType[] decs, NameTokType name, argumentsType args, exprType - returns, stmtType[] body, boolean async) { + public FunctionDef(decoratorsType[] decs, NameTokType name, type_params_suiteType type_params, + argumentsType args, exprType returns, stmtType[] body, boolean async) { this.decs = decs; this.name = name; + this.type_params = type_params; this.args = args; this.returns = returns; this.body = body; @@ -33,6 +35,7 @@ public int hashCode() { int result = 1; result = prime * result + Arrays.hashCode(decs); result = prime * result + ((name == null) ? 0 : name.hashCode()); + result = prime * result + ((type_params == null) ? 0 : type_params.hashCode()); result = prime * result + ((args == null) ? 0 : args.hashCode()); result = prime * result + ((returns == null) ? 0 : returns.hashCode()); result = prime * result + Arrays.hashCode(body); @@ -49,6 +52,8 @@ public boolean equals(Object obj) { if (!Arrays.equals(decs, other.decs)) return false; if (name == null) { if (other.name != null) return false;} else if (!name.equals(other.name)) return false; + if (type_params == null) { if (other.type_params != null) return false;} + else if (!type_params.equals(other.type_params)) return false; if (args == null) { if (other.args != null) return false;} else if (!args.equals(other.args)) return false; if (returns == null) { if (other.returns != null) return false;} @@ -84,6 +89,7 @@ public FunctionDef createCopy(boolean copyComments) { } FunctionDef temp = new FunctionDef(new0, name!=null?(NameTokType)name.createCopy(copyComments):null, + type_params!=null?(type_params_suiteType)type_params.createCopy(copyComments):null, args!=null?(argumentsType)args.createCopy(copyComments):null, returns!=null?(exprType)returns.createCopy(copyComments):null, new1, async); temp.beginLine = this.beginLine; @@ -116,6 +122,9 @@ public String toString() { sb.append("name="); sb.append(dumpThis(this.name)); sb.append(", "); + sb.append("type_params="); + sb.append(dumpThis(this.type_params)); + sb.append(", "); sb.append("args="); sb.append(dumpThis(this.args)); sb.append(", "); @@ -148,6 +157,9 @@ public void traverse(VisitorIF visitor) throws Exception { if (name != null) { name.accept(visitor); } + if (type_params != null) { + type_params.accept(visitor); + } if (args != null) { args.accept(visitor); } diff --git a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/jython/ast/ISimpleNodeSwitch.java b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/jython/ast/ISimpleNodeSwitch.java index 9771d09fad..5b27512976 100644 --- a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/jython/ast/ISimpleNodeSwitch.java +++ b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/jython/ast/ISimpleNodeSwitch.java @@ -8,6 +8,7 @@ public interface ISimpleNodeSwitch { public void visit(Expression node); public void visit(NameTok node); public void visit(Suite node); + public void visit(TypeParamsSuite node); public void visit(WithItem node); public void visit(FunctionDef node); public void visit(ClassDef node); @@ -72,4 +73,7 @@ public interface ISimpleNodeSwitch { public void visit(MatchKeyVal node); public void visit(MatchAs node); public void visit(MatchOr node); + public void visit(TypeVar node); + public void visit(ParamSpec node); + public void visit(TypeVarTuple node); } diff --git a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/jython/ast/ParamSpec.java b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/jython/ast/ParamSpec.java new file mode 100644 index 0000000000..32d022598d --- /dev/null +++ b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/jython/ast/ParamSpec.java @@ -0,0 +1,93 @@ +// Autogenerated AST node +package org.python.pydev.parser.jython.ast; + +import org.python.pydev.parser.jython.SimpleNode; +import java.util.Arrays; + +public final class ParamSpec extends type_paramType { + public NameTokType name; + public exprType defaultValue; + + public ParamSpec(NameTokType name, exprType defaultValue) { + this.name = name; + this.defaultValue = defaultValue; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((name == null) ? 0 : name.hashCode()); + result = prime * result + ((defaultValue == null) ? 0 : defaultValue.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) return true; + if (obj == null) return false; + if (getClass() != obj.getClass()) return false; + ParamSpec other = (ParamSpec) obj; + if (name == null) { if (other.name != null) return false;} + else if (!name.equals(other.name)) return false; + if (defaultValue == null) { if (other.defaultValue != null) return false;} + else if (!defaultValue.equals(other.defaultValue)) return false; + return true; + } + @Override + public ParamSpec createCopy() { + return createCopy(true); + } + @Override + public ParamSpec createCopy(boolean copyComments) { + ParamSpec temp = new ParamSpec(name!=null?(NameTokType)name.createCopy(copyComments):null, + defaultValue!=null?(exprType)defaultValue.createCopy(copyComments):null); + temp.beginLine = this.beginLine; + temp.beginColumn = this.beginColumn; + if(this.specialsBefore != null && copyComments){ + for(Object o:this.specialsBefore){ + if(o instanceof commentType){ + commentType commentType = (commentType) o; + temp.getSpecialsBefore().add(commentType.createCopy(copyComments)); + } + } + } + if(this.specialsAfter != null && copyComments){ + for(Object o:this.specialsAfter){ + if(o instanceof commentType){ + commentType commentType = (commentType) o; + temp.getSpecialsAfter().add(commentType.createCopy(copyComments)); + } + } + } + return temp; + } + + @Override + public String toString() { + StringBuffer sb = new StringBuffer("ParamSpec["); + sb.append("name="); + sb.append(dumpThis(this.name)); + sb.append(", "); + sb.append("defaultValue="); + sb.append(dumpThis(this.defaultValue)); + sb.append("]"); + return sb.toString(); + } + + @Override + public Object accept(VisitorIF visitor) throws Exception { + return visitor.visitParamSpec(this); + } + + @Override + public void traverse(VisitorIF visitor) throws Exception { + if (name != null) { + name.accept(visitor); + } + if (defaultValue != null) { + defaultValue.accept(visitor); + } + } + +} diff --git a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/jython/ast/Python.asdl b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/jython/ast/Python.asdl index 011cf4ac03..26f6af60fc 100644 --- a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/jython/ast/Python.asdl +++ b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/jython/ast/Python.asdl @@ -16,17 +16,18 @@ module Python NameTok = NameTok(identifier id, name_context ctx) - name_context = ClassName | FunctionName | KeywordName | ImportName | VarArg | KwArg | ImportModule | Attrib | GlobalName | NonLocalName + name_context = ClassName | FunctionName | KeywordName | ImportName | VarArg | KwArg | ImportModule | Attrib | GlobalName | NonLocalName | TypeVarName -- the body is an array of statements (this is not used for all constructs because initially the suite was 'inlined' -- in the constructs, but some information was lost in this way). suite = Suite(stmt* body) + type_params_suite = TypeParamsSuite(type_param* typeParams) --with item because the With() construct may have multiple items in the same construct in python 3.1 WithItem = WithItem(expr context_expr, expr? optional_vars) - stmt = FunctionDef(decorators* decs, NameTok name, arguments args, expr? returns, stmt* body, bool? async) - | ClassDef(NameTok name, expr* bases, stmt* body, decorators* decs, keyword* keywords, expr? starargs, expr? kwargs) + stmt = FunctionDef(decorators* decs, NameTok name, type_params_suite? type_params, arguments args, expr? returns, stmt* body, bool? async) + | ClassDef(NameTok name, type_params_suite? type_params, expr* bases, stmt* body, decorators* decs, keyword* keywords, expr? starargs, expr? kwargs) | Return(expr? value) | Delete(expr* targets) @@ -182,4 +183,10 @@ module Python | MatchOr(pattern* patterns) attributes (int lineno, int col_offset, int end_lineno, int end_col_offset) + + + type_param = TypeVar(NameTok name, expr? bound, expr? defaultValue) + | ParamSpec(NameTok name, expr? defaultValue) + | TypeVarTuple(NameTok name, expr? defaultValue) + attributes (int lineno, int col_offset, int end_lineno, int end_col_offset) } diff --git a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/jython/ast/TypeParamsSuite.java b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/jython/ast/TypeParamsSuite.java new file mode 100644 index 0000000000..c64a6321b6 --- /dev/null +++ b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/jython/ast/TypeParamsSuite.java @@ -0,0 +1,94 @@ +// Autogenerated AST node +package org.python.pydev.parser.jython.ast; + +import org.python.pydev.parser.jython.SimpleNode; +import java.util.Arrays; + +public final class TypeParamsSuite extends type_params_suiteType { + public type_paramType[] typeParams; + + public TypeParamsSuite(type_paramType[] typeParams) { + this.typeParams = typeParams; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + Arrays.hashCode(typeParams); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) return true; + if (obj == null) return false; + if (getClass() != obj.getClass()) return false; + TypeParamsSuite other = (TypeParamsSuite) obj; + if (!Arrays.equals(typeParams, other.typeParams)) return false; + return true; + } + @Override + public TypeParamsSuite createCopy() { + return createCopy(true); + } + @Override + public TypeParamsSuite createCopy(boolean copyComments) { + type_paramType[] new0; + if(this.typeParams != null){ + new0 = new type_paramType[this.typeParams.length]; + for(int i=0;i", @@ -26,5 +27,6 @@ public interface name_contextType { "Attrib", "GlobalName", "NonLocalName", + "TypeVarName", }; } diff --git a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/jython/ast/type_paramType.java b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/jython/ast/type_paramType.java new file mode 100644 index 0000000000..98811a1283 --- /dev/null +++ b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/jython/ast/type_paramType.java @@ -0,0 +1,8 @@ +// Autogenerated AST node +package org.python.pydev.parser.jython.ast; + +import org.python.pydev.parser.jython.SimpleNode; +import java.util.Arrays; + +public abstract class type_paramType extends SimpleNode { +} diff --git a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/jython/ast/type_params_suiteType.java b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/jython/ast/type_params_suiteType.java new file mode 100644 index 0000000000..6a2a382ede --- /dev/null +++ b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/jython/ast/type_params_suiteType.java @@ -0,0 +1,8 @@ +// Autogenerated AST node +package org.python.pydev.parser.jython.ast; + +import org.python.pydev.parser.jython.SimpleNode; +import java.util.Arrays; + +public abstract class type_params_suiteType extends SimpleNode { +} diff --git a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/prettyprinterv2/MakeAstValidForPrettyPrintingVisitor.java b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/prettyprinterv2/MakeAstValidForPrettyPrintingVisitor.java index cf232fe53c..638b157274 100644 --- a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/prettyprinterv2/MakeAstValidForPrettyPrintingVisitor.java +++ b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/prettyprinterv2/MakeAstValidForPrettyPrintingVisitor.java @@ -56,6 +56,7 @@ import org.python.pydev.parser.jython.ast.NameTok; import org.python.pydev.parser.jython.ast.NonLocal; import org.python.pydev.parser.jython.ast.Num; +import org.python.pydev.parser.jython.ast.ParamSpec; import org.python.pydev.parser.jython.ast.Pass; import org.python.pydev.parser.jython.ast.Print; import org.python.pydev.parser.jython.ast.Raise; @@ -72,6 +73,9 @@ import org.python.pydev.parser.jython.ast.TryExcept; import org.python.pydev.parser.jython.ast.TryFinally; import org.python.pydev.parser.jython.ast.Tuple; +import org.python.pydev.parser.jython.ast.TypeParamsSuite; +import org.python.pydev.parser.jython.ast.TypeVar; +import org.python.pydev.parser.jython.ast.TypeVarTuple; import org.python.pydev.parser.jython.ast.UnaryOp; import org.python.pydev.parser.jython.ast.VisitorBase; import org.python.pydev.parser.jython.ast.While; @@ -89,6 +93,7 @@ import org.python.pydev.parser.jython.ast.match_caseType; import org.python.pydev.parser.jython.ast.stmtType; import org.python.pydev.parser.jython.ast.suiteType; +import org.python.pydev.parser.jython.ast.type_paramType; public class MakeAstValidForPrettyPrintingVisitor extends VisitorBase { @@ -117,6 +122,42 @@ protected Object unhandled_node(SimpleNode node) throws Exception { throw new RuntimeException("Unhandled: " + node); } + @Override + public Object visitTypeVar(TypeVar node) throws Exception { + fixNode(node); + traverse(node); + fixAfterNode(node); + return null; + } + + @Override + public Object visitTypeVarTuple(TypeVarTuple node) throws Exception { + fixNode(node); + traverse(node); + fixAfterNode(node); + return null; + } + + @Override + public Object visitParamSpec(ParamSpec node) throws Exception { + fixNode(node); + traverse(node); + fixAfterNode(node); + return null; + } + + @Override + public Object visitTypeParamsSuite(TypeParamsSuite node) throws Exception { + fixNode(node); + this.pushInMultiline(); + if (node.typeParams != null && node.typeParams.length > 0) { + visitCommaSeparated(node.typeParams, true); + } + this.popInMultiline(); + fixAfterNode(node); + return null; + } + @Override public Object visitIndex(Index node) throws Exception { fixNode(node); @@ -419,6 +460,16 @@ private void visitCommaSeparated(exprType[] elts, boolean requireEndWithCommaSin } } + private void visitCommaSeparated(type_paramType[] elts, boolean requireEndWithCommaSingleElement) throws Exception { + if (elts != null) { + for (int i = 0; i < elts.length; i++) { + if (elts[i] != null) { + elts[i].accept(this); + } + } + } + } + @Override public Object visitList(List node) throws Exception { fixNode(node); @@ -845,6 +896,9 @@ public Object visitClassDef(ClassDef node) throws Exception { fixNode(node); node.name.accept(this); + if (node.type_params != null) { + node.type_params.accept(this); + } handleArguments(node.bases, node.keywords, node.starargs, node.kwargs); @@ -980,10 +1034,12 @@ public Object visitFunctionDef(FunctionDef node) throws Exception { fixNode(node); node.name.accept(this); - if (node.args != null) { + if (node.type_params != null) { + node.type_params.accept(this); + } + if (node.args != null) { handleArguments(node.args); - } // 'def' NAME parameters ['->' test] ':' suite diff --git a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/prettyprinterv2/PrettyPrinterDocV2.java b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/prettyprinterv2/PrettyPrinterDocV2.java index db0b1672d7..192501c470 100644 --- a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/prettyprinterv2/PrettyPrinterDocV2.java +++ b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/prettyprinterv2/PrettyPrinterDocV2.java @@ -27,7 +27,7 @@ /** * This document is the temporary structure we create to put on the tokens and the comments. - * + * * It's line oriented and we should fill it with all things in the proper place (and properly indented) so * that we can just make a simple print later on. */ @@ -186,12 +186,11 @@ public LinePartIndentMark addDedent(int emptyLinesRequiredAfterDedent) { @Override public String toString() { FastStringBuffer buf = new FastStringBuffer(); - buf.append("PrettyPrinterDocV2[\n"); Set> entrySet = linesToColAndContents.entrySet(); for (Entry entry : entrySet) { buf.append(entry.getKey() + ": " + entry.getValue() + "\n"); } - return "PrettyPrinterDocV2[" + buf + "]"; + return "PrettyPrinterDocV2<\n" + buf + "\n>"; } //------------ Changes Recording diff --git a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/prettyprinterv2/PrettyPrinterVisitorV2.java b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/prettyprinterv2/PrettyPrinterVisitorV2.java index a0f7f2484e..586c9d6c5d 100644 --- a/plugins/org.python.pydev.parser/src/org/python/pydev/parser/prettyprinterv2/PrettyPrinterVisitorV2.java +++ b/plugins/org.python.pydev.parser/src/org/python/pydev/parser/prettyprinterv2/PrettyPrinterVisitorV2.java @@ -53,6 +53,7 @@ import org.python.pydev.parser.jython.ast.NameTok; import org.python.pydev.parser.jython.ast.NonLocal; import org.python.pydev.parser.jython.ast.Num; +import org.python.pydev.parser.jython.ast.ParamSpec; import org.python.pydev.parser.jython.ast.Pass; import org.python.pydev.parser.jython.ast.Print; import org.python.pydev.parser.jython.ast.Raise; @@ -69,6 +70,9 @@ import org.python.pydev.parser.jython.ast.TryExcept; import org.python.pydev.parser.jython.ast.TryFinally; import org.python.pydev.parser.jython.ast.Tuple; +import org.python.pydev.parser.jython.ast.TypeParamsSuite; +import org.python.pydev.parser.jython.ast.TypeVar; +import org.python.pydev.parser.jython.ast.TypeVarTuple; import org.python.pydev.parser.jython.ast.UnaryOp; import org.python.pydev.parser.jython.ast.While; import org.python.pydev.parser.jython.ast.With; @@ -87,6 +91,7 @@ import org.python.pydev.parser.jython.ast.patternType; import org.python.pydev.parser.jython.ast.stmtType; import org.python.pydev.parser.jython.ast.suiteType; +import org.python.pydev.parser.jython.ast.type_paramType; import org.python.pydev.parser.visitors.NodeUtils; import org.python.pydev.shared_core.string.FastStringBuffer; @@ -350,6 +355,66 @@ private void visitCommaSeparated(exprType[] elts, boolean requireEndWithCommaSin } } + private void visitCommaSeparated(type_paramType[] elts, boolean requireEndWithCommaSingleElement) throws Exception { + if (elts != null) { + for (int i = 0; i < elts.length; i++) { + if (elts[i] != null) { + if (i > 0) { + doc.addRequire(",", lastNode); + } + elts[i].accept(this); + } + } + if (elts.length == 1 && requireEndWithCommaSingleElement) { + doc.addRequire(",", lastNode); + } + } + } + + @Override + public Object visitTypeParamsSuite(TypeParamsSuite node) throws Exception { + beforeNode(node); + this.pushTupleNeedsParens(); + doc.addRequire("[", node); + visitCommaSeparated(node.typeParams, false); + doc.addRequire("]", lastNode); + this.popTupleNeedsParens(); + afterNode(node); + return null; + } + + @Override + public Object visitTypeVar(TypeVar node) throws Exception { + beforeNode(node); + if (node.name != null) { + node.name.accept(this); + } + if (node.bound != null) { + doc.addRequire(":", node.bound); + node.bound.accept(this); + } + afterNode(node); + return null; + } + + @Override + public Object visitTypeVarTuple(TypeVarTuple node) throws Exception { + beforeNode(node); + doc.addRequire("*", node); + node.accept(this); + afterNode(node); + return null; + } + + @Override + public Object visitParamSpec(ParamSpec node) throws Exception { + beforeNode(node); + doc.addRequire("**", node); + node.accept(this); + afterNode(node); + return null; + } + @Override public Object visitList(List node) throws Exception { beforeNode(node); @@ -981,6 +1046,10 @@ public Object visitClassDef(ClassDef node) throws Exception { doc.add(node.name.beginLine, node.beginColumn, "class", node); node.name.accept(this); + if (node.type_params != null) { + node.type_params.accept(this); + } + int id = this.doc.pushRecordChanges(); this.pushTupleNeedsParens(); handleArguments(node.bases, node.keywords, node.starargs, node.kwargs); @@ -1168,6 +1237,10 @@ public Object visitFunctionDef(FunctionDef node) throws Exception { doc.add(node.name.beginLine, node.beginColumn, "def", node); node.name.accept(this); + if (node.type_params != null) { + node.type_params.accept(this); + } + doc.addRequire("(", lastNode); if (node.args != null) { this.pushTupleNeedsParens(); diff --git a/plugins/org.python.pydev.parser/tests/org/python/pydev/parser/PyParser312Test.java b/plugins/org.python.pydev.parser/tests/org/python/pydev/parser/PyParser312Test.java index b8f68c46d4..933d1e7847 100644 --- a/plugins/org.python.pydev.parser/tests/org/python/pydev/parser/PyParser312Test.java +++ b/plugins/org.python.pydev.parser/tests/org/python/pydev/parser/PyParser312Test.java @@ -32,13 +32,26 @@ public void testFStrings() { } + public void testTypeVarSyntaxClass() { + String s = """ + class myclass[T, Y:str]: + pass + """; + parseLegalDocStr(s); + } + public void testTypeVarSyntax() { String s = """ - def f312[T](e: T) -> None: ... - print(f312) + def f312[T, Y:str](e: T) -> None: ... """; - // TODO: Support this! - // parseLegalDocStr(s); + parseLegalDocStr(s); + } + + public void testTypeVarSyntax2() { + String s = """ + def f312[*X, **Y](e: T) -> None: ... + """; + parseLegalDocStr(s); } } diff --git a/plugins/org.python.pydev.parser/tests/org/python/pydev/parser/prettyprinter/PrettyPrinter312Test.java b/plugins/org.python.pydev.parser/tests/org/python/pydev/parser/prettyprinter/PrettyPrinter312Test.java new file mode 100644 index 0000000000..5751703b57 --- /dev/null +++ b/plugins/org.python.pydev.parser/tests/org/python/pydev/parser/prettyprinter/PrettyPrinter312Test.java @@ -0,0 +1,41 @@ +package org.python.pydev.parser.prettyprinter; + +import org.python.pydev.core.IGrammarVersionProvider; + +public class PrettyPrinter312Test extends AbstractPrettyPrinterTestBase { + + public static void main(String[] args) { + try { + DEBUG = true; + PrettyPrinter312Test test = new PrettyPrinter312Test(); + test.setUp(); + test.tearDown(); + System.out.println("Finished"); + junit.textui.TestRunner.run(PrettyPrinter312Test.class); + } catch (Throwable e) { + e.printStackTrace(); + } + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + setDefaultVersion(IGrammarVersionProvider.GRAMMAR_PYTHON_VERSION_3_12); + } + + public void testTypeVar() { + String s = """ + def f312[T,Y:str](argument:T)->None: + pass + """; + checkPrettyPrintEqual(s); + } + + public void testTypeVarInClass() { + String s = """ + class f312[T,Y:str]: + pass + """; + checkPrettyPrintEqual(s); + } +} \ No newline at end of file diff --git a/plugins/org.python.pydev/tests_analysis/com/python/pydev/analysis/additionalinfo/AdditionalInterpreterInfoTest.java b/plugins/org.python.pydev/tests_analysis/com/python/pydev/analysis/additionalinfo/AdditionalInterpreterInfoTest.java index a393001932..6f62dab1f0 100644 --- a/plugins/org.python.pydev/tests_analysis/com/python/pydev/analysis/additionalinfo/AdditionalInterpreterInfoTest.java +++ b/plugins/org.python.pydev/tests_analysis/com/python/pydev/analysis/additionalinfo/AdditionalInterpreterInfoTest.java @@ -419,7 +419,8 @@ private void checkItertoolsToken(AbstractAdditionalDependencyInfo additionalSyst } private ClassDef createClassDef(String name) { - return new ClassDef(new NameTok(name, NameTok.FunctionName), null, null, null, null, null, null); + return new ClassDef(new NameTok(name, NameTok.FunctionName), null, null, null, + null, null, null, null); } private IInfo assertIsIn(String req, Collection tokensStartingWith) {