Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KOmY6-0006C4-5k for mharc-grub-devel@gnu.org; Fri, 01 Aug 2008 00:47:30 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KOmY2-00066u-NY for grub-devel@gnu.org; Fri, 01 Aug 2008 00:47:26 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KOmY1-00064t-Fn for grub-devel@gnu.org; Fri, 01 Aug 2008 00:47:26 -0400 Received: from [199.232.76.173] (port=45408 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KOmY1-00064d-Bi for grub-devel@gnu.org; Fri, 01 Aug 2008 00:47:25 -0400 Received: from ti-out-0910.google.com ([209.85.142.185]:57154) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KOmY0-0007Mm-Q2 for grub-devel@gnu.org; Fri, 01 Aug 2008 00:47:25 -0400 Received: by ti-out-0910.google.com with SMTP id u5so208854tia.10 for ; Thu, 31 Jul 2008 21:47:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=jWBMihuIgSTXmnQopQiOkY+yRnTVGf9402yqH6s8JwI=; b=O1VZgorqNABueuCO5ysIQjJYn61IaM+Zo9pJKO+9Q1qukGIgcLqK0urBOe45hUNncL RhDQnorHyg76TJKrGj+nrFIk8M2OuaRE4J3jDEwzg4XBWNDmn6fLjBzhsJ0YT1lzQbzS CLlbtTjx9vybECvGJcmCICtBsFWOT3k6JB7V4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=Lp45SweARy+/vxJ3SFX4Qj48xUZv7V2zVH8+iQElrZxbKukRensC3/1nwBEkKayEgx cswVgZhg1TUsre4vz0f7ltRIbpgTbtDaFplIk16jleEu4d5aD5IjNvloGPj82QzvQC9z w3su7yC48+7ZykFg/mWWkIhlGmnLcNcM9Z3lY= Received: by 10.110.15.19 with SMTP id 19mr8520436tio.59.1217566042443; Thu, 31 Jul 2008 21:47:22 -0700 (PDT) Received: by 10.110.16.5 with HTTP; Thu, 31 Jul 2008 21:47:22 -0700 (PDT) Message-ID: Date: Fri, 1 Aug 2008 12:47:22 +0800 From: Bean To: "The development of GRUB 2" In-Reply-To: <4892943F.1080000@coresystems.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4892907B.8020204@coresystems.de> <4892943F.1080000@coresystems.de> X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) Subject: Re: slight oddity in script parser X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Aug 2008 04:47:28 -0000 On Fri, Aug 1, 2008 at 12:42 PM, Stefan Reinauer wrote: > Bean wrote: >> On Fri, Aug 1, 2008 at 12:26 PM, Stefan Reinauer wrote: >> >>> Bean wrote: >>> >>>> On Fri, Aug 1, 2008 at 7:48 AM, Patrick Georgi wrote: >>>> >>>> >>>>> Hi, >>>>> >>>>> I forgot this, so sorry for the separate mail: >>>>> Currently, the parser expects comments to start at the beginning of the >>>>> line, so "ls /foo # necessary because of baz" doesn't work properly >>>>> >>>>> I think a good scenario would be to have comments start either on "#" at >>>>> pos0, or on " #". This way, ls /foo#bar continues to work. >>>>> >>>>> Also, currently the following is a single comment, which is an unusual >>>>> feature: >>>>> # this comment starts here\ >>>>> and continues on this line >>>>> >>>>> >>>> Hi, >>>> >>>> Actually, # and \ is handled in the read line function, it can't >>>> handle complicated situation. >>>> >>>> >>> Are you implying it is wrong there and should be moved to the parser? >>> >> >> Hi, >> >> In theory, it should be handled by the lexer. but actually, it's not >> so easy. lexer already has some issue, adding new handling would not >> help. >> >> > So, what's the right way to fix it, then? Hi, Perhaps we should use automatic tool to generate the lexer, like using bison for the parser. But I recall that Marco encounter some issue with flex, but I can't remember what it's now. -- Bean