Modified: velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/parser/ParserTreeConstants.java URL: http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/parser/ParserTreeConstants.java?rev=752697&r1=752696&r2=752697&view=diff ============================================================================== --- velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/parser/ParserTreeConstants.java (original) +++ velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/parser/ParserTreeConstants.java Wed Mar 11 23:45:28 2009 @@ -1,5 +1,4 @@ -/* Generated By:JJTree: Do not edit this line. ParserTreeConstants.java */ - +/* Generated By:JavaCC: Do not edit this line. ParserTreeConstants.java Version 4.1 */ package org.apache.velocity.runtime.parser; public interface ParserTreeConstants @@ -31,24 +30,22 @@ public int JJTELSESTATEMENT = 24; public int JJTELSEIFSTATEMENT = 25; public int JJTSETDIRECTIVE = 26; - public int JJTLOCALDIRECTIVE = 27; - public int JJTGLOBALDIRECTIVE = 28; - public int JJTEXPRESSION = 29; - public int JJTASSIGNMENT = 30; - public int JJTORNODE = 31; - public int JJTANDNODE = 32; - public int JJTEQNODE = 33; - public int JJTNENODE = 34; - public int JJTLTNODE = 35; - public int JJTGTNODE = 36; - public int JJTLENODE = 37; - public int JJTGENODE = 38; - public int JJTADDNODE = 39; - public int JJTSUBTRACTNODE = 40; - public int JJTMULNODE = 41; - public int JJTDIVNODE = 42; - public int JJTMODNODE = 43; - public int JJTNOTNODE = 44; + public int JJTEXPRESSION = 27; + public int JJTASSIGNMENT = 28; + public int JJTORNODE = 29; + public int JJTANDNODE = 30; + public int JJTEQNODE = 31; + public int JJTNENODE = 32; + public int JJTLTNODE = 33; + public int JJTGTNODE = 34; + public int JJTLENODE = 35; + public int JJTGENODE = 36; + public int JJTADDNODE = 37; + public int JJTSUBTRACTNODE = 38; + public int JJTMULNODE = 39; + public int JJTDIVNODE = 40; + public int JJTMODNODE = 41; + public int JJTNOTNODE = 42; public String[] jjtNodeName = { @@ -79,8 +76,6 @@ "ElseStatement", "ElseIfStatement", "SetDirective", - "LocalDirective", - "GlobalDirective", "Expression", "Assignment", "OrNode", @@ -99,3 +94,4 @@ "NotNode", }; } +/* JavaCC - OriginalChecksum=261582fb47ac551da00f57bcc11d78b6 (do not edit this line) */
Modified: velocity/engine/branches/2.0_Exp/src/parser/Parser.jjt URL: http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/parser/Parser.jjt?rev=752697&r1=752696&r2=752697&view=diff ============================================================================== --- velocity/engine/branches/2.0_Exp/src/parser/Parser.jjt (original) +++ velocity/engine/branches/2.0_Exp/src/parser/Parser.jjt Wed Mar 11 23:45:28 2009 @@ -744,79 +744,6 @@ } } - -<DEFAULT, REFERENCE, REFMODIFIER, REFMOD2> -TOKEN: -{ - <LOCAL_DIRECTIVE: (" "|"\t")* ("#local" | "#{local}") (" ")* "("> - { - if (! inComment) - { - inDirective = true; - - if ( debugPrint ) - System.out.print("#local : going to " + DIRECTIVE ); - - stateStackPush(); - inSet = true; - SwitchTo(DIRECTIVE); - } - - /* - * need the LPAREN action - */ - - if (!inComment) - { - lparen++; - - /* - * If in REFERENCE and we have seen the dot, then move - * to REFMOD2 -> Modifier() - */ - - if (curLexState == REFMODIFIER ) - SwitchTo( REFMOD2 ); - } - } -} - -<DEFAULT, REFERENCE, REFMODIFIER, REFMOD2> -TOKEN: -{ - <GLOBAL_DIRECTIVE: (" "|"\t")* ("#global" | "#{global}") (" ")* "("> - { - if (! inComment) - { - inDirective = true; - - if ( debugPrint ) - System.out.print("#global : going to " + DIRECTIVE ); - - stateStackPush(); - inSet = true; - SwitchTo(DIRECTIVE); - } - - /* - * need the LPAREN action - */ - - if (!inComment) - { - lparen++; - - /* - * If in REFERENCE and we have seen the dot, then move - * to REFMOD2 -> Modifier() - */ - - if (curLexState == REFMODIFIER ) - SwitchTo( REFMOD2 ); - } - } -} - <*> MORE : { @@ -1348,8 +1275,6 @@ | Comment() | Textblock() | SetDirective() -| LocalDirective() -| GlobalDirective() | EscapedDirective() | Escape() | Directive() @@ -1920,38 +1845,6 @@ [<NEWLINE>] ) } -/** - * Meant to shadow the behavior of Set but only affect local contexts - */ -void LocalDirective() : {} -{ - <LOCAL_DIRECTIVE>([<WHITESPACE>] Reference() [<WHITESPACE>] <EQUALS> Expression() <RPAREN> - { - /* - * ensure that inSet is false. Leads to some amusing bugs... - */ - - token_source.inSet = false; - } - [<NEWLINE>] ) -} - -/** - * Meant to shadow the behavior of Set but only affect the global context - */ -void GlobalDirective() : {} -{ - <GLOBAL_DIRECTIVE>([<WHITESPACE>] Reference() [<WHITESPACE>] <EQUALS> Expression() <RPAREN> - { - /* - * ensure that inSet is false. Leads to some amusing bugs... - */ - - token_source.inSet = false; - } - [<NEWLINE>] ) -} - /* ----------------------------------------------------------------------- * * Expression Syntax
