External Issue: Grammar railroad diagram

18051, "mingodad", "Grammar railroad diagram", "2021-07-12T09:15:39Z"

Using this tool https://www.bottlecaps.de/convert/ and manually adding the tokens from main/compiler/parser/chapel.lex we can see a railroad diagram for the grammar in main/compiler/parser/chapel.ypp copy and paste the EBNF shown bellow on Railroad Diagram Generator in the tab Edit Grammar then switching to the tab View Diagram.

/*
From https://raw.githubusercontent.com/chapel-lang/chapel/main/compiler/parser/chapel.ypp
*/

/* converted on Mon Jul 12, 2021, 11:00 (UTC+02) by bison-to-w3c v0.51 which is Copyright (c) 2011-2021 by Gunther Rademacher <grd@gmx.net> */

program  ::= toplevel_stmt*
toplevel_stmt
         ::= pragma_ls? stmt
pragma_ls
         ::= ( TPRAGMA STRINGLITERAL )+
stmt     ::= ( TATOMIC | TBEGIN opt_task_intent_ls | TLABEL ident_def | TSYNC )* ( deprecated_decl_stmt | include_module_stmt | ( TCOBEGIN opt_task_intent_ls )? block_stmt | use_stmt | import_stmt | require_stmt | assignment_stmt | extern_block_stmt | if_stmt | implements_stmt | interface_stmt | loop_stmt | select_stmt | defer_stmt | try_stmt | throw_stmt | return_stmt | ( stmt_level_expr | ( TBREAK | TCONTINUE ) opt_label_ident | ( TDELETE ( expr TCOMMA )* | TYIELD ) expr | error ) TSEMI | ( ( TLOCAL | TSERIAL ) expr? | TON expr ) do_stmt )
deprecated_decl_stmt
         ::= ( TDEPRECATED STRINGLITERAL? )? deprecated_decl_base
deprecated_decl_base
         ::= module_decl_stmt
           > class_level_stmt
module_decl_start
         ::= access_control opt_prototype TMODULE ident_def
module_decl_stmt
         ::= module_decl_start TLCBR ( stmt_ls | error )? TRCBR
access_control
         ::= ( TPUBLIC | TPRIVATE )?
opt_prototype
         ::= TPROTOTYPE?
include_access_control
         ::= ( TPUBLIC | TPRIVATE )?
include_module_stmt
         ::= TINCLUDE include_access_control opt_prototype TMODULE ident_def TSEMI
block_stmt
         ::= TLCBR ( stmt_ls | error )? TRCBR
stmt_ls  ::= toplevel_stmt+
renames_ls
         ::= expr ( TAS expr )? ( TCOMMA expr ( TAS expr )? )*
opt_only_ls
         ::= renames_ls?
except_ls
         ::= TSTAR
           > renames_ls
use_access_control
         ::= ( TPUBLIC | TPRIVATE )?
use_stmt ::= use_access_control TUSE expr ( TAS ( expr | TUNDERSCORE ) )? ( ( TCOMMA expr ( TAS ( expr | TUNDERSCORE ) )? )* | TEXCEPT except_ls | TONLY opt_only_ls ) TSEMI
import_stmt
         ::= use_access_control TIMPORT import_expr ( TCOMMA import_expr )* TSEMI
import_expr
         ::= expr ( TAS ident_use | TDOT TLCBR renames_ls TRCBR )?
require_stmt
         ::= TREQUIRE expr_ls TSEMI
assignment_stmt
         ::= lhs_expr ( ( assignop_ident | TSWAP | TASSIGNREDUCE | TASSIGNLAND | TASSIGNLOR ) opt_try_expr | TASSIGN TNOINIT ) TSEMI
opt_label_ident
         ::= TIDENT?
ident_fn_def
         ::= TIDENT
           > TNONE
           > TTHIS
           > TFALSE
           > TTRUE
           > internal_type_ident_def
ident_def
         ::= TIDENT
           > TNONE
           > TTHIS
           > TFALSE
           > TTRUE
           > internal_type_ident_def
ident_use
         ::= TIDENT
           > TTHIS
internal_type_ident_def
         ::= TBOOL
           > TINT
           > TUINT
           > TREAL
           > TIMAG
           > TCOMPLEX
           > TBYTES
           > TSTRING
           > TSYNC
           > TSINGLE
           > TOWNED
           > TSHARED
           > TBORROWED
           > TUNMANAGED
           > TDOMAIN
           > TINDEX
           > TLOCALE
           > TNOTHING
           > TVOID
scalar_type
         ::= TBOOL
           > TENUM
           > TINT
           > TUINT
           > TREAL
           > TIMAG
           > TCOMPLEX
           > TBYTES
           > TSTRING
           > TLOCALE
           > TNOTHING
           > TVOID
reserved_type_ident_use
         ::= TSYNC
           > TSINGLE
           > TDOMAIN
           > TINDEX
do_stmt  ::= TDO stmt
           > block_stmt
return_stmt
         ::= TRETURN opt_try_expr? TSEMI
deprecated_class_level_stmt
         ::= ( TDEPRECATED STRINGLITERAL? )? class_level_stmt
class_level_stmt
         ::= TSEMI
           > ( TPUBLIC | TPRIVATE )? private_decl
private_decl
         ::= fn_decl_stmt
           > var_decl_stmt
           > enum_decl_stmt
           > type_alias_decl_stmt
           > class_decl_stmt
           > forwarding_stmt
           > extern_export_decl_stmt
forwarding_stmt
         ::= TFORWARDING ( expr ( TEXCEPT except_ls | TONLY opt_only_ls )? TSEMI | var_decl_stmt )
extern_export_decl_stmt
         ::= TEXTERN ( STRINGLITERAL? ( TRECORD | TUNION ) ident_def opt_inherit TLCBR class_level_stmt_ls TRCBR | opt_expr ( fn_decl_stmt | var_decl_type var_decl_stmt_inner_ls TSEMI ) )
           > TEXPORT ( STRINGLITERAL? TRECORD ident_def opt_inherit TLCBR class_level_stmt_ls TRCBR | opt_expr ( fn_decl_stmt | var_decl_type var_decl_stmt_inner_ls TSEMI ) )
extern_block_stmt
         ::= TEXTERN EXTERNCODE
loop_stmt
         ::= TDO stmt TWHILE expr TSEMI
           > ( TWHILE ( expr | ifvar ) | TCOFORALL expr ( TIN ( expr | zippered_iterator ) )? opt_task_intent_ls | TFOR ( expr ( TIN ( expr | zippered_iterator ) )? | zippered_iterator | TPARAM ident_def TIN expr ) | ( TFORALL | TFOREACH ) ( expr ( TIN ( expr | zippered_iterator ) )? | zippered_iterator ) forall_intent_clause? ) do_stmt
           > TLSBR ( expr_ls ( TIN ( expr | zippered_iterator ) )? | zippered_iterator ) forall_intent_clause? TRSBR stmt
zippered_iterator
         ::= TZIP TLP expr_ls TRP
if_stmt  ::= TIF ( expr ( assignop_ident expr )? | ifvar ) ( TTHEN stmt | block_stmt ) ( TELSE stmt )?
ifvar    ::= ( TVAR | TCONST ) ident_def TASSIGN expr
interface_stmt
         ::= TINTERFACE ident_def ( TLP ifc_formal ( TCOMMA ifc_formal )* TRP )? block_stmt
ifc_formal
         ::= ident_def
implements_type_ident
         ::= TIDENT
           > TBOOL
           > TINT
           > TUINT
           > TREAL
           > TIMAG
           > TCOMPLEX
           > TBYTES
           > TSTRING
           > TLOCALE
           > TNOTHING
           > TVOID
           > implements_type_error_ident
implements_type_error_ident
         ::= TNONE
           > TTHIS
           > TFALSE
           > TTRUE
           > TDOMAIN
           > TINDEX
implements_stmt
         ::= ( TIMPLEMENTS ident_def TLP actual_ls TRP | implements_type_ident TIMPLEMENTS ident_def ( TLP actual_ls TRP )? ) TSEMI
ifc_constraint
         ::= TIMPLEMENTS ident_def TLP actual_ls TRP
           > implements_type_ident TIMPLEMENTS ident_def ( TLP actual_ls TRP )?
defer_stmt
         ::= TDEFER stmt
try_stmt ::= ( TTRY | TTRYBANG ) ( expr TSEMI | assignment_stmt | block_stmt catch_stmt_ls )
catch_stmt_ls
         ::= catch_stmt*
catch_stmt
         ::= TCATCH ( catch_expr | TLP catch_expr TRP )? block_stmt
catch_expr
         ::= ident_def ( TCOLON expr )?
throw_stmt
         ::= TTHROW expr TSEMI
select_stmt
         ::= TSELECT expr TLCBR ( when_stmt* | error ) TRCBR
when_stmt
         ::= TWHEN expr_ls do_stmt
           > TOTHERWISE TDO? stmt
class_decl_stmt
         ::= class_tag ident_def opt_inherit TLCBR ( class_level_stmt_ls | error ) TRCBR
class_tag
         ::= TCLASS
           > TRECORD
           > TUNION
opt_inherit
         ::= ( TCOLON expr_ls )?
class_level_stmt_ls
         ::= ( pragma_ls? deprecated_class_level_stmt )*
enum_decl_stmt
         ::= enum_header ident_def TLCBR ( deprecated_enum_item ( TCOMMA deprecated_enum_item? )* | error ) TRCBR
enum_header
         ::= TENUM
deprecated_enum_item
         ::= ( TDEPRECATED STRINGLITERAL? )? enum_item
enum_item
         ::= ident_def ( TASSIGN expr )?
lambda_decl_expr
         ::= TLAMBDA req_formal_ls opt_ret_tag opt_type opt_lifetime_where function_body_stmt
linkage_spec
         ::= ( TINLINE | TOVERRIDE )?
fn_decl_stmt
         ::= linkage_spec proc_iter_or_op fn_decl_stmt_inner opt_ret_tag opt_ret_type opt_throws_error opt_lifetime_where opt_function_body_stmt
fn_decl_stmt_inner
         ::= opt_this_intent_tag ( ( fn_decl_receiver_expr TDOT )? ( fn_ident | assignop_ident ) | error ) opt_formal_ls
fn_decl_receiver_expr
         ::= ident_expr
           > TLP expr TRP
fn_ident ::= ident_fn_def
           > TBAND
           > TBOR
           > TBXOR
           > TBNOT
           > TEQUAL
           > TNOTEQUAL
           > TLESSEQUAL
           > TGREATEREQUAL
           > TLESS
           > TGREATER
           > TPLUS
           > TMINUS
           > TSTAR
           > TDIVIDE
           > TSHIFTLEFT
           > TSHIFTRIGHT
           > TMOD
           > TEXP
           > ident_def? TBANG
           > TBY
           > THASH
           > TALIGN
           > TSWAP
           > TIO
           > TINITEQUALS
           > TCOLON
assignop_ident
         ::= TASSIGN
           > TASSIGNPLUS
           > TASSIGNMINUS
           > TASSIGNMULTIPLY
           > TASSIGNDIVIDE
           > TASSIGNMOD
           > TASSIGNEXP
           > TASSIGNBAND
           > TASSIGNBOR
           > TASSIGNBXOR
           > TASSIGNSR
           > TASSIGNSL
opt_formal_ls
         ::= ( TLP formal_ls TRP )?
req_formal_ls
         ::= TLP formal_ls TRP
formal_ls
         ::= ( formal ( TCOMMA formal )* )?
formal   ::= ( opt_intent_tag ( ident_def | TLP tuple_var_decl_stmt_inner_ls TRP ) | pragma_ls opt_intent_tag ident_def ) opt_formal_type ( opt_init_expr | var_arg_expr )
opt_intent_tag
         ::= required_intent_tag?
required_intent_tag
         ::= TIN
           > TINOUT
           > TOUT
           > TCONST ( TIN | TREF )?
           > TPARAM
           > TREF
           > TTYPE
opt_this_intent_tag
         ::= TCONST? TREF?
           > TPARAM
           > TTYPE
proc_iter_or_op
         ::= TPROC
           > TITER
           > TOPERATOR
opt_ret_tag
         ::= TCONST? TREF?
           > TPARAM
           > TTYPE
opt_throws_error
         ::= TTHROWS?
opt_function_body_stmt
         ::= TSEMI
           > function_body_stmt
function_body_stmt
         ::= block_stmt
           > return_stmt
query_expr
         ::= TQUERIEDIDENT
var_arg_expr
         ::= TDOTDOTDOT ( expr | query_expr )?
opt_lifetime_where
         ::= ( TWHERE expr ( TLIFETIME lifetime_components_expr )? | TLIFETIME lifetime_components_expr ( TWHERE expr )? )?
lifetime_components_expr
         ::= lifetime_expr ( TCOMMA lifetime_expr )*
lifetime_expr
         ::= ( lifetime_ident ( TASSIGN | TLESS | TLESSEQUAL | TEQUAL | TGREATER | TGREATEREQUAL ) | TRETURN ) lifetime_ident
lifetime_ident
         ::= TIDENT
           > TTHIS
