Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grammar railroad diagram #17

Open
mingodad opened this issue Jun 12, 2023 · 2 comments
Open

Grammar railroad diagram #17

mingodad opened this issue Jun 12, 2023 · 2 comments

Comments

@mingodad
Copy link

With a custom parser and a bit of manual fixes I could get an EBNF understood by https://www.bottlecaps.de/rr/ui to generate a nice navigable railroad diagram from parser.mly.

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

implementation ::=  structure EOF

interface ::=  signature EOF

toplevel_phrase ::=  seq_expr list_post_item_attribute_ SEMISEMI
	| list_text_str_structure_item__ SEMISEMI
	| toplevel_directive SEMISEMI
	| EOF

use_file ::=  list_use_file_element_ EOF
	| seq_expr list_post_item_attribute_ list_use_file_element_ EOF

parse_module_type ::=  module_type EOF

parse_module_expr ::=  module_expr EOF

parse_core_type ::=  core_type EOF

parse_expression ::=  seq_expr EOF

parse_pattern ::=  pattern EOF

parse_mty_longident ::=  mty_longident EOF

parse_val_longident ::=  val_longident EOF

parse_constr_longident ::=  constr_longident EOF

parse_mod_ext_longident ::=  mod_ext_longident EOF

parse_mod_longident ::=  mod_longident EOF

parse_any_longident ::=  any_longident EOF

functor_arg ::=  LPAREN RPAREN
	| LPAREN module_name COLON module_type RPAREN

module_name ::=  UIDENT
	| UNDERSCORE

module_expr ::=  STRUCT list_attribute_ structure END
	| STRUCT list_attribute_ structure error
	| FUNCTOR list_attribute_ reversed_nonempty_llist_functor_arg_ MINUSGREATER module_expr
	| paren_module_expr
	| module_expr attribute
	| mod_longident
	| module_expr paren_module_expr
	| module_expr LPAREN RPAREN
	| extension

paren_module_expr ::=  LPAREN module_expr COLON module_type RPAREN
	| LPAREN module_expr COLON module_type error
	| LPAREN module_expr RPAREN
	| LPAREN module_expr error
	| LPAREN VAL list_attribute_ expr RPAREN
	| LPAREN VAL list_attribute_ expr COLON module_type RPAREN
	| LPAREN VAL list_attribute_ expr COLON module_type COLONGREATER module_type RPAREN
	| LPAREN VAL list_attribute_ expr COLONGREATER module_type RPAREN
	| LPAREN VAL list_attribute_ expr COLON error
	| LPAREN VAL list_attribute_ expr COLONGREATER error
	| LPAREN VAL list_attribute_ expr error

structure ::=  list_structure_element_
	| seq_expr list_post_item_attribute_ list_structure_element_

structure_item ::=  let_bindings_ext_
	| item_extension list_post_item_attribute_
	| floating_attribute
	| primitive_declaration
	| value_description
	| generic_type_declaration_nonrec_flag_type_kind_ list_generic_and_type_declaration_type_kind__
	| TYPE ext list_attribute_ type_parameters type_longident PLUSEQ private_flag reversed_bar_llist_extension_constructor_ list_post_item_attribute_
	| TYPE ext list_attribute_ NONREC type_parameters type_longident PLUSEQ private_flag reversed_bar_llist_extension_constructor_ list_post_item_attribute_
	| str_exception_declaration
	| MODULE ext list_attribute_ module_name module_binding_body list_post_item_attribute_
	| MODULE ext list_attribute_ REC module_name module_binding_body list_post_item_attribute_ list_and_module_binding_
	| module_type_declaration
	| open_declaration
	| CLASS ext list_attribute_ virtual_flag formal_class_parameters LIDENT class_fun_binding list_post_item_attribute_ list_and_class_declaration_
	| class_type_declarations
	| INCLUDE ext list_attribute_ module_expr list_post_item_attribute_

module_binding_body ::=  EQUAL module_expr
	| COLON module_type EQUAL module_expr
	| functor_arg module_binding_body

module_type_declaration ::=  MODULE TYPE ext list_attribute_ ident option_preceded_EQUAL_module_type__ list_post_item_attribute_

open_declaration ::=  OPEN ext list_attribute_ module_expr list_post_item_attribute_
	| OPEN BANG ext list_attribute_ module_expr list_post_item_attribute_

open_description ::=  OPEN ext list_attribute_ mod_ext_longident list_post_item_attribute_
	| OPEN BANG ext list_attribute_ mod_ext_longident list_post_item_attribute_

module_type ::=  SIG list_attribute_ signature END
	| SIG list_attribute_ signature error
	| FUNCTOR list_attribute_ reversed_nonempty_llist_functor_arg_ MINUSGREATER module_type
	| MODULE TYPE OF list_attribute_ module_expr
	| LPAREN module_type RPAREN
	| LPAREN module_type error
	| module_type attribute
	| mty_longident
	| module_type MINUSGREATER module_type
	| module_type WITH reversed_separated_nonempty_llist_AND_with_constraint_
	| extension

signature ::=  list_signature_element_

signature_item ::=  item_extension list_post_item_attribute_
	| floating_attribute
	| value_description
	| primitive_declaration
	| generic_type_declaration_nonrec_flag_type_kind_ list_generic_and_type_declaration_type_kind__
	| generic_type_declaration_no_nonrec_flag_type_subst_kind_ list_generic_and_type_declaration_type_subst_kind__
	| TYPE ext list_attribute_ type_parameters type_longident PLUSEQ private_flag reversed_bar_llist_extension_constructor_declaration_ list_post_item_attribute_
	| TYPE ext list_attribute_ NONREC type_parameters type_longident PLUSEQ private_flag reversed_bar_llist_extension_constructor_declaration_ list_post_item_attribute_
	| sig_exception_declaration
	| MODULE ext list_attribute_ module_name module_declaration_body list_post_item_attribute_
	| MODULE ext list_attribute_ module_name EQUAL mod_longident list_post_item_attribute_
	| module_subst
	| MODULE ext list_attribute_ REC module_name COLON module_type list_post_item_attribute_ list_and_module_declaration_
	| module_type_declaration
	| module_type_subst
	| open_description
	| INCLUDE ext list_attribute_ module_type list_post_item_attribute_
	| CLASS ext list_attribute_ virtual_flag formal_class_parameters LIDENT COLON class_type list_post_item_attribute_ list_and_class_description_
	| class_type_declarations

module_declaration_body ::=  COLON module_type
	| functor_arg module_declaration_body

module_subst ::=  MODULE ext list_attribute_ UIDENT COLONEQUAL mod_ext_longident list_post_item_attribute_
	| MODULE ext list_attribute_ UIDENT COLONEQUAL error

