123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- location:
- | LOCATION_START EOL*
- line_statement*
- LOCATION_END EOL*
- EOF
- line_statement:
- | COMMENT EOL+ // A comment
- | COLUMN IDENT EOL* // A location
- | instruction, line_sep
- | inline_action line_sep
- | ACT expression COLUMN EOL+ // ACT … END ACT
- line_statement*
- END ACT? // Yes you can have END or END ACT
- line_sep
- | IF expression COLUMN EOL+ // IF … END IF
- line_statement*
- elif*
- else
- END IF? // Yes you can have END or END IF
- line_sep
- elif:
- | ELIF
- expression COLUMN EOL+
- line_statement*
- else:
- | ELSE EOL+
- line_statement*
- |
- line_sep:
- | EOL+
- | AMPERSAND+ EOL*
- instruction:
- | expression
- | let_assignation
- | keyword argument(expression)
- keyword:
- | STAR KEYWORD // A keyword starting with *
- | KEYWORD
- let_assignation:
- | assignation
- variable
- assignation_operator
- expression
- assignation:
- |
- | LET
- | SET
- assignation_operator:
- | EQUAL
- | INCR // +=
- | DECR // -=
- inline_action:
- | ACT expression COLUMN // There is a recursive code here
- | IF expression COLUMN // Because ACT: can contains an IF: etc
- (ELSE, instruction)? // complicated to flatten here.
- expression:
- | delimited(l_paren, expression, r_paren)
- | unary_operator expression
- | expression binary_operator expression
- | literal
- | integer
- | variable
- | function argument(expression)
- unary_operator:
- | OBJ
- | LOC
- | NO
- | MINUS
- | PLUS
- binary_operator:
- | EQUAL
- | LT GT // Different
- | EXCLAMATION // Neg, not a comment here
- | PLUS
- | MINUS
- | STAR // Not the first char of keyword here
- | DIV
- | MOD
- | GT
- | LT
- | GT EQUAL
- | LT EQUAL
- | EQUAL GT // Alternative syntax
- | EQUAL LT // Alternative syntax
- | AND
- | OR
|