简体   繁体   中英

Getting started with SableCC

I am a total beginner in programming and for school i have to make a little SableCC project. However im not sure how to use SableCC properly.

I have downloaded it from sablecc.org and i did what was said in the readme to install it.

So after installing with the java -jar lib/sablecc.jar command the console tells me how the usage works, like for example

sablecc --license

or to use

sablecc [-d destination] 

to where i want sablecc to work (i guess).

However, when i use anything from this list it just says:

Sablecc is not recognized as an internal or external command

What have i done wrong? Thanks!

I followed also the instruction of [README.html][1] for ANT and it worked fine for me.

edit: I put some commands here in case the link is unavailable some time.

After downloading, follow the next steps:

  • Decompress the file sablecc-3.2.tar.gz or sablecc-3.2.zip:
    tar -xzvf sablecc-3.2.tar.gz jar -xvf sablecc-3.2.zip jar -xvf sablecc-3.2.zip
  • Go to the created directory:
    cd sablecc-3.2
  • You will find an executable sablecc.jar file in the lib directory:
    java -jar lib/sablecc.jar

This is it.

If you have Ant installed on your system, you can install SableCC with the command:

ant -Dinstall.dir=destination install

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM