├── .cargo └── config.toml ├── .github └── workflows │ └── rust.yml ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md ├── peg-macros ├── Cargo.toml ├── LICENSE ├── analysis.rs ├── ast.rs ├── bin.rs ├── grammar.rs ├── grammar.rustpeg ├── lib.rs ├── tokens.rs └── translate.rs ├── peg-runtime ├── Cargo.toml ├── LICENSE ├── error.rs ├── lib.rs ├── slice.rs └── str.rs ├── src └── lib.rs ├── tests ├── compile-fail │ ├── cache_with_args.rs │ ├── cache_with_args.stderr │ ├── duplicate_rule.rs │ ├── duplicate_rule.stderr │ ├── incomplete_grammar.rs │ ├── incomplete_grammar.stderr │ ├── left_recursion_without_cache.rs │ ├── left_recursion_without_cache.stderr │ ├── nullable_loop.rs │ ├── nullable_loop.stderr │ ├── rule-missing-eq.rs │ ├── rule-missing-eq.stderr │ ├── rule_args_errors.rs │ ├── rule_args_errors.stderr │ ├── rust_action_syntax_error.rs │ ├── rust_action_syntax_error.stderr │ ├── rust_action_type_error.rs │ ├── rust_action_type_error.stderr │ ├── syntax_error.rs │ ├── syntax_error.stderr │ ├── use_undefined_result.rs │ ├── use_undefined_result.stderr │ ├── use_undefined_rule.rs │ └── use_undefined_rule.stderr ├── pass │ ├── arithmetic.rs │ ├── arithmetic_ast.rs │ ├── arithmetic_infix.rs │ ├── arithmetic_infix_ast.rs │ ├── arithmetic_infix_ast_span.rs │ ├── arithmetic_with_left_recursion.rs │ ├── assembly_ast_dyn_type_param_bounds.rs │ ├── borrow_from_input.rs │ ├── bytes.rs │ ├── conditional_block.rs │ ├── crate_import.rs │ ├── custom_expr.rs │ ├── errors.rs │ ├── generic_fn_traits.rs │ ├── grammar_with_args_and_cache.rs │ ├── keyval.rs │ ├── lifetimes.rs │ ├── memoization.rs │ ├── mod.rs │ ├── no_eof.rs │ ├── optional.rs │ ├── pattern.rs │ ├── pos_neg_assert.rs │ ├── position.rs │ ├── raw_ident.rs │ ├── renamed_imports.rs │ ├── repeats.rs │ ├── return_type.rs │ ├── rule_args.rs │ ├── rule_generic.rs │ ├── rule_impl_use_bound.rs │ ├── rule_where_clause.rs │ ├── rust_use_tree.rs │ ├── test_hygiene.rs │ ├── tokens.rs │ ├── tokens_struct.rs │ └── utf8.rs ├── run-pass.rs └── trybuild.rs └── xtask ├── Cargo.toml └── src └── main.rs /.cargo/config.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/.cargo/config.toml -------------------------------------------------------------------------------- /.github/workflows/rust.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/.github/workflows/rust.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/.gitignore -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/Cargo.lock -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/Cargo.toml -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/README.md -------------------------------------------------------------------------------- /peg-macros/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/peg-macros/Cargo.toml -------------------------------------------------------------------------------- /peg-macros/LICENSE: -------------------------------------------------------------------------------- 1 | ../LICENSE -------------------------------------------------------------------------------- /peg-macros/analysis.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/peg-macros/analysis.rs -------------------------------------------------------------------------------- /peg-macros/ast.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/peg-macros/ast.rs -------------------------------------------------------------------------------- /peg-macros/bin.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/peg-macros/bin.rs -------------------------------------------------------------------------------- /peg-macros/grammar.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/peg-macros/grammar.rs -------------------------------------------------------------------------------- /peg-macros/grammar.rustpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/peg-macros/grammar.rustpeg -------------------------------------------------------------------------------- /peg-macros/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/peg-macros/lib.rs -------------------------------------------------------------------------------- /peg-macros/tokens.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/peg-macros/tokens.rs -------------------------------------------------------------------------------- /peg-macros/translate.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/peg-macros/translate.rs -------------------------------------------------------------------------------- /peg-runtime/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/peg-runtime/Cargo.toml -------------------------------------------------------------------------------- /peg-runtime/LICENSE: -------------------------------------------------------------------------------- 1 | ../LICENSE -------------------------------------------------------------------------------- /peg-runtime/error.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/peg-runtime/error.rs -------------------------------------------------------------------------------- /peg-runtime/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/peg-runtime/lib.rs -------------------------------------------------------------------------------- /peg-runtime/slice.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/peg-runtime/slice.rs -------------------------------------------------------------------------------- /peg-runtime/str.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/peg-runtime/str.rs -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/src/lib.rs -------------------------------------------------------------------------------- /tests/compile-fail/cache_with_args.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/compile-fail/cache_with_args.rs -------------------------------------------------------------------------------- /tests/compile-fail/cache_with_args.stderr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/compile-fail/cache_with_args.stderr -------------------------------------------------------------------------------- /tests/compile-fail/duplicate_rule.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/compile-fail/duplicate_rule.rs -------------------------------------------------------------------------------- /tests/compile-fail/duplicate_rule.stderr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/compile-fail/duplicate_rule.stderr -------------------------------------------------------------------------------- /tests/compile-fail/incomplete_grammar.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/compile-fail/incomplete_grammar.rs -------------------------------------------------------------------------------- /tests/compile-fail/incomplete_grammar.stderr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/compile-fail/incomplete_grammar.stderr -------------------------------------------------------------------------------- /tests/compile-fail/left_recursion_without_cache.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/compile-fail/left_recursion_without_cache.rs -------------------------------------------------------------------------------- /tests/compile-fail/left_recursion_without_cache.stderr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/compile-fail/left_recursion_without_cache.stderr -------------------------------------------------------------------------------- /tests/compile-fail/nullable_loop.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/compile-fail/nullable_loop.rs -------------------------------------------------------------------------------- /tests/compile-fail/nullable_loop.stderr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/compile-fail/nullable_loop.stderr -------------------------------------------------------------------------------- /tests/compile-fail/rule-missing-eq.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/compile-fail/rule-missing-eq.rs -------------------------------------------------------------------------------- /tests/compile-fail/rule-missing-eq.stderr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/compile-fail/rule-missing-eq.stderr -------------------------------------------------------------------------------- /tests/compile-fail/rule_args_errors.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/compile-fail/rule_args_errors.rs -------------------------------------------------------------------------------- /tests/compile-fail/rule_args_errors.stderr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/compile-fail/rule_args_errors.stderr -------------------------------------------------------------------------------- /tests/compile-fail/rust_action_syntax_error.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/compile-fail/rust_action_syntax_error.rs -------------------------------------------------------------------------------- /tests/compile-fail/rust_action_syntax_error.stderr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/compile-fail/rust_action_syntax_error.stderr -------------------------------------------------------------------------------- /tests/compile-fail/rust_action_type_error.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/compile-fail/rust_action_type_error.rs -------------------------------------------------------------------------------- /tests/compile-fail/rust_action_type_error.stderr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/compile-fail/rust_action_type_error.stderr -------------------------------------------------------------------------------- /tests/compile-fail/syntax_error.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/compile-fail/syntax_error.rs -------------------------------------------------------------------------------- /tests/compile-fail/syntax_error.stderr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/compile-fail/syntax_error.stderr -------------------------------------------------------------------------------- /tests/compile-fail/use_undefined_result.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/compile-fail/use_undefined_result.rs -------------------------------------------------------------------------------- /tests/compile-fail/use_undefined_result.stderr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/compile-fail/use_undefined_result.stderr -------------------------------------------------------------------------------- /tests/compile-fail/use_undefined_rule.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/compile-fail/use_undefined_rule.rs -------------------------------------------------------------------------------- /tests/compile-fail/use_undefined_rule.stderr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/compile-fail/use_undefined_rule.stderr -------------------------------------------------------------------------------- /tests/pass/arithmetic.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/arithmetic.rs -------------------------------------------------------------------------------- /tests/pass/arithmetic_ast.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/arithmetic_ast.rs -------------------------------------------------------------------------------- /tests/pass/arithmetic_infix.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/arithmetic_infix.rs -------------------------------------------------------------------------------- /tests/pass/arithmetic_infix_ast.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/arithmetic_infix_ast.rs -------------------------------------------------------------------------------- /tests/pass/arithmetic_infix_ast_span.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/arithmetic_infix_ast_span.rs -------------------------------------------------------------------------------- /tests/pass/arithmetic_with_left_recursion.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/arithmetic_with_left_recursion.rs -------------------------------------------------------------------------------- /tests/pass/assembly_ast_dyn_type_param_bounds.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/assembly_ast_dyn_type_param_bounds.rs -------------------------------------------------------------------------------- /tests/pass/borrow_from_input.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/borrow_from_input.rs -------------------------------------------------------------------------------- /tests/pass/bytes.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/bytes.rs -------------------------------------------------------------------------------- /tests/pass/conditional_block.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/conditional_block.rs -------------------------------------------------------------------------------- /tests/pass/crate_import.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/crate_import.rs -------------------------------------------------------------------------------- /tests/pass/custom_expr.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/custom_expr.rs -------------------------------------------------------------------------------- /tests/pass/errors.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/errors.rs -------------------------------------------------------------------------------- /tests/pass/generic_fn_traits.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/generic_fn_traits.rs -------------------------------------------------------------------------------- /tests/pass/grammar_with_args_and_cache.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/grammar_with_args_and_cache.rs -------------------------------------------------------------------------------- /tests/pass/keyval.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/keyval.rs -------------------------------------------------------------------------------- /tests/pass/lifetimes.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/lifetimes.rs -------------------------------------------------------------------------------- /tests/pass/memoization.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/memoization.rs -------------------------------------------------------------------------------- /tests/pass/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/mod.rs -------------------------------------------------------------------------------- /tests/pass/no_eof.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/no_eof.rs -------------------------------------------------------------------------------- /tests/pass/optional.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/optional.rs -------------------------------------------------------------------------------- /tests/pass/pattern.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/pattern.rs -------------------------------------------------------------------------------- /tests/pass/pos_neg_assert.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/pos_neg_assert.rs -------------------------------------------------------------------------------- /tests/pass/position.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/position.rs -------------------------------------------------------------------------------- /tests/pass/raw_ident.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/raw_ident.rs -------------------------------------------------------------------------------- /tests/pass/renamed_imports.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/renamed_imports.rs -------------------------------------------------------------------------------- /tests/pass/repeats.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/repeats.rs -------------------------------------------------------------------------------- /tests/pass/return_type.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/return_type.rs -------------------------------------------------------------------------------- /tests/pass/rule_args.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/rule_args.rs -------------------------------------------------------------------------------- /tests/pass/rule_generic.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/rule_generic.rs -------------------------------------------------------------------------------- /tests/pass/rule_impl_use_bound.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/rule_impl_use_bound.rs -------------------------------------------------------------------------------- /tests/pass/rule_where_clause.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/rule_where_clause.rs -------------------------------------------------------------------------------- /tests/pass/rust_use_tree.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/rust_use_tree.rs -------------------------------------------------------------------------------- /tests/pass/test_hygiene.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/test_hygiene.rs -------------------------------------------------------------------------------- /tests/pass/tokens.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/tokens.rs -------------------------------------------------------------------------------- /tests/pass/tokens_struct.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/tokens_struct.rs -------------------------------------------------------------------------------- /tests/pass/utf8.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/pass/utf8.rs -------------------------------------------------------------------------------- /tests/run-pass.rs: -------------------------------------------------------------------------------- 1 | mod pass; 2 | -------------------------------------------------------------------------------- /tests/trybuild.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/tests/trybuild.rs -------------------------------------------------------------------------------- /xtask/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/xtask/Cargo.toml -------------------------------------------------------------------------------- /xtask/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinmehall/rust-peg/HEAD/xtask/src/main.rs --------------------------------------------------------------------------------