Xtext validation for custom terminal rules [message #1793424] |
Wed, 08 August 2018 02:15  |
Eclipse User |
|
|
|
Hello,
I have written a custom terminal rule similar to SL and ML comments.
I have marked that in hidden rules.
I need to validate this custom terminal rule for particular format.
How can I write validation for my scenario?
I am not able to use @Check method, as there is no Interface created for hidden terminal rules.
grammar org.xtext.example.mydsl.MyDsl with org.eclipse.xtext.common.Terminals hidden(ML_COMMENT, SL_COMMENT, MY_STMT)
generate myDsl "http://www.xtext.org/example/mydsl/MyDsl"
Model:
greetings+=Greeting*;
Greeting:
'Hello' name=ID '!';
terminal MY_STMT : 'STMT' -> 'END_STMT';
How can I write validation for MY_STMT.
Thanks and regards,
Virag Purnam
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.09355 seconds