1 |
commit: 284f2fd1149453021d518b9cb2665103715df409 |
2 |
Author: Mu Qiao <qiaomuf <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Apr 12 11:19:32 2011 +0000 |
4 |
Commit: Petteri Räty <betelgeuse <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Apr 12 12:08:11 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/libbash.git;a=commit;h=284f2fd1 |
7 |
|
8 |
Fix broken grammar for test ebuilds |
9 |
|
10 |
Binary arithmetic is broken by some previous commits. Now it's |
11 |
fixed. |
12 |
|
13 |
--- |
14 |
bashast/bashast.g | 2 +- |
15 |
bashast/libbashWalker.g | 8 ++++---- |
16 |
2 files changed, 5 insertions(+), 5 deletions(-) |
17 |
|
18 |
diff --git a/bashast/bashast.g b/bashast/bashast.g |
19 |
index 9f0f80c..0defc93 100644 |
20 |
--- a/bashast/bashast.g |
21 |
+++ b/bashast/bashast.g |
22 |
@@ -435,7 +435,7 @@ pre_inc_dec |
23 |
| MINUS MINUS BLANK? primary -> ^(PRE_DECR primary); |
24 |
unary : post_inc_dec |
25 |
| pre_inc_dec |
26 |
- | primary |
27 |
+ | BLANK!? primary |
28 |
| PLUS unary -> ^(PLUS_SIGN unary) |
29 |
| MINUS unary -> ^(MINUS_SIGN unary) |
30 |
| (TILDE|BANG)^ unary; |
31 |
|
32 |
diff --git a/bashast/libbashWalker.g b/bashast/libbashWalker.g |
33 |
index e0add2a..33c18a6 100644 |
34 |
--- a/bashast/libbashWalker.g |
35 |
+++ b/bashast/libbashWalker.g |
36 |
@@ -160,10 +160,10 @@ arithmetics returns[int value] |
37 |
|^(VAR_REF libbash_name=name) { |
38 |
$value = walker->resolve<int>(libbash_name); |
39 |
} |
40 |
- |^(PRE_INCR libbash_name=name){ $value = walker->pre_incr(libbash_name); } |
41 |
- |^(PRE_DECR libbash_name=name){ $value = walker->pre_decr(libbash_name); } |
42 |
- |^(POST_INCR libbash_name=name){ $value = walker->post_incr(libbash_name); } |
43 |
- |^(POST_DECR libbash_name=name){ $value = walker->post_decr(libbash_name); } |
44 |
+ |^(PRE_INCR ^(VAR_REF libbash_name=name)){ $value = walker->pre_incr(libbash_name); } |
45 |
+ |^(PRE_DECR ^(VAR_REF libbash_name=name)){ $value = walker->pre_decr(libbash_name); } |
46 |
+ |^(POST_INCR ^(VAR_REF libbash_name=name)){ $value = walker->post_incr(libbash_name); } |
47 |
+ |^(POST_DECR ^(VAR_REF libbash_name=name)){ $value = walker->post_decr(libbash_name); } |
48 |
|^(EQUALS libbash_name=name l=arithmetics) { |
49 |
$value = walker->set_value(libbash_name, l); |
50 |
} |