1 |
commit: fa4053e5a365b1ced100736989070b8bd01f33eb |
2 |
Author: Petteri Räty <petsku <AT> petteriraty <DOT> eu> |
3 |
AuthorDate: Fri Apr 8 19:22:57 2011 +0000 |
4 |
Commit: Petteri Räty <betelgeuse <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Apr 9 06:13:53 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/libbash.git;a=commit;h=fa4053e5 |
7 |
|
8 |
Remove need to backtrack from the word rule |
9 |
|
10 |
All the other alternatives can also be matched from fname so we need |
11 |
syntactic predicates. We should give thought to if we need both the word |
12 |
and fname rules. |
13 |
|
14 |
--- |
15 |
bashast/bashast.g | 14 +++++++------- |
16 |
1 files changed, 7 insertions(+), 7 deletions(-) |
17 |
|
18 |
diff --git a/bashast/bashast.g b/bashast/bashast.g |
19 |
index 64568c9..20068b5 100644 |
20 |
--- a/bashast/bashast.g |
21 |
+++ b/bashast/bashast.g |
22 |
@@ -330,13 +330,13 @@ wspace : BLANK+|EOL; |
23 |
semiel : (';'|EOL) BLANK*; |
24 |
|
25 |
//definition of word. this is just going to grow... |
26 |
-word : brace_expansion |
27 |
- | command_sub |
28 |
- | var_ref |
29 |
- | num |
30 |
- | fname |
31 |
- | arithmetic_expansion |
32 |
- | res_word_str -> ^(STRING res_word_str); |
33 |
+word : (brace_expansion) => brace_expansion |
34 |
+ | (command_sub) => command_sub |
35 |
+ | (var_ref) => var_ref |
36 |
+ | (num) => num |
37 |
+ | (arithmetic_expansion) => arithmetic_expansion |
38 |
+ | fname; |
39 |
+ |
40 |
pattern : command_sub |
41 |
| fname |
42 |
| TIMES; |