diff options
author | sergio <sqmedeiros@gmail.com> | 2016-07-22 15:13:58 -0300 |
---|---|---|
committer | sergio <sqmedeiros@gmail.com> | 2016-07-22 15:13:58 -0300 |
commit | abb26cdfd3d44e7b10ec001f2afb980616c71573 (patch) | |
tree | 86a5caade53be9dc1d3b5cefb3d212f9096842b4 /lpcode.c | |
parent | 28a44f01cb7a75068b75a99c0badb3abdaf7047a (diff) | |
download | lpeglabel-abb26cdfd3d44e7b10ec001f2afb980616c71573.tar.gz lpeglabel-abb26cdfd3d44e7b10ec001f2afb980616c71573.tar.bz2 lpeglabel-abb26cdfd3d44e7b10ec001f2afb980616c71573.zip |
Changing the semantics of labels to recovery/resume (ILabChoice does not work)
Diffstat (limited to 'lpcode.c')
-rw-r--r-- | lpcode.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -725,16 +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 pcommit; | 728 | int pjmp; |
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 | pcommit = addoffsetinst(compst, ICommit); | 733 | pjmp = addoffsetinst(compst, IJmp); |
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 | jumptohere(compst, pcommit); | 737 | addinstruction(compst, IRet, 0); |
738 | jumptohere(compst, pjmp); | ||
738 | } | 739 | } |
739 | /* labeled failure end */ | 740 | /* labeled failure end */ |
740 | 741 | ||