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 1Q99Z5-0004Bc-Ut for garchives@archives.gentoo.org; Mon, 11 Apr 2011 05:21:32 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BF4DD1C040; Mon, 11 Apr 2011 05:21:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 8EC1D1C03F for ; Mon, 11 Apr 2011 05:21:17 +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 0428A1B40CC for ; Mon, 11 Apr 2011 05:21:17 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id BE23280072 for ; Mon, 11 Apr 2011 05:21:15 +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/function.gunit X-VCS-Directories: bashast/ bashast/gunit/ X-VCS-Committer: betelgeuse X-VCS-Committer-Name: Petteri Räty X-VCS-Revision: e435f385e1c71e172b46f2860d37339fbac06506 Date: Mon, 11 Apr 2011 05:21:15 +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: 7174a74f31179409ad361cf48822ade6 commit: e435f385e1c71e172b46f2860d37339fbac06506 Author: Mu Qiao gentoo org> AuthorDate: Sun Apr 10 03:15:02 2011 +0000 Commit: Petteri R=C3=A4ty gentoo org> CommitDate: Mon Apr 11 01:39:01 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/libbash.git;a= =3Dcommit;h=3De435f385 Fix EOL handling in functions wrt bug #362715 --- bashast/bashast.g | 2 +- bashast/gunit/function.gunit | 3 +++ 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/bashast/bashast.g b/bashast/bashast.g index 8aebc93..2418a81 100644 --- a/bashast/bashast.g +++ b/bashast/bashast.g @@ -327,7 +327,7 @@ cond_part: brace_expansion | fname | arithmetic; //Rules for whitespace/line endings -wspace : BLANK+|EOL; +wspace : BLANK+|EOL+; semiel : (SEMIC|EOL) BLANK*; =20 //definition of word. this is just going to grow... diff --git a/bashast/gunit/function.gunit b/bashast/gunit/function.gunit index a861eab..157c0a6 100644 --- a/bashast/gunit/function.gunit +++ b/bashast/gunit/function.gunit @@ -31,5 +31,8 @@ function: "foo() { :; }" -> (function foo (CURRSHELL (LIST (COMMAND (STRING :))))) =20 "function quit { exit; } > /dev/null" -> (function quit (CURRSHELL (LIST= (COMMAND (STRING exit)))) (REDIR > (STRING / dev / null))) +"function quit { + # comment + exit; } > /dev/null" -> (function quit (CURRSHELL (LIST (COMMAND (ST= RING exit)))) (REDIR > (STRING / dev / null))) "function help { echo hi; } 2> /dev/null" -> (function help (CURRSHELL (= LIST (COMMAND (STRING echo) (STRING hi)))) (REDIR 2 > (STRING / dev / nul= l))) "function help { echo 3; } 2> /dev/null > output" OK