110.69; CM changes broke ml-yacc plugin

Matthew Fluet <[email protected]> Fri, 6 Feb 2009 10:55:54 -0600 (CST)
Newsgroups gmane.comp.lang.sml.smlnj
Message-ID <[email protected]>
The ml-yacc program is very particular about being invoked with exactly 
one command line argument.  Revision 3263 changed the default shell 
command string used to invoke CM shell tools to explicitly quote the 
command, options, and src file (apparently to behave nicely in the 
presence of spaces in the command and src file).  Since the mlyacc tool is 
registered without an explicit template, its use instantiates the default 
template, yielding a shell command like:

   "/Users/fluet/devel/smlnj/smlnj-110.69/bin/ml-yacc" "" "a.grm"

Unfortunately, the shell then invokes ml-yacc with two arguments (the 
first the explicitly empty string); ml-yacc fails because it sees two 
arguments.

In any case, I doubt that quoting the "%u" is the right thing to do, since 
it appears to be instantiated by a list of options, which should appear to 
the command as separate command line arguments, but would appear as a 
single argument if passed to the shell in quotes.

This also affects the other tools, but ml-ulex and ml-antlr are a bit more 
robust in the face of empty strings as command line arguments.

It might also be better to quote the strings that get substituted for 
"%c", "%s" and "%t", rather than changing the template.  That way, tools 
that provide their own template will get properly quoted string.

-Matthew


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com