Using element define in one grammar into another [message #695213] |
Mon, 11 July 2011 09:45 |
irfan Messages: 16 Registered: July 2011 |
Junior Member |
|
|
Hi all,
i have a file style.xtext which looks as follow:
External_Style:
'{'
('"fill"' ':' fill=(Color | Fill_gradient) (',')?)?
('"outline"' ':' outline=Color (',')?)?
('"stroke"' ':' stroke=Stroke (',')?)?
('"symbol"' ':' symbol=STYLE_SYMBOL (',')?)?
('"orientation"' ':' orientation=STYLE_ORIENTATION (',')?)?
('"padding"' ':' padding=(NUMBER | PERCENTAGE) (',')?)?
('"size"' ':' size=(NUMBER | PERCENTAGE) (',')?)?
('"font"' ':' font=Font (',')?)?
('"inside"' ':' inside=STYLE_INSIDE (',')?)?
('"align"' ':' align=STYLE_ALIGN (',')?)?
('"valign"' ':' valign=STYLE_ALIGN (',')?)?
('"effect"' ':' effect=Effect (',')?)?
'}';
Now i want to use the Style element into another file like this...
VizSpec:
'{' '"data"' ':' data=(DataEntity | DataArray) ','
'"grammar"' ':' vizGrammar=(GrammarEntity | GrammarArray)
(',' '"legends"' ':' legends=(LegendsEntity | LegendsArray))?
(',' '"size"' ':' size=Size)?
(',' '"style"' ':' style=External_Style)?
'}';
Can any one please provide a solution for it...
I have basically divided the entire grammar into two...
one file containing style element and the other the rest of it...
Code given above is not the whole file....just the part of it...
Thanks in advance
Irfan.
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04438 seconds