Skip to content
This repository has been archived by the owner on Apr 2, 2023. It is now read-only.

Commit

Permalink
Fix/issue 182 (#183)
Browse files Browse the repository at this point in the history
* fix backwards parse of sequencing tactical :)

* fix parsing of multiple bindings in sequencing tactical

* add a test for the primitive sequencing tactical
  • Loading branch information
jonsterling authored Jan 4, 2017
1 parent 3e5c01b commit d06d394
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/redprl/redprl.grm
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ end
| tactic of ast
| tactics of ast list
| hypBindings of (string * P.param_sort) list
| multiHypBindings of (string * P.param_sort) list
| atomicRawMultitac of ast
| atomicMultitac of ast
| rawMultitac of ast
Expand Down Expand Up @@ -374,7 +375,7 @@ atomicRawMultitac
| MTAC_PROGRESS LBRACKET multitac RBRACKET (Ast.$$ (O.MONO O.MTAC_PROGRESS, [\ (([], []), multitac)]))
| MTAC_REC VARNAME IN LBRACKET multitac RBRACKET (Ast.$$ (O.MONO O.MTAC_REC, [\ (([],[VARNAME]), multitac)]))
| LBRACKET multitac RBRACKET (multitac)
| hypBindings LEFT_ARROW atomicRawMultitac SEMI multitac %prec LEFT_ARROW (Tac.makeSeq multitac hypBindings atomicRawMultitac)
| hypBindings LEFT_ARROW atomicRawMultitac SEMI multitac %prec LEFT_ARROW (Tac.makeSeq atomicRawMultitac hypBindings multitac)
| atomicTac %prec SEMI (Ast.$$ (O.MONO O.MTAC_ALL, [\ (([],[]), atomicTac)]))
| (Ast.$$ (O.MONO O.MTAC_ALL, [\ (([],[]), Ast.$$ (O.MONO O.RULE_ID, []))]))

Expand All @@ -387,10 +388,13 @@ rawMultitac

multitac : rawMultitac (annotate (Pos.pos (rawMultitac1left fileName) (rawMultitac1right fileName)) rawMultitac)

multiHypBindings
: VARNAME ([(VARNAME, P.HYP)])
| VARNAME COMMA hypBindings ((VARNAME, P.HYP) :: hypBindings)

hypBindings
: VARNAME ([(VARNAME, P.HYP)])
| VARNAME COMMA hypBindings ((VARNAME, P.HYP) :: hypBindings)
| LBRACKET multiHypBindings RBRACKET (multiHypBindings)

rawTactic
: multitac %prec SEMI (Tac.multitacToTac multitac)
Expand Down
4 changes: 4 additions & 0 deletions test/success/primitive-sequencing.prl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Thm PrimitiveSequencingTest : [bool -> bool -> bool true] by [
{x,y} <- auto;
hyp{y}
].

0 comments on commit d06d394

Please sign in to comment.