ALPHAlower

[a-z]

ALPHAupper

[A-Z]

DIGIT2

[0-1]

DIGIT8

[0-7]

DIGIT10

[0-9]

DIGIT16

[0-9a-fA-F]

PREFIXbin

'0b'

PREFIXoct

'0c'

PREFIXdec

'0d'

PREFIXhex

'0x'

IDENTIFIERpart

ALPHAlowerALPHAupperDIGIT10UNUSED

U8

'U8'

U16

'U16'

U32

'U32'

U64

'U64'

I8

'I8'

I16

'I16'

I32

'I32'

I64

'I64'

F32

'F32'

F64

'F64'

STR

'Str'

BOOL

'Bool'

BIT

'Bit'

PTR

'Ptr'

OPT

'Opt'

ERR

'Err'

IMM

'Imm'

MODULE

'module'

IMPORT

'import'

EXPORT

'export'

LOOP

'loop'

BREAK

'break'

CONTINUE

'continue'

IF

'if'

ELSE

'else'

RETURN

'return'

IN

'in'

SELF

'self'

TRUE

'true'

FALSE

'false'

COMMENT

COMMENTstartany charnot[\r\n]

NUMBERbin

PREFIXbinDIGIT2UNUSED

NUMBERoct

PREFIXoctDIGIT8UNUSED

NUMBERdec

DIGIT10

NUMBERdec_prefix

PREFIXdecDIGIT10UNUSED

NUMBERhex

PREFIXhexDIGIT16UNUSED

CHARACTER

CHAR_QUOTEany charCHAR_QUOTE

STRING

STR_QUOTEany charSTR_QUOTE

AND

'and'

OR

'or'

NOT

'not'

UNUSED

'_'

PLUS

'+'

MINUS_NEG

'-'

MULT_PTR

'*'

DIV

'/'

MOD

'%'

POW

'**'

EQ_ASSIGN

'='

NEQ

'<>'

GREAT_ANGLEclose

'>'

SMALL_ANGLEopen

'<'

GREQ

'>='

SMEQ

'<='

BIT_AND

'&'

BIT_OR

'|'

BIT_XOR_IMM

'^'

BIT_NOT

'~'

BIT_SHL

'<<'

BIT_SHR

'>>'

BIT_ROLL

'|,'

BIT_ROLR

'>|'

CONCAT

'&&'

SUBopen

'['

SUBclose

']'

PARENopen

'('

PARENclose

')'

QUESTION

'?'

COLON

':'

DOT

'.'

RANGE

'..'

SPREAD

'...'

COMMA

','

META

'#'

COMPTIME

'#!'

ERROR

'!'

STR_QUOTE

'"'

CHAR_QUOTE

'\''

COMMENTstart

'//'

IDENTIFIERupper

ALPHAupperIDENTIFIERpart

IDENTIFIERlower

ALPHAlowerIDENTIFIERpart

SP

' '

TAB

'\t'

INDENT

SP

EOL

'\r''\n''\r'

file

sourceEOF

source

module_statementdefinition_topcommentempty_line

codeblock

flow_statementvariable_assignfunction_calldefinitioncommentempty_line

module_statement

statement_modulestatement_importstatement_export

module_name

identifier_modulemodule_nameDOTidentifier_module

statement_module

MODULESPmodule_namenewline

statement_import

IMPORTSPmodule_namenewline

statement_export

EXPORTSPidentifier_funcidentifier_typenewline

flow_statement

statement_ifstatement_elsestatement_elseifstatement_loopstatement_returnstatement_breakstatement_continue

statement_return

indentRETURNSPexpression_valuenewline

statement_if

indentIFSPexpression_logicnewlinecodeblock

statement_else

indentELSEnewlinecodeblock

statement_elseif

indentELSESPIFSPexpression_logicnewlinecodeblock

statement_break

indentBREAK

statement_continue

indentCONTINUE

statement_loop

indentstatement_loop_infinitestatement_loop_whilenewlinecodeblock

statement_loop_infinite

LOOP

statement_loop_while

LOOPSPexpression_logic

definition_top

function_def_exportfunction_defenum_defstruct_deftype_deftype_aliasvariable_def_top

definition

function_defvariable_def

expression_value

numberstringexpression_boolexpression_arithmeticexpression_logicfunction_call

comptime_expression_value

numberstringexpression_bool

expression_arithmetic

expression_arithmeticSPoperator_arithmeticSPexpression_arithmeticexpression_arithmeticSPoperator_bitsSPexpression_arithmeticPARENopenexpression_arithmeticPARENcloseoperator_arithmetic_unaryexpression_arithmeticoperator_bits_unaryexpression_arithmeticarithmetic_operand

arithmetic_operand

numbervariable_reffunction_call

expression_logic

