Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added error case to detect and notify missing IF clause -- fixes BYTE…

…MAN-247
  • Loading branch information...
commit a29ec9d66ec8195ef3faa09bca5c663a386f3980 1 parent 49b5b8c
@adinn adinn authored
View
5 agent/grammar/cup/ECAGrammar.cup
@@ -392,12 +392,17 @@ ca_error
ca_error_in_condition
::= IF:i error {: error("invalid condition", ileft, iright); :}
DO actions:a {: RESULT = node(ParseNode.BIND, ileft, iright, null, null, a); :}
+ | DO actions:a {: error("missing IF clause", aleft, aright);
+ RESULT = node(ParseNode.BIND, aleft, aright, null, null, a); :}
;
ca_error_in_action
::= IF condition:c
DO:d error {: error("invalid action", dleft, dright);
RESULT = node(ParseNode.BIND, cleft, cright, null, c, null); :}
+ | DO:d error {: error("invalid action", dleft, dright);
+ error("missing IF clause", dleft, dright);
+ RESULT = node(ParseNode.BIND, dleft, dright, null, null, null); :}
;
// event specifications -- for now events are just a list of bindings
View
1,952 agent/src/main/java/org/jboss/byteman/rule/grammar/ECAGrammarParser.java
996 additions, 956 deletions not shown
View
4 agent/src/main/java/org/jboss/byteman/rule/grammar/ECATokenLexer.java
@@ -1,4 +1,4 @@
-/* The following code was generated by JFlex 1.4.3 on 24/07/12 14:53 */
+/* The following code was generated by JFlex 1.4.3 on 08/07/13 16:28 */
/*
* 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.3
- * on 24/07/12 14:53 from the specification file
+ * on 08/07/13 16:28 from the specification file
* <tt>/ssd/home/adinn/jboss/byteman/git/byteman/agent/grammar/flex/ECAToken.flex</tt>
*/
public class ECATokenLexer implements java_cup.runtime.Scanner {
View
2  agent/src/main/java/org/jboss/byteman/rule/grammar/sym.java
@@ -1,7 +1,7 @@
//----------------------------------------------------
// The following code was generated by CUP v0.11a beta 20060608
-// Tue Jul 24 14:53:20 BST 2012
+// Mon Jul 08 16:28:35 BST 2013
//----------------------------------------------------
package org.jboss.byteman.rule.grammar;
Please sign in to comment.
Something went wrong with that request. Please try again.