Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Nov 1996 08:26:08 -0600
From:      peter@taronga.com (Peter da Silva)
To:        hackers@freebsd.org
Subject:   Re: Lex/Yacc question
Message-ID:  <199611291426.IAA15151@bonkers.taronga.com>
In-Reply-To: <v01540b11aec3de6b7afb@[194.32.164.2]>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <v01540b11aec3de6b7afb@[194.32.164.2]> you write:
>>I've written a number of parsers, too.  Nonen of them needed:
>>
>>        KEYWORD rest of stuff to end of line
>
>Ever heard of Ada?
>
>        -- and the rest of the line is a comment

# sh does it too.
// And C++
% And Postscript
; And a number of assemblers
! And X resource files
XCOMM And Imakefiles

I just don't get it. Why use a formal grammer to parse 821 anyway, not to
mention that

KEYWORD\ .*		{ foo(yytext+sizeof "KEYWORD"); }

works fine. Did you see the disgusting trick I pulled there?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199611291426.IAA15151>