Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F4000479
SimpleDeclarative.g
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Jul 9, 4:19 AM
Size
876 B
Mime Type
text/plain
Expires
Sat, Jul 11, 4:19 AM (1 d, 3 h)
Engine
blob
Format
Raw Data
Handle
272956
Attached To
rXR Xreate
SimpleDeclarative.g
View Options
grammar SimpleDeclarative;
function
: WORD COLON 'function' expression(ARROW expression)? setFuncBody SEMICOLON;
setFuncBody
: BRACESTART BRACEEND | BRACESTART expression ARROW expression (COMMA expression ARROW expression)* BRACEEND;
;
set : BRACESTART BRACEEND | '{' set_member (COMMA set_member)* BRACEEND;
set_member: (atom COLON)=> atom COLON expression (OR expression)* | (expression EQUAL)=> equation | expression;
expression
: (LET set)? (atom | set) (WHERE set)?;
equation : expression EQUAL expression;
atom : WORD | NUMBER;
WHERE : 'where';
LET : 'let';
EQUAL : '=';
SEMICOLON: ';';
OR : '|';
COLON : ':';
ARROW : '->';
BRACESTART : '{';
BRACEEND : '}';
COMMA : ',';
NUMBER : (DIGIT)+ ;
WORD : (LETTER)+;
fragment
DIGIT : '0'..'9' ;
fragment
LETTER : 'a'..'z';
WHITESPACE : ( '\t' | ' ' | '\r' | '\n'| '\u000C' )+ { $channel = HIDDEN; } ;
Event Timeline
Log In to Comment