youthlin / Snl Compiler
SNL(Small Nested Language) Compiler. Maven jUnit Tokenizer Lexer Syntax Parser. 编译原理 词法分析 语法分析
Stars: ✭ 19
Programming Languages
java
68154 projects - #9 most used programming language
Projects that are alternatives of or similar to Snl Compiler
lexertk
C++ Lexer Toolkit Library (LexerTk) https://www.partow.net/programming/lexertk/index.html
Stars: ✭ 26 (+36.84%)
Mutual labels: tokenizer, lexer
Chevrotain
Parser Building Toolkit for JavaScript
Stars: ✭ 1,795 (+9347.37%)
Mutual labels: tokenizer, lexer
Jflex
The fast scanner generator for Java™ with full Unicode support
Stars: ✭ 380 (+1900%)
Mutual labels: tokenizer, lexer
lex
Lex is an implementation of lex tool in Ruby.
Stars: ✭ 49 (+157.89%)
Mutual labels: tokenizer, lexer
snapdragon-lexer
Converts a string into an array of tokens, with useful methods for looking ahead and behind, capturing, matching, et cetera.
Stars: ✭ 19 (+0%)
Mutual labels: tokenizer, lexer
Moo
Optimised tokenizer/lexer generator! 🐄 Uses /y for performance. Moo.
Stars: ✭ 434 (+2184.21%)
Mutual labels: tokenizer, lexer
Php Parser
🌿 NodeJS PHP Parser - extract AST or tokens (PHP5 and PHP7)
Stars: ✭ 400 (+2005.26%)
Mutual labels: tokenizer, lexer
bredon
A modern CSS value compiler in JavaScript
Stars: ✭ 39 (+105.26%)
Mutual labels: tokenizer, lexer
pascal-interpreter
A simple interpreter for a large subset of Pascal language written for educational purposes
Stars: ✭ 21 (+10.53%)
Mutual labels: tokenizer, lexer
Minigo
minigo🐥is a small Go compiler made from scratch. It can compile itself.
Stars: ✭ 456 (+2300%)
Mutual labels: lexer
Syntax Parser
Light and fast 🚀parser! With zero dependents. - Sql Parser Demo added!
Stars: ✭ 317 (+1568.42%)
Mutual labels: lexer
Soynlp
한국어 자연어처리를 위한 파이썬 라이브러리입니다. 단어 추출/ 토크나이저 / 품사판별/ 전처리의 기능을 제공합니다.
Stars: ✭ 613 (+3126.32%)
Mutual labels: tokenizer
Open Korean Text
Open Korean Text Processor - An Open-source Korean Text Processor
Stars: ✭ 438 (+2205.26%)
Mutual labels: tokenizer
Friso
High performance Chinese tokenizer with both GBK and UTF-8 charset support based on MMSEG algorithm developed by ANSI C. Completely based on modular implementation and can be easily embedded in other programs, like: MySQL, PostgreSQL, PHP, etc.
Stars: ✭ 313 (+1547.37%)
Mutual labels: tokenizer
Exprtk
C++ Mathematical Expression Parsing And Evaluation Library
Stars: ✭ 301 (+1484.21%)
Mutual labels: lexer
Sentences
A multilingual command line sentence tokenizer in Golang
Stars: ✭ 293 (+1442.11%)
Mutual labels: tokenizer
SNL-Compiler
SNL(Small Nested Language) Compiler. Maven jUnit Tokenizer Lexer Syntax Parser.
编译原理 词法分析 语法分析
进展
- 2016-05-24 开始构思
- 2016-05-27 查资料
- 2016-05-28 1.开始编码
- 2016-05-28 2.初步完成词法分析,开始写语法分析
- 2016-05-29 开始递归下降
- 2016-05-30 递归下降基本完成
- 2016-05-31 1.完成递归下降
- 2016-05-31 2.语法树的输出(竖版)
- 2016-05-31 3.添加主程序,使用 Commons-Cli 解析命令行参数
- 2016-05-31 4.添加几个发现的错误如下
- 2016-06-01 开始 LL1
- 2016-06-02 1.初步完成 LL1
- 2016-06-02 2.增加自动识别文件编码。修复标识符结点值错误的 Bug.
- 2016-06-02 3.查错,基本上完成了.
- 2016-06-16 修复词法分析点号处理的 Bug (如
end.+
应该报语法错误,在这里当作词法错误处理).
参考书籍
《编译程序的设计与实现》刘磊 金英 张晶 张荷花 单郸;高等教育出版社,ISBN 978-7-04-014620-7.
勘误
- 编译程序的设计与实现(书稿电子版).pdf (侵删)
- 《编译程序的设计与实现》随书光盘 (侵删)
其中《编译程序的设计与实现》:
- 第 10 页,产生式 (43) 应为:
ProcDecMore -> ProcDec
. (而不是 ProcDeclare) - 第 63 页,产生式 (67) Predict 集应为
[
(左中括号),.
(句点),:=
(赋值号). - 第 64 页,产生式 (93) Predict 集应包含
]
(右中括号). - 第 55 页,例子中
v2:='a';
只能通过词法分析,而不能通过语法分析,因为按照给定的产生式(Exp
)不能推出字符型。 - 第 10 页,产生式 (42), (43) 完全多余。可以去掉,并且把产生式 (41) 右部的
ProcDecMore
改为ProcDecpart
. - 第 10 页,产生式 (48), 预测符集应为
)
(右括号),而不是左括号。(第 62 页)
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].