IntelliJ Plugin Preview with Semantic Predicate Condition

17 views
Skip to first unread message

Raz Friman

unread,
Jun 18, 2015, 11:59:45 AM6/18/15
to antlr-di...@googlegroups.com
I was wondering if the IntelliJ plugin supports previewing grammars that include semantic predicate conditions

I want to be able to support comments where there is an asterick in position 0, or anywhere on the line from '/*' to only the end of the line

my current rule is:


COMMENT:( '/*' .*? ([\r\n] | EOF)
| '*' .*? ([\r\n] | EOF) {getCharPositionInLine() == 0}?
)
-> channel(HIDDEN)
;

Does this seem correct? When paste my input into the preview window, I am not getting the expected results when the '*' comment moves away from position 0.

Thanks,

Raz



Terence Parr

unread,
Jun 19, 2015, 3:14:27 PM6/19/15
to antlr-di...@googlegroups.com
the interpreterDoesn't compile Java actions and so it's unable to handle semantic predicates. Sorry.

--
You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antlr-discussi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Dictation in use. Please excuse homophones, malapropisms, and nonsense. 
Reply all
Reply to author
Forward
0 new messages