[anjuta] am-project: Fix bgo#638524 - Syntax error on valid configure.ac files



commit 3bbb6fa12a6bcf3eee9f434f975dde922919d98e
Author: Sébastien Granjoux <seb sfo free fr>
Date:   Thu Jan 6 21:35:39 2011 +0100

    am-project: Fix bgo#638524 - Syntax error on valid configure.ac files

 plugins/am-project/ac-parser.y     |    9 +++++----
 plugins/am-project/tests/acinit.at |   23 +++++++++++++++++++++++
 2 files changed, 28 insertions(+), 4 deletions(-)
---
diff --git a/plugins/am-project/ac-parser.y b/plugins/am-project/ac-parser.y
index 6b89ea9..a41d5fd 100644
--- a/plugins/am-project/ac-parser.y
+++ b/plugins/am-project/ac-parser.y
@@ -416,8 +416,8 @@ arg_part_or_space:
 
 arg_part:
     arg_string
-    | expression { $$ = NULL;}
-    | dnl
+    | expression
+    | macro
     | arg_token {
         $$ = anjuta_token_new_static (ANJUTA_TOKEN_ITEM, NULL);
         anjuta_token_merge ($$, $1);
@@ -456,8 +456,6 @@ separator:
 
 expression:
     LEFT_PAREN  expression_body  RIGHT_PAREN {
-        anjuta_token_set_type ($1, ANJUTA_TOKEN_OPEN_QUOTE);
-        anjuta_token_set_type ($3, ANJUTA_TOKEN_CLOSE_QUOTE);
         $$ = anjuta_token_merge_previous ($2, $1);
         anjuta_token_merge ($2, $3);
     }
@@ -496,6 +494,9 @@ expression_body:
     | expression_body expression {
         anjuta_token_merge ($1, $2);
     }
+    | expression_body arg_string {
+        anjuta_token_merge ($1, $2);
+    }
     ;
 
 spaces:
diff --git a/plugins/am-project/tests/acinit.at b/plugins/am-project/tests/acinit.at
index 1462abf..abfcd6c 100644
--- a/plugins/am-project/tests/acinit.at
+++ b/plugins/am-project/tests/acinit.at
@@ -85,4 +85,27 @@ AT_PARSER_CHECK([load simple \
 		list])
 AT_CHECK([diff -b output expect])
 
+
+m4_pattern_allow(m4_esyscmd)
+AS_MKDIR_P([rygel])
+AT_DATA([rygel/configure.ac],
+[[AC_INIT([rygel],
+        m4_esyscmd([GNOME_TAG_PATTERN=RYGEL build-aux/git-version-gen .tarball-version]),
+        [http://bugzilla.gnome.org/enter_bug.cgi?product=Rygel])
+AC_CONFIG_FILES(Makefile)
+]])
+AT_DATA([rygel/Makefile.am],
+[[
+]])
+AT_DATA([expect],
+[[PROPERTY (Name): rygel
+PROPERTY (Version): m4_esyscmd(GNOME_TAG_PATTERN=RYGEL build-aux/git-version-gen .tarball-version)
+PROPERTY (Bug report URL): http://bugzilla.gnome.org/enter_bug.cgi?product=Rygel
+    GROUP (0): rygel
+]])
+AT_PARSER_CHECK([load rygel \
+		list])
+AT_CHECK([diff -b output expect])
+
+
 AT_CLEANUP



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]