[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GSoC] Proposal for "Parse using an AST"

From: Matthias Paulmier
Subject: Re: [GSoC] Proposal for "Parse using an AST"
Date: Mon, 05 Mar 2018 18:37:47 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

John Calcote <address@hidden> writes:

> A file is really just a Makefile with embellishments. It seems
> like your ast would have to incorporate most of make’s syntax to work
> correctly.
> The reason Perl was chosen to begin with is because of its great text
> processing capabilities as, ultimately, all automake really does is copy
> the file directly to the output file, filtering out automake
> stuff along the way and injecting make snippets generated from the automake
> constructs.
> This may not appear obvious at first because many simpler files
> contain only automake stuff. But anything found in the file
> that automake doesn’t recognize is assumed to be proper make script and
> copied directly to the output file.

This is what I figured from the doc. To be honest I've really only used automake
as a "user" and have never written a myself. But I figured that from
the "General Operation" subsection of the documentation and from the chat I had
with Mathieu.

> I suggest making your ast handle non automake chunks as a specific token
> type designed to be passed through without modifications.

As you said automake assumes what it doesn't recognize is proper make script I
think this would be a reasonable approach. Letting make handle make stuff sounds
good to me. 

Thanks for the pointers.

Matthias Paulmier

reply via email to

[Prev in Thread] Current Thread [Next in Thread]