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 1QBPhS-0002VX-Og for garchives@archives.gentoo.org; Sun, 17 Apr 2011 10:59:30 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 08B191C0BA; Sun, 17 Apr 2011 10:58:33 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id CBAD41C0BA for ; Sun, 17 Apr 2011 10:58:33 +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 84B091BC003 for ; Sun, 17 Apr 2011 10:58:33 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id DDFC08006E for ; Sun, 17 Apr 2011 10:58:32 +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: bdf60a3a655fd1cb0234e9b14f8faedbfc5e0b4c Date: Sun, 17 Apr 2011 10:58:32 +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: 48d0ce4c079759789882f34b09c2d9a5 commit: bdf60a3a655fd1cb0234e9b14f8faedbfc5e0b4c Author: Petteri R=C3=A4ty petteriraty eu> AuthorDate: Sat Apr 16 17:09:25 2011 +0000 Commit: Petteri R=C3=A4ty gentoo org> CommitDate: Sun Apr 17 10:57:04 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/libbash.git;a= =3Dcommit;h=3Dbdf60a3a Parser: support numbers in function names --- bashast/bashast.g | 2 +- bashast/gunit/function.gunit | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bashast/bashast.g b/bashast/bashast.g index db04b03..98ef58f 100644 --- a/bashast/bashast.g +++ b/bashast/bashast.g @@ -525,7 +525,7 @@ function: FUNCTION BLANK+ function_name (BLANK* paren= s)? wspace compound_command //http://article.gmane.org/gmane.comp.shells.bash.bugs/16424 //the documented set is stricter but we need to have at least what's use= d in Gentoo function_name - : (MINUS|name)+; + : (MINUS|DIGIT|name)+; parens : LPAREN BLANK* RPAREN; name : NAME | LETTER diff --git a/bashast/gunit/function.gunit b/bashast/gunit/function.gunit index b233b0a..c22821a 100644 --- a/bashast/gunit/function.gunit +++ b/bashast/gunit/function.gunit @@ -36,4 +36,4 @@ function: exit; } > /dev/null" -> (function (STRING quit) (CURRENT_SHELL (LIST= (COMMAND (STRING exit)))) (REDIR > (STRING / dev / null))) "function help { echo hi; } 2> /dev/null" -> (function (STRING help) (CU= RRENT_SHELL (LIST (COMMAND (STRING echo) (STRING hi)))) (REDIR 2 > (STRIN= G / dev / null))) "function help { echo 3; } 2> /dev/null > output" OK -"foo-bar() { :; }" -> (function (STRING foo - bar) (CURRENT_SHELL (LIST = (COMMAND (STRING :))))) +"xorg-2_reconf_source() { :; }" -> (function (STRING xorg - 2 _reconf_so= urce) (CURRENT_SHELL (LIST (COMMAND (STRING :)))))