module_type_subst ::=  MODULE TYPE ext list_attribute_ ident COLONEQUAL module_type list_post_item_attribute_

class_fun_binding ::=  EQUAL class_expr
	| COLON class_type EQUAL class_expr
	| labeled_simple_pattern class_fun_binding

formal_class_parameters ::=  /* empty */
	| LBRACKET reversed_separated_nonempty_llist_COMMA_type_parameter_ RBRACKET

class_expr ::=  class_simple_expr
	| FUN list_attribute_ class_fun_def
	| let_bindings_no_ext_ IN class_expr
	| LET OPEN list_attribute_ mod_longident IN class_expr
	| LET OPEN BANG list_attribute_ mod_longident IN class_expr
	| class_expr attribute
	| class_simple_expr reversed_nonempty_llist_labeled_simple_expr_
	| extension

class_simple_expr ::=  LPAREN class_expr RPAREN
	| LPAREN class_expr error
	| class_longident
	| LBRACKET reversed_separated_nonempty_llist_COMMA_core_type_ RBRACKET class_longident
	| OBJECT list_attribute_ class_self_pattern list_text_cstr_class_field__ error
	| LPAREN class_expr COLON class_type RPAREN
	| LPAREN class_expr COLON class_type error
	| OBJECT list_attribute_ class_self_pattern list_text_cstr_class_field__ END

class_fun_def ::=  labeled_simple_pattern MINUSGREATER class_expr
	| labeled_simple_pattern class_fun_def

class_self_pattern ::=  LPAREN pattern RPAREN
	| LPAREN pattern COLON core_type RPAREN
	| /* empty */

class_field ::=  INHERIT list_attribute_ class_expr option_preceded_AS_mkrhs_LIDENT___ list_post_item_attribute_
	| INHERIT BANG list_attribute_ class_expr option_preceded_AS_mkrhs_LIDENT___ list_post_item_attribute_
	| VAL value list_post_item_attribute_
	| METHOD method_ list_post_item_attribute_
	| CONSTRAINT list_attribute_ constrain_field list_post_item_attribute_
	| INITIALIZER list_attribute_ seq_expr list_post_item_attribute_
	| item_extension list_post_item_attribute_
	| floating_attribute

value ::=  list_attribute_ virtual_with_mutable_flag LIDENT COLON core_type
	| list_attribute_ mutable_flag LIDENT EQUAL seq_expr
	| BANG list_attribute_ mutable_flag LIDENT EQUAL seq_expr
	| list_attribute_ mutable_flag LIDENT type_constraint EQUAL seq_expr
	| BANG list_attribute_ mutable_flag LIDENT type_constraint EQUAL seq_expr

method_ ::=  list_attribute_ virtual_with_private_flag LIDENT COLON possibly_poly_core_type_
	| list_attribute_ private_flag LIDENT strict_binding
	| BANG list_attribute_ private_flag LIDENT strict_binding
	| list_attribute_ private_flag LIDENT COLON possibly_poly_core_type_ EQUAL seq_expr
	| BANG list_attribute_ private_flag LIDENT COLON possibly_poly_core_type_ EQUAL seq_expr
	| list_attribute_ private_flag LIDENT COLON TYPE nonempty_list_mkrhs_LIDENT__ DOT core_type EQUAL seq_expr
	| BANG list_attribute_ private_flag LIDENT COLON TYPE nonempty_list_mkrhs_LIDENT__ DOT core_type EQUAL seq_expr

class_type ::=  class_signature
	| optlabel tuple_type MINUSGREATER class_type
	| LIDENT COLON tuple_type MINUSGREATER class_type
	| tuple_type MINUSGREATER class_type

class_signature ::=  clty_longident
	| LBRACKET reversed_separated_nonempty_llist_COMMA_core_type_ RBRACKET clty_longident
	| extension
	| OBJECT list_attribute_ class_self_type list_text_csig_class_sig_field__ END
	| OBJECT list_attribute_ class_self_type list_text_csig_class_sig_field__ error
	| class_signature attribute
	| LET OPEN list_attribute_ mod_longident IN class_signature
	| LET OPEN BANG list_attribute_ mod_longident IN class_signature

class_self_type ::=  LPAREN core_type RPAREN
	| /* empty */

class_sig_field ::=  INHERIT list_attribute_ class_signature list_post_item_attribute_
	| VAL list_attribute_ mutable_virtual_flags LIDENT COLON core_type list_post_item_attribute_
	| METHOD list_attribute_ private_virtual_flags LIDENT COLON possibly_poly_core_type_ list_post_item_attribute_
	| CONSTRAINT list_attribute_ constrain_field list_post_item_attribute_
	| item_extension list_post_item_attribute_
	| floating_attribute

constrain_field ::=  core_type EQUAL core_type

class_type_declarations ::=  CLASS TYPE ext list_attribute_ virtual_flag formal_class_parameters LIDENT EQUAL class_signature list_post_item_attribute_ list_and_class_type_declaration_

seq_expr ::=  expr
	| expr SEMI
	| expr SEMI seq_expr
	| expr SEMI PERCENT attr_id seq_expr

labeled_simple_pattern ::=  QUESTION LPAREN label_let_pattern option_preceded_EQUAL_seq_expr__ RPAREN
	| QUESTION LIDENT
	| OPTLABEL LPAREN let_pattern option_preceded_EQUAL_seq_expr__ RPAREN
	| OPTLABEL pattern_var
	| TILDE LPAREN label_let_pattern RPAREN
	| TILDE LIDENT
	| LABEL simple_pattern
	| simple_pattern

pattern_var ::=  LIDENT
	| UNDERSCORE

label_let_pattern ::=  LIDENT
	| LIDENT COLON core_type

let_pattern ::=  pattern
	| pattern COLON core_type

expr ::=  simple_expr
	| LET MODULE ext list_attribute_ module_name module_binding_body IN seq_expr
	| LET EXCEPTION ext list_attribute_ constr_ident generalized_constructor_arguments list_attribute_ IN seq_expr
	| LET OPEN ext list_attribute_ module_expr IN seq_expr
	| LET OPEN BANG ext list_attribute_ module_expr IN seq_expr
	| FUNCTION ext list_attribute_ reversed_preceded_or_separated_nonempty_llist_BAR_match_case_
	| FUN ext list_attribute_ labeled_simple_pattern fun_def
	| FUN ext list_attribute_ LPAREN TYPE nonempty_list_mkrhs_LIDENT__ RPAREN fun_def
	| MATCH ext list_attribute_ seq_expr WITH reversed_preceded_or_separated_nonempty_llist_BAR_match_case_
	| TRY ext list_attribute_ seq_expr WITH reversed_preceded_or_separated_nonempty_llist_BAR_match_case_
	| TRY ext list_attribute_ seq_expr WITH error
	| IF ext list_attribute_ seq_expr THEN expr ELSE expr
	| IF ext list_attribute_ seq_expr THEN expr
	| WHILE ext list_attribute_ seq_expr DO seq_expr DONE
	| FOR ext list_attribute_ pattern EQUAL seq_expr direction_flag seq_expr DO seq_expr DONE
	| ASSERT ext list_attribute_ simple_expr
	| LAZY ext list_attribute_ simple_expr
	| simple_expr reversed_nonempty_llist_labeled_simple_expr_
	| reversed_separated_nontrivial_llist_COMMA_expr_
	| constr_longident simple_expr
	| name_tag simple_expr
	| expr INFIXOP0 expr
	| expr INFIXOP1 expr
	| expr INFIXOP2 expr
	| expr INFIXOP3 expr
	| expr INFIXOP4 expr
	| expr PLUS expr
	| expr PLUSDOT expr
	| expr PLUSEQ expr
	| expr MINUS expr
	| expr MINUSDOT expr
	| expr STAR expr
	| expr PERCENT expr
	| expr EQUAL expr
	| expr LESS expr
	| expr GREATER expr
	| expr OR expr
	| expr BARBAR expr
	| expr AMPERSAND expr
	| expr AMPERAMPER expr
	| expr COLONEQUAL expr
	| subtractive expr
	| additive expr
	| let_bindings_ext_ IN seq_expr
	| LETOP letop_bindings IN seq_expr
	| expr COLONCOLON expr
	| LIDENT LESSMINUS expr
	| simple_expr DOT label_longident LESSMINUS expr
	| simple_expr DOT LPAREN seq_expr RPAREN LESSMINUS expr
	| simple_expr DOT LBRACE seq_expr RBRACE LESSMINUS expr
	| simple_expr DOT LBRACKET seq_expr RBRACKET LESSMINUS expr
	| simple_expr DOTOP LPAREN separated_or_terminated_nonempty_list_SEMI_expr_ RPAREN LESSMINUS expr
	| simple_expr DOT mod_longident DOTOP LPAREN separated_or_terminated_nonempty_list_SEMI_expr_ RPAREN LESSMINUS expr
	| simple_expr DOTOP LBRACE separated_or_terminated_nonempty_list_SEMI_expr_ RBRACE LESSMINUS expr
	| simple_expr DOT mod_longident DOTOP LBRACE separated_or_terminated_nonempty_list_SEMI_expr_ RBRACE LESSMINUS expr
	| simple_expr DOTOP LBRACKET separated_or_terminated_nonempty_list_SEMI_expr_ RBRACKET LESSMINUS expr
	| simple_expr DOT mod_longident DOTOP LBRACKET separated_or_terminated_nonempty_list_SEMI_expr_ RBRACKET LESSMINUS expr
	| expr attribute
	| UNDERSCORE

simple_expr ::=  LPAREN seq_expr RPAREN
	| LPAREN seq_expr error
	| LPAREN seq_expr type_constraint RPAREN
	| simple_expr DOT LPAREN seq_expr RPAREN
	| simple_expr DOT LBRACE seq_expr RBRACE
	| simple_expr DOT LBRACKET seq_expr RBRACKET
	| simple_expr DOTOP LPAREN separated_or_terminated_nonempty_list_SEMI_expr_ RPAREN
	| simple_expr DOT mod_longident DOTOP LPAREN separated_or_terminated_nonempty_list_SEMI_expr_ RPAREN
	| simple_expr DOTOP LBRACE separated_or_terminated_nonempty_list_SEMI_expr_ RBRACE
	| simple_expr DOT mod_longident DOTOP LBRACE separated_or_terminated_nonempty_list_SEMI_expr_ RBRACE
	| simple_expr DOTOP LBRACKET separated_or_terminated_nonempty_list_SEMI_expr_ RBRACKET
	| simple_expr DOT mod_longident DOTOP LBRACKET separated_or_terminated_nonempty_list_SEMI_expr_ RBRACKET
	| simple_expr DOT LPAREN seq_expr error
	| simple_expr DOT LBRACE seq_expr error
	| simple_expr DOT LBRACKET seq_expr error
	| simple_expr DOTOP LPAREN separated_or_terminated_nonempty_list_SEMI_expr_ error
	| simple_expr DOT mod_longident DOTOP LPAREN separated_or_terminated_nonempty_list_SEMI_expr_ error
	| simple_expr DOTOP LBRACE separated_or_terminated_nonempty_list_SEMI_expr_ error
	| simple_expr DOT mod_longident DOTOP LBRACE separated_or_terminated_nonempty_list_SEMI_expr_ error
	| simple_expr DOTOP LBRACKET separated_or_terminated_nonempty_list_SEMI_expr_ error
	| simple_expr DOT mod_longident DOTOP LBRACKET separated_or_terminated_nonempty_list_SEMI_expr_ error
	| BEGIN ext list_attribute_ seq_expr END
	| BEGIN ext list_attribute_ END
	| BEGIN ext list_attribute_ seq_expr error
	| NEW ext list_attribute_ class_longident
	| LPAREN MODULE ext list_attribute_ module_expr RPAREN
	| LPAREN MODULE ext list_attribute_ module_expr COLON module_type RPAREN
	| LPAREN MODULE ext list_attribute_ module_expr COLON error
	| OBJECT ext list_attribute_ class_self_pattern list_text_cstr_class_field__ END
	| OBJECT ext list_attribute_ class_self_pattern list_text_cstr_class_field__ error
	| val_longident
	| constant
	| constr_longident
	| name_tag
	| PREFIXOP simple_expr
	| BANG simple_expr
	| LBRACELESS separated_or_terminated_nonempty_list_SEMI_object_expr_field_ GREATERRBRACE
	| LBRACELESS separated_or_terminated_nonempty_list_SEMI_object_expr_field_ error
	| LBRACELESS GREATERRBRACE
	| simple_expr DOT label_longident
	| mod_longident DOT LPAREN seq_expr RPAREN
	| mod_longident DOT LBRACELESS separated_or_terminated_nonempty_list_SEMI_object_expr_field_ GREATERRBRACE
	| mod_longident DOT LBRACELESS separated_or_terminated_nonempty_list_SEMI_object_expr_field_ error
	| simple_expr HASH LIDENT
	| simple_expr HASHOP simple_expr
	| extension
	| mod_longident DOT LPAREN RPAREN
	| mod_longident DOT LPAREN seq_expr error
	| LBRACE record_expr_content RBRACE
	| LBRACE record_expr_content error
	| mod_longident DOT LBRACE record_expr_content RBRACE
	| mod_longident DOT LBRACE record_expr_content error
	| LBRACKETBAR separated_or_terminated_nonempty_list_SEMI_expr_ BARRBRACKET
	| LBRACKETBAR separated_or_terminated_nonempty_list_SEMI_expr_ error
	| LBRACKETBAR BARRBRACKET
	| mod_longident DOT LBRACKETBAR separated_or_terminated_nonempty_list_SEMI_expr_ BARRBRACKET
	| mod_longident DOT LBRACKETBAR BARRBRACKET
	| mod_longident DOT LBRACKETBAR separated_or_terminated_nonempty_list_SEMI_expr_ error
	| LBRACKET separated_or_terminated_nonempty_list_SEMI_expr_ RBRACKET
	| LBRACKET separated_or_terminated_nonempty_list_SEMI_expr_ error
	| mod_longident DOT LBRACKET separated_or_terminated_nonempty_list_SEMI_expr_ RBRACKET
	| mod_longident DOT LBRACKET RBRACKET
	| mod_longident DOT LBRACKET separated_or_terminated_nonempty_list_SEMI_expr_ error
	| mod_longident DOT LPAREN MODULE ext list_attribute_ module_expr COLON module_type RPAREN
	| mod_longident DOT LPAREN MODULE ext list_attribute_ module_expr COLON error

