importURI strange problems [message #876435] |
Thu, 24 May 2012 15:35 |
Vil Lpz Messages: 24 Registered: April 2012 |
Junior Member |
|
|
Hey.
I have long time with this and not understand the error ...
This works:
Grammar:
grammar pruebas.MyDsl
ScxmlStateType hidden(WS):
'<state'
( 'id=' name = ID
& ('src=' importURI = LocalUrl)?
& ('initial=' initial1 = [ScxmlStateType | ID])? ) //state
scxmlStateMix = ScxmlStateMix
;
ScxmlStateMix:
('/>') |
('>'
( state += ScxmlStateType*
& transition += ScxmlTransitionType* )
'</state>')
;
ScxmlTransitionType:
{ScxmlTransitionType}
'<transition'
('target=' target = [ScxmlStateType | ID])? // state
'/>'
;
LocalUrl:
('../')? ID (('/' | '../') ID )* ('.' ID)?
;
LocalUrlDataType:
QUOTE_V1 LocalUrl QUOTE_V1
//| QUOTE_V2 LocalUrl QUOTE_V2
;
terminal QUOTE_V1:
'"'
;
terminal QUOTE_V2:
'\''
;
terminal ID:
('a'..'z'|'A'..'Z'|'_'|'-') ('a'..'z'|'A'..'Z'|'_'|'-'|'0'..'9')*
;
terminal WS:
(' '|'\t'|'\r'|'\n')+
;
I can reference states in another files which indicated by state src attribute...
x.test
<state id=x1 [b]src=y.test[/b]>
<state id=x2>
<transition target=y2 />
</state>
</state>
y.test
<state id=y1>
<state id=y2>
<transition target=y1 />
</state>
</state>
But if instead of
'src=' importURI = LocalUrl
Put's
'src=' importURI = LocalUrlDataType
That is, the same thing with quotes. It does not work. And I do not understand why.
Someone can help me?
Thank you.
A greeting.
[Updated on: Thu, 24 May 2012 15:36] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06746 seconds