/** * P3 * * @see <a href="http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#15.17">JLS section 15.17</a> */ Rule multiplicativeExpressionChaining() { return forLeftAssociativeBinaryExpression("exprMultiplicative", FirstOf(Ch('*'), solitarySymbol('/'), Ch('%')), level2ExpressionChaining()); }
/** * P3 * * @see <a href="http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#15.17">JLS section 15.17</a> */ Rule multiplicativeExpressionChaining() { return forLeftAssociativeBinaryExpression("exprMultiplicative", FirstOf(Ch('*'), solitarySymbol('/'), Ch('%')), level2ExpressionChaining()); }
/** * P3 * * @see <a href="http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#15.17">JLS section 15.17</a> */ Rule multiplicativeExpressionChaining() { return forLeftAssociativeBinaryExpression("exprMultiplicative", FirstOf(Ch('*'), solitarySymbol('/'), Ch('%')), level2ExpressionChaining()); }
public Rule arrayInitializer() { return Sequence( Ch('{'), group.basics.optWS(), Optional(Sequence( FirstOf(arrayInitializer(), anyExpression()).label("head"), ZeroOrMore(Sequence( Ch(','), group.basics.optWS(), FirstOf(arrayInitializer(), anyExpression()).label("tail"))), Optional(Ch(',')), group.basics.optWS())), Ch('}'), group.basics.optWS(), set(actions.createArrayInitializerExpression(value("Optional/Sequence/head"), values("Optional/Sequence/ZeroOrMore/Sequence/tail")))); }
public Rule arrayInitializer() { return Sequence( Ch('{'), group.basics.optWS(), Optional(Sequence( FirstOf(arrayInitializer(), anyExpression()).label("head"), ZeroOrMore(Sequence( Ch(','), group.basics.optWS(), FirstOf(arrayInitializer(), anyExpression()).label("tail"))), Optional(Ch(',')), group.basics.optWS())), Ch('}'), group.basics.optWS(), set(actions.createArrayInitializerExpression(value("Optional/Sequence/head"), values("Optional/Sequence/ZeroOrMore/Sequence/tail")))); }
Rule select() { return Sequence( group.basics.dotIdentifier().label("identifier"), TestNot(Ch('(')), set(actions.createSelectOperation(value("identifier")))); }
Rule select() { return Sequence( group.basics.dotIdentifier().label("identifier"), TestNot(Ch('(')), set(actions.createSelectOperation(value("identifier")))); }
Rule select() { return Sequence( group.basics.dotIdentifier().label("identifier"), TestNot(Ch('(')), set(actions.createSelectOperation(value("identifier")))); }
Rule unqualifiedThisOrSuperLiteral() { return Sequence( FirstOf(String("this"), String("super")).label("thisOrSuper"), group.basics.testLexBreak(), group.basics.optWS(), TestNot(Ch('(')), set(actions.createThisOrSuperOrClass(null, text("thisOrSuper"), null))); }
Rule unqualifiedThisOrSuperLiteral() { return Sequence( FirstOf(String("this"), String("super")).label("thisOrSuper"), group.basics.testLexBreak(), group.basics.optWS(), TestNot(Ch('(')), set(actions.createThisOrSuperOrClass(null, text("thisOrSuper"), null))); }
Rule methodInvocationWithTypeArgsOperation() { return Sequence( Ch('.').label("dot"), group.basics.optWS(), group.types.typeArguments().label("typeArguments"), group.basics.identifier().label("name"), group.structures.methodArguments().label("methodArguments"), set(actions.createMethodInvocationOperation(node("dot"), value("typeArguments"), value("name"), value("methodArguments")))); }
Rule methodInvocationWithTypeArgsOperation() { return Sequence( Ch('.').label("dot"), group.basics.optWS(), group.types.typeArguments().label("typeArguments"), group.basics.identifier().label("name"), group.structures.methodArguments().label("methodArguments"), set(actions.createMethodInvocationOperation(node("dot"), value("typeArguments"), value("name"), value("methodArguments")))); }
Rule methodInvocationWithTypeArgsOperation() { return Sequence( Ch('.').label("dot"), group.basics.optWS(), group.types.typeArguments().label("typeArguments"), group.basics.identifier().label("name"), group.structures.methodArguments().label("methodArguments"), set(actions.createMethodInvocationOperation(node("dot"), value("typeArguments"), value("name"), value("methodArguments")))); }
/** * @see <a href="http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.8.2">JLS section 15.8.2</a> */ Rule qualifiedClassOrThisOrSuperLiteral() { return Sequence( group.types.type().label("type"), Ch('.').label("dot"), group.basics.optWS(), FirstOf(String("this"), String("super"), String("class")).label("thisOrSuperOrClass"), group.basics.testLexBreak(), group.basics.optWS(), set(actions.createThisOrSuperOrClass(node("dot"), text("thisOrSuperOrClass"), value("type")))); }