Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
12062738
Commit
12062738
authored
May 17, 2016
by
Maxime Perrotin
Browse files
Fix error reporting of syntax errors in state aggregations
parent
d95d7448
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
12062738
...
...
@@ -142,8 +142,11 @@ The background pattern was downloaded from www.subtlepatterns.com
Changelog
=========
1.
3.23 (05/2016)
-
Fix reporting of syntax errors in state aggregations
1.
3.22 (05/2016)
-
Bu
x
fix in range checks for division and subtraction
-
Bu
g
fix in range checks for division and subtraction
-
Optimise loading when there are no CIF comments
1.
3.21 (05/2016)
...
...
opengeode/icons.py
View file @
12062738
...
...
@@ -2,7 +2,7 @@
# Resource object code
#
# Created:
Sat Mar 26 10:12:49
2016
# Created:
Tue May 17 16:27:03
2016
# by: The Resource Compiler for PySide (Qt v4.8.6)
#
# WARNING! All changes made in this file will be lost!
opengeode/opengeode.py
View file @
12062738
...
...
@@ -117,7 +117,7 @@ except ImportError:
__all__
=
[
'opengeode'
,
'SDL_Scene'
,
'SDL_View'
,
'parse'
]
__version__
=
'1.3.2
2
'
__version__
=
'1.3.2
3
'
if
hasattr
(
sys
,
'frozen'
):
# Detect if we are running on Windows (py2exe-generated)
...
...
opengeode/sdl92Lexer.py
View file @
12062738
This diff is collapsed.
Click to expand it.
opengeode/sdl92Parser.py
View file @
12062738
This diff is collapsed.
Click to expand it.
sdl92.g
View file @
12062738
...
...
@@ -508,6 +508,11 @@ composite_state
| state_aggregation
;
// used for syntactic predicate
composite_state_preamble
: STATE AGGREGATION? statename end
SUBSTRUCTURE
;
composite_state_graph
: STATE statename e=end
...
...
@@ -589,9 +594,13 @@ state_entry_exit_points
// 11.11.1 Composite State graph content (SDL2000)
// Use a syntactic predicate to disambiguate the parsing of the composite
// state vs a normal state, in the case of a syntax error in the composite.
composite_state_body
: (text_area | procedure | composite_state)*
start* (state | floating_label)*
: (text_area
| procedure
| (composite_state_preamble) =>composite_state)*
start* (state | floating_label)*
;
...
...
tests/parser/aggreg.py
View file @
12062738
#!/usr/bin/env python
import
opengeode
y
=
opengeode
.
ogParser
.
parser_init
(
string
=
'''state ENTRYA;
# detect syntax errors (missing semi after "entry")
print
(
'composite_state_body:'
)
test
=
opengeode
.
ogParser
.
parser_init
(
string
=
'''state ENTRYA;
substructure
procedure entry EXTERNAL;
endsubstructure ENTRYA;'''
)
endsubstructure ENTRYA;
'''
)
y
.
composite_state_body
()
test
.
composite_state_body
()
z
=
opengeode
.
ogParser
.
parser_init
(
string
=
'''state CHECKING;
print
(
'composite_state:'
)
test
=
opengeode
.
ogParser
.
parser_init
(
string
=
'''state CHECKING;
substructure
state ENTRYA;
substructure
...
...
@@ -17,4 +27,26 @@ z=opengeode.ogParser.parser_init(string='''state CHECKING;
endsubstructure CHECKING;
'''
)
z
.
composite_state
()
test
.
composite_state
()
print
(
'composite_state (should have no error)'
)
test
=
opengeode
.
ogParser
.
parser_init
(
string
=
'''state CHECKING;
substructure
state ENTRYA;
endstate ENTRYA;
endsubstructure CHECKING;
'''
)
test
.
composite_state
()
print
(
'composite_state_body 2:'
)
test
=
opengeode
.
ogParser
.
parser_init
(
string
=
'''state ENTRYA;
endstate;
'''
)
test
.
composite_state_body
()
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment