On Wednesday, November 5, 2014 7:34:51 PM UTC-8, Rendaw wrote:
>
> > My biggest concern with the lua parser is that it seems a very clumsy 
> > alternative to the run-script option.  True, it can be a little clumsy 
> > generating strings, but writing a parser for an arbitrary language in 
> > lua seems much clumsier.  And that is precisely what one often wants 
> > when writing rules:  you want to know the inputs and outputs of a 
> > given build, which often can be determined by parsing an input file. 
> >  True, you can write hokey regular expressions, but when those fail, 
> > I'd like to be able to do it right. 
> I'm afraid I don't exactly understand where you're coming from here.  I 
> don't think anyone was expecting to write a Python or Ruby parser in 
> Lua.  Rather, if you had legacy Makefiles or build descriptors in some 
> other internal data file format, Lua could help parse those.  I don't 
> believe there's any programming language out there that natively 
> supports loading Makefiles, so you'd be writing a parser no matter which 
> language you use. 
>

I suppose that is one use for scripting.  But my primary reason for wanting 
scripting is to be able to automate the actual creation of dependency 
relationships.  This means parsing (or munging) latex files, python 
scripts, etc. Currently I do this primarily with simple regular 
expressions, but if this breaks down (and it is fragile) I'll want the 
option to switch to real parsing (or at least better munging).  Many 
languages have existing libraries that would be effective for this sort of 
task, which is what makes run-script so great.  Other systems (such as 
scons, waf or cmake) have built-in logic for handling major languages, but 
they don't handle everything.  The run-script option enables writing such 
dependency analyzers in the most convenient language for the task.

The beautiful thing about the Tupfile language is that it is pretty simple. 
 Much easier to learn than the combination of lua + a tup-specific library.

David

-- 
-- 
tup-users mailing list
email: [email protected]
unsubscribe: [email protected]
options: http://groups.google.com/group/tup-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"tup-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to