You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by mr...@apache.org on 2008/11/08 21:38:31 UTC

svn commit: r712428 - in /ode/sandbox/simpel/src/main/antlr/org/apache/ode/simpel/antlr: SimPEL.g SimPELWalker.g

Author: mriou
Date: Sat Nov  8 12:38:31 2008
New Revision: 712428

URL: http://svn.apache.org/viewvc?rev=712428&view=rev
Log:
ODE-298 Airport patch of small grammar errors.

Modified:
    ode/sandbox/simpel/src/main/antlr/org/apache/ode/simpel/antlr/SimPEL.g
    ode/sandbox/simpel/src/main/antlr/org/apache/ode/simpel/antlr/SimPELWalker.g

Modified: ode/sandbox/simpel/src/main/antlr/org/apache/ode/simpel/antlr/SimPEL.g
URL: http://svn.apache.org/viewvc/ode/sandbox/simpel/src/main/antlr/org/apache/ode/simpel/antlr/SimPEL.g?rev=712428&r1=712427&r2=712428&view=diff
==============================================================================
--- ode/sandbox/simpel/src/main/antlr/org/apache/ode/simpel/antlr/SimPEL.g (original)
+++ ode/sandbox/simpel/src/main/antlr/org/apache/ode/simpel/antlr/SimPEL.g Sat Nov  8 12:38:31 2008
@@ -100,16 +100,16 @@
 
 block	:	'{' proc_stmt+ '}' -> ^(SEQUENCE proc_stmt+);
 param_block
-	:	'{' ('|' in+=ID (',' in+=ID)* '|')? proc_stmt+ '}' -> ^(SEQUENCE $in proc_stmt+);
+	:	'{' ('|' in+=ID (',' in+=ID)* '|')? proc_stmt+ '}' -> ^(SEQUENCE $in* proc_stmt+);
 body	:	block | proc_stmt;
 
 // Structured activities
 pick	:	'pick' '{' receive* timeout* '}' -> ^(PICK receive* timeout*);
 timeout	:	'timeout' '(' expr ')' block -> ^(TIMEOUT expr block); 
 
-flow	:	'parallel' b+=body ('and' b+=body)* -> ^(FLOW $b);
+flow	:	'parallel' b+=body ('and' b+=body)* -> ^(FLOW $b*);
 signal	:	'signal' '('ID (',' expr)? ')' -> ^(SIGNAL ID expr?);
-join	:	'join' '(' k+=ID (',' k+=ID)* (',' expr)? ')' -> ^(JOIN $k expr?);
+join	:	'join' '(' k+=ID (',' k+=ID)* (',' expr)? ')' -> ^(JOIN $k+ expr?);
 
 if_ex	:	'if' '(' expr ')' ifb=body ('else' eb=body)? -> ^(IF expr $ifb (^(ELSE $eb))?);
 
@@ -133,7 +133,7 @@
 	:	'compensation' body -> ^(COMPENSATION body);
 
 with_ex :
-                'with' '(' wm+=with_map (',' wm+=with_map)* ')' body -> ^(WITH $wm* body);
+                'with' '(' wm+=with_map (',' wm+=with_map)* ')' body -> ^(WITH $wm+ body);
 with_map:       ID ':' path_expr -> ^(MAP ID path_expr);
 
 // Simple activities
@@ -184,10 +184,10 @@
 variable:	ID VAR_MODS* -> ^(VARIABLE ID VAR_MODS*);
 
 partner_link
-	:	'partnerLink' pl+=ID (',' pl+=ID)* -> ^(PARTNERLINK $pl);
+	:	'partnerLink' pl+=ID (',' pl+=ID)* -> ^(PARTNERLINK $pl+);
 
 correlation
-	:	'{' corr_mapping (',' corr_mapping)* '}' -> ^(CORRELATION corr_mapping*);
+	:	'{' corr_mapping (',' corr_mapping)* '}' -> ^(CORRELATION corr_mapping+);
 corr_mapping
 	:	fn=ID ':' var=ID -> ^(CORR_MAP $fn $var);
 
@@ -205,7 +205,7 @@
 mexpr	:	atom (('*'|'/') ^ atom)* | STRING;
 atom	:	path_expr | INT | '(' s_expr ')' -> s_expr | funct_call;
 path_expr
-	:	pelmt+=ns_id ('.' pelmt+=ns_id)* -> ^(PATH $pelmt);
+	:	pelmt+=ns_id ('.' pelmt+=ns_id)* -> ^(PATH $pelmt+);
 
 ns_id	:	(pr=ID '::')? loc=ID ('(' ')')? -> ^(NS $pr? $loc);
 

Modified: ode/sandbox/simpel/src/main/antlr/org/apache/ode/simpel/antlr/SimPELWalker.g
URL: http://svn.apache.org/viewvc/ode/sandbox/simpel/src/main/antlr/org/apache/ode/simpel/antlr/SimPELWalker.g?rev=712428&r1=712427&r2=712428&view=diff
==============================================================================
--- ode/sandbox/simpel/src/main/antlr/org/apache/ode/simpel/antlr/SimPELWalker.g (original)
+++ ode/sandbox/simpel/src/main/antlr/org/apache/ode/simpel/antlr/SimPELWalker.g Sat Nov  8 12:38:31 2008
@@ -123,9 +123,9 @@
 
 // TODO links
 flow	
-	:	^(FLOW body*);
+	:	^(FLOW body+);
 signal	:	^(SIGNAL ID expr?);
-join	:	^(JOIN ID* expr?);
+join	:	^(JOIN ID+ expr?);
 
 if_ex	
 scope ExprContext Parent;
@@ -189,7 +189,7 @@
 	: ^(WITH {
         $ExprContext::expr = new SimPELExpr(builder.getProcess());
     }
-    with_map* body);
+    with_map+ body);
 with_map:       ^(MAP ID path_expr);
 
 // Simple activities
@@ -272,12 +272,12 @@
     };
 
 partner_link
-	:	^(PARTNERLINK ID*);
+	:	^(PARTNERLINK ID+);
 
 correlation
 	:	^(CORRELATION (corr_mapping {
 	        builder.addCorrelationMatch($ReceiveBlock::activity, $corr_mapping.corr); 
-	    } )*);
+	    } )+);
 corr_mapping
 returns [List corr]
 	:	^(CORR_MAP fn=ID var=ID) {
@@ -304,7 +304,7 @@
 funct_call
 	:	^(CALL ID expr*);
 path_expr
-	:	^(PATH ids=(ns_id*)) { 
+	:	^(PATH ids=(ns_id+)) { 
         builder.addExprVariable($BPELScope::oscope, $ExprContext::expr, deepText($ids));
     };
 ns_id	:	^(NS ID? ID);