Skip to content

Instantly share code, notes, and snippets.

@manuelleduc
Created February 1, 2018 10:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manuelleduc/fd4004694f7431a13201b72a6da42358 to your computer and use it in GitHub Desktop.
Save manuelleduc/fd4004694f7431a13201b72a6da42358 to your computer and use it in GitHub Desktop.
XNumberLiteral returns XExpression :
{XNumberLiteral} value=Number;
Number hidden():
HEX | (INT | DECIMAL) ('.' (INT | DECIMAL))?;
terminal HEX:
('0x'|'0X') ('0'..'9'|'a'..'f'|'A'..'F'|'_')+
('#' (('b'|'B')('i'|'I') | ('l'|'L')))?;
terminal INT returns ecore::EInt:
'0'..'9' ('0'..'9'|'_')*;
terminal DECIMAL:
INT
(('e'|'E') ('+'|'-')? INT)?
(('b'|'B')('i'|'I'|'d'|'D') | ('l'|'L'|'d'|'D'|'f'|'F'))?;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment