⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 java.pars

📁 linux 下的源代码分析阅读器 red hat公司新版
💻 PARS
📖 第 1 页 / 共 3 页
字号:
		{ tree := munary ('++':Position, cExpression:tree, post_incr); } .		= cExpression '--' PREC POST_OP		{ tree := munary ('--':Position, cExpression:tree, post_decr); } .		= MethodInvocation .		= ClassInstanceCreationExpression .> .SwitchBlock	= <		= '{' '}'		{ tree := dnoswitch; } .		= '{' SwitchBlockStatementGroups '}'		{ tree := ReverseTree (SwitchBlockStatementGroups:tree); } .		= '{' SwitchLabels '}'		{ tree := ReverseTree (mswitch_ (dnoswitch,			ReverseTree (SwitchLabels:tree), dnostatement)); } .		= '{' SwitchBlockStatementGroups SwitchLabels '}'		{ tree := ReverseTree (mswitch_ (SwitchBlockStatementGroups:tree,			ReverseTree (SwitchLabels:tree), dnostatement)); } .> .SwitchBlockStatementGroups	= <		= SwitchBlockStatementGroup		{ tree := { tree = SwitchBlockStatementGroup:tree;			tree->switch_.next = dnoswitch; }; } .		= SwitchBlockStatementGroups SwitchBlockStatementGroup		{ tree := { tree = SwitchBlockStatementGroup:tree;		    tree->switch_.next = SwitchBlockStatementGroups:tree; }; } .> .SwitchBlockStatementGroup	= SwitchLabels BlockStatements		{ tree := mswitch_ (NoTree, ReverseTree (SwitchLabels:tree), ReverseTree (BlockStatements:tree)); } .SwitchLabels	= <		= SwitchLabel		{ tree := mexpression (dnoexpression_l, SwitchLabel:tree); } .		= SwitchLabels SwitchLabel		{ tree := mexpression (SwitchLabels:tree, SwitchLabel:tree); } .> .SwitchLabel	= <		= case ConstantExpression: Expression ':' .		= default ':'		{ tree := dnoexpression; } .> .ForInit		= <		=		{ tree := dnostatement; } .		= StatementExpressionList		{ tree := ReverseTree (StatementExpressionList:tree); } .		= LocalVariableDeclaration		{ tree := mstatement (dnostatement, LocalVariableDeclaration:tree); } .> .ExpressionOpt	= <		=		{ tree := dnoexpression; } .		= Expression .> .ForUpdate	= <		=		{ tree := dnostatement; } .		= StatementExpressionList		{ tree := ReverseTree (StatementExpressionList:tree); } .> .StatementExpressionList	= <		= StatementExpression		{ tree := mstatement (dnostatement,			mexpression_stmt (StatementExpression:tree)); } .		= StatementExpressionList ',' StatementExpression		{ tree := mstatement (StatementExpressionList:tree,			mexpression_stmt (StatementExpression:tree)); } .> .CatchesOpt	= <		=		{ tree := dnocatch; } .		= Catches		{ tree := ReverseTree (Catches:tree); } .> .Catches		= <		= CatchClause		{ tree := { tree = CatchClause:tree;			tree->catch.next = dnocatch; }; } .		= Catches CatchClause		{ tree := { tree = CatchClause:tree;			tree->catch.next = Catches:tree; }; } .> .CatchClause	= catch '(' FormalParameter ')' Block		{ tree := { FormalParameter:tree->parameter.next = dnodecl;			tree = mcatch (NoTree, FormalParameter:tree, Block:tree); }; } .Finally		= finally Block .Primary		= <   PrimaryNoNewArray	= <      Literal		= <		= IntegerLiteral		{ tree := mint_literal (IntegerLiteral:Position, IntegerLiteral:value); } .		= LongLiteral		{ tree := mlong_literal (LongLiteral:Position, LongLiteral:value); } .		= FloatingPointLiteral		{ tree := mfloat_literal (FloatingPointLiteral:Position, FloatingPointLiteral:value); } .		= DoubleLiteral		{ tree := mfloat_literal (DoubleLiteral:Position, DoubleLiteral:value); } .		= CharacterLiteral		{ tree := mchar_literal (CharacterLiteral:Position, CharacterLiteral:value); } .		= StringLiteral		{ tree := mstring_literal (StringLiteral:Position, StringLiteral:value); } .	 BooleanLiteral	= <		= true		{ tree := mbool_literal (true:Position, rtrue); } .		= false		{ tree := mbool_literal (false:Position, rfalse); } .	 > .	 NullLiteral	= null		{ tree := mnull (null:Position); } .      > .		= this		{ tree := mthis (this:Position); } .		= '(' Expression ')' .      ClassInstanceCreationExpression		= new ClassType '(' ArgumentListOpt ')'		{ tree := mnew (new:Position, ClassType:tree, dnotype,			ArgumentListOpt:tree, dnoexpression); } .      AnonymousClass		= new ClassType '(' ArgumentListOpt ')'		{ => if (hl >= 0) push (i_anonymous); }		  ClassBody		{ tree := manonymous (new:Position, ClassType:tree,			ArgumentListOpt:tree, ClassBody:tree);		  => if (hl >= 0) pop (); } .      FieldAccess	= <		= Primary '.' Identifier		{ tree := mselect (Identifier:Position, Primary:tree, Identifier:ident); } .		= super '.' Identifier		{ tree := mselect (Identifier:Position, msuper (super:Position), Identifier:ident); } .      > .		= Name '.' class		{ tree := mget_class_of_expr (class:Position, Name:tree); } .		= super '.' class		{ tree := mget_class_of_expr (class:Position, msuper (super:Position)); } .		= PrimitiveType '.' class		{ tree := mget_class (class:Position, PrimitiveType:tree); } .		= void '.' class		{ tree := mget_class (class:Position, msimple_type (t_void)); } .		= Name '.' this		{ tree := mget_class_of_expr (this:Position, Name:tree); } .		= super '.' this		{ tree := mget_class_of_expr (this:Position, msuper (super:Position)); } .		= PrimitiveType '.' this		{ tree := mget_class (this:Position, PrimitiveType:tree); } .		= void '.' this		{ tree := mget_class (this:Position, msimple_type (t_void)); } .      MethodInvocation	= <		= Name '(' ArgumentListOpt ')'		{ tree := mcall ('(':Position, Name:tree, ArgumentListOpt:tree); } .		= Primary '.' Identifier '(' ArgumentListOpt ')'		{ tree := mcall ('(':Position, mselect (Identifier:Position,		     Primary:tree, Identifier:ident), ArgumentListOpt:tree); } .		= super '.' Identifier '(' ArgumentListOpt ')'		{ tree := mcall ('(':Position, mselect (Identifier:Position,		     msuper (super:Position), Identifier:ident), ArgumentListOpt:tree); } .      > .      ArrayAccess	= <		= Name '[' Expression ']'		{ tree := msubscript ('[':Position, Name:tree, Expression:tree); } .		= PrimaryNoNewArray '[' Expression ']'		{ tree := msubscript ('[':Position, PrimaryNoNewArray:tree, Expression:tree); } .      > .   > .   ArrayCreationExpression	= <		= new PrimitiveType DimExprs ArrayInitializerOpt		{ tree := mnew (new:Position, PrimitiveType:tree,			dnotype, ReverseTree (DimExprs:tree),			ArrayInitializerOpt:tree); } .		= new PrimitiveType DimExprs Dims ArrayInitializerOpt		{ tree := mnew (new:Position, PrimitiveType:tree,			Dims:tree, ReverseTree (DimExprs:tree),			ArrayInitializerOpt:tree); } .		= new PrimitiveType Dims ArrayInitializer		{ tree := mnew (new:Position, PrimitiveType:tree,			Dims:tree, dnoexpression_l, ArrayInitializer:tree); } .		= new ClassOrInterfaceType DimExprs ArrayInitializerOpt		{ tree := mnew (new:Position, ClassOrInterfaceType:tree,			dnotype, ReverseTree (DimExprs:tree),			ArrayInitializerOpt:tree); } .		= new ClassOrInterfaceType DimExprs Dims ArrayInitializerOpt		{ tree := mnew (new:Position, ClassOrInterfaceType:tree,			Dims:tree, ReverseTree (DimExprs:tree),			ArrayInitializerOpt:tree); } .		= new ClassOrInterfaceType Dims ArrayInitializer		{ tree := mnew (new:Position, ClassOrInterfaceType:tree,			Dims:tree, dnoexpression_l, ArrayInitializer:tree); } .   > .> .DimExprs	= <		= DimExpr		{ tree := mexpression (dnoexpression_l, DimExpr:tree); } .		= DimExprs DimExpr		{ tree := mexpression (DimExprs:tree, DimExpr:tree); } .> .DimExpr		= '[' Expression ']' .Dims		= <		= '[' ']'		{ tree := marray_type (dnotype); } .		= Dims '[' ']'		{ tree := marray_type (Dims:tree); } .> .ArgumentListOpt	= <		=		{ tree := dnoexpression_l; } .		= ArgumentList		{ tree := ReverseTree (ArgumentList:tree); } .> .ArgumentList	= <		= Expression		{ tree := mexpression (dnoexpression_l, Expression:tree); } .		= ArgumentList ',' Expression		{ tree := mexpression (ArgumentList:tree, Expression:tree); } .> .cExpression	= <		= Primary .		= Name .		= cExpression '++' PREC POST_OP		{ tree := munary ('++':Position, cExpression:tree, post_incr); } .		= cExpression '--' PREC POST_OP		{ tree := munary ('--':Position, cExpression:tree, post_decr); } .		= '++' cExpression		{ tree := munary ('++':Position, cExpression:tree, pre_incr); } .		= '--' cExpression		{ tree := munary ('--':Position, cExpression:tree, pre_decr); } .		= '+' cExpression PREC UNARY_OP		{ tree := munary ('+':Position, cExpression:tree, plus); } .		= '-' cExpression PREC UNARY_OP		{ tree := munary ('-':Position, cExpression:tree, negate); } .		= '~' cExpression		{ tree := munary ('~':Position, cExpression:tree, complement); } .		= '!' cExpression		{ tree := munary ('!':Position, cExpression:tree, not); } .   CastExpression	= <		= '(' PrimitiveType ')' cExpression PREC CAST		{ tree := mtype_cast ('(':Position, PrimitiveType:tree,			dnotype, cExpression:tree); } .		= '(' PrimitiveType Dims ')' cExpression PREC CAST		{ tree := mtype_cast ('(':Position, PrimitiveType:tree,			Dims:tree, cExpression:tree); } .		= '(' Expression ')' e2: cExpression PREC CAST		{ tree := mtype_cast ('(':Position, mnamed_type (Expression:tree),			dnotype, e2:tree); } .		= '(' Name Dims ')' cExpression PREC CAST		{ tree := mtype_cast ('(':Position, mnamed_type (Name:tree),			Dims:tree, cExpression:tree); } .   > .		= cExpression '*'   e2: cExpression		{ tree := mbinary ('*':Position, cExpression:tree, e2:tree, times); } .		= cExpression '/'   e2: cExpression		{ tree := mbinary ('/':Position, cExpression:tree, e2:tree, divide); } .		= cExpression '%'   e2: cExpression		{ tree := mbinary ('%':Position, cExpression:tree, e2:tree, modulo); } .		= cExpression '+'   e2: cExpression		{ tree := mbinary ('+':Position, cExpression:tree, e2:tree, plus); } .		= cExpression '-'   e2: cExpression		{ tree := mbinary ('-':Position, cExpression:tree, e2:tree, minus); } .		= cExpression '<<'  e2: cExpression		{ tree := mbinary ('<<':Position, cExpression:tree, e2:tree, lshift); } .		= cExpression '>>'  e2: cExpression		{ tree := mbinary ('>>':Position, cExpression:tree, e2:tree, rshift); } .		= cExpression '>>>' e2: cExpression		{ tree := mbinary ('>>>':Position, cExpression:tree, e2:tree, us_rshift); } .		= cExpression '<'   e2: cExpression		{ tree := mbinary ('<':Position, cExpression:tree, e2:tree, less); } .		= cExpression '>'   e2: cExpression		{ tree := mbinary ('>':Position, cExpression:tree, e2:tree, greater); } .		= cExpression '<='  e2: cExpression		{ tree := mbinary ('<=':Position, cExpression:tree, e2:tree, less_equal); } .		= cExpression '>='  e2: cExpression		{ tree := mbinary ('>=':Position, cExpression:tree, e2:tree, greater_equal); } .		= cExpression instanceof ReferenceType		{ tree := mtype_compare (instanceof:Position, cExpression:tree, ReferenceType:tree); } .		= cExpression '=='  e2: cExpression		{ tree := mbinary ('==':Position, cExpression:tree, e2:tree, equal); } .		= cExpression '!='  e2: cExpression		{ tree := mbinary ('!=':Position, cExpression:tree, e2:tree, not_equal); } .		= cExpression '&'   e2: cExpression		{ tree := mbinary ('&':Position, cExpression:tree, e2:tree, and); } .		= cExpression '^'   e2: cExpression		{ tree := mbinary ('^':Position, cExpression:tree, e2:tree, xor); } .		= cExpression '|'   e2: cExpression		{ tree := mbinary ('|':Position, cExpression:tree, e2:tree, or); } .		= cExpression '&&'  e2: cExpression		{ tree := mbinary ('&&':Position, cExpression:tree, e2:tree, and_and); } .		= cExpression '||'  e2: cExpression		{ tree := mbinary ('||':Position, cExpression:tree, e2:tree, or_or); } .		= cExpression '?'   e2: Expression ':' e3: cExpression		{ tree := mconditional ('?':Position, cExpression:tree, e2:tree, e3:tree); } .> .Expression	= <   AssignmentExpression	= <      ConditionalExpression	= cExpression .      Assignment	= LeftHandSide AssignmentOperator Expression		{ tree := massign (AssignmentOperator:Position, LeftHandSide:tree,			Expression:tree, AssignmentOperator:operator); } .   > .> .LeftHandSide	= <		= Name .		= FieldAccess .		= ArrayAccess .> .AssignmentOperator	 = <		= '='		{ operator := assignment; } .		= '*='		{ operator := times	; } .		= '/='		{ operator := divide	; } .		= '%='		{ operator := modulo	; } .		= '+='		{ operator := plus	; } .		= '-='		{ operator := minus	; } .		= '<<='		{ operator := lshift	; } .		= '>>='		{ operator := rshift	; } .		= '>>>='	{ operator := us_rshift	; } .		= '&='		{ operator := and	; } .		= '^='		{ operator := xor	; } .		= '|='		{ operator := or	; } .> .Identifier	: [ident: tIdent	] { ident := NoIdent		; } .IntegerLiteral	: [value: long		] { value := 0			; } .LongLiteral	: [value: long		] { value := 0			; } .FloatingPointLiteral		: [value: tStringRef	] { value := PutString ("", 0)	; } .DoubleLiteral	: [value: tStringRef	] { value := PutString ("", 0)	; } .CharacterLiteral: [value: tStringRef	] { value := PutString ("", 0)	; } .StringLiteral	: [value: tStringRef	] { value := PutString ("", 0)	; } .MODULE attributesPROPERTY SYNDECLAREArgumentListArgumentListOptArrayInitializerOptArrayTypeBlockBlockStatementBlockStatementsCatchClauseCatchesCatchesOptClassBodyClassBodyDeclarationClassBodyDeclarationsClassDeclarationClassInitializerClassOrInterfaceTypeClassTypeClassTypeListConstructorBodyConstructorDeclarationConstructorDeclaratorDimExprDimExprsDimsExplicitConstructorInvocationExpressionExpressionOptExtendsInterfacesExtendsInterfacesOptFieldDeclarationFinallyForInitForUpdateFormalParameterFormalParameterListFormalParameterListOptImportDeclarationImportDeclarationsInterfaceBodyInterfaceDeclarationInterfaceMemberDeclarationInterfaceMemberDeclarationsInterfaceTypeInterfaceTypeListInterfacesLeftHandSideLocalVariableDeclarationLocalVariableDeclaratorLocalVariableDeclaratorsMethodBodyMethodDeclarationMethodDeclaratorMethodHeaderNamePackageDeclarationPrimaryPrimitiveTypeReferenceTypeStatementExpressionStatementExpressionListStatementNoShortIfStatementWithoutTrailingSubstatementSuperSwitchBlockSwitchBlockStatementGroupSwitchBlockStatementGroupsSwitchLabelSwitchLabelsThrowsOptTypeTypeDeclarationTypeDeclarationsVariableDeclaratorVariableDeclaratorIdVariableDeclaratorsVariableInitializerVariableInitializerOptVariableInitializersVariableInitializersOptcExpression			= [tree: tTree] .ModifierModifiers		= [attr: long] .BlockMethodBodyConstructorBodyInterfaceBodyClassBody		= [epos: tPosition] .ConstructorDeclaratorVariableDeclaratorId	= [ident: tIdent] [Position: tPosition] .MethodDeclaratorMethodHeader		= [ident: tIdent] [Position: tPosition] [array: tTree] .MethodHeader		= [attr: long] [type: tTree] [throws: tTree] .ClassTypeClassOrInterfaceTypeName			= [bpos: tPosition] [epos: tPosition] .AssignmentOperator	= [operator: int] [Position: tPosition] .END attributes

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -