Skip to content

Grammar railroad diagram #1

@mingodad

Description

@mingodad

Using this extended peg https://github.com/mingodad/peg from Piumatra and with a bit of manual fix we can have a railroad diagram for https://github.com/neumannt/cppfront-exp/blob/master/src/parser/cpp2.peg.

Copy and paste the EBNF shown bellow at https://www.bottlecaps.de/rr/ui on the tab Edit Grammar then click on the tab View Diagram to get a navigable railroad diagram.

//To be viewd at https://www.bottlecaps.de/rr/ui

translation_unit ::=
	 ( _ declaration_seq _ end_of_file )
	| ( _ end_of_file )

parameter_declaration_list ::=
	 '(' _ parameter_declaration_seq? _ ')'

parameter_declaration_seq ::=
	 ( parameter_declaration_seq _ ',' _ parameter_declaration )
	| ( parameter_declaration )

parameter_declaration ::=
	 parameter_direction? declaration_param

parameter_direction ::=
	 ( skw_in _ )
	| ( skw_copy _ )
	| ( skw_inout _ )
	| ( skw_out _ )
	| ( skw_move _ )
	| ( skw_forward _ )

function_type ::=
	 parameter_declaration_list ( _ throws_specifier )? ( _ return_list )? ( _ function_modifier_list )? ( _ contract_seq )?

throws_specifier ::=
	 kw_throws

return_list ::=
	 ( '->' _ id_expression )
	| ( '->' _ parameter_declaration_list )

contract ::=
	 '[[' _ contract_kind ( _ id_expression )? _ ':' _NOT_  ':' _ logical_or_expression ( _ ',' string_literal )? _ ']]'

function_modifier ::=
	 ( skw_in _ )
	| ( skw_inout _ )
	| ( skw_out _ )
	| ( skw_move _ )
	| ( skw_forward _ )
	| ( kw_static _ )
	| ( kw_virtual _ )
	| ( 'override' _ )
	| ( '=' _ '0' _ )
	| ( '=' _ kw_default _ )
	| ( '=' _ kw_delete _ )

function_modifier_list ::=
	 ( function_modifier_list function_modifier )
	| ( function_modifier )

contract_kind ::=
	 ( skw_pre )
	| ( skw_post )
	| ( skw_assert )

contract_seq ::=
	 ( contract_seq contract )
	| ( contract )

unnamed_declaration ::=
	 ( ':' _NOT_  ':' _ function_type _ '=' _ statement )
	| ( ':' _NOT_  ':' _ type_id_expression? _ '=' _ statement )
	| ( ':' _NOT_  ':' _ type_id_expression _ ';' )
	| ( ':' _NOT_  ':' _ function_type _ ';' )

unnamed_declaration_param ::=
	 ( ':' _NOT_  ':' _ function_type _ '=' _ statement )
	| ( ':' _NOT_  ':' _ type_id_expression? _ '=' _ statement )
	| ( ':' _NOT_  ':' _ type_id_expression )

unqualified_id ::=
	 ( template_id )
	| ( identifier )

template_id ::=
	 identifier _ '<' _ template_argument_list? _ '>'

template_argument_list ::=
	 ( template_argument_list _ ',' _ template_argument )
	| ( template_argument )

template_argument ::=
	 ( id_expression )
	| ( expression_no_cmp )

qualified_id ::=
	 ( nested_name_specifier _ unqualified_id )
	| ( member_name_specifier _ unqualified_id )

qualified_id_after_dot ::=
	 nested_name_specifier _ unqualified_id

nested_name_specifier ::=
	 ( '::' _ nested_name_specifier_list )
	| ( '::' )
	| ( nested_name_specifier_list )

nested_name_specifier_list ::=
	 ( nested_name_specifier_list _ unqualified_id _ '::' )
	| ( unqualified_id _ '::' )

member_name_specifier ::=
	 unqualified_id _ '.'

id_expression ::=
	 ( kw_const _ id_expression )
	| ( qualified_id )
	| ( unqualified_id )
	| ( fundamental_type )

id_expression_after_dot ::=
	 ( qualified_id_after_dot )
	| ( unqualified_id )

type_id_expression ::=
	 ( '*' _ id_expression )
	| ( id_expression )

fundamental_type_modifier ::=
	 ( kw_unsigned )
	| ( kw_signed )
	| ( kw_long )
	| ( kw_short )

fundamental_type_modifier_list ::=
	 ( fundamental_type_modifier_list _ fundamental_type_modifier )
	| ( fundamental_type_modifier )

fundamental_type ::=
	 ( kw_void )
	| ( ( fundamental_type_modifier_list _ )? kw_char )
	| ( kw_char8_t )
	| ( kw_char16_t )
	| ( kw_char32_t )
	| ( kw_wchar_t )
	| ( ( fundamental_type_modifier_list _ )? kw_int )
	| ( kw_bool )
	| ( kw_float )
	| ( kw_double )
	| ( kw_long _ kw_double )
	| ( fundamental_type_modifier_list )

declaration ::=
	 ( identifier _ unnamed_declaration )
	| ( kw_operator _ operator_name _ unnamed_declaration )
	| ( kw_namespace _ identifier _ '{' _ '}' )
	| ( kw_namespace _ identifier _ '{' _ declaration_seq _ '}' )
	| ( kw_class _ identifier ( _ ':' _ identifier )? _ '{' _ '}' )
	| ( kw_class _ identifier ( _ ':' _ identifier )? _ '{' _ declaration_seq _ '}' )
	| ( kw_using _ identifier _ '=' _ id_expression _ ';' )
	| ( kw_using _ identifier _ '=' _ kw_decltype _ '(' expression _ ')' _ ';' )
	| ( kw_template _ '<' _ template_declaration_list _ '>' declaration )

declaration_param ::=
	 identifier _ unnamed_declaration_param

declaration_seq ::=
	 ( declaration_seq _ declaration )
	| ( declaration )
	| declaration

expression ::=
	 assignment_expression

expression_no_cmp ::=
	 assignment_expression_no_cmp

expression_list ::=
	 ( expression_list _ ',' _ expression )
	| ( expression )

assignment_expression ::=
	 ( logical_or_expression _ assignment_operator _ assignment_expression )
	| ( logical_or_expression )

assignment_expression_no_cmp ::=
	 ( logical_or_expression_no_cmp _ assignment_operator _ assignment_expression_no_cmp )
	| ( logical_or_expression_no_cmp )

assignment_operator ::=
	 ( '=' _NOT_  '=' )
	| ( '*=' )
	| ( '/=' )
	| ( '%=' )
	| ( '+=' )
	| ( '-=' )
	| ( '>>=' )
	| ( '<<=' )
	| ( at_and_eq )
	| ( at_xor_eq )
	| ( at_or_eq )

logical_or_expression ::=
	 ( logical_or_expression _ at_or _ logical_and_expression )
	| ( logical_and_expression )

logical_or_expression_no_cmp ::=
	 ( logical_or_expression_no_cmp _ at_or _ logical_and_expression_no_cmp )
	| ( logical_and_expression_no_cmp )

logical_and_expression ::=
	 ( logical_and_expression _ at_and _ bit_or_expression )
	| ( bit_or_expression )

logical_and_expression_no_cmp ::=
	 ( logical_and_expression_no_cmp _ at_and _ bit_or_expression_no_cmp )
	| ( bit_or_expression_no_cmp )

bit_or_expression ::=
	 ( bit_or_expression _ at_bitor _ bit_xor_expression )
	| ( bit_xor_expression )

bit_or_expression_no_cmp ::=
	 ( bit_or_expression_no_cmp _ at_bitor _ bit_xor_expression_no_cmp )
	| ( bit_xor_expression_no_cmp )

bit_xor_expression ::=
	 ( bit_xor_expression _ at_xor _ bit_and_expression )
	| ( bit_and_expression )

bit_xor_expression_no_cmp ::=
	 ( bit_xor_expression_no_cmp _ at_xor _ bit_and_expression_no_cmp )
	| ( bit_and_expression_no_cmp )

bit_and_expression ::=
	 ( bit_and_expression _ at_bitand _ equality_expression )
	| ( equality_expression )

bit_and_expression_no_cmp ::=
	 ( bit_and_expression_no_cmp _ at_bitand _ equality_expression_no_cmp )
	| ( equality_expression_no_cmp )

equality_expression ::=
	 ( equality_expression _ '==' _ relational_expression )
	| ( equality_expression _ at_not_eq _ relational_expression )
	| ( relational_expression )

equality_expression_no_cmp ::=
	 ( equality_expression_no_cmp _ '==' _ relational_expression_no_cmp )
	| ( equality_expression_no_cmp _ at_not_eq _ relational_expression_no_cmp )
	| ( relational_expression_no_cmp )

relational_expression ::=
	 ( relational_expression _ '<=' _ compare_expression )
	| ( relational_expression _ '>=' _ compare_expression )
	| ( relational_expression _ '<' _NOT_  '<' _ compare_expression )
	| ( relational_expression _ '>' _NOT_  '>' _ compare_expression )
	| ( compare_expression )

relational_expression_no_cmp ::=
	 compare_expression_no_cmp

compare_expression ::=
	 ( compare_expression _ '<=>' _ shift_expression )
	| ( shift_expression )

compare_expression_no_cmp ::=
	 ( compare_expression _ '<=>' _ shift_expression )
	| ( additive_expression )

shift_expression ::=
	 ( shift_expression _ '<<' _ additive_expression )
	| ( shift_expression _ '>>' _ additive_expression )
	| ( additive_expression )

additive_expression ::=
	 ( additive_expression _ '+' _NOT_  '+' _ multiplicative_expression )
	| ( additive_expression _ '-' _NOT_  '-' _ multiplicative_expression )
	| ( multiplicative_expression )

multiplicative_expression ::=
	 ( multiplicative_expression _ '*' _ is_as_expression )
	| ( multiplicative_expression _ '/' _ is_as_expression )
	| ( multiplicative_expression _ '%' _ is_as_expression )
	| ( is_as_expression )

is_as_expression ::=
	 ( is_as_expression _ kw_is _ id_expression )
	| ( is_as_expression _ kw_as _ id_expression )
	| ( prefix_expression )

prefix_expression ::=
	 ( at_not _ prefix_expression )
	| ( '+' _ prefix_expression )
	| ( '-' _ prefix_expression )
	| ( postfix_expression )

postfix_expression ::=
	 ( postfix_expression '++' )
	| ( postfix_expression '--' )
	| ( postfix_expression '*' _NOT_  ( '(' | identifier | literal ) )
	| ( postfix_expression '&' _NOT_  ( '(' | identifier | literal ) )
	| ( postfix_expression at_compl )
	| ( postfix_expression '$' )
	| ( postfix_expression _ '[' _ expression_list _ ']' )
	| ( postfix_expression _ '(' _ expression_list? _ ')' )
	| ( postfix_expression _ '.' _ id_expression_after_dot )
	| ( primary_expression )

primary_expression ::=
	 ( inspect_expression )
	| ( id_expression_after_dot )
	| ( literal )
	| ( '(' _ expression_list? _ ')' )
	| ( unnamed_declaration )
	| ( kw_nullptr )
	| ( kw_true )
	| ( kw_false )
	| ( kw_typeid _ '(' _ expression _ ')' )
	| ( kw_new _ '<' id_expression _ '>' _ '(' _ expression_list? _ ')' )

literal ::=
	 ( numeric_literal )
	| ( string_literal )

statement ::=
	 ( declaration_statement )
	| ( compound_statement )
	| ( selection_statement )
	| ( return_statement )
	| ( iteration_statement )
	| ( inspect_expression )
	| ( expression_statement )
	| ( kw_delete '[]'? _ expression _ ';' )