labeled_simple_expr ::=  simple_expr
	| LABEL simple_expr
	| TILDE LIDENT
	| TILDE LPAREN LIDENT type_constraint RPAREN
	| QUESTION LIDENT
	| OPTLABEL simple_expr

let_binding_body_no_punning ::=  val_ident strict_binding
	| val_ident type_constraint EQUAL seq_expr
	| val_ident COLON reversed_nonempty_llist_typevar_ DOT core_type EQUAL seq_expr
	| val_ident COLON TYPE nonempty_list_mkrhs_LIDENT__ DOT core_type EQUAL seq_expr
	| pattern_no_exn EQUAL seq_expr
	| simple_pattern_not_ident COLON core_type EQUAL seq_expr

let_binding_body ::=  let_binding_body_no_punning
	| val_ident

let_bindings_ext_ ::=  LET ext list_attribute_ rec_flag let_binding_body list_post_item_attribute_
	| let_bindings_ext_ and_let_binding

let_bindings_no_ext_ ::=  LET list_attribute_ rec_flag let_binding_body list_post_item_attribute_
	| LET PERCENT attr_id list_attribute_ rec_flag let_binding_body list_post_item_attribute_
	| let_bindings_no_ext_ and_let_binding

and_let_binding ::=  AND list_attribute_ let_binding_body list_post_item_attribute_

letop_binding_body ::=  val_ident strict_binding
	| val_ident
	| simple_pattern COLON core_type EQUAL seq_expr
	| pattern_no_exn EQUAL seq_expr

letop_bindings ::=  letop_binding_body
	| letop_bindings ANDOP letop_binding_body

fun_binding ::=  strict_binding
	| type_constraint EQUAL seq_expr

strict_binding ::=  EQUAL seq_expr
	| labeled_simple_pattern fun_binding
	| LPAREN TYPE nonempty_list_mkrhs_LIDENT__ RPAREN fun_binding

match_case ::=  pattern MINUSGREATER seq_expr
	| pattern WHEN seq_expr MINUSGREATER seq_expr
	| pattern MINUSGREATER DOT

fun_def ::=  MINUSGREATER seq_expr
	| COLON atomic_type MINUSGREATER seq_expr
	| labeled_simple_pattern fun_def
	| LPAREN TYPE nonempty_list_mkrhs_LIDENT__ RPAREN fun_def

record_expr_content ::=  separated_or_terminated_nonempty_list_SEMI_record_expr_field_
	| simple_expr WITH separated_or_terminated_nonempty_list_SEMI_record_expr_field_

type_constraint ::=  COLON core_type
	| COLON core_type COLONGREATER core_type
	| COLONGREATER core_type
	| COLON error
	| COLONGREATER error

pattern ::=  pattern COLONCOLON pattern
	| pattern attribute
	| pattern_gen
	| pattern AS val_ident
	| pattern AS error
	| pattern_comma_list_pattern_
	| pattern COLONCOLON error
	| pattern BAR pattern
	| pattern BAR error
	| EXCEPTION ext list_attribute_ pattern

pattern_no_exn ::=  pattern_no_exn COLONCOLON pattern
	| pattern_no_exn attribute
	| pattern_gen
	| pattern_no_exn AS val_ident
	| pattern_no_exn AS error
	| pattern_comma_list_pattern_no_exn_
	| pattern_no_exn COLONCOLON error
	| pattern_no_exn BAR pattern
	| pattern_no_exn BAR error

pattern_gen ::=  simple_pattern
	| constr_longident pattern
	| constr_longident LPAREN TYPE nonempty_list_mkrhs_LIDENT__ RPAREN simple_pattern
	| name_tag pattern
	| LAZY ext list_attribute_ simple_pattern

simple_pattern ::=  val_ident
	| simple_pattern_not_ident

simple_pattern_not_ident ::=  LPAREN pattern RPAREN
	| simple_delimited_pattern
	| LPAREN MODULE ext list_attribute_ module_name RPAREN
	| LPAREN MODULE ext list_attribute_ module_name COLON module_type RPAREN
	| UNDERSCORE
	| signed_constant
	| signed_constant DOTDOT signed_constant
	| constr_longident
	| name_tag
	| HASH type_longident
	| mod_longident DOT simple_delimited_pattern
	| mod_longident DOT LBRACKET RBRACKET
	| mod_longident DOT LPAREN RPAREN
	| mod_longident DOT LPAREN pattern RPAREN
	| mod_longident DOT LPAREN pattern error
	| mod_longident DOT LPAREN error
	| LPAREN pattern error
	| LPAREN pattern COLON core_type RPAREN
	| LPAREN pattern COLON core_type error
	| LPAREN pattern COLON error
	| LPAREN MODULE ext list_attribute_ module_name COLON module_type error
	| extension

simple_delimited_pattern ::=  LBRACE listx_SEMI_record_pat_field_UNDERSCORE_ RBRACE
	| LBRACE listx_SEMI_record_pat_field_UNDERSCORE_ error
	| LBRACKET separated_or_terminated_nonempty_list_SEMI_pattern_ RBRACKET
	| LBRACKET separated_or_terminated_nonempty_list_SEMI_pattern_ error
	| LBRACKETBAR separated_or_terminated_nonempty_list_SEMI_pattern_ BARRBRACKET
	| LBRACKETBAR BARRBRACKET
	| LBRACKETBAR separated_or_terminated_nonempty_list_SEMI_pattern_ error

pattern_comma_list_pattern_ ::=  pattern_comma_list_pattern_ COMMA pattern
	| pattern COMMA pattern
	| pattern COMMA error

