Errors in SimPEL Grammar
------------------------
Key: ODE-298
URL: https://issues.apache.org/jira/browse/ODE-298
Project: ODE
Issue Type: Bug
Environment: ANTLR
Reporter: Marc Bischof
Priority: Trivial
Attachments: SimPEL.g
I looked at the SimPEL-Grammar and I think you've missed something when
modeling non-empty lists.
I also propose that the rewrite-rules should be correct in the grammar
so the translation into tree-grammar would be clearer and less error
prone.
Here a short example:
In the param_block-rule you've modeled an optional ID-list. But in the
rewrite-rule this is missing. So I think that there should be $in* (in
general this should be a $in+, but in this special case the complete list is
optional).
When this was done in the proposed way in the grammar, it would also affect
the tree-grammar. There, the param-block-rule is currently modeled with $ID+
instead of $ID*.
So I went over the grammar and looked for these errors (changes in
tree-grammar analog):
* param_block : '{' ('|' in+=ID (',' in+=ID)* '|')? proc_stmt+ '}' ->
^(SEQUENCE $in proc_stmt+);
> param_block : '{' ('|' in+=ID (',' in+=ID)* '|')? proc_stmt+ '}' ->
^(SEQUENCE $in* proc_stmt+);
* flow : 'parallel' b+=body ('and' b+=body)* -> ^(FLOW $b);
> flow : 'parallel' b+=body ('and' b+=body)* -> ^(FLOW $b+);
* join : 'join' '(' k+=ID (',' k+=ID)* (',' expr)? ')' -> ^(JOIN $k expr?);
> join : 'join' '(' k+=ID (',' k+=ID)* (',' expr)? ')' -> ^(JOIN $k+
expr?);
* with_ex : 'with' '(' wm+=with_map (',' wm+=with_map)* ')' body -> ^(WITH
$wm* body);
> with_ex : 'with' '(' wm+=with_map (',' wm+=with_map)* ')' body -> ^(WITH
$wm+ body);
* partner_link : 'partnerLink' pl+=ID (',' pl+=ID)* -> ^(PARTNERLINK $pl);
> partner_link : 'partnerLink' pl+=ID (',' pl+=ID)* -> ^(PARTNERLINK $pl+);
* correlation : '{' corr_mapping (',' corr_mapping)* '}' -> ^(CORRELATION
corr_mapping*);
> correlation : '{' corr_mapping (',' corr_mapping)* '}' -> ^(CORRELATION
corr_mapping+);
* path_expr : pelmt+=ns_id ('.' pelmt+=ns_id)* -> ^(PATH $pelmt);
> path_expr : pelmt+=ns_id ('.' pelmt+=ns_id)* -> ^(PATH $pelmt+);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.