diff options
Diffstat (limited to 'scripts/gen-s-parser.py')
-rwxr-xr-x | scripts/gen-s-parser.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/gen-s-parser.py b/scripts/gen-s-parser.py index 776cc4425..08c5fe31f 100755 --- a/scripts/gen-s-parser.py +++ b/scripts/gen-s-parser.py @@ -708,6 +708,11 @@ class Node: def instruction_parser(new_parser=False): """Build a trie out of all the instructions, then emit it as C++ code.""" + global instructions + if new_parser: + # Filter out instructions that the new parser does not need. + instructions = [(inst, code) for (inst, code) in instructions + if inst not in ('block', 'loop', 'if', 'then', 'else')] trie = Node() inst_length = 0 for inst, expr in instructions: |