pattern_comma_list_pattern_no_exn_ ::=  pattern_comma_list_pattern_no_exn_ COMMA pattern
	| pattern_no_exn COMMA pattern
	| pattern_no_exn COMMA error

value_description ::=  VAL ext list_attribute_ val_ident COLON possibly_poly_core_type_ list_post_item_attribute_

primitive_declaration ::=  EXTERNAL ext list_attribute_ val_ident COLON possibly_poly_core_type_ EQUAL nonempty_list_raw_string_ list_post_item_attribute_

generic_type_declaration_no_nonrec_flag_type_subst_kind_ ::=  TYPE ext list_attribute_ type_parameters LIDENT COLONEQUAL nonempty_type_kind reversed_llist_preceded_CONSTRAINT_constrain__ list_post_item_attribute_
	| TYPE ext list_attribute_ NONREC type_parameters LIDENT COLONEQUAL nonempty_type_kind reversed_llist_preceded_CONSTRAINT_constrain__ list_post_item_attribute_

generic_type_declaration_nonrec_flag_type_kind_ ::=  TYPE ext list_attribute_ type_parameters LIDENT type_kind reversed_llist_preceded_CONSTRAINT_constrain__ list_post_item_attribute_
	| TYPE ext list_attribute_ NONREC type_parameters LIDENT type_kind reversed_llist_preceded_CONSTRAINT_constrain__ list_post_item_attribute_

nonempty_type_kind ::=  core_type
	| PRIVATE core_type
	| constructor_declarations
	| PRIVATE constructor_declarations
	| core_type EQUAL constructor_declarations
	| core_type EQUAL PRIVATE constructor_declarations
	| DOTDOT
	| PRIVATE DOTDOT
	| core_type EQUAL DOTDOT
	| core_type EQUAL PRIVATE DOTDOT
	| LBRACE label_declarations RBRACE
	| PRIVATE LBRACE label_declarations RBRACE
	| core_type EQUAL LBRACE label_declarations RBRACE
	| core_type EQUAL PRIVATE LBRACE label_declarations RBRACE

type_kind ::=  /* empty */
	| EQUAL nonempty_type_kind

type_parameters ::=  /* empty */
	| type_parameter
	| LPAREN reversed_separated_nonempty_llist_COMMA_type_parameter_ RPAREN

type_parameter ::=  type_variance type_variable

type_variable ::=  QUOTE ident
	| UNDERSCORE

type_variance ::=  /* empty */
	| PLUS
	| MINUS
	| BANG
	| PLUS BANG
	| BANG PLUS
	| MINUS BANG
	| BANG MINUS
	| INFIXOP2
	| PREFIXOP

constructor_declarations ::=  BAR
	| reversed_bar_llist_constructor_declaration_

generic_constructor_declaration_BAR_ ::=  BAR constr_ident generalized_constructor_arguments list_attribute_

generic_constructor_declaration_epsilon_ ::=  constr_ident generalized_constructor_arguments list_attribute_

str_exception_declaration ::=  sig_exception_declaration
	| EXCEPTION ext list_attribute_ constr_ident EQUAL constr_longident list_attribute_ list_post_item_attribute_

sig_exception_declaration ::=  EXCEPTION ext list_attribute_ constr_ident generalized_constructor_arguments list_attribute_ list_post_item_attribute_

generalized_constructor_arguments ::=  /* empty */
	| OF constructor_arguments
	| COLON constructor_arguments MINUSGREATER atomic_type
	| COLON reversed_nonempty_llist_typevar_ DOT constructor_arguments MINUSGREATER atomic_type
	| COLON atomic_type
	| COLON reversed_nonempty_llist_typevar_ DOT atomic_type

constructor_arguments ::=  atomic_type
	| reversed_separated_nonempty_llist_STAR_atomic_type_ STAR atomic_type
	| LBRACE label_declarations RBRACE

label_declarations ::=  label_declaration
	| label_declaration_semi
	| label_declaration_semi label_declarations

label_declaration ::=  mutable_flag LIDENT COLON possibly_poly_core_type_no_attr_ list_attribute_

label_declaration_semi ::=  mutable_flag LIDENT COLON possibly_poly_core_type_no_attr_ list_attribute_ SEMI list_attribute_

extension_constructor_rebind_BAR_ ::=  BAR constr_ident EQUAL constr_longident list_attribute_

extension_constructor_rebind_epsilon_ ::=  constr_ident EQUAL constr_longident list_attribute_

with_constraint ::=  TYPE type_parameters label_longident with_type_binder alias_type reversed_llist_preceded_CONSTRAINT_constrain__
	| TYPE type_parameters label_longident COLONEQUAL alias_type
	| MODULE mod_longident EQUAL mod_ext_longident
	| MODULE mod_longident COLONEQUAL mod_ext_longident
	| MODULE TYPE mty_longident EQUAL module_type
	| MODULE TYPE mty_longident COLONEQUAL module_type

with_type_binder ::=  EQUAL
	| EQUAL PRIVATE

possibly_poly_core_type_ ::=  core_type
	| reversed_nonempty_llist_typevar_ DOT core_type

possibly_poly_core_type_no_attr_ ::=  alias_type
	| reversed_nonempty_llist_typevar_ DOT alias_type

core_type ::=  alias_type
	| core_type attribute

alias_type ::=  function_type
	| alias_type AS QUOTE ident

function_type ::=  tuple_type
	| optlabel tuple_type MINUSGREATER function_type
	| LIDENT COLON tuple_type MINUSGREATER function_type
	| tuple_type MINUSGREATER function_type

tuple_type ::=  atomic_type
	| reversed_separated_nontrivial_llist_STAR_atomic_type_

atomic_type ::=  LPAREN core_type RPAREN
	| LPAREN MODULE ext list_attribute_ module_type RPAREN
	| QUOTE ident
	| UNDERSCORE
	| type_longident
	| atomic_type type_longident
	| LPAREN reversed_separated_nontrivial_llist_COMMA_core_type_ RPAREN type_longident
	| LESS meth_list GREATER
	| LESS GREATER
	| HASH clty_longident
	| atomic_type HASH clty_longident
	| LPAREN reversed_separated_nontrivial_llist_COMMA_core_type_ RPAREN HASH clty_longident
	| LBRACKET tag_field RBRACKET
	| LBRACKET BAR reversed_separated_nonempty_llist_BAR_row_field_ RBRACKET
	| LBRACKET row_field BAR reversed_separated_nonempty_llist_BAR_row_field_ RBRACKET
	| LBRACKETGREATER option_BAR_ reversed_separated_nonempty_llist_BAR_row_field_ RBRACKET
	| LBRACKETGREATER RBRACKET
	| LBRACKETLESS option_BAR_ reversed_separated_nonempty_llist_BAR_row_field_ RBRACKET
	| LBRACKETLESS option_BAR_ reversed_separated_nonempty_llist_BAR_row_field_ GREATER reversed_nonempty_llist_name_tag_ RBRACKET
	| extension

