Skip to content

Commit

Permalink
change parsing prefix for whitespace expansion
Browse files Browse the repository at this point in the history
  • Loading branch information
janheuer authored and teiesti committed Jan 31, 2025
1 parent 66849fc commit 3ffe441
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/parsing/fol/grammar.pest
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ formula_eoi = _{ formula ~ EOI }
infix = _{ binary_connective }
primary = _{ "(" ~ formula ~ ")" | atomic_formula }

theory = { (WHITESPACE | COMMENT)? ~ (formula ~ ".")* }
theory = { &ANY? ~ (formula ~ ".")* }
theory_eoi = _{ theory ~ EOI }

role = { assumption | spec | lemma | definition | inductive_lemma }
Expand All @@ -124,7 +124,7 @@ direction_eoi = _{ direction ~ EOI }
annotated_formula = { role ~ ("(" ~ direction ~ ")")? ~ ("[" ~ symbolic_constant ~ "]")? ~ ":" ~ formula }
annotated_formula_eoi = _{ annotated_formula ~ EOI }

specification = { (WHITESPACE | COMMENT)? ~ (annotated_formula ~ ".")* }
specification = { &ANY? ~ (annotated_formula ~ ".")* }
specification_eoi = _{ specification ~ EOI }

user_guide_entry = { input_predicate | output_predicate | placeholder_declaration | annotated_formula }
Expand All @@ -133,5 +133,5 @@ user_guide_entry_eoi = _{ user_guide_entry ~ EOI }
output_predicate = { "output" ~ ":" ~ predicate}
placeholder_declaration = { "input" ~ ":" ~ symbolic_constant ~ ("->" ~ sort)? }

user_guide = { (WHITESPACE | COMMENT)? ~ (user_guide_entry ~ ".")* }
user_guide = { &ANY? ~ (user_guide_entry ~ ".")* }
user_guide_eoi = _{ user_guide ~ EOI }

0 comments on commit 3ffe441

Please sign in to comment.