110.69; CM changes broke ml-yacc plugin

View: New views
2 Messages — Rating Filter:   Alert me  

110.69; CM changes broke ml-yacc plugin

by Matthew Fluet-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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
_______________________________________________
Smlnj-list mailing list
Smlnj-list@...
https://lists.sourceforge.net/lists/listinfo/smlnj-list

Re: 110.69; CM changes broke ml-yacc plugin

by Matthias Blume-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Feb 6, 2009, at 10:55 AM, Matthew Fluet wrote:

>
> 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.

Thanks, this looks like the correct analysis of the problem.  (Someone  
else had reported the same issue, but I hadn't looked into it yet.)

> 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.

For the time being I changed the template (removed the quotation marks  
around %u), but I agree that your suggestion is better.  I will try to  
implement that later.

Matthias


------------------------------------------------------------------------------
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
_______________________________________________
Smlnj-list mailing list
Smlnj-list@...
https://lists.sourceforge.net/lists/listinfo/smlnj-list