row_field ::=  tag_field
	| core_type

tag_field ::=  name_tag OF opt_ampersand reversed_separated_nonempty_llist_AMPERSAND_core_type_no_attr_ list_attribute_
	| name_tag list_attribute_

opt_ampersand ::=  AMPERSAND
	| /* empty */

meth_list ::=  LIDENT COLON possibly_poly_core_type_no_attr_ list_attribute_ SEMI list_attribute_ meth_list
	| atomic_type SEMI meth_list
	| LIDENT COLON possibly_poly_core_type_no_attr_ list_attribute_ SEMI list_attribute_
	| atomic_type SEMI
	| LIDENT COLON possibly_poly_core_type_no_attr_ list_attribute_
	| atomic_type
	| DOTDOT

constant ::=  INT
	| CHAR
	| STRING
	| FLOAT

signed_constant ::=  constant
	| MINUS INT
	| MINUS FLOAT
	| PLUS INT
	| PLUS FLOAT

ident ::=  UIDENT
	| LIDENT

val_extra_ident ::=  LPAREN operator RPAREN
	| LPAREN operator error
	| LPAREN error
	| LPAREN MODULE error

val_ident ::=  LIDENT
	| val_extra_ident

operator ::=  PREFIXOP
	| LETOP
	| ANDOP
	| DOTOP LPAREN index_mod RPAREN
	| DOTOP LPAREN index_mod RPAREN LESSMINUS
	| DOTOP LBRACKET index_mod RBRACKET
	| DOTOP LBRACKET index_mod RBRACKET LESSMINUS
	| DOTOP LBRACE index_mod RBRACE
	| DOTOP LBRACE index_mod RBRACE LESSMINUS
	| HASHOP
	| BANG
	| INFIXOP0
	| INFIXOP1
	| INFIXOP2
	| INFIXOP3
	| INFIXOP4
	| PLUS
	| PLUSDOT
	| PLUSEQ
	| MINUS
	| MINUSDOT
	| STAR
	| PERCENT
	| EQUAL
	| LESS
	| GREATER
	| OR
	| BARBAR
	| AMPERSAND
	| AMPERAMPER
	| COLONEQUAL

index_mod ::=  /* empty */
	| SEMI DOTDOT

constr_extra_nonprefix_ident ::=  LBRACKET RBRACKET
	| LPAREN RPAREN
	| FALSE
	| TRUE

constr_ident ::=  UIDENT
	| LPAREN COLONCOLON RPAREN
	| constr_extra_nonprefix_ident

constr_longident ::=  mod_longident
	| mod_longident DOT LPAREN COLONCOLON RPAREN
	| LPAREN COLONCOLON RPAREN
	| constr_extra_nonprefix_ident

mk_longident_mod_ext_longident_LIDENT_ ::=  LIDENT
	| mod_ext_longident DOT LIDENT

mk_longident_mod_ext_longident_UIDENT_ ::=  UIDENT
	| mod_ext_longident DOT UIDENT

mk_longident_mod_ext_longident___anonymous_41_ ::=  ident
	| LPAREN COLONCOLON RPAREN
	| val_extra_ident
	| mod_ext_longident DOT ident
	| mod_ext_longident DOT LPAREN COLONCOLON RPAREN
	| mod_ext_longident DOT val_extra_ident

mk_longident_mod_ext_longident_ident_ ::=  ident
	| mod_ext_longident DOT ident

mk_longident_mod_longident_LIDENT_ ::=  LIDENT
	| mod_longident DOT LIDENT

mk_longident_mod_longident_UIDENT_ ::=  UIDENT
	| mod_longident DOT UIDENT

mk_longident_mod_longident_val_ident_ ::=  val_ident
	| mod_longident DOT val_ident

val_longident ::=  mk_longident_mod_longident_val_ident_

label_longident ::=  mk_longident_mod_longident_LIDENT_

type_longident ::=  mk_longident_mod_ext_longident_LIDENT_

mod_longident ::=  mk_longident_mod_longident_UIDENT_

mod_ext_longident ::=  mk_longident_mod_ext_longident_UIDENT_
	| mod_ext_longident LPAREN mod_ext_longident RPAREN
	| mod_ext_longident LPAREN error

mty_longident ::=  mk_longident_mod_ext_longident_ident_

clty_longident ::=  mk_longident_mod_ext_longident_LIDENT_

class_longident ::=  mk_longident_mod_longident_LIDENT_

any_longident ::=  mk_longident_mod_ext_longident___anonymous_41_
	| constr_extra_nonprefix_ident

toplevel_directive ::=  HASH ident
	| HASH ident STRING
	| HASH ident INT
	| HASH ident val_longident
	| HASH ident mod_longident
	| HASH ident FALSE
	| HASH ident TRUE

name_tag ::=  BACKQUOTE ident

rec_flag ::=  /* empty */
	| REC

direction_flag ::=  TO
	| DOWNTO

private_flag ::=  /* empty */
	| PRIVATE

mutable_flag ::=  /* empty */
	| MUTABLE

virtual_flag ::=  /* empty */
	| VIRTUAL

mutable_virtual_flags ::=  /* empty */
	| MUTABLE
	| VIRTUAL
	| MUTABLE VIRTUAL
	| VIRTUAL MUTABLE

private_virtual_flags ::=  /* empty */
	| PRIVATE
	| VIRTUAL
	| PRIVATE VIRTUAL
	| VIRTUAL PRIVATE

virtual_with_mutable_flag ::=  VIRTUAL
	| MUTABLE VIRTUAL
	| VIRTUAL MUTABLE

virtual_with_private_flag ::=  VIRTUAL
	| PRIVATE VIRTUAL
	| VIRTUAL PRIVATE

subtractive ::=  MINUS
	| MINUSDOT

additive ::=  PLUS
	| PLUSDOT

optlabel ::=  OPTLABEL
	| QUESTION LIDENT COLON

single_attr_id ::=  LIDENT
	| UIDENT
	| AND
	| AS
	| ASSERT
	| BEGIN
	| CLASS
	| CONSTRAINT
	| DO
	| DONE
	| DOWNTO
	| ELSE
	| END
	| EXCEPTION
	| EXTERNAL
	| FALSE
	| FOR
	| FUN
	| FUNCTION
	| FUNCTOR
	| IF
	| IN
	| INCLUDE
	| INHERIT
	| INITIALIZER
	| LAZY
	| LET
	| MATCH
	| METHOD
	| MODULE
	| MUTABLE
	| NEW
	| NONREC
	| OBJECT
	| OF
	| OPEN
	| OR
	| PRIVATE
	| REC
	| SIG
	| STRUCT
	| THEN
	| TO
	| TRUE
	| TRY
	| TYPE
	| VAL
	| VIRTUAL
	| WHEN
	| WHILE
	| WITH