type_alias_decl_stmt
         ::= ( TCONFIG | TEXTERN )? TTYPE type_alias_decl_stmt_inner TSEMI
type_alias_decl_stmt_inner
         ::= ident_def opt_init_type ( TCOMMA ident_def opt_init_type )*
opt_init_type
         ::= ( TASSIGN ( type_level_expr | array_type ) )?
var_decl_type
         ::= TPARAM
           > TCONST TREF?
           > TREF
           > TVAR
var_decl_stmt
         ::= TCONFIG? var_decl_type var_decl_stmt_inner_ls TSEMI
var_decl_stmt_inner_ls
         ::= var_decl_stmt_inner ( TCOMMA var_decl_stmt_inner )*
var_decl_stmt_inner
         ::= ( ident_def | TLP tuple_var_decl_stmt_inner_ls TRP ) opt_type opt_init_expr
tuple_var_decl_component
         ::= TUNDERSCORE
           > ident_def
           > TLP tuple_var_decl_stmt_inner_ls TRP
tuple_var_decl_stmt_inner_ls
         ::= tuple_var_decl_component ( TCOMMA tuple_var_decl_component )* TCOMMA?
opt_init_expr
         ::= ( TASSIGN ( TNOINIT | opt_try_expr ) )?
opt_ret_type
         ::= ( TCOLON ( type_level_expr | TLSBR ( expr_ls? TRSBR TLSBR )* ( expr_ls? TRSBR type_level_expr? | error TRSBR ) | reserved_type_ident_use ) | error )?
opt_type ::= ( TCOLON ( type_level_expr | array_type | reserved_type_ident_use ) | error )?
array_type
         ::= TLSBR ( expr_ls TRSBR TLSBR )* ( expr_ls ( TIN expr )? TRSBR type_level_expr | error TRSBR )
opt_formal_array_elt_type
         ::= ( type_level_expr | query_expr )?
opt_formal_type
         ::= ( TCOLON ( type_level_expr | query_expr | reserved_type_ident_use | TLSBR ( expr_ls? TRSBR TLSBR )* ( expr_ls ( TIN expr )? )? TRSBR opt_formal_array_elt_type ) )?
expr_ls  ::= ( expr | query_expr ) ( TCOMMA ( expr | query_expr ) )*
tuple_component
         ::= TUNDERSCORE
           > opt_try_expr
           > query_expr
tuple_expr_ls
         ::= tuple_component ( TCOMMA tuple_component )+
opt_actual_ls
         ::= actual_ls?
actual_ls
         ::= actual_expr ( TCOMMA actual_expr )*
actual_expr
         ::= ( ident_use TASSIGN )? ( query_expr | opt_try_expr )
ident_expr
         ::= ident_use
           > scalar_type
type_level_expr
         ::= sub_type_level_expr TQUESTION?
           > TQUESTION
sub_type_level_expr
         ::= nil_expr
           > lhs_expr
           > cond_expr
           > unary_op_expr
           > binary_op_expr
           > ( TSINGLE | TATOMIC | TSYNC ) expr
           > ( ( TINDEX | TDOMAIN | TSUBDOMAIN ) TLP opt_actual_ls | TSPARSE TSUBDOMAIN TLP actual_expr ) TRP
           > ( TOWNED | TUNMANAGED | TSHARED | TBORROWED ) expr?
           > TCLASS
           > TRECORD
for_expr ::= ( ( TFOR | TFORALL ) expr ( TIN ( expr | zippered_iterator ) )? TDO ( TIF expr TTHEN )? | TLSBR expr_ls ( TRSBR | TIN ( expr | zippered_iterator ) TRSBR ( TIF expr TTHEN )? ) ) expr
cond_expr
         ::= TIF expr TTHEN expr TELSE expr
nil_expr ::= TNIL
stmt_level_expr
         ::= nil_expr
           > ident_expr
           > dot_expr
           > call_expr
           > lambda_decl_expr
           > new_expr
           > let_expr
           > lhs_expr ( TIO expr )+
opt_task_intent_ls
         ::= task_intent_clause?
task_intent_clause
         ::= TWITH TLP intent_expr ( TCOMMA intent_expr )* TRP
forall_intent_clause
         ::= TWITH TLP intent_expr ( TCOMMA intent_expr )* TRP
intent_expr
         ::= shadow_var_prefix ident_expr opt_type opt_init_expr
           > ( reduce_scan_op_expr | expr ) TREDUCE ident_expr
shadow_var_prefix
         ::= TCONST ( TIN | TREF )?
           > TIN
           > TREF
           > TVAR
