Gentoo Archives: gentoo-commits

From: "Petteri Räty" <betelgeuse@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/libbash:master commit in: bashast/
Date: Sun, 29 May 2011 11:20:26
Message-Id: fb30f68e903cf62eb02caa3c8784c57431916ef5.betelgeuse@gentoo
1 commit: fb30f68e903cf62eb02caa3c8784c57431916ef5
2 Author: Mu Qiao <qiaomuf <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 29 01:46:08 2011 +0000
4 Commit: Petteri Räty <betelgeuse <AT> gentoo <DOT> org>
5 CommitDate: Sun May 29 11:44:53 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/libbash.git;a=commit;h=fb30f68e
7
8 Parser&Walker: use EOF as the end of grammar
9
10 This change is hard to get tested. Eclasses now fail to parse if the
11 parsers stop too early.
12
13 ---
14 bashast/bashast.g | 2 +-
15 bashast/libbashWalker.g | 2 +-
16 2 files changed, 2 insertions(+), 2 deletions(-)
17
18 diff --git a/bashast/bashast.g b/bashast/bashast.g
19 index bb12b91..f9d5425 100644
20 --- a/bashast/bashast.g
21 +++ b/bashast/bashast.g
22 @@ -104,7 +104,7 @@ tokens{
23 NOT_EQUALS;
24 }
25
26 -start : (flcomment)? EOL* clist BLANK* (SEMIC|AMP|EOL)? -> clist;
27 +start : (flcomment)? EOL* clist BLANK* (SEMIC|AMP|EOL)? EOF -> clist;
28 //Because the comment token doesn't handle the first comment in a file if it's on the first line, have a parser rule for it
29 flcomment
30 : POUND ~(EOL)* EOL;
31
32 diff --git a/bashast/libbashWalker.g b/bashast/libbashWalker.g
33 index e61d7b6..f53a2be 100644
34 --- a/bashast/libbashWalker.g
35 +++ b/bashast/libbashWalker.g
36 @@ -116,7 +116,7 @@ options
37 }
38 }
39
40 -start: list|EOF;
41 +start: list EOF;
42
43 list: ^(LIST (logic_command_list)+);