expression_statement ::=
	 expression _ ';'

compound_statement ::=
	 ( '{' _ '}' )
	| ( '{' _ statement_seq _ '}' )

statement_seq ::=
	 ( statement_seq _ statement )
	| ( statement )
	| statement

selection_statement ::=
	 ( kw_if ( _ constexpr )? _ expression _ compound_statement _ kw_else _ compound_statement )
	| ( kw_if ( _ constexpr )? _ expression _ compound_statement )
	| ( kw_if ( _ constexpr )? _ expression _ compound_statement _ kw_else _ compound_statement )
	| ( kw_if ( _ constexpr )? _ expression _ compound_statement )
	| ( kw_if ( _ constexpr )? _ expression )

constexpr ::=
	 _ kw_constexpr

declaration_statement ::=
	 declaration

return_statement ::=
	 ( kw_return ( _ expression )? _ ';' )
	| ( kw_return ( ( _ expression )? _ ';' ) )

iteration_statement ::=
	 ( kw_while _ logical_or_expression ( _ next_clause )? _ compound_statement )
	| ( kw_do _ compound_statement _ kw_while _ logical_or_expression ( _ next_clause )? _ ';' )
	| ( kw_for _ expression ( _ next_clause )? _ kw_do _ unnamed_declaration )

next_clause ::=
	 skw_next _ assignment_expression

inspect_expression ::=
	 ( kw_inspect constexpr? _ expression _ '->' _ id_expression _ '{' _ alternative_seq? _ '}' )
	| ( kw_inspect constexpr? _ expression _ '{' _ alternative_seq? _ '}' )

alternative_seq ::=
	 ( alternative_seq _ alternative )
	| ( alternative )

alternative ::=
	 ( ( alt_name _ )? kw_is _ id_expression _ '=' _NOT_  '=' _ statement )
	| ( ( alt_name _ )? kw_as _ id_expression _ '=' _NOT_  '=' _ statement )

alt_name ::=
	 unqualified_id _ ':' _NOT_  ':'

identifier ::=
	 _AND_  L _NOT_  keyword L ( L | D )*

