From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QBPi3-0002do-V3 for garchives@archives.gentoo.org; Sun, 17 Apr 2011 11:00:08 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1890B1C09D; Sun, 17 Apr 2011 10:58:31 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id D2F901C09C for ; Sun, 17 Apr 2011 10:58:30 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4D5601B4047 for ; Sun, 17 Apr 2011 10:58:30 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 662D480074 for ; Sun, 17 Apr 2011 10:58:29 +0000 (UTC) From: "Petteri Räty" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Petteri Räty" Message-ID: Subject: [gentoo-commits] proj/libbash:master commit in: bashast/, bashast/gunit/ X-VCS-Repository: proj/libbash X-VCS-Files: bashast/bashast.g bashast/gunit/list.gunit X-VCS-Directories: bashast/ bashast/gunit/ X-VCS-Committer: betelgeuse X-VCS-Committer-Name: Petteri Räty X-VCS-Revision: f865c8f07976609d8e318fbd4f38fb1088c2b6da Date: Sun, 17 Apr 2011 10:58:29 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 8fef1134f1973de39f908ffd6a989a04 commit: f865c8f07976609d8e318fbd4f38fb1088c2b6da Author: Petteri R=C3=A4ty petteriraty eu> AuthorDate: Fri Apr 15 14:08:45 2011 +0000 Commit: Petteri R=C3=A4ty gentoo org> CommitDate: Sun Apr 17 10:44:26 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/libbash.git;a= =3Dcommit;h=3Df865c8f0 Parser: fix space after variable assignment --- bashast/bashast.g | 9 ++++++--- bashast/gunit/list.gunit | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/bashast/bashast.g b/bashast/bashast.g index 3d73cfb..67353e3 100644 --- a/bashast/bashast.g +++ b/bashast/bashast.g @@ -101,12 +101,15 @@ time_posix : TIME_POSIX BLANK!+; //The structure of a command in bash command - : var_def (BLANK!+ var_def)* - | compound_command + : compound_command | simple_command; //Simple bash commands simple_command - : (var_def BLANK!+)* bash_command^ redirect*; + : variable_definitions BLANK!+ bash_command^ redirect* + | variable_definitions + | bash_command^ redirect*; +variable_definitions + : var_def (BLANK!+ var_def)*; bash_command : fname_no_res_word (BLANK+ arg)* -> ^(COMMAND fname_no_res_word arg*); //An argument to a command diff --git a/bashast/gunit/list.gunit b/bashast/gunit/list.gunit index f21f014..3d2076a 100644 --- a/bashast/gunit/list.gunit +++ b/bashast/gunit/list.gunit @@ -38,3 +38,4 @@ cp arch/x86_64/boot/bzImage /boot/kernel" -> (LIST (COM= MAND (STRING make)) (COMM b=3Dthree echo \"a b\"" -> (LIST (=3D a (STRING asdf)) (=3D b (STRING three)) (COM= MAND (STRING echo) (STRING (DOUBLE_QUOTED_STRING a b)))) "echo one && (echo two || echo three)" -> (LIST (&& (COMMAND (STRING ech= o) (STRING one)) (SUBSHELL (LIST (|| (COMMAND (STRING echo) (STRING two))= (COMMAND (STRING echo) (STRING three))))))) +"FOO=3D'bar' ;" -> (LIST (=3D FOO (STRING (SINGLE_QUOTED_STRING bar))))