diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-04-21 15:29:53 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-04-21 15:29:53 -0300 |
commit | 9f7183c280f310c0d0b49b7b9c3b8eac297fafa7 (patch) | |
tree | 503392ee1a94f6446151a0b90babe8235efdb573 /lpprint.c | |
parent | 7b42a7b13f9c6655dfa7c5951de46dcf0642b0a6 (diff) | |
download | lpeg-9f7183c280f310c0d0b49b7b9c3b8eac297fafa7.tar.gz lpeg-9f7183c280f310c0d0b49b7b9c3b8eac297fafa7.tar.bz2 lpeg-9f7183c280f310c0d0b49b7b9c3b8eac297fafa7.zip |
Field Instruction.key put inside a union
So that we can get its space for other uses, if needed.
Diffstat (limited to 'lpprint.c')
-rw-r--r-- | lpprint.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -62,11 +62,11 @@ void printinst (const Instruction *op, const Instruction *p) { | |||
62 | printf("%02ld: %s ", (long)(p - op), names[p->i.code]); | 62 | printf("%02ld: %s ", (long)(p - op), names[p->i.code]); |
63 | switch ((Opcode)p->i.code) { | 63 | switch ((Opcode)p->i.code) { |
64 | case IChar: { | 64 | case IChar: { |
65 | printf("'%c' (%02x)", p->i.aux, p->i.aux); | 65 | printf("'%c' (%02x)", p->i.aux1, p->i.aux1); |
66 | break; | 66 | break; |
67 | } | 67 | } |
68 | case ITestChar: { | 68 | case ITestChar: { |
69 | printf("'%c' (%02x)", p->i.aux, p->i.aux); printjmp(op, p); | 69 | printf("'%c' (%02x)", p->i.aux1, p->i.aux1); printjmp(op, p); |
70 | break; | 70 | break; |
71 | } | 71 | } |
72 | case IUTFR: { | 72 | case IUTFR: { |
@@ -75,11 +75,11 @@ void printinst (const Instruction *op, const Instruction *p) { | |||
75 | } | 75 | } |
76 | case IFullCapture: { | 76 | case IFullCapture: { |
77 | printf("%s (size = %d) (idx = %d)", | 77 | printf("%s (size = %d) (idx = %d)", |
78 | capkind(getkind(p)), getoff(p), p->i.key); | 78 | capkind(getkind(p)), getoff(p), p->i.aux2.key); |
79 | break; | 79 | break; |
80 | } | 80 | } |
81 | case IOpenCapture: { | 81 | case IOpenCapture: { |
82 | printf("%s (idx = %d)", capkind(getkind(p)), p->i.key); | 82 | printf("%s (idx = %d)", capkind(getkind(p)), p->i.aux2.key); |
83 | break; | 83 | break; |
84 | } | 84 | } |
85 | case ISet: { | 85 | case ISet: { |
@@ -99,7 +99,7 @@ void printinst (const Instruction *op, const Instruction *p) { | |||
99 | break; | 99 | break; |
100 | } | 100 | } |
101 | case IBehind: { | 101 | case IBehind: { |
102 | printf("%d", p->i.aux); | 102 | printf("%d", p->i.aux1); |
103 | break; | 103 | break; |
104 | } | 104 | } |
105 | case IJmp: case ICall: case ICommit: case IChoice: | 105 | case IJmp: case ICall: case ICommit: case IChoice: |