Commit db23ae92 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Add more syntactic predicates in ANTLR

parent a0029596
......@@ -142,7 +142,7 @@ The background pattern was downloaded from www.subtlepatterns.com
Changelog
=========
1.3.23 (05/2016)
1.3.24 (05/2016)
- Fix reporting of syntax errors in state aggregations
1.3.22 (05/2016)
......
......@@ -2,7 +2,7 @@
 
# Resource object code
#
# Created: Tue May 17 16:27:03 2016
# Created: Wed May 18 14:18:26 2016
# by: The Resource Compiler for PySide (Qt v4.8.6)
#
# WARNING! All changes made in this file will be lost!
......@@ -117,7 +117,7 @@ except ImportError:
__all__ = ['opengeode', 'SDL_Scene', 'SDL_View', 'parse']
__version__ = '1.3.23'
__version__ = '1.3.24'
if hasattr(sys, 'frozen'):
# Detect if we are running on Windows (py2exe-generated)
......
# $ANTLR 3.1.3 Mar 17, 2009 19:23:44 sdl92.g 2016-05-17 16:27:05
# $ANTLR 3.1.3 Mar 17, 2009 19:23:44 sdl92.g 2016-05-18 14:18:28
import sys
from antlr3 import *
......
This diff is collapsed.
......@@ -257,7 +257,7 @@ process_definition
PROCESS process_id
number_of_instances? (':' type_inst)? REFERENCED? a=end
pfpar?
(text_area | procedure | composite_state)*
(text_area | procedure | (composite_state_preamble) =>composite_state)*
processBody? ENDPROCESS? process_id?
end?
-> ^(PROCESS cif? process_id number_of_instances? type_inst?
......
......@@ -66,3 +66,22 @@ STATE AGGREGATION DemoDeviceDACPStates;
test.composite_state()
print('from rm(2) - reports that start must be before state:')
test=opengeode.ogParser.parser_init(string=
'''
process hello;
STATE AGGREGATION DemoDeviceDACPStates;
SUBSTRUCTURE
STATE INTERNAL_MAPPINGS;
SUBSTRUCTURE
STATE STATELESS;
ENDSTATE STATELESS;
START;
NEXTSTATE STATELESS;
ENDSUBSTRUCTURE INTERNAL_MAPPINGS;
ENDSUBSTRUCTURE DemoDeviceDACPStates;
end hello;
''')
test.process_definition()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment