@echo off
REM
REM  make_SampleLex : make SampleLex.java from sample.ulc
REM  Written by Stanley J. Hong <babel96@gmail.com>, Aug 2013.
REM

setlocal

set ULC_FILE=%1

if "%ULC_FILE%" == "" set ULC_FILE=.\sample.ulc

if not exist "%ULC_FILE%" (
	echo %ULC_FILE%: Not Exist!
	goto end_0
)

set ULC2CLASS_FPATH=
for /F "tokens=*" %%a in ('where ulc2class') do set ULC2CLASS_FPATH=%%a

if "%ULC2CLASS_FPATH%" == ""  (
	echo ulc2class: Not Found!
	goto end_0
)

echo making the java-file SampleLex.java from %ULC_FILE% ...
ulc2class -o ..\src\uls\tests\SampleLex.java -ljava -n uls.tests.SampleLex %ULC_FILE%

:end_0
pause
endlocal
