Skip to content

Commit

Permalink
fix, use optional sentence
Browse files Browse the repository at this point in the history
mike dupont committed Dec 19, 2023
1 parent c13ac69 commit 073a495
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
duntest:
dune test --verbose --force
test1:
menhir --trace -v --interpret ./lib/sentenceParser.mly < test/test.gbnf
2 changes: 1 addition & 1 deletion test/test_gbnf_parser.ml
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@ rule ::= lhs S "=" S rhs S terminator
root ::= ( S rule S ) *
|codesample} in
let lexbuf = Lexing.from_string inputstr in
match SentenceParser.entry SentenceLexer.lex lexbuf with
match SentenceParser.optional_sentence SentenceLexer.lex lexbuf with
| exception Parsing.Parse_error ->
Error.error
[Positions.cpos lexbuf]

0 comments on commit 073a495

Please sign in to comment.