diff options
author | Bobby Bingham <koorogi@koorogi.info> | 2017-07-25 21:08:44 -0500 |
---|---|---|
committer | Bobby Bingham <koorogi@koorogi.info> | 2017-07-25 21:09:45 -0500 |
commit | 0e96b8551b5293ffeadfebc31b85a165b0a74b99 (patch) | |
tree | 1057a6bc62f64b9172d3d73a2d4a6cf422cc2f7e /parse-pattern.y | |
parent | ee78102672afdede839489fa0b1932b64335eaaf (diff) |
Move the previous special-case logic for removing 1-1 repeats into this
pass.
Diffstat (limited to 'parse-pattern.y')
-rw-r--r-- | parse-pattern.y | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/parse-pattern.y b/parse-pattern.y index 2c0556a..e5acd3c 100644 --- a/parse-pattern.y +++ b/parse-pattern.y @@ -62,13 +62,7 @@ input: ; molecule: - repeat sequence { - if ($1.min == 1 && $1.max == 1) { - $$ = $2; - } else { - $$ = mkatom(&(struct atom) { .type = ATOM_REPETITION, .u = { .repeat = { .counts = $1, .child = $2 } } }); - } - } + repeat sequence { $$ = mkatom(&(struct atom) { .type = ATOM_REPETITION, .u = { .repeat = { .counts = $1, .child = $2 } } }); } ; repeat: |