expression_logicSPoperator_logicSPexpression_logicPARENopenexpression_logicPARENcloseoperator_logic_unarySPexpression_logiclogic_operand

logic_operand

expression_comparisonexpression_bool

expression_comparison

expression_comparisonSPoperator_comparisonSPexpression_comparisonPARENopenexpression_comparisonPARENclosecomparison_operand

comparison_operand

expression_arithmeticfunction_callvariable_refliteral

expression_bool

literal_boolvariable_ref

function_call

indentidentifier_funcPARENopenfunction_parameter_uselistPARENclosenewline

function_def

identifier_funcCOLONSPPARENopenfunction_parameter_listPARENclosefunction_return_typenewlinecodeblock

function_def_export

EXPORTSPfunction_def

function_parameter_list

function_parameterfunction_parameter_selfCOMMASPfunction_parameter

function_parameter

identifier_paramtype_ref_use

function_parameter_self

SELFtype_ref_use

function_parameter_uselist

function_param_useCOMMASPfunction_param_use

function_param_use

expression_valueCOMMASPexpression_value

function_return_type

type_ref_use

variable_ref

identifier_var

variable_def_top

variable_def_typedvariable_def_typed_initvariable_assign_autonewline

variable_def

indentvariable_def_typedvariable_def_typed_initvariable_assign_autonewline

variable_def_typed

identifier_vartype_ref_use

variable_def_typed_init

identifier_vartype_ref_useSPEQ_ASSIGNSPexpression_value

variable_assign_auto

identifier_varSPEQ_ASSIGNSPexpression_value

variable_assign

indentvariable_assign_auto

struct_def

identifier_typetemplate_param_listtype_ref_usenewlinestruct_field_def_list

struct_field_def_list

struct_field_def

struct_field_def

indentidentifier_fieldtype_ref_usenewline

enum_def

identifier_typeCOLONSPenum_base_typenewlineenum_option_def_listenum_option_def_listline

enum_option_def_listline

indentidentifier_enumoptionCOMMASPidentifier_enumoptionCOMMAnewline

enum_option_def_list

enum_option_defnewlineenum_option_defnewline

enum_option_def

indentidentifier_enumoptionenum_option_value

enum_option_value

SPEQ_ASSIGNSPcomptime_expression_value

enum_base_type

type_BitSTRF64F32I16I64I32I8U16U64U32U8

type_def

identifier_typetemplate_param_listtype_ref_useSPUNUSEDnewline

type_alias

identifier_typetemplate_param_listSPEQ_ASSIGNSPtype_refnewline

type_ref_use

COLONSPtype_ref

type_ref

type_nameERRORQUESTION

type_name

known_typesidentifier_typetemplate_param_list

known_types

type_Bittype_PtrBOOLSTRF64F32I16I64I32I8U16U64U32U8

type_Bit

BITtemplate_param_number

type_Ptr

PTRtemplate_param_type

type_Opt

OPTtemplate_param_type

type_Err

ERRtemplate_param_type

type_Imm

IMMtemplate_param_type

template_param_list

SMALL_ANGLEopentemplate_param_anyCOMMASPtemplate_param_anyGREAT_ANGLEclose

template_param_number

SMALL_ANGLEopennumberGREAT_ANGLEclose

template_param_type

SMALL_ANGLEopentype_nameGREAT_ANGLEclose

template_param_any

type_namenumber

identifier_type

IDENTIFIERupper

identifier_var

IDENTIFIERlower

identifier_param

IDENTIFIERlower

identifier_func

IDENTIFIERupperIDENTIFIERlower

identifier_field

IDENTIFIERupperIDENTIFIERlower

identifier_enumoption

IDENTIFIERupperIDENTIFIERlower

identifier_module

IDENTIFIERupperIDENTIFIERlower

identifier_unused

UNUSED

literal_bool

TRUEFALSE

literal

numberstring

number

number_binnumber_octnumber_decnumber_hexnumber_char

number_bin

NUMBERbin

number_oct

NUMBERoct

number_dec

NUMBERdecNUMBERdec_prefix

number_hex

NUMBERhex

number_char

character

operator_arithmetic

PLUSMINUS_NEGDIVMODMULT_PTRPOW

operator_arithmetic_unary

MINUS_NEG

operator_logic

ANDOR

operator_logic_unary

NOT

operator_comparison

EQ_ASSIGNNEQGREAT_ANGLEcloseSMALL_ANGLEopenGREQSMEQ

operator_bits

BIT_ANDBIT_ORBIT_XOR_IMMBIT_SHLBIT_SHRBIT_ROLLBIT_ROLR

operator_bits_unary

BIT_NOT

operator_assignment

EQ_ASSIGN

empty_line

INDENTEOL

newline

INDENTCOMMENTEOL

comment

INDENTCOMMENTEOL

string

STRING

character

CHARACTER

indent

INDENT