Different prefix for Special Character in RuleCall [message #1725260] |
Wed, 02 March 2016 08:10  |
pranay roy Messages: 196 Registered: January 2016 |
Senior Member |
|
|
MY Grammar has definition of string as
Model:
greetings=Query;
Query:
(key=QTypekeyWord)? (aggregation=Aggregation)?(measure=MeasureList);
QTypekeyWord:
qKeyword='plot'
;
MeasureList : names+=Measure ("and" names+=Measure)*;
EinString:ID |SPECIAL;
SPECIAL:
('/' | ';' | ',' | '!' | 'ยง' | '%' | '&' | '(' | ')' | '?' | '*' | '+' | '.' | '-' | '|' | '[' | ']' | '#' | '@' |'{'|'}' |'$' |'^' |'~' |INT |':');
Measure:EinString+;
the value of prefix is different .
For
plot profit a --->prefix ="profit a"
for
plot profit # ----> preifix =""
For the second case ,I expect the prefix to be "profit #" and not "".Please suggest if I am missing something.
At these places I am checking prefix value.
override protected def dispatch void createProposals(Keyword keyword, ContentAssistContext context,
IIdeContentProposalAcceptor acceptor) {
if(filterKeyword(keyword, context)) {
var userTypedText= context.getRootNode.getText
var prefix=context.prefix
and
override dispatch createProposals(RuleCall ruleCall, ContentAssistContext context,
IIdeContentProposalAcceptor acceptor) {
[b] val prefix= context.prefix[/b]
[Updated on: Wed, 02 March 2016 08:12] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02233 seconds