Looking for the latest version? Download uls-1.6.1.tar.xz (3.6 MB)
Name Modified Size Downloads / Week Status
Totals: 13 Items   26.1 MB 14
1.5.x 2015-09-05 33 weekly downloads
1.3.x 2015-01-11 44 weekly downloads
1.2.x 2015-01-11 44 weekly downloads
1.4.x 2015-01-11 66 weekly downloads
uls_1.6.1_x86.exe 2015-10-05 3.6 MB 11 weekly downloads
uls-1.6.1.tar.xz 2015-09-26 3.6 MB 11 weekly downloads
uls_1.6.1_amd64.deb 2015-09-26 4.0 MB 0
uls_1.6.1_i386.deb 2015-09-26 1.1 MB 0
uls_1.6_amd64.deb 2015-09-05 4.0 MB 22 weekly downloads
readme 2015-09-05 8.4 kB 22 weekly downloads
uls-1.6.tar.xz 2015-09-05 3.4 MB 22 weekly downloads
uls_1.6_x86.exe 2015-09-05 3.5 MB 44 weekly downloads
uls_1.6_i386.deb 2015-09-05 2.8 MB 22 weekly downloads
ULS(Unified Lexical Scheme) What is it? ----------- ULS is a class library for creating lexical analyzer from language specification file. The project ULS project has been since 2011 for the purpose of providing compiler creators with a intuitive, practical, flexible language design. It consists of C/C++, C#/Java libraries with a few of tools and runs on the many Linux platforms and on the Windows. Key Features ------------- ULS has the following key features. o Can tokenize the input file which encoded by UTF-8, UTF-16, UTF-32 as well as ASCII. The input files may contain the words in localized language as identifier. o Can map the tokens that you define to any number of all range of 32-integer. Even 1-character token like '+', '-', '=', '&' can be mapped to any number other than ASCII codes, unless there's confliction among those tokens in one language. o Can be used as a replacement of 'lex/flex' for token-provider to yacc/bison parser. o Can instantiate multiple objects for one language or other languages in one application as it's designed as class library. o Can store the tokens from many text or uls(*.uls) input files to a uls-file(*.uls), which can be replayed and re-generated to another contents. o Can tokenize multiple of files or (literal) strings as input streams with nested fashion. ULS internally implements an stack of different type inputs like file-path, string, file-descriptors. o As ULS manipulates the real or integer number as text string format, it can get and store numbers in input source having the arbitrary number of digits. o Provides with a unique (varargs-style) logging framework from scratch, which is also used for general purposes. Examples ------------- Refer to 'examples' and 'tests' directory to see the scenarios using ULS APIs. The programs in 'tests' are to test the core library source and executed in the step of 'make check'. o yacc : There's an ULS-object providing yacc parser with token sequence in this program. o dump_toks : A basic example of ULS. dumps the tokens from input files. o getch : ULS supports for getting or ungetting one char in input-file in restricted manner, using uls_getch(), uls_ungetch(), or uls_peekch() o id_stat : Shows the statistics of identifiers from input-files recognizing the IDs. o line : You can give a literal line as input of the uls-object by calling uls_set_line(), uls_push_line(). o log : ULS has a unique logging system(uls_lf_*) with vararg style. With this logging system you can log error-messages including the error-location(%w) and token-name(%k). The 'log' demonstrates how to use the uls_lf. o many_keys : ULS supports for the languages having many keywords with little loss of performance. o nest : Demonstrates to process the input that contains sub-language in it by instantiating two ULS-objects. o strings : This shows that ULS is able to extract the literal strings from input files. o tok_remap : ULS can remap the token numbers of 1-char ACSII, such as '(', '{', '=', ... to arbitrary integers. o two_lex : An example using two ULS-objects. o cpp_hello : Demonstrates the usage of ULS-class in C++. This is also included in the Windows version as an example. o wdump_toks : The wide string version of the 'dump_toks'. There are also examples in the directory 'examples' which should be built after installing ULS. o Css3 : Using the uls-c++ library, it scans css3 file and dump its tokens to the standard output. o Html5 : Using the uls-c++ library, it scans html file and dump its tokens to the standard output. o Shell : Using the uls-c++ library, it scans shell-script file and dump its tokens to the standard output. o Mkf : Using the uls-c++ library, it scans 'Makefile' file and dump its tokens to the standard output. o tokseq : Tests the token streamp apis, writing and reading uls-files. In Linux, entering the directory 'examples', build them by entering command 'make'. In Windows, There is a (VS2012) solution file in 'UlsWin\UlsCppExamples'. Documentation ------------- There are an user-guide ULS-ug.pdf and manuals on tools, ulc2class.txt, ulf_gen.txt, uls_stream in 'doc'. You can see the manuals on 'ulc2class', 'uls_stream', 'ulf_gen' on linux after installing the package. To see the man-pages, type man ulc2class man uls_stream man ulf_gen If you installed ULS in directory other than '/usr/local', you need to add the path to the environment variable 'MANPATH' to see them. Installation ------------ On Debian platforms like Debian, Ubuntu, Mint, two deb-files is provided. o uls_x.y.z_amd64.deb: for 64-bit mach(x86_64, amd64) o uls_x.y.z_i386.deb: for 32-bit mach To install the deb-file, download the proper file on the site(http://www.sourceforge.net/projects/uls). Enter the command as follows. sudo gdebi uls_x.y.z_amd64.deb To test the ULS, setup the examples of ULS by entering the command 'setup_uls_examples'. setup_uls_examples <dest-dir> There'll a directory called 'uls_examples' in the <dest-dir> after the command. To build the examples, do the followings 1. ./configure 2. make Refer to the section 'Demos' below to examine the executions. ULS The installation process of ULS from code sources on Linux platforms is routine. 1. ./configure 2. make 3. make check 4. sudo make install The default installation directory is '/usr/local', which is arranged by 'configure' script. If you want to install ULS to directory other than '/usr/local', start 'configure' with typing 'configure --prefix=<dir-you-want-install>'. On Windows platforms(Windows7, Windows8), A zip-file, UlsZip_x.y.z.zip is provided for both 32-bit and 64-bit mach. Unzip the file and run setup.bat in it. Demos ------------ After installing the libraries, you can build the demo programs in 'examples'. Go to the directory, build the program by running 'make'. All the demo programs accept an input file specified in command line like this. LD_LIBRARY_PATH=/usr/local/lib64 <demo-prog> <input-file> where demo-prog = DumpToks, Css3Toks, Html5Toks, ... o test_1st test_1st_sam.txt in the 'test_1st' directory. o ulc2xml in the 'yacc' directory. o tokseq tokseq_sam.txt o DumpToks input1.txt o Css3Toks css3_sam.txt o Html5Toks html5_sam.txt o ShellToks shell_sam.txt o MkfToks mkf_sam.txt You may need to set the environment variable 'LD_LIBRARY_PATH' for the shared library loader. For example, LD_LIBRARY_PATH=/usr/local/lib64 ./test_1st input1.txt LD_LIBRARY_PATH=/usr/local/lib ./test_1st input1.txt or simply ./test_1st input1.txt Please see the file called INSTALL.txt to see how to use ULS in Windows or Eclipse. Tested Platforms ------------ ULS is tested on following platforms. o Linux Mint 17 o Ubuntu 14.10 o Debian GNU/Linux 7.0, 7.2 o OpenSUSE 13.1 o Manjaro 0.8.12 o Kali Linux 1.1.0 o Centos 6.5 (32-bit) o Windows 7 Maybe, it'll work well on similar or later version of above platforms. Prerequisite packages ------------ o glibc o gcc o g++ o make o libtool o help2man o bison o autoconf(2.13) o bash The above packages is needed to build ULS from code sources. The package is dependant on libc6(glibc) to run. The Latest Version ------------------ You can find the latest version of ULS in <http://sourceforge.net/projects/ULS>. Licensing --------- ULS is provided under Apache License 2.0. Contacts -------- o If you have a concrete bug report for ULS, go to the ULS Bug Database and submit your report: 'https://sourceforge.net/projects/ULS' -- 'Tracker' -- 'Bugs'
Source: readme, updated 2015-09-05