Author: metamaker
This is C# language parser. It performs lexical analysis, syntax analysis and intermediate code generation (in a form of intermediate parse tree and triads).
Lexical analysis: Tokens reading is implemented by use of regular expressions. Directive "#if" is implemented using grammar (which is quite slow so I will change such a way of things in future).
Syntax analysis: Application uses CYK algorithm to build parse tree. For more information see http://web.cs.ucdavis.edu/~rogaway/classes/120/winter12/CYK.pdf.
Project goes under GPL v3 license. Use it for educational purpose freely.
You can use CMake (http://www.cmake.org/) to build this project. The steps are next:
- Open command line and change current directory with
$ cdcommand to the directory where you unpacked the project's source code. - Run
$ cmake -H. -Bbuild -G "Visual Studio 12"to create Makefile for Visual Studio 2013 (or use other generator if you use other IDE). Don't forget to specify path to dependency libraries and headers with -D parameter. - Open
build/C-Sharp-Parser.slnand build solution in Visual Studio. - Optionally, you can install this utility by building project which name is
INSTALLin Visual Studio. Remember that you must have enough rights on your system to let VS copy files to installation folder.
Another option is to use bii (http://www.biicode.com). Building commands are next:
$ cdto the project's folder.- Run
$ bii init -L. - Run
$ bii find. - Run
$ bii cpp:configure. You can specify your CMake generator with-Gflag like$ bii cpp:configure -G "Visual Studio 12". - Run
$ bii cpp:buildto build the project.
Dependencies are automatically integrated into project when you use bii as build tool. If you prefer CMake you must compile dependencies and specify paths to them. The libraries are next:
- ExcelFormat: http://www.biicode.com/metamaker/ExcelFormat
- wxWidgets: https://www.biicode.com/fenix/wxwidgets
- cxxtest: https://www.biicode.com/DevOmem/cxxtest
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/
29.04.2015 - Version 0.2
- Biicode support
28.04.2015 - Version 0.1
- First release