numeric_literal ::=
	 ( '0' [xX] X [0-9a-fA-F']* _NOT_  [.pP] ( ( [uU] ( 'll' | 'LL' | [lLzZ] )? ) | ( ( 'll' | 'LL' | [zZ] ) 'u'? ) )? )
	| ( '0' O [0-7']* ( ( [uU] ( 'll' | 'LL' | [lLzZ] )? ) | ( ( 'll' | 'LL' | [zZ] ) 'u'? ) )? )
	| ( D [0-9']* ( ( [.] D+ ( [eE] [-+]? D+ )? ) | ( [eE] [-+]? D+ ) ) [fFlL]? )
	| ( D [0-9']* ( ( [uU] ( 'll' | 'LL' | [lLzZ] )? ) | ( ( 'll' | 'LL' | [zZ] ) 'u'? ) )? )
	| ( '0' [xX] X [0-9a-fA-F']* ( ( [.] D+ ( [pP] [-+]? D+ )? ) | ( [pP] [-+]? D+ ) ) [fFlL]? )

string_literal ::=
	 ( '"' ( "\\" | '\"' | [^"] )* '"' L? ( L | D )* )
	| ( "'" ( "\\" | "\'" | [^'] )* "'" )
	| ( ( "u8" | "u" | "U" ) '"' ( "\\" | '\"' | [^"] )* '"' L? ( L | D )* )

keyword ::=
	 kw_alignas
	| kw_alignof
	| kw_asm
	| kw_as
	| kw_auto
	| kw_bool
	| kw_break
	| kw_case
	| kw_catch
	| kw_char
	| kw_char16_t
	| kw_char32_t
	| kw_char8_t
	| kw_class
	| kw_co_await
	| kw_co_return
	| kw_co_yield
	| kw_concept
	| kw_const
	| kw_const_cast
	| kw_consteval
	| kw_constexpr
	| kw_constinit
	| kw_continue
	| kw_decltype
	| kw_default
	| kw_delete
	| kw_double
	| kw_do
	| kw_dynamic_cast
	| kw_else
	| kw_enum
	| kw_explicit
	| kw_export
	| kw_extern
	| kw_false
	| kw_float
	| kw_for
	| kw_friend
	| kw_goto
	| kw_if
	| kw_import
	| kw_inline
	| kw_inspect
	| kw_int
	| kw_is
	| kw_long
	| kw_module
	| kw_mutable
	| kw_namespace
	| kw_new
	| kw_noexcept
	| kw_nullptr
	| kw_operator
	| kw_private
	| kw_protected
	| kw_public
	| kw_register
	| kw_reinterpret_cast
	| kw_requires
	| kw_return
	| kw_short
	| kw_signed
	| kw_sizeof
	| kw_static
	| kw_static_assert
	| kw_static_cast
	| kw_struct
	| kw_switch
	| kw_template
	| kw_this
	| kw_thread_local
	| kw_throws
	| kw_throw
	| kw_true
	| kw_try
	| kw_typedef
	| kw_typeid
	| kw_typename
	| kw_union
	| kw_unsigned
	| kw_using
	| kw_virtual
	| kw_void
	| kw_volatile
	| kw_wchar_t
	| kw_while
	| atkw_and
	| atkw_and_eq
	| atkw_bitand
	| atkw_bitor
	| atkw_compl
	| atkw_not
	| atkw_not_eq
	| atkw_or
	| atkw_or_eq
	| atkw_xor
	| atkw_xor_eq

kw_alignas ::=
	 'alignas' _NOT_  ( L | D )

kw_alignof ::=
	 'alignof' _NOT_  ( L | D )

kw_asm ::=
	 'asm' _NOT_  ( L | D )

kw_as ::=
	 'as' _NOT_  ( L | D )

kw_auto ::=
	 'auto' _NOT_  ( L | D )

kw_bool ::=
	 'bool' _NOT_  ( L | D )

kw_break ::=
	 'break' _NOT_  ( L | D )

kw_case ::=
	 'case' _NOT_  ( L | D )

kw_catch ::=
	 'catch' _NOT_  ( L | D )

kw_char ::=
	 'char' _NOT_  ( L | D )

kw_char16_t ::=
	 'char16_t' _NOT_  ( L | D )

kw_char32_t ::=
	 'char32_t' _NOT_  ( L | D )

kw_char8_t ::=
	 'char8_t' _NOT_  ( L | D )

kw_class ::=
	 'class' _NOT_  ( L | D )

kw_co_await ::=
	 'co_await' _NOT_  ( L | D )

kw_co_return ::=
	 'co_return' _NOT_  ( L | D )

kw_co_yield ::=
	 'co_yield' _NOT_  ( L | D )

kw_concept ::=
	 'concept' _NOT_  ( L | D )

kw_const ::=
	 'const' _NOT_  ( L | D )

kw_const_cast ::=
	 'const_cast' _NOT_  ( L | D )

kw_consteval ::=
	 'consteval' _NOT_  ( L | D )

kw_constexpr ::=
	 'constexpr' _NOT_  ( L | D )

kw_constinit ::=
	 'constinit' _NOT_  ( L | D )

kw_continue ::=
	 'continue' _NOT_  ( L | D )

kw_decltype ::=
	 'decltype' _NOT_  ( L | D )

kw_default ::=
	 'default' _NOT_  ( L | D )

kw_delete ::=
	 'delete' _NOT_  ( L | D )

kw_double ::=
	 'double' _NOT_  ( L | D )

kw_do ::=
	 'do' _NOT_  ( L | D )

kw_dynamic_cast ::=
	 'dynamic_cast' _NOT_  ( L | D )

kw_else ::=
	 'else' _NOT_  ( L | D )

kw_enum ::=
	 'enum' _NOT_  ( L | D )

kw_explicit ::=
	 'explicit' _NOT_  ( L | D )

kw_export ::=
	 'export' _NOT_  ( L | D )

kw_extern ::=
	 'extern' _NOT_  ( L | D )

kw_false ::=
	 'false' _NOT_  ( L | D )

kw_float ::=
	 'float' _NOT_  ( L | D )

kw_for ::=
	 'for' _NOT_  ( L | D )

kw_friend ::=
	 'friend' _NOT_  ( L | D )

kw_goto ::=
	 'goto' _NOT_  ( L | D )

kw_if ::=
	 'if' _NOT_  ( L | D )

kw_import ::=
	 'import' _NOT_  ( L | D )

kw_inline ::=
	 'inline' _NOT_  ( L | D )

kw_inspect ::=
	 'inspect' _NOT_  ( L | D )

kw_int ::=
	 'int' _NOT_  ( L | D )

kw_is ::=
	 'is' _NOT_  ( L | D )

kw_long ::=
	 'long' _NOT_  ( L | D )

kw_module ::=
	 'module' _NOT_  ( L | D )

kw_mutable ::=
	 'mutable' _NOT_  ( L | D )

kw_namespace ::=
	 'namespace' _NOT_  ( L | D )

kw_new ::=
	 'new' _NOT_  ( L | D )

kw_noexcept ::=
	 'noexcept' _NOT_  ( L | D )

kw_nullptr ::=
	 'nullptr' _NOT_  ( L | D )

kw_operator ::=
	 'operator' _NOT_  ( L | D )

kw_private ::=
	 'private' _NOT_  ( L | D )

kw_protected ::=
	 'protected' _NOT_  ( L | D )

kw_public ::=
	 'public' _NOT_  ( L | D )

kw_register ::=
	 'register' _NOT_  ( L | D )

kw_reinterpret_cast ::=
	 'reinterpret_cast' _NOT_  ( L | D )

kw_requires ::=
	 'requires' _NOT_  ( L | D )

kw_return ::=
	 'return' _NOT_  ( L | D )

kw_short ::=
	 'short' _NOT_  ( L | D )

kw_signed ::=
	 'signed' _NOT_  ( L | D )

kw_sizeof ::=
	 'sizeof' _NOT_  ( L | D )

kw_static ::=
	 'static' _NOT_  ( L | D )

kw_static_assert ::=
	 'static_assert' _NOT_  ( L | D )

kw_static_cast ::=
	 'static_cast' _NOT_  ( L | D )

kw_struct ::=
	 'struct' _NOT_  ( L | D )

kw_switch ::=
	 'switch' _NOT_  ( L | D )

kw_template ::=
	 'template' _NOT_  ( L | D )

kw_this ::=
	 'this' _NOT_  ( L | D )

kw_thread_local ::=
	 'thread_local' _NOT_  ( L | D )

kw_throws ::=
	 'throws' _NOT_  ( L | D )

kw_throw ::=
	 'throw' _NOT_  ( L | D )

kw_true ::=
	 'true' _NOT_  ( L | D )

kw_try ::=
	 'try' _NOT_  ( L | D )

kw_typedef ::=
	 'typedef' _NOT_  ( L | D )

kw_typeid ::=
	 'typeid' _NOT_  ( L | D )

kw_typename ::=
	 'typename' _NOT_  ( L | D )

kw_union ::=
	 'union' _NOT_  ( L | D )

kw_unsigned ::=
	 'unsigned' _NOT_  ( L | D )

kw_using ::=
	 'using' _NOT_  ( L | D )

kw_virtual ::=
	 'virtual' _NOT_  ( L | D )

kw_void ::=
	 'void' _NOT_  ( L | D )

kw_volatile ::=
	 'volatile' _NOT_  ( L | D )

kw_wchar_t ::=
	 'wchar_t' _NOT_  ( L | D )

kw_while ::=
	 'while' _NOT_  ( L | D )

atkw_and ::=
	 'and' _NOT_  ( L | D )

at_and ::=
	 '&&'
	| atkw_and

atkw_and_eq ::=
	 'and_eq' _NOT_  ( L | D )

at_and_eq ::=
	 '&='
	| atkw_and_eq

atkw_bitand ::=
	 'bitand' _NOT_  ( L | D )

at_bitand ::=
	 ( '&' _NOT_  [&=] )
	| atkw_bitand

atkw_bitor ::=
	 'bitor' _NOT_  ( L | D )

at_bitor ::=
	 ( '|' _NOT_  [|=] )
	| atkw_bitor

atkw_compl ::=
	 'compl' _NOT_  ( L | D )

at_compl ::=
	 '~'
	| atkw_compl

atkw_not ::=
	 'not' _NOT_  ( L | D )

at_not ::=
	 ( '!' _NOT_  '=' )
	| atkw_not

atkw_not_eq ::=
	 'not_eq' _NOT_  ( L | D )

at_not_eq ::=
	 '!='
	| atkw_not_eq

atkw_or ::=
	 'or' _NOT_  ( L | D )

at_or ::=
	 '||'
	| atkw_or

atkw_or_eq ::=
	 'or_eq' _NOT_  ( L | D )

at_or_eq ::=
	 '|='
	| atkw_or_eq

atkw_xor ::=
	 'xor' _NOT_  ( L | D )

at_xor ::=
	 ( '^' _NOT_  '=' )
	| atkw_xor

atkw_xor_eq ::=
	 'xor_eq' _NOT_  ( L | D )

at_xor_eq ::=
	 '^='
	| atkw_xor_eq

skw_pre ::=
	 'pre' _NOT_  ( L | D )

skw_post ::=
	 'post' _NOT_  ( L | D )

skw_assert ::=
	 'assert' _NOT_  ( L | D )

skw_in ::=
	 'in' _NOT_  ( L | D )

skw_copy ::=
	 'copy' _NOT_  ( L | D )

skw_inout ::=
	 'inout' _NOT_  ( L | D )

skw_out ::=
	 'out' _NOT_  ( L | D )

skw_move ::=
	 'move' _NOT_  ( L | D )

skw_forward ::=
	 'forward' _NOT_  ( L | D )

skw_next ::=
	 'next' _NOT_  ( L | D )

O ::=
	 [0-7]

D ::=
	 [0-9]

X ::=
	 [0-9a-fA-F]

L ::=
	 [a-zA-Z_]

_ ::=
	 ( space | comment | preprocessor )*

comment ::=
	 ( '//' ( _NOT_  ( end_of_line | end_of_file ) . )* end_of_line )
	| end_of_file
	| ( '/*' ( _NOT_  '*/' . )* '*/' )
	| ( '/*' ( _NOT_  '*/' . )* )

space ::=
	 blank
	| end_of_line

blank ::=
	 [ \t\v\f]

end_of_line ::=
	 '\r\n'
	| '\n'
	| '\r'

end_of_file ::=
	 _NOT_  .

preprocessor ::=
	 '#' [^\n\r]* [\n\r]

template_declaration_list ::=
	 ( template_declaration_list _ ',' identifier )
	| ( identifier )

operator_name ::=
	 ( at_and )
	| ( at_or )
	| ( at_bitand )
	| ( at_bitor )
	| ( at_xor )
	| ( at_compl )
	| ( at_not )
	| ( at_and_eq )
	| ( at_or_eq )
	| ( at_xor_eq )
	| ( '<<=' )
	| ( '<<' )
	| ( '>>=' )
	| ( '>>' )
	| ( '++' )
	| ( '+=' )
	| ( '+' )
	| ( '--' )
	| ( '-=' )
	| ( '-' )
	| ( '*=' )
	| ( '*' )
	| ( '/=' )
	| ( '/' )
	| ( '%=' )
	| ( '%' )
	| ( '<=>' )
	| ( '==' )
	| ( '=' )
	| ( '!=' )
	| ( '<=' )
	| ( '<' )
	| ( '>=' )
	| ( '>' )


//Added tokens for railroad generation
_NOT_ ::= '!'
_AND_ ::= '&'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions