A short contribution

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

A short contribution

by Jacek Cala :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


  Hello

  I've recently downloaded SableCC 3.1 and found that the bin\sablecc.bat
file is a bit too simple and requires user's intervention (the same is
related to SableCC 3.2).

Please consider the following simple change:

I think that line:

----------------------------------------------------
java -jar lib\sablecc.jar %1 %2 %3 %4 %5 %6 %7 %8 %9
----------------------------------------------------

can be changed to the following three lines:

----------------------------------------------------
setlocal
set SABLECCHOME=%~dp0..
java -jar %SABLECCHOME%\lib\sablecc.jar %*
----------------------------------------------------

this allows invoking sablecc.bat without the need to change anything after
unzipping the code.

Below please find the whole batch file. I'm not sure if this is also
valuable to the 4th version so I don't follow the contribution guidelines
and simply use this mailing list.

  Best regards,
--
  Jacek Cala
___________________________________________________________________
Distributed Systems Research Group   Department of Computer Science
AGH - University of Science and Technology           Krakow, Poland
tel.: +48 12 6173491 ext. 71                   fax.: +48 12 6339406


--- Begin of sablecc.bat ---------------------------
@echo off

rem * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
rem * This file is part of SableCC.                             *
rem * See the file "LICENSE" for copyright information and the  *
rem * terms and conditions for copying, distribution and        *
rem * modification of SableCC.                                  *
rem * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
rem

setlocal
set SABLECCHOME=%~dp0..

java -jar %SABLECCHOME%\lib\sablecc.jar %*

--- End of sablecc.bat -----------------------------



_______________________________________________
SableCC-Discussion mailing list
SableCC-Discussion@...
http://lists.sablecc.org/listinfo/sablecc-discussion

Re: A short contribution

by Etienne M. Gagnon :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Jacek,

Yes, this could be valuable for SableCC 4. Could you fill in an enhancement ticket with a description of the problem and a .bat attachment?

You could test that it works for invoking the sablecc-4-alpha.4 jar file. It won't generate code, but it should be able you to type:
c:\> sablecc -h
:-)

Thanks in advance,

Etienne

jcala@... a écrit :
Please consider the following simple change:

...

-- 
Etienne M. Gagnon, Ph.D.
SableCC:                                            http://sablecc.org
SableVM:                                            http://sablevm.org


_______________________________________________
SableCC-Discussion mailing list
SableCC-Discussion@...
http://lists.sablecc.org/listinfo/sablecc-discussion

signature.asc (265 bytes) Download Attachment
LightInTheBox - Buy quality products at wholesale price