Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ZachJHansen committed Feb 23, 2024
1 parent 5b8ae7c commit cf2bdb8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions src/parsing/asp/pest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1090,6 +1090,18 @@ mod tests {
],
},
),
(
"a.\n",
Program {
rules: vec![Rule {
head: Head::Basic(Atom {
predicate_symbol: "a".into(),
terms: vec![],
}),
body: Body { formulas: vec![] },
}],
},
),
(
"% First comment. \na. %%%% Second comment %%%%\n%Last comment",
Program {
Expand Down
2 changes: 1 addition & 1 deletion src/parsing/fol/grammar.pest
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// can be transformed into TPTP formulas (Vampire-compatible input).

WHITESPACE = _{ " " | NEWLINE }
COMMENT = _{ ("%" ~ (!NEWLINE ~ ANY)* ~ NEWLINE) | ("%" ~ (!NEWLINE ~ ANY)* ~ EOI)}
COMMENT = _{ "%" ~ (!NEWLINE ~ ANY)* ~ (NEWLINE | EOI) }

keyword = _{ primitive | binary_connective | unary_connective | quantifier }

Expand Down

0 comments on commit cf2bdb8

Please sign in to comment.