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

Commit d06d394

Browse files
authored
Fix/issue 182 (#183)
* fix backwards parse of sequencing tactical :) * fix parsing of multiple bindings in sequencing tactical * add a test for the primitive sequencing tactical
1 parent 3e5c01b commit d06d394

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/redprl/redprl.grm

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ end
144144
| tactic of ast
145145
| tactics of ast list
146146
| hypBindings of (string * P.param_sort) list
147+
| multiHypBindings of (string * P.param_sort) list
147148
| atomicRawMultitac of ast
148149
| atomicMultitac of ast
149150
| rawMultitac of ast
@@ -374,7 +375,7 @@ atomicRawMultitac
374375
| MTAC_PROGRESS LBRACKET multitac RBRACKET (Ast.$$ (O.MONO O.MTAC_PROGRESS, [\ (([], []), multitac)]))
375376
| MTAC_REC VARNAME IN LBRACKET multitac RBRACKET (Ast.$$ (O.MONO O.MTAC_REC, [\ (([],[VARNAME]), multitac)]))
376377
| LBRACKET multitac RBRACKET (multitac)
377-
| hypBindings LEFT_ARROW atomicRawMultitac SEMI multitac %prec LEFT_ARROW (Tac.makeSeq multitac hypBindings atomicRawMultitac)
378+
| hypBindings LEFT_ARROW atomicRawMultitac SEMI multitac %prec LEFT_ARROW (Tac.makeSeq atomicRawMultitac hypBindings multitac)
378379
| atomicTac %prec SEMI (Ast.$$ (O.MONO O.MTAC_ALL, [\ (([],[]), atomicTac)]))
379380
| (Ast.$$ (O.MONO O.MTAC_ALL, [\ (([],[]), Ast.$$ (O.MONO O.RULE_ID, []))]))
380381

@@ -387,10 +388,13 @@ rawMultitac
387388

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

391+
multiHypBindings
392+
: VARNAME ([(VARNAME, P.HYP)])
393+
| VARNAME COMMA hypBindings ((VARNAME, P.HYP) :: hypBindings)
390394

391395
hypBindings
392396
: VARNAME ([(VARNAME, P.HYP)])
393-
| VARNAME COMMA hypBindings ((VARNAME, P.HYP) :: hypBindings)
397+
| LBRACKET multiHypBindings RBRACKET (multiHypBindings)
394398

395399
rawTactic
396400
: multitac %prec SEMI (Tac.multitacToTac multitac)

test/success/primitive-sequencing.prl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Thm PrimitiveSequencingTest : [bool -> bool -> bool true] by [
2+
{x,y} <- auto;
3+
hyp{y}
4+
].

0 commit comments

Comments
 (0)