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 1Mnp3K-0006QR-4M for garchives@archives.gentoo.org; Wed, 16 Sep 2009 07:35:46 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2A234E0730; Wed, 16 Sep 2009 07:35:45 +0000 (UTC) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.158]) by pigeon.gentoo.org (Postfix) with ESMTP id E2075E0730 for ; Wed, 16 Sep 2009 07:35:44 +0000 (UTC) Received: by fg-out-1718.google.com with SMTP id d23so1327472fga.10 for ; Wed, 16 Sep 2009 00:35:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=ee+5juzFLlH3ArFPoEiVOr+UZ22mcv3wKJbYVAEKxEQ=; b=Sf+b5qPBKYvponSzUJfMmFmEZ8kPAj+E1Z64VXjPTPKUndbXZ2NtbeO28nhebYp/Uq zKW+WeKWigS+OVKXXZnyTiRpc1D4jOs3j+uSJcIjfqZ+WvzzfqerODQ+bOO6BF3aEfvK /1Fx2QCTSTcQAU0bN5OdXCfUbGa1dqnkyA4DQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:references:in-reply-to:mime-version :content-type:content-transfer-encoding:message-id; b=JIoZ08qI/C8FpGZdr+ZB/yv41OFNCFsV2BtKMt/5Q89o8rZrroFhoLxuStAjGJFxIB thwXMQRNicElzZAsW2Bw6EMhEG1tNYfwFsSvrKvNGxGADij6hIUYMUkBbxZHGpMA2tUK SPnXzGUFzYAdzNJvYJ+QTTmx5nzflu9lrHLjg= Received: by 10.86.169.25 with SMTP id r25mr3332675fge.17.1253086544371; Wed, 16 Sep 2009 00:35:44 -0700 (PDT) Received: from nazgul.localnet (196-210-140-68-rrdg-esr-2.dynamic.isadsl.co.za [196.210.140.68]) by mx.google.com with ESMTPS id d6sm1880891fga.11.2009.09.16.00.35.43 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 16 Sep 2009 00:35:43 -0700 (PDT) From: Alan McKinnon To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] comments on portage.keywords Date: Wed, 16 Sep 2009 09:34:05 +0200 User-Agent: KMail/1.12.1 (Linux/2.6.31-gentoo; KDE/4.3.1; x86_64; ; ) References: <92ad22480909151255t54700471k308f611a5298d193@mail.gmail.com> <20090915214920.6c88693a@zaphod.digimed.co.uk> <92ad22480909151914h47ade5e2kf6cda49425b150bd@mail.gmail.com> In-Reply-To: <92ad22480909151914h47ade5e2kf6cda49425b150bd@mail.gmail.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Message-Id: <200909160934.05774.alan.mckinnon@gmail.com> X-Archives-Salt: 1a2eadb3-882d-4008-882c-f94d6a48f2b3 X-Archives-Hash: 8627d61ae5334741cafeb9085b917b94 On Wednesday 16 September 2009 04:14:59 Cr=EDstian Viana wrote: > but in that case the "#" character is inside a string, so it wuldn't be > considered a comment. I was thinking like "//" in Java: it can be anywhere > in the line, but if it's inside a string it's not considered a comment > marker. >=20 > but thanks again for the information :) To deal with a hash anywhere, you need a complex language parser and probab= ly=20 a full blown tokenizer like compilers have to implement. This is decidedly non-trivial. Java is a freeform language, the location of line breaks does not really=20 matter. Config files are very different beasts, they are very much line=20 oriented - one setting per line. Think like grep, it deals with a line at a= =20 time. So the easiest implementation by far is the comment marker must be the firs= t=20 non-whitespace character, other wise it isn't a comment. That one step can= =20 make most of your config file bugs never happen, just like that. =2D-=20 alan dot mckinnon at gmail dot com