new_maybe_decorated
         ::= TNEW ( TOWNED | TSHARED | TUNMANAGED | TBORROWED )?
new_expr ::= new_maybe_decorated expr
           > TNEW ( TOWNED | TSHARED ) TLP expr TRP TLP opt_actual_ls TRP TQUESTION?
let_expr ::= TLET var_decl_stmt_inner_ls TIN expr
expr     ::= literal_expr
           > type_level_expr
           > for_expr
           > reduce_expr
           > scan_expr
           > lambda_decl_expr
           > new_expr
           > let_expr
           > ifc_constraint
           > TLP TDOTDOTDOT expr TRP
           > expr ( ( TCOLON | TDOTDOTOPENHIGH ) expr | TDOTDOT expr? )
           > TDOTDOT expr?
           > TDOTDOTOPENHIGH expr
opt_expr ::= expr?
opt_try_expr
         ::= ( TTRY | TTRYBANG )? expr
lhs_expr ::= ident_expr
           > call_expr
           > dot_expr
           > parenthesized_expr
call_base_expr
         ::= lhs_expr
           > expr TBANG
           > sub_type_level_expr TQUESTION
           > lambda_decl_expr
           > str_bytes_literal
call_expr
         ::= call_base_expr ( TLP opt_actual_ls TRP | TLSBR opt_actual_ls TRSBR )
           > TPRIMITIVE TLP opt_actual_ls TRP
dot_expr ::= expr TDOT ( ident_use | TTYPE | TDOMAIN | TLOCALE | TBYTES TLP TRP )
parenthesized_expr
         ::= TLP ( tuple_component | tuple_expr_ls ) TCOMMA? TRP
bool_literal
         ::= TFALSE
           > TTRUE
str_bytes_literal
         ::= STRINGLITERAL
           > BYTESLITERAL
literal_expr
         ::= bool_literal
           > str_bytes_literal
           > INTLITERAL
           > REALLITERAL
           > IMAGLITERAL
           > CSTRINGLITERAL
           > TNONE
           > TLCBR expr_ls TCOMMA? TRCBR
           > TLSBR ( expr_ls | assoc_expr_ls ) TCOMMA? TRSBR
assoc_expr_ls
         ::= expr TALIAS expr ( TCOMMA expr TALIAS expr )*
binary_op_expr
         ::= expr ( TPLUS | TMINUS | TSTAR | TDIVIDE | TSHIFTLEFT | TSHIFTRIGHT | TMOD | TEQUAL | TNOTEQUAL | TLESSEQUAL | TGREATEREQUAL | TLESS | TGREATER | TBAND | TBOR | TBXOR | TAND | TOR | TEXP | TBY | TALIGN | THASH | TDMAPPED ) expr
unary_op_expr
         ::= ( TPLUS | TMINUS | TMINUSMINUS | TPLUSPLUS | TBANG | TBNOT ) expr
           > expr TBANG
reduce_expr
         ::= ( expr | reduce_scan_op_expr ) TREDUCE ( expr | zippered_iterator )
scan_expr
         ::= ( expr | reduce_scan_op_expr ) TSCAN ( expr | zippered_iterator )
reduce_scan_op_expr
         ::= TPLUS
           > TSTAR
           > TAND
           > TOR
           > TBAND
           > TBOR
           > TBXOR

// Tokens from https://github.com/chapel-lang/chapel/blob/main/compiler/parser/chapel.lex

