Rule solitarySymbol(char c) { return Sequence(Ch(c), TestNot(Ch(c))); } }
Rule solitarySymbol(char c) { return Sequence(Ch(c), TestNot(Ch(c))); } }
Rule solitarySymbol(char c) { return Sequence(Ch(c), TestNot(Ch(c))); } }
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 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))); }
/** * P13 * * @see <a href="http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#15.25">JLS section 15.25</a> */ Rule inlineIfExpressionChaining() { return Sequence( conditionalOrExpressionChaining().label("head"), set(), Optional( Sequence( Sequence(Ch('?'), TestNot(FirstOf(Ch('.'), Ch(':'), Ch('?')))).label("operator1"), group.basics.optWS(), assignmentExpressionChaining().label("tail1"), Ch(':').label("operator2"), group.basics.optWS(), inlineIfExpressionChaining().label("tail2") )), set(actions.createInlineIfExpression(value("head"), node("Optional/Sequence/operator1"), node("Optional/Sequence/operator2"), value("Optional/Sequence/tail1"), value("Optional/Sequence/tail2"))), group.basics.optWS()); }
/** * P13 * * @see <a href="http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#15.25">JLS section 15.25</a> */ Rule inlineIfExpressionChaining() { return Sequence( conditionalOrExpressionChaining().label("head"), set(), Optional( Sequence( Sequence(Ch('?'), TestNot(FirstOf(Ch('.'), Ch(':'), Ch('?')))).label("operator1"), group.basics.optWS(), assignmentExpressionChaining().label("tail1"), Ch(':').label("operator2"), group.basics.optWS(), inlineIfExpressionChaining().label("tail2") )), set(actions.createInlineIfExpression(value("head"), node("Optional/Sequence/operator1"), node("Optional/Sequence/operator2"), value("Optional/Sequence/tail1"), value("Optional/Sequence/tail2"))), group.basics.optWS()); }
/** * P13 * * @see <a href="http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#15.25">JLS section 15.25</a> */ Rule inlineIfExpressionChaining() { return Sequence( conditionalOrExpressionChaining().label("head"), set(), Optional( Sequence( Sequence(Ch('?'), TestNot(FirstOf(Ch('.'), Ch(':'), Ch('?')))).label("operator1"), group.basics.optWS(), assignmentExpressionChaining().label("tail1"), Ch(':').label("operator2"), group.basics.optWS(), inlineIfExpressionChaining().label("tail2") )), set(actions.createInlineIfExpression(value("head"), node("Optional/Sequence/operator1"), node("Optional/Sequence/operator2"), value("Optional/Sequence/tail1"), value("Optional/Sequence/tail2"))), group.basics.optWS()); }
/** * P2 */ Rule level2ExpressionChaining() { return FirstOf( Sequence( FirstOf( String("++"), String("--"), Ch('!'), Ch('~'), solitarySymbol('+'), solitarySymbol('-'), Sequence( Ch('('), group.basics.optWS(), group.types.type().label("type"), Ch(')'), TestNot(Sequence( actions.typeIsAlsoLegalAsExpression(UP(UP(value("type")))), group.basics.optWS(), FirstOf(solitarySymbol('+'), solitarySymbol('-'))))).label("cast") ).label("operator"), group.basics.optWS(), level2ExpressionChaining().label("operand"), set(), set(actions.createUnaryPrefixExpression(value("operand"), node("operator"), text("operator")))), Sequence(postfixIncrementExpressionChaining(), set())); }