lslint is a tool to check the syntactic and semantic validity of Second Life LSL scripts.
C++ LSL Yacc Lex Shell Makefile Batchfile
Clone or download
Pull request Compare This branch is 216 commits ahead, 2 commits behind pclewis:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
scripts Add test case with all type combos LSL supports May 16, 2018
.gitignore Add Linux ignores Apr 21, 2018
.travis.yml Update .travis.yml Oct 5, 2017
ChangeLog Miscellaneous cleanups. May 1, 2017
Makefile kwdb 0.0.20180626000 Jul 1, 2018
NMakefile kwdb 0.0.20180626000 Jul 1, 2018
README.md Add support for god mode functions and a flag to enable god mode. May 18, 2017
archive_lslint.sh for releases Aug 21, 2017
ast.hh Remove unused node type: LLScriptEvent Apr 25, 2018
builtins.cc Add warning/error about uninitialized globals Apr 28, 2018
builtins.txt kwdb 0.0.20180626000 Jul 1, 2018
builtins_txt.cc kwdb 0.0.20180626000 Jul 1, 2018
creator_linux.sh inserted version date Oct 4, 2017
creator_osx.sh inserted version date Oct 4, 2017
creator_win.bat Build using VS2017 when VS2015 is not present Feb 14, 2018
creator_win64.bat Build using VS2017 when VS2015 is not present Feb 14, 2018
creator_winxp.bat ignore and automatically create binary directories Apr 14, 2017
final_walk.cc Implement constant conditions with key arguments Apr 25, 2018
location.hh import May 30, 2011
logger.cc Add warning/error about uninitialized globals Apr 28, 2018
logger.hh Add warning/error about uninitialized globals Apr 28, 2018
lslmini.cc Assign type of node based on operator in some cases May 16, 2018
lslmini.hh Fix compilation failure on XP May 20, 2018
lslmini.l Implement $[Lxxxxx] and $[Mxxxxx] for LSO-only and Mono-only assertions Apr 28, 2018
lslmini.y Remove unused node type: LLScriptEvent Apr 25, 2018
operators.cc Fix copypaste error: Key + String is not implemented May 15, 2018
position.hh import May 30, 2011
stack.hh import May 30, 2011
symtab.cc Remove found standard C++ violations. Nov 23, 2017
symtab.hh Add warning/error about uninitialized globals Apr 28, 2018
test.csh import May 30, 2011
test.sh Add support for god mode functions and a flag to enable god mode. May 18, 2017
types.cc Key + string is not a valid combination May 15, 2018
types.hh Change return type of LLScriptType::get_itype() from int to enum Apr 22, 2018
values.cc Implement the remaining type casts Apr 27, 2018

README.md

lslint is a tool to check the syntactic and semantic validity of Second Life LSL scripts.

Build Status

Releases

See Releases for binaries. Latest release resides here.

Compiling

  • make should be all that's required on POSIX systems, and a solution file exists for VS2015 on Windows.
  • Win flex-bison as well as VS2015 or SDK7.0 or later are required for Windows build. See the comment in NMakefile for detailed instructions.

License

All code is public domain unless otherwise noted.

LSL scripts are from various sources and the property of their respective owners.

.l and .y files are based on samples provided by Linden Lab.

WARNING: lslint faithfully reproduced all the quirks of the LSL compiler circa ~2006, like having constants as lexer tokens, events as part of the parser grammar, and lots of right recursion. From a compiler perspective, it does everything wrong, and is not recommended as a base for anything but a lint tool.

Additional changes

Makopoppo
  • added nmake support (see NMAkefile for details).
  • dropped builtins.txt creator. if you look for new builtins.txt, see kwdb project
  • enabled appending the input file path to the result lines by "-p".
Xenhat
  • Makefile-less VS2015 support (more cpp hybridization was necessary)
    • Side effects includes x86_64 binary, x86 is possible still
Sei-Lisa
  • added Mono mode (-m for Mono(default), -m- for LSO)
  • added option to make the warning on unused event parameters optional (-u to enable, -u- to disable)
  • added option to ignore preprocessor commands (-i)
  • added switch() statement and lazy list support
  • added god mode support
  • added reporting of several errors and warnings
  • numerous bug fixes and enhancements

Special Thanks

  • Strife Onizuka
  • Howie Lament
  • Cory Linden
  • Huns Valen
  • Doran Zemlja / Adam Wozniak

Shout Outs

  • Daniel Linden
  • Bakuzelas Khan
  • One Song
  • Otacon Falcone
  • Shokra Patel