Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/avakar/stanse
https://github.com/avakar/stanse
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/avakar/stanse
- Owner: avakar
- Created: 2010-07-21T13:28:56.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2011-05-24T23:17:11.000Z (over 13 years ago)
- Last Synced: 2023-03-11T05:07:08.635Z (over 1 year ago)
- Language: C
- Homepage: http://stanse.fi.muni.cz/
- Size: 29.1 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
STANSE Readme
=============Building
--------Prerequisities: ant with cpptasks and antlr3 targets
By running
$ ant jar
one gets dist/stanse.jar.Sometimes ant is unable to find these task definitions even if you put them in
the ant lib location. In that case it usually helps to run ant as follows:
CLASSPATH=tools/ant/antlr3.jar:tools/ant/cpptasks.jar ant jarRunning
-------
Prior to running the appliction, MAKE SURE stcparser-c, stcc and stpreproc from
dist/ directory are in one of paths set in your PATH environment variable. I.e.
all
$ stcparser-c
$ stcc
$ stpreproc
don't complain about command not found, permission denied or any other problem.For C++ support, you need to download and build the cpp2sir Stanse frontend.
The sources can be found at http://github.org/avakar/cpp2sir. Build them
and place the cpp2sir executable into the dist/ directory.There are several methods how to invoke Stanse:
1) First of all, one may run stanse by typing
$ java -jar /stanse.jar -gui
Selecting a file and running tests will result in checker to go through the
file and report potential errors.2) Also jobfiles are supported. By putting filenames into a textfile, each on
its own line and selecting this feature in the gui mentioned in point 1) will
check all these files.-- Advanced use of jobfiles --
It lays in a following structure (one per line) of jobfiles:
{filename},{output},{working directory},{compiler flags}
filename -- a file to check
output -- a file to output to (.includes and .preproc is appended)
working directory -- where to run the preprocessor from
compiler flags -- preprocessor flags (e.g. derived from gcc line)Example of checking foo.c with specified flags from /tmp:
{foo.c},{foo.o},{/tmp},{-I/my_project/include -lm}
Preprocessor line will look like:
cd /tmp; cc -E -I/my_project/include -lm -o foo.o.preproc foo.c3) If your Makefile supports overriding of CC variable (as those generated
by autoconf/automake do), you can easily obtain a jobfile from point 2)
by setting CC to stcc. JOB_FILE environment has to be set with a resulting
jobfile name.Example of this usage follows:
$ JOB_FILE=/tmp/my_jobfile make CC=stcc
After the build finishes in this example, /tmp/my_jobfile contains a list of
4-tuples which Stanse can understand and use for preprocess as described in
the previous point. This generated jobfile is intended to be used in the
same manner.Other info
----------
See our website at http://stanse.fi.muni.cz/ to obtain more documentation and
information. E.g. format of and conveniences implemented in XML checker
definitions.