attr_id ::=  single_attr_id
	| single_attr_id DOT attr_id

attribute ::=  LBRACKETAT attr_id payload RBRACKET

post_item_attribute ::=  LBRACKETATAT attr_id payload RBRACKET

floating_attribute ::=  LBRACKETATATAT attr_id payload RBRACKET

ext ::=  /* empty */
	| PERCENT attr_id

extension ::=  LBRACKETPERCENT attr_id payload RBRACKET
	| QUOTED_STRING_EXPR

item_extension ::=  LBRACKETPERCENTPERCENT attr_id payload RBRACKET
	| QUOTED_STRING_ITEM

payload ::=  structure
	| COLON signature
	| COLON core_type
	| QUESTION pattern
	| QUESTION pattern WHEN seq_expr



option_BAR_ ::=  /* empty */
	| BAR

option_SEMI_ ::=  /* empty */
	| SEMI

option_preceded_AS_mkrhs_LIDENT___ ::=  /* empty */
	| AS LIDENT

option_preceded_COLON_core_type__ ::=  /* empty */
	| COLON core_type

option_preceded_EQUAL_expr__ ::=  /* empty */
	| EQUAL expr

option_preceded_EQUAL_module_type__ ::=  /* empty */
	| EQUAL module_type

option_preceded_EQUAL_pattern__ ::=  /* empty */
	| EQUAL pattern

option_preceded_EQUAL_seq_expr__ ::=  /* empty */
	| EQUAL seq_expr

option_type_constraint_ ::=  /* empty */
	| type_constraint

list_and_class_declaration_ ::=  /* empty */
	| AND list_attribute_ virtual_flag formal_class_parameters LIDENT class_fun_binding list_post_item_attribute_ list_and_class_declaration_

list_and_class_description_ ::=  /* empty */
	| AND list_attribute_ virtual_flag formal_class_parameters LIDENT COLON class_type list_post_item_attribute_ list_and_class_description_

list_and_class_type_declaration_ ::=  /* empty */
	| AND list_attribute_ virtual_flag formal_class_parameters LIDENT EQUAL class_signature list_post_item_attribute_ list_and_class_type_declaration_

list_and_module_binding_ ::=  /* empty */
	| AND list_attribute_ module_name module_binding_body list_post_item_attribute_ list_and_module_binding_

list_and_module_declaration_ ::=  /* empty */
	| AND list_attribute_ module_name COLON module_type list_post_item_attribute_ list_and_module_declaration_

list_attribute_ ::=  /* empty */
	| attribute list_attribute_

list_generic_and_type_declaration_type_kind__ ::=  /* empty */
	| AND list_attribute_ type_parameters LIDENT type_kind reversed_llist_preceded_CONSTRAINT_constrain__ list_post_item_attribute_ list_generic_and_type_declaration_type_kind__

list_generic_and_type_declaration_type_subst_kind__ ::=  /* empty */
	| AND list_attribute_ type_parameters LIDENT COLONEQUAL nonempty_type_kind reversed_llist_preceded_CONSTRAINT_constrain__ list_post_item_attribute_ list_generic_and_type_declaration_type_subst_kind__

list_post_item_attribute_ ::=  /* empty */
	| post_item_attribute list_post_item_attribute_

list_signature_element_ ::=  /* empty */
	| SEMISEMI list_signature_element_
	| signature_item list_signature_element_

list_structure_element_ ::=  /* empty */
	| SEMISEMI list_structure_element_
	| SEMISEMI seq_expr list_post_item_attribute_ list_structure_element_
	| structure_item list_structure_element_

list_text_csig_class_sig_field__ ::=  /* empty */
	| class_sig_field list_text_csig_class_sig_field__

list_text_cstr_class_field__ ::=  /* empty */
	| class_field list_text_cstr_class_field__

list_text_str_structure_item__ ::=  /* empty */
	| structure_item list_text_str_structure_item__

list_use_file_element_ ::=  /* empty */
	| SEMISEMI list_use_file_element_
	| SEMISEMI seq_expr list_post_item_attribute_ list_use_file_element_
	| structure_item list_use_file_element_
	| toplevel_directive list_use_file_element_

nonempty_list_mkrhs_LIDENT__ ::=  LIDENT
	| LIDENT nonempty_list_mkrhs_LIDENT__

nonempty_list_raw_string_ ::=  STRING
	| STRING nonempty_list_raw_string_

reversed_llist_preceded_CONSTRAINT_constrain__ ::=  /* empty */
	| reversed_llist_preceded_CONSTRAINT_constrain__ CONSTRAINT core_type EQUAL core_type

reversed_nonempty_llist_functor_arg_ ::=  functor_arg
	| reversed_nonempty_llist_functor_arg_ functor_arg

reversed_nonempty_llist_labeled_simple_expr_ ::=  labeled_simple_expr
	| reversed_nonempty_llist_labeled_simple_expr_ labeled_simple_expr

reversed_nonempty_llist_name_tag_ ::=  name_tag
	| reversed_nonempty_llist_name_tag_ name_tag

reversed_nonempty_llist_typevar_ ::=  QUOTE ident
	| reversed_nonempty_llist_typevar_ QUOTE ident

reversed_separated_nonempty_llist_AMPERSAND_core_type_no_attr_ ::=  alias_type
	| reversed_separated_nonempty_llist_AMPERSAND_core_type_no_attr_ AMPERSAND alias_type

reversed_separated_nonempty_llist_AND_with_constraint_ ::=  with_constraint
	| reversed_separated_nonempty_llist_AND_with_constraint_ AND with_constraint

reversed_separated_nonempty_llist_BAR_row_field_ ::=  row_field
	| reversed_separated_nonempty_llist_BAR_row_field_ BAR row_field

reversed_separated_nonempty_llist_COMMA_core_type_ ::=  core_type
	| reversed_separated_nonempty_llist_COMMA_core_type_ COMMA core_type

reversed_separated_nonempty_llist_COMMA_type_parameter_ ::=  type_parameter
	| reversed_separated_nonempty_llist_COMMA_type_parameter_ COMMA type_parameter

reversed_separated_nonempty_llist_STAR_atomic_type_ ::=  atomic_type
	| reversed_separated_nonempty_llist_STAR_atomic_type_ STAR atomic_type

reversed_separated_nontrivial_llist_COMMA_core_type_ ::=  reversed_separated_nontrivial_llist_COMMA_core_type_ COMMA core_type
	| core_type COMMA core_type

