diff options
author | Sergio Queiroz <sqmedeiros@gmail.com> | 2016-09-09 16:26:44 -0300 |
---|---|---|
committer | Sergio Queiroz <sqmedeiros@gmail.com> | 2016-09-09 16:26:44 -0300 |
commit | a9c5a38994074d2c9c5da4cf081c4ca9fa8b3271 (patch) | |
tree | 3f060fb9f4280cd06a0c1ad376af1b36f95a8219 /lpcode.c | |
parent | 7757aac333c5a37181f942d5f20223023cbdc207 (diff) | |
download | lpeglabel-a9c5a38994074d2c9c5da4cf081c4ca9fa8b3271.tar.gz lpeglabel-a9c5a38994074d2c9c5da4cf081c4ca9fa8b3271.tar.bz2 lpeglabel-a9c5a38994074d2c9c5da4cf081c4ca9fa8b3271.zip |
Updating implementation of Recovery to follow Fabio's idea. Not compatible with labeled ordered choice
Diffstat (limited to 'lpcode.c')
-rw-r--r-- | lpcode.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -725,17 +725,17 @@ static void codelabchoice (CompileState *compst, TTree *p1, TTree *p2, int opt, | |||
725 | static void coderecovery (CompileState *compst, TTree *p1, TTree *p2, int opt, | 725 | static void coderecovery (CompileState *compst, TTree *p1, TTree *p2, int opt, |
726 | const Charset *fl, const byte *cs) { | 726 | const Charset *fl, const byte *cs) { |
727 | int emptyp2 = (p2->tag == TTrue); | 727 | int emptyp2 = (p2->tag == TTrue); |
728 | int pjmp; | 728 | int pcommit; |
729 | int test = NOINST; | 729 | int test = NOINST; |
730 | int precovery = addoffsetinst(compst, IRecov); | 730 | int precovery = addoffsetinst(compst, IRecov); |
731 | addcharset(compst, cs); | 731 | addcharset(compst, cs); |
732 | codegen(compst, p1, emptyp2, test, fullset); | 732 | codegen(compst, p1, emptyp2, test, fullset); |
733 | pjmp = addoffsetinst(compst, IJmp); | 733 | pcommit = addoffsetinst(compst, ICommit); |
734 | jumptohere(compst, precovery); | 734 | jumptohere(compst, precovery); |
735 | jumptohere(compst, test); | 735 | jumptohere(compst, test); |
736 | codegen(compst, p2, opt, NOINST, fl); | 736 | codegen(compst, p2, opt, NOINST, fl); |
737 | addinstruction(compst, IRet, 0); | 737 | addinstruction(compst, IRet, 0); |
738 | jumptohere(compst, pjmp); | 738 | jumptohere(compst, pcommit); |
739 | } | 739 | } |
740 | /* labeled failure end */ | 740 | /* labeled failure end */ |
741 | 741 | ||