Commit 91040e44 authored by dbarbera's avatar dbarbera
Browse files

Removed implicit token definitions

parent 74e305fe
......@@ -2,8 +2,8 @@
 
# Resource object code
#
# Created: Wed Jun 18 19:48:04 2014
# by: The Resource Compiler for PySide (Qt v4.8.6)
# Created: vie jun 20 00:57:31 2014
# by: The Resource Compiler for PySide (Qt v4.8.4)
#
# WARNING! All changes made in this file will be lost!
 
......@@ -477,7 +477,7 @@ signal_item
/* Not considered for the moment
(irrelevant in the scope of the generation of code for a single process)
priority_input
: 'PRIORITY INPUT' priority_input_list end transition;
: PRIORITY INPUT priority_input_list end transition;
priority_input_list
......@@ -544,10 +544,10 @@ export
/*
remote_procedure_call
: 'CALL' remote_procedure_call_body;
: CALL remote_procedure_call_body;
remote_procedure_call_body
: remote_procedure_id actual_parameters? ('TO' destination)?;
: remote_procedure_id actual_parameters? (TO destination)?;
*/
......@@ -703,13 +703,13 @@ to_part
-> ^(TO destination);
via_part
: 'VIA' viabody
-> ^(VIA viabody);
: VIA viabody
-> ^(VIA viabody);
// ambiguous in SDL92, added OR between ALL and via_path
viabody
: 'ALL'
: ALL
-> ^(ALL)
| via_path
-> ^(VIAPATH via_path);
......@@ -913,11 +913,11 @@ imperative_operator
timer_active_expression
: 'ACTIVE' '(' timer_id ('(' expression_list ')')? ')';
: ACTIVE '(' timer_id ('(' expression_list ')')? ')';
anyvalue_expression
: 'ANY' '(' sort ')';
: ANY '(' sort ')';
sort : sort_id
......@@ -928,11 +928,11 @@ syntype : syntype_id;
import_expression
: 'IMPORT' '(' remote_variable_id (',' destination)? ')';
: IMPORT '(' remote_variable_id (',' destination)? ')';
view_expression
: 'VIEW' '(' view_id (',' pid_expression)? ')';
: VIEW '(' view_id (',' pid_expression)? ')';
variable_access
......@@ -1262,6 +1262,9 @@ ENDNEWTYPE : E N D N E W T Y P E;
ARRAY : A R R A Y;
CONSTANTS : C O N S T A N T S;
STRUCT : S T R U C T;
IMPORT : I M P O R T;
VIEW : V I E W;
ACTIVE : A C T I V E;
StringLiteral : STR+ ;
fragment
......
# $ANTLR 3.1.3 Mar 17, 2009 19:23:44 sdl92.g 2014-06-18 19:48:07
# $ANTLR 3.1.3 Mar 17, 2009 19:23:44 sdl92.g 2014-06-20 00:57:34
import sys
from antlr3 import *
......@@ -10,7 +10,7 @@ HIDDEN = BaseRecognizer.HIDDEN
# token types
NUMBER_OF_INSTANCES=24
COMMENT2=206
COMMENT2=209
MANTISSA=167
ROUTE=93
MOD=154
......@@ -21,6 +21,7 @@ SEQOF=13
TEXTAREA_CONTENT=78
EOF=-1
ACTION=33
IMPORT=172
CREATE=143
FPAR=82
NEXTSTATE=54
......@@ -31,44 +32,44 @@ CHANNEL=91
ENDCONNECTION=121
EXPORT=38
EQ=137
GEODE=173
INFORMAL_TEXT=70
D=180
E=183
F=190
GEODE=176
D=183
E=186
F=193
GE=142
G=191
A=177
G=194
A=180
IMPLIES=147
B=199
C=181
L=182
M=187
N=178
O=192
B=202
C=184
L=185
M=190
N=181
O=195
TERMINATOR=56
H=193
I=189
H=196
I=192
ELSE=45
J=200
K=184
U=196
T=194
W=198
J=203
K=187
U=199
T=197
W=201
STOP=87
V=197
V=200
INT=119
Q=207
P=185
S=188
Q=210
P=188
S=191
VALUE=10
R=186
Y=179
X=195
R=189
Y=182
X=198
FI=65
Z=208
Z=211
MINUS_INFINITY=163
WS=205
WS=208
OUT=127
FloatingPointLiteral=164
NONE=128
......@@ -76,14 +77,13 @@ INPUT_NONE=27
CONSTANT=44
GT=139
CALL=133
END=175
END=178
FLOATING_LABEL=97
IFTHENELSE=8
T__215=215
IFTHENELSE=8
T__216=216
T__213=213
T__214=214
T__219=219
T__217=217
T__218=218
INPUT=31
......@@ -91,30 +91,24 @@ ENDSUBSTRUCTURE=126
FLOAT=15
SUBSTRUCTURE=125
ASTERISK=124
T__222=222
T__221=221
INOUT=84
T__220=220
STR=202
STR=205
STIMULUS=32
THEN=64
T__209=209
ENDDECISION=135
OPEN_RANGE=43
SIGNAL=90
ENDSYSTEM=109
PLUS=150
T__210=210
CHOICE=11
T__212=212
TASK_BODY=80
T__212=212
PARAMS=59
CLOSED_RANGE=42
T__211=211
STATE=26
STATELIST=68
TO=47
ASSIG_OP=176
ASSIG_OP=179
SIGNALROUTE=114
ENDSYNTYPE=101
SORT=73
......@@ -151,9 +145,11 @@ BASE=168
COMMENT=9
ENDALTERNATIVE=134
ARRAY=104
ACTIVE=171
ENDFOR=146
FIELD_NAME=60
OCTSTR=18
VIEW=173
EMPTYSTR=14
ENDCHANNEL=110
NULL=161
......@@ -161,11 +157,11 @@ ANSWER=41
PRIMARY=61
TASK=79
REFERENCED=116
ALPHA=203
ALPHA=206
SEQUENCE=12
VARIABLE=71
PRIORITY=129
SPECIFIC=172
SPECIFIC=175
OR=148
COMPOSITE_STATE=98
OctetStringLiteral=157
......@@ -181,7 +177,7 @@ PRIMARY_ID=62
DIGITS=21
HYPERLINK=67
NEWTYPE=102
Exponent=204
Exponent=207
FOR=4
ENDSTATE=123
PROCEDURE_NAME=58
......@@ -194,8 +190,8 @@ IN=86
PROVIDED=29
COMMA=132
ALL=46
ASNFILENAME=174
DOT=201
ASNFILENAME=177
DOT=204
EXPRESSION=20
WITH=112
BITSTR=17
......@@ -222,7 +218,7 @@ LABEL=7
PLUS_INFINITY=162
PARAMNAMES=95
ASN1=96
KEEP=171
KEEP=174
ASSIGN=52
VARIABLES=72
ALTERNATIVE=40
......@@ -270,81 +266,6 @@ class sdl92Lexer(Lexer):
# $ANTLR start "T__209"
def mT__209(self, ):
try:
_type = T__209
_channel = DEFAULT_CHANNEL
# sdl92.g:7:8: ( ':' )
# sdl92.g:7:10: ':'
pass
self.match(58)
self._state.type = _type
self._state.channel = _channel
finally:
pass
# $ANTLR end "T__209"
# $ANTLR start "T__210"
def mT__210(self, ):
try:
_type = T__210
_channel = DEFAULT_CHANNEL
# sdl92.g:8:8: ( 'TO' )
# sdl92.g:8:10: 'TO'
pass
self.match("TO")
self._state.type = _type
self._state.channel = _channel
finally:
pass
# $ANTLR end "T__210"
# $ANTLR start "T__211"
def mT__211(self, ):
try:
_type = T__211
_channel = DEFAULT_CHANNEL
# sdl92.g:9:8: ( 'VIA' )
# sdl92.g:9:10: 'VIA'
pass
self.match("VIA")
self._state.type = _type
self._state.channel = _channel
finally:
pass
# $ANTLR end "T__211"
# $ANTLR start "T__212"
def mT__212(self, ):
......@@ -352,10 +273,10 @@ class sdl92Lexer(Lexer):
_type = T__212
_channel = DEFAULT_CHANNEL
# sdl92.g:10:8: ( 'ALL' )
# sdl92.g:10:10: 'ALL'
# sdl92.g:7:8: ( ':' )
# sdl92.g:7:10: ':'
pass
self.match("ALL")
self.match(58)
......@@ -377,8 +298,8 @@ class sdl92Lexer(Lexer):
_type = T__213
_channel = DEFAULT_CHANNEL
# sdl92.g:11:8: ( '!' )
# sdl92.g:11:10: '!'
# sdl92.g:8:8: ( '!' )
# sdl92.g:8:10: '!'
pass
self.match(33)
......@@ -402,8 +323,8 @@ class sdl92Lexer(Lexer):
_type = T__214
_channel = DEFAULT_CHANNEL
# sdl92.g:12:8: ( '(.' )
# sdl92.g:12:10: '(.'
# sdl92.g:9:8: ( '(.' )
# sdl92.g:9:10: '(.'
pass
self.match("(.")
......@@ -427,8 +348,8 @@ class sdl92Lexer(Lexer):
_type = T__215
_channel = DEFAULT_CHANNEL
# sdl92.g:13:8: ( '.)' )
# sdl92.g:13:10: '.)'
# sdl92.g:10:8: ( '.)' )
# sdl92.g:10:10: '.)'
pass
self.match(".)")
......@@ -452,8 +373,8 @@ class sdl92Lexer(Lexer):
_type = T__216
_channel = DEFAULT_CHANNEL
# sdl92.g:14:8: ( 'ERROR' )
# sdl92.g:14:10: 'ERROR'
# sdl92.g:11:8: ( 'ERROR' )
# sdl92.g:11:10: 'ERROR'
pass
self.match("ERROR")
......@@ -477,10 +398,10 @@ class sdl92Lexer(Lexer):
_type = T__217
_channel = DEFAULT_CHANNEL
# sdl92.g:15:8: ( 'ACTIVE' )
# sdl92.g:15:10: 'ACTIVE'
# sdl92.g:12:8: ( '/* CIF' )
# sdl92.g:12:10: '/* CIF'
pass
self.match("ACTIVE")
self.match("/* CIF")
......@@ -502,108 +423,8 @@ class sdl92Lexer(Lexer):
_type = T__218
_channel = DEFAULT_CHANNEL
# sdl92.g:16:8: ( 'ANY' )
# sdl92.g:16:10: 'ANY'
pass
self.match("ANY")
self._state.type = _type
self._state.channel = _channel
finally:
pass
# $ANTLR end "T__218"
# $ANTLR start "T__219"
def mT__219(self, ):
try:
_type = T__219
_channel = DEFAULT_CHANNEL
# sdl92.g:17:8: ( 'IMPORT' )
# sdl92.g:17:10: 'IMPORT'
pass
self.match("IMPORT")
self._state.type = _type
self._state.channel = _channel
finally:
pass
# $ANTLR end "T__219"
# $ANTLR start "T__220"
def mT__220(self, ):
try:
_type = T__220
_channel = DEFAULT_CHANNEL
# sdl92.g:18:8: ( 'VIEW' )
# sdl92.g:18:10: 'VIEW'
pass
self.match("VIEW")
self._state.type = _type
self._state.channel = _channel
finally:
pass
# $ANTLR end "T__220"
# $ANTLR start "T__221"
def mT__221(self, ):
try:
_type = T__221
_channel = DEFAULT_CHANNEL
# sdl92.g:19:8: ( '/* CIF' )
# sdl92.g:19:10: '/* CIF'
pass
self.match("/* CIF")
self._state.type = _type
self._state.channel = _channel
finally:
pass
# $ANTLR end "T__221"
# $ANTLR start "T__222"
def mT__222(self, ):
try:
_type = T__222
_channel = DEFAULT_CHANNEL
# sdl92.g:20:8: ( '*/' )
# sdl92.g:20:10: '*/'
# sdl92.g:13:8: ( '*/' )
# sdl92.g:13:10: '*/'
pass
self.match("*/")
......@@ -616,7 +437,7 @@ class sdl92Lexer(Lexer):
pass
# $ANTLR end "T__222"
# $ANTLR end "T__218"
......@@ -4196,6 +4017,94 @@ class sdl92Lexer(Lexer):
# $ANTLR start "IMPORT"
def mIMPORT(self, ):
try:
_type = IMPORT
_channel = DEFAULT_CHANNEL
# sdl92.g:1265:17: ( I M P O R T )
# sdl92.g:1265:25: I M P O R T
pass
self.mI()
self.mM()
self.mP()
self.mO()
self.mR()
self.mT()
self._state.type = _type
self._state.channel = _channel
finally:
pass
# $ANTLR end "IMPORT"
# $ANTLR start "VIEW"
def mVIEW(self, ):
try:
_type = VIEW
_channel = DEFAULT_CHANNEL
# sdl92.g:1266:17: ( V I E W )
# sdl92.g:1266:25: V I E W
pass
self.mV()
self.mI()
self.mE()
self.mW()
self._state.type = _type
self._state.channel = _channel
finally:
pass
# $ANTLR end "VIEW"
# $ANTLR start "ACTIVE"
def mACTIVE(self, ):
try:
_type = ACTIVE
_channel = DEFAULT_CHANNEL
# sdl92.g:1267:17: ( A C T I V E )
# sdl92.g:1267:25: A C T I V E
pass
self.mA()
self.mC()
self.mT()
self.mI()
self.mV()
self.mE()
self._state.type = _type
self._state.channel = _channel
finally:
pass
# $ANTLR end "ACTIVE"
# $ANTLR start "StringLiteral"
def mStringLiteral(self, ):
......@@ -4203,10 +4112,10 @@ class sdl92Lexer(Lexer):
_type = StringLiteral
_channel = DEFAULT_CHANNEL
# sdl92.g:1265:17: ( ( STR )+ )
# sdl92.g:1265:25: ( STR )+
# sdl92.g:1268:17: ( ( STR )+ )
# sdl92.g:1268:25: ( STR )+
pass
# sdl92.g:1265:25: ( STR )+
# sdl92.g:1268:25: ( STR )+
cnt3 = 0
while True: #loop3
alt3 = 2
......@@ -4217,7 +4126,7 @@ class sdl92Lexer(Lexer):