From 870320f3a1f9dbabccf5f9f1de2670259a9d5117 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Sun, 27 Oct 2013 02:06:59 +0900 Subject: [PATCH] refactor incomplete data parsing --- src/parse.y | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/parse.y b/src/parse.y index 5b8fac5c..6e62b2c6 100644 --- a/src/parse.y +++ b/src/parse.y @@ -113,22 +113,26 @@ abbrev ; incomplete_datum - : /* none */ - | tLPAREN incomplete_data + : tLPAREN incomplete_data | incomplete_abbrev ; +incomplete_tail + : /* none */ + | incomplete_datum +; + incomplete_data - : incomplete_datum - | datum tDOT incomplete_datum + : incomplete_tail + | datum tDOT incomplete_tail | datum incomplete_data ; incomplete_abbrev - : tQUOTE incomplete_datum - | tQUASIQUOTE incomplete_datum - | tUNQUOTE incomplete_datum - | tUNQUOTE_SPLICING incomplete_datum + : tQUOTE incomplete_tail + | tQUASIQUOTE incomplete_tail + | tUNQUOTE incomplete_tail + | tUNQUOTE_SPLICING incomplete_tail ; %%