reversed_separated_nontrivial_llist_COMMA_expr_ ::=  reversed_separated_nontrivial_llist_COMMA_expr_ COMMA expr
	| expr COMMA expr

reversed_separated_nontrivial_llist_STAR_atomic_type_ ::=  reversed_separated_nontrivial_llist_STAR_atomic_type_ STAR atomic_type
	| atomic_type STAR atomic_type

separated_or_terminated_nonempty_list_SEMI_expr_ ::=  expr
	| expr SEMI
	| expr SEMI separated_or_terminated_nonempty_list_SEMI_expr_

separated_or_terminated_nonempty_list_SEMI_object_expr_field_ ::=  LIDENT option_preceded_EQUAL_expr__
	| LIDENT option_preceded_EQUAL_expr__ SEMI
	| LIDENT option_preceded_EQUAL_expr__ SEMI separated_or_terminated_nonempty_list_SEMI_object_expr_field_

separated_or_terminated_nonempty_list_SEMI_pattern_ ::=  pattern
	| pattern SEMI
	| pattern SEMI separated_or_terminated_nonempty_list_SEMI_pattern_

separated_or_terminated_nonempty_list_SEMI_record_expr_field_ ::=  label_longident option_type_constraint_ option_preceded_EQUAL_expr__
	| label_longident option_type_constraint_ option_preceded_EQUAL_expr__ SEMI
	| label_longident option_type_constraint_ option_preceded_EQUAL_expr__ SEMI separated_or_terminated_nonempty_list_SEMI_record_expr_field_

reversed_preceded_or_separated_nonempty_llist_BAR_match_case_ ::=  match_case
	| BAR match_case
	| reversed_preceded_or_separated_nonempty_llist_BAR_match_case_ BAR match_case

reversed_bar_llist_constructor_declaration_ ::=  generic_constructor_declaration_epsilon_
	| generic_constructor_declaration_BAR_
	| reversed_bar_llist_constructor_declaration_ generic_constructor_declaration_BAR_

reversed_bar_llist_extension_constructor_ ::=  generic_constructor_declaration_epsilon_
	| extension_constructor_rebind_epsilon_
	| generic_constructor_declaration_BAR_
	| extension_constructor_rebind_BAR_
	| reversed_bar_llist_extension_constructor_ generic_constructor_declaration_BAR_
	| reversed_bar_llist_extension_constructor_ extension_constructor_rebind_BAR_

reversed_bar_llist_extension_constructor_declaration_ ::=  generic_constructor_declaration_epsilon_
	| generic_constructor_declaration_BAR_
	| reversed_bar_llist_extension_constructor_declaration_ generic_constructor_declaration_BAR_

listx_SEMI_record_pat_field_UNDERSCORE_ ::=  label_longident option_preceded_COLON_core_type__ option_preceded_EQUAL_pattern__
	| label_longident option_preceded_COLON_core_type__ option_preceded_EQUAL_pattern__ SEMI
	| label_longident option_preceded_COLON_core_type__ option_preceded_EQUAL_pattern__ SEMI UNDERSCORE option_SEMI_
	| label_longident option_preceded_COLON_core_type__ option_preceded_EQUAL_pattern__ SEMI listx_SEMI_record_pat_field_UNDERSCORE_


//Tokens

AND ::= "and"
AS ::= "as"
ASSERT ::= "assert"
BEGIN ::= "begin"
CLASS ::= "class"
CONSTRAINT ::= "constraint"
DO ::= "do"
DONE ::= "done"
DOWNTO ::= "downto"
ELSE ::= "else"
END ::= "end"
EXCEPTION ::= "exception"
EXTERNAL ::= "external"
FALSE ::= "false"
FOR ::= "for"
FUN ::= "fun"
FUNCTION ::= "function"
FUNCTOR ::= "functor"
IF ::= "if"
IN ::= "in"
INCLUDE ::= "include"
INHERIT ::= "inherit"
INITIALIZER ::= "initializer"
LAZY ::= "lazy"
LET ::= "let"
MATCH ::= "match"
METHOD ::= "method"
MODULE ::= "module"
MUTABLE ::= "mutable"
NEW ::= "new"
NONREC ::= "nonrec"
OBJECT ::= "object"
OF ::= "of"
OPEN ::= "open"
OR ::= "or"
//(*  PARSER ::= "parser" *)
PRIVATE ::= "private"
REC ::= "rec"
SIG ::= "sig"
STRUCT ::= "struct"
THEN ::= "then"
TO ::= "to"
TRUE ::= "true"
TRY ::= "try"
TYPE ::= "type"
VAL ::= "val"
VIRTUAL ::= "virtual"
WHEN ::= "when"
WHILE ::= "while"
WITH ::= "with"

AMPERSAND ::= "&"
AMPERAMPER ::= "&&"
BACKQUOTE ::= "`"
QUOTE ::= "\'"
LPAREN ::= "("
RPAREN ::= ")"
STAR ::= "*"
COMMA ::= ","
MINUSGREATER ::= "->"
DOT ::= "."
DOTDOT ::= ".."
//  | "." (dotsymbolchar symbolchar* as op) { DOTOP op }
COLON ::= ":"
COLONCOLON ::= "::"
COLONEQUAL ::= ":="
COLONGREATER ::= ":>"
SEMI ::= ";"
SEMISEMI ::= ";;"
LESS ::= "<"
LESSMINUS ::= "<-"
EQUAL ::= "="
LBRACKET ::= "["
LBRACKETBAR ::= "[|"
LBRACKETLESS ::= "[<"
LBRACKETGREATER ::= "[>"
RBRACKET ::= "]"
LBRACE ::= "{"
LBRACELESS ::= "{<"
BAR ::= "|"
BARBAR ::= "||"
BARRBRACKET ::= "|]"
GREATER ::= ">"
GREATERRBRACKET ::= ">]"
RBRACE ::= "}"
GREATERRBRACE ::= ">}"
LBRACKETAT ::= "[@"
LBRACKETATAT ::= "[@@"
LBRACKETATATAT ::= "[@@@"
LBRACKETPERCENT ::= "[%"
LBRACKETPERCENTPERCENT ::= "[%%"
BANG ::= "!"
//  | "!=" { INFIXOP0 "!=" }
PLUS ::= "+"
PLUSDOT ::= "+."
PLUSEQ ::= "+="
MINUS ::= "-"
MINUSDOT ::= "-."
@anmonteiro
Copy link
Member

Hey, this is very cool. This repository keeps a fork of the OCaml 4.14 grammar, so your work is valid for OCaml!

@mingodad
Copy link
Author

Yes it can be used for ocaml too, see here ocaml/ocaml#11161

anmonteiro added a commit that referenced this issue Jun 25, 2024
* feat: require `Eio.Flow.close`

* don't actually require close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants