[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Makefiles parser?
From: |
Paul D. Smith |
Subject: |
Re: Makefiles parser? |
Date: |
Mon, 26 Jun 2006 17:02:44 -0400 |
%% Gutson Daniel-ADG035 <address@hidden> writes:
gd> is there any Yacc or similar grammar for Makefiles? I saw a couple
gd> of Makefile.y in google, but couldn't find where they were. Or,
gd> is the grammar described somewhere? (in bnf or similar).
Not really. The problem is that makefile syntax is highly
context-dependent: for example, wildly different syntactical rules hold
inside a rule's command script than do during variable assignment.
For this reason most instances of make I'm aware of have hand-rolled
parsers rather than utilizing yacc, or even lex.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
- Makefiles parser?, Gutson Daniel-ADG035, 2006/06/26
- Re: Makefiles parser?,
Paul D. Smith <=