TALIGN ::= "align"
TAS ::= "as"
TATOMIC ::= "atomic"
TBEGIN ::= "begin"
TBOOL ::= "bool"
TBORROWED ::= "borrowed"
TBREAK ::= "break"
TBY ::= "by"
TBYTES ::= "bytes"
TCATCH ::= "catch"
TCLASS ::= "class"
TCOBEGIN ::= "cobegin"
TCOFORALL ::= "coforall"
TCOMPLEX ::= "complex"
TCONFIG ::= "config"
TCONST ::= "const"
TCONTINUE ::= "continue"
TDEFER ::= "defer"
TDELETE ::= "delete"
TDEPRECATED ::= "deprecated"
TDMAPPED ::= "dmapped"
TDO ::= "do"
TDOMAIN ::= "domain"
TELSE ::= "else"
TENUM ::= "enum"
TEXPORT ::= "export"
TEXCEPT ::= "except"
TFALSE ::= "false"
TFOR ::= "for"
TFORALL ::= "forall"
TFOREACH ::= "foreach"
TFORWARDING ::= "forwarding"
TIF ::= "if"
TIMAG ::= "imag"
TIMPORT ::= "import"
TIN ::= "in"
TINCLUDE ::= "include"
TINDEX ::= "index"
TINLINE ::= "inline"
TINOUT ::= "inout"
TINT ::= "int"
TIMPLEMENTS ::= "implements"
TINTERFACE ::= "interface"
TITER ::= "iter"
TLABEL ::= "label"
TLAMBDA ::= "lambda"
TLET ::= "let"
TLIFETIME ::= "lifetime"
TLOCAL ::= "local"
TLOCALE ::= "locale"
TMODULE ::= "module"
TNEW ::= "new"
TNIL ::= "nil"
TNOINIT ::= "noinit"
TNONE ::= "none"
TNOTHING ::= "nothing"
TON ::= "on"
TONLY ::= "only"
TOPERATOR ::= "operator"
TOTHERWISE ::= "otherwise"
TOUT ::= "out"
TOVERRIDE ::= "override"
TOWNED ::= "owned"
TPARAM ::= "param"
TPRAGMA ::= "pragma"
TPRIMITIVE ::= "__primitive"
TPRIVATE ::= "private"
TPROC ::= "proc"
TPROTOTYPE ::= "prototype"
TPUBLIC ::= "public"
TREAL ::= "real"
TRECORD ::= "record"
TREDUCE ::= "reduce"
TREF ::= "ref"
TREQUIRE ::= "require"
TRETURN ::= "return"
TSCAN ::= "scan"
TSELECT ::= "select"
TSERIAL ::= "serial"
TSHARED ::= "shared"
TSINGLE ::= "single"
TSPARSE ::= "sparse"
TSTRING ::= "string"
TSUBDOMAIN ::= "subdomain"
TSYNC ::= "sync"
TTHEN ::= "then"
TTHIS ::= "this"
TTHROW ::= "throw"
TTHROWS ::= "throws"
TTRUE ::= "true"
TTRY ::= "try"
TTRYBANG ::= "try!"
TTYPE ::= "type"
TUINT ::= "uint"
TUNION ::= "union"
TUNMANAGED ::= "unmanaged"
TUSE ::= "use"
TVAR ::= "var"
TVOID ::= "void"
TWHEN ::= "when"
TWHERE ::= "where"
TWHILE ::= "while"
TWITH ::= "with"
TYIELD ::= "yield"
TZIP ::= "zip"

TUNDERSCORE ::= "_"

TASSIGN ::= "="
TASSIGNPLUS ::= "+="
TASSIGNMINUS ::= "-="
TASSIGNMULTIPLY ::= "*="
TASSIGNDIVIDE ::= "/="
TASSIGNEXP ::= "**="
TASSIGNMOD ::= "%="
TASSIGNBAND ::= "&="
TASSIGNBOR ::= "|="
TASSIGNBXOR ::= "^="
TASSIGNLAND ::= "&&="
TASSIGNLOR ::= "||="
TASSIGNSL ::= "<<="
TASSIGNSR ::= ">>="
TASSIGNREDUCE ::= "reduce="

TINITEQUALS ::= "init="

TALIAS ::= "=>"

TSWAP ::= "<=>"

THASH ::= "#"
TDOTDOT ::= ".."
TDOTDOTOPENHIGH ::= "..<"
TDOTDOTDOT ::= "..."

TAND ::= "&&"
TOR ::= "||"
TBANG ::= "!"

TBAND ::= "&"
TBOR ::= "|"
TBXOR ::= "^"
TBNOT ::= "~"

TSHIFTLEFT ::= "<<"
TSHIFTRIGHT ::= ">>"

TEQUAL ::= "=="
TNOTEQUAL ::= "!="
TLESSEQUAL ::= "<="
TGREATEREQUAL ::= ">="
TLESS ::= "<"
TGREATER ::= ">"

TPLUS ::= "+"
TMINUS ::= "-"
TSTAR ::= "*"
TDIVIDE ::= "/"
TMOD ::= "%"
TMINUSMINUS ::= "--"
TPLUSPLUS ::= "++"

TEXP ::= "**"

TCOLON ::= ":"
TSEMI ::= ";"
TCOMMA ::= ","
TDOT ::= "."
TLP ::= "("
TRP ::= ")"
TLSBR ::= "["
TRSBR ::= "]"
TLCBR ::= "{"
TRCBR ::= "}"
TIO ::= "<~>"
TQUESTION ::= "?"