|
|
|
|
|
|
|
|
|
|
|
|
Re: An internal error occurred during: "calculating highlighting". [message #1765053 is a reply to message #1765011] |
Tue, 06 June 2017 08:42   |
Udeshika Sewwandi Messages: 118 Registered: March 2017 |
Senior Member |
|
|
Hi
The Antlr grammar rule for double is as follows.
DOUBLE_LITERAL
: DIGIT+ ( '.' DIGIT* )? ( E [-+]? DIGIT+ )? D
;
fragment DIGIT : [0-9];
The converted Xtext grammar rule is :
DOUBLE_LITERAL:
DIGIT+ ( '.' DIGIT* )? ( E ('-'|'+')? DIGIT+ )? D
;
fragment DIGIT:
INT
;
@Override
terminal INT returns ecore::EInt:
('0'..'9');
Is this conversion correct?
The double values inserted in the following query in the editor seems errornous.
from purchase[price >= 30]#window.lossyFrequent(0.1,0.01) --double
select cardNo, price
insert into PotentialFraud ;
Thank you.
[Updated on: Tue, 06 June 2017 08:43] Report message to a moderator
|
|
|
|
|
|
|
Re: An internal error occurred during: "calculating highlighting". [message #1765165 is a reply to message #1765164] |
Wed, 07 June 2017 07:55   |
|
sorry: create new Grammar With
import "http://www.eclipse.org/emf/2002/Ecore" as ecore
Model:
greetings+=Greeting*;
Greeting:
'Hello' name=ID value=DOUBLE_LITERAL '!';
DOUBLE_LITERAL:
DIGIT+ ( '.' DIGIT* )? ( E ('-'|'+')? DIGIT+ )? D
|DIGIT+ ( '.' DIGIT* )? E ('-'|'+')? DIGIT+ D?
|(DIGIT+)? '.' DIGIT+ ( E ('-'|'+')? DIGIT+ )? D
;
E: "e"|"E";
D: "D"|"d";
fragment DIGIT:
INT
;
@Override
terminal INT returns ecore::EInt:
('0'..'9');
and youll get tons of warnings
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03414 seconds