diff options
Diffstat (limited to 'Parser/grammar.c')
-rw-r--r-- | Parser/grammar.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Parser/grammar.c b/Parser/grammar.c index 07e59ff..c4efce7 100644 --- a/Parser/grammar.c +++ b/Parser/grammar.c @@ -211,6 +211,18 @@ translabel(grammar *g, label *lb) printf("Unknown OP label %s\n", lb->lb_str); } + else if (lb->lb_str[2] && lb->lb_str[3] && lb->lb_str[4] == lb->lb_str[0]) { + int type = (int) PyToken_ThreeChars(lb->lb_str[1], + lb->lb_str[2], + lb->lb_str[3]); + if (type != OP) { + lb->lb_type = type; + lb->lb_str = NULL; + } + else + printf("Unknown OP label %s\n", + lb->lb_str); + } else printf("Can't translate STRING label %s\n", lb->lb_str); |