[jboss-svn-commits] JBL Code SVN: r27292 - in labs/jbosstm/workspace/adinn/byteman/trunk: src/org/jboss/byteman/rule/grammar and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Jun 29 10:42:40 EDT 2009
Author: adinn
Date: 2009-06-29 10:42:40 -0400 (Mon, 29 Jun 2009)
New Revision: 27292
Modified:
labs/jbosstm/workspace/adinn/byteman/trunk/dd/grammar/cup/ECAGrammar.cup
labs/jbosstm/workspace/adinn/byteman/trunk/src/org/jboss/byteman/rule/grammar/ECAGrammarParser.java
labs/jbosstm/workspace/adinn/byteman/trunk/src/org/jboss/byteman/rule/grammar/ECATokenLexer.java
labs/jbosstm/workspace/adinn/byteman/trunk/src/org/jboss/byteman/rule/grammar/sym.java
Log:
corrected error introduced into action parsing which caused returns and throws to be lost
Modified: labs/jbosstm/workspace/adinn/byteman/trunk/dd/grammar/cup/ECAGrammar.cup
===================================================================
--- labs/jbosstm/workspace/adinn/byteman/trunk/dd/grammar/cup/ECAGrammar.cup 2009-06-29 14:29:27 UTC (rev 27291)
+++ labs/jbosstm/workspace/adinn/byteman/trunk/dd/grammar/cup/ECAGrammar.cup 2009-06-29 14:42:40 UTC (rev 27292)
@@ -386,8 +386,8 @@
{: RESULT = node(ParseNode.SEMI, eleft, eright, e, ael); :}
| expr:e COMMA action_expr_list:ael
{: RESULT = node(ParseNode.SEMI, eleft, eright, e, ael); :}
+ | action_expr:ae {: RESULT = ae; :}
| action_expr_list_error_invalid_action:ael {: RESULT = ael; :}
- | action_expr:ae {: RESULT = ae; :}
;
action_expr_list_error_invalid_action
@@ -398,7 +398,7 @@
action_expr
::= expr:e {: RESULT = e; :}
- | throw_return_expr
+ | throw_return_expr:tre {: RESULT = tre; :}
;
throw_return_expr
Modified: labs/jbosstm/workspace/adinn/byteman/trunk/src/org/jboss/byteman/rule/grammar/ECAGrammarParser.java
===================================================================
--- labs/jbosstm/workspace/adinn/byteman/trunk/src/org/jboss/byteman/rule/grammar/ECAGrammarParser.java 2009-06-29 14:29:27 UTC (rev 27291)
+++ labs/jbosstm/workspace/adinn/byteman/trunk/src/org/jboss/byteman/rule/grammar/ECAGrammarParser.java 2009-06-29 14:42:40 UTC (rev 27292)
@@ -1,7 +1,7 @@
//----------------------------------------------------
// The following code was generated by CUP v0.10k
-// Mon Jun 29 15:28:38 BST 2009
+// Mon Jun 29 15:41:19 BST 2009
//----------------------------------------------------
package org.jboss.byteman.rule.grammar;
@@ -10,7 +10,7 @@
import org.jboss.byteman.rule.grammar.ParseNode;
/** CUP v0.10k generated parser.
- * @version Mon Jun 29 15:28:38 BST 2009
+ * @version Mon Jun 29 15:41:19 BST 2009
*/
public class ECAGrammarParser extends java_cup.runtime.lr_parser {
@@ -418,7 +418,7 @@
"\043\103\001\002\000\004\006\ufff8\001\002\000\004\006" +
"\216\001\002\000\036\003\226\007\223\010\221\011\227" +
"\012\047\042\056\044\043\045\046\047\042\050\064\051" +
- "\060\052\044\053\051\054\032\001\002\000\004\002\uffe7" +
+ "\060\052\044\053\051\054\032\001\002\000\004\002\uffe8" +
"\001\002\000\052\002\uffe5\016\241\017\242\022\124\024" +
"\110\025\104\026\106\027\112\030\121\031\105\032\117" +
"\033\111\034\116\035\122\036\115\037\123\040\114\041" +
@@ -426,7 +426,7 @@
"\042\056\044\043\045\046\047\042\050\064\051\060\052" +
"\044\053\051\054\032\001\002\000\004\002\uffff\001\002" +
"\000\004\002\uffec\001\002\000\004\002\uffeb\001\002\000" +
- "\004\002\uffe8\001\002\000\036\002\ufff6\003\237\010\221" +
+ "\004\002\uffe7\001\002\000\036\002\ufff6\003\237\010\221" +
"\011\227\012\047\042\056\044\043\045\046\047\042\050" +
"\064\051\060\052\044\053\051\054\032\001\002\000\004" +
"\054\032\001\002\000\004\002\uffe4\001\002\000\004\012" +
@@ -1827,7 +1827,10 @@
case 29: // action_expr ::= throw_return_expr
{
ParseNode RESULT = null;
-
+ int treleft = ((java_cup.runtime.Symbol)CUP$ECAGrammarParser$stack.elementAt(CUP$ECAGrammarParser$top-0)).left;
+ int treright = ((java_cup.runtime.Symbol)CUP$ECAGrammarParser$stack.elementAt(CUP$ECAGrammarParser$top-0)).right;
+ ParseNode tre = (ParseNode)((java_cup.runtime.Symbol) CUP$ECAGrammarParser$stack.elementAt(CUP$ECAGrammarParser$top-0)).value;
+ RESULT = tre;
CUP$ECAGrammarParser$result = new java_cup.runtime.Symbol(10/*action_expr*/, ((java_cup.runtime.Symbol)CUP$ECAGrammarParser$stack.elementAt(CUP$ECAGrammarParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$ECAGrammarParser$stack.elementAt(CUP$ECAGrammarParser$top-0)).right, RESULT);
}
return CUP$ECAGrammarParser$result;
@@ -1858,25 +1861,25 @@
return CUP$ECAGrammarParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
- case 26: // action_expr_list ::= action_expr
+ case 26: // action_expr_list ::= action_expr_list_error_invalid_action
{
ParseNode RESULT = null;
- int aeleft = ((java_cup.runtime.Symbol)CUP$ECAGrammarParser$stack.elementAt(CUP$ECAGrammarParser$top-0)).left;
- int aeright = ((java_cup.runtime.Symbol)CUP$ECAGrammarParser$stack.elementAt(CUP$ECAGrammarParser$top-0)).right;
- ParseNode ae = (ParseNode)((java_cup.runtime.Symbol) CUP$ECAGrammarParser$stack.elementAt(CUP$ECAGrammarParser$top-0)).value;
- RESULT = ae;
+ int aelleft = ((java_cup.runtime.Symbol)CUP$ECAGrammarParser$stack.elementAt(CUP$ECAGrammarParser$top-0)).left;
+ int aelright = ((java_cup.runtime.Symbol)CUP$ECAGrammarParser$stack.elementAt(CUP$ECAGrammarParser$top-0)).right;
+ ParseNode ael = (ParseNode)((java_cup.runtime.Symbol) CUP$ECAGrammarParser$stack.elementAt(CUP$ECAGrammarParser$top-0)).value;
+ RESULT = ael;
CUP$ECAGrammarParser$result = new java_cup.runtime.Symbol(9/*action_expr_list*/, ((java_cup.runtime.Symbol)CUP$ECAGrammarParser$stack.elementAt(CUP$ECAGrammarParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$ECAGrammarParser$stack.elementAt(CUP$ECAGrammarParser$top-0)).right, RESULT);
}
return CUP$ECAGrammarParser$result;
/*. . . . . . . . . . . . . . . . . . . .*/
- case 25: // action_expr_list ::= action_expr_list_error_invalid_action
+ case 25: // action_expr_list ::= action_expr
{
ParseNode RESULT = null;
- int aelleft = ((java_cup.runtime.Symbol)CUP$ECAGrammarParser$stack.elementAt(CUP$ECAGrammarParser$top-0)).left;
- int aelright = ((java_cup.runtime.Symbol)CUP$ECAGrammarParser$stack.elementAt(CUP$ECAGrammarParser$top-0)).right;
- ParseNode ael = (ParseNode)((java_cup.runtime.Symbol) CUP$ECAGrammarParser$stack.elementAt(CUP$ECAGrammarParser$top-0)).value;
- RESULT = ael;
+ int aeleft = ((java_cup.runtime.Symbol)CUP$ECAGrammarParser$stack.elementAt(CUP$ECAGrammarParser$top-0)).left;
+ int aeright = ((java_cup.runtime.Symbol)CUP$ECAGrammarParser$stack.elementAt(CUP$ECAGrammarParser$top-0)).right;
+ ParseNode ae = (ParseNode)((java_cup.runtime.Symbol) CUP$ECAGrammarParser$stack.elementAt(CUP$ECAGrammarParser$top-0)).value;
+ RESULT = ae;
CUP$ECAGrammarParser$result = new java_cup.runtime.Symbol(9/*action_expr_list*/, ((java_cup.runtime.Symbol)CUP$ECAGrammarParser$stack.elementAt(CUP$ECAGrammarParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$ECAGrammarParser$stack.elementAt(CUP$ECAGrammarParser$top-0)).right, RESULT);
}
return CUP$ECAGrammarParser$result;
Modified: labs/jbosstm/workspace/adinn/byteman/trunk/src/org/jboss/byteman/rule/grammar/ECATokenLexer.java
===================================================================
--- labs/jbosstm/workspace/adinn/byteman/trunk/src/org/jboss/byteman/rule/grammar/ECATokenLexer.java 2009-06-29 14:29:27 UTC (rev 27291)
+++ labs/jbosstm/workspace/adinn/byteman/trunk/src/org/jboss/byteman/rule/grammar/ECATokenLexer.java 2009-06-29 14:42:40 UTC (rev 27292)
@@ -1,4 +1,4 @@
-/* The following code was generated by JFlex 1.4.2 on 6/29/09 3:28 PM */
+/* The following code was generated by JFlex 1.4.2 on 6/29/09 3:41 PM */
/*
* JBoss, Home of Professional Open Source
@@ -33,7 +33,7 @@
/**
* This class is a scanner generated by
* <a href="http://www.jflex.de/">JFlex</a> 1.4.2
- * on 6/29/09 3:28 PM from the specification file
+ * on 6/29/09 3:41 PM from the specification file
* <tt>dd/grammar/flex/ECAToken.flex</tt>
*/
public class ECATokenLexer implements java_cup.runtime.Scanner {
Modified: labs/jbosstm/workspace/adinn/byteman/trunk/src/org/jboss/byteman/rule/grammar/sym.java
===================================================================
--- labs/jbosstm/workspace/adinn/byteman/trunk/src/org/jboss/byteman/rule/grammar/sym.java 2009-06-29 14:29:27 UTC (rev 27291)
+++ labs/jbosstm/workspace/adinn/byteman/trunk/src/org/jboss/byteman/rule/grammar/sym.java 2009-06-29 14:42:40 UTC (rev 27292)
@@ -1,7 +1,7 @@
//----------------------------------------------------
// The following code was generated by CUP v0.10k
-// Mon Jun 29 15:28:38 BST 2009
+// Mon Jun 29 15:41:19 BST 2009
//----------------------------------------------------
package org.jboss.byteman.rule.grammar;
More information about the jboss-svn-commits
mailing list