goantlr

Posted by 夏泽民

https://mikespook.com/2014/05/%e7%bf%bb%e8%af%91%e7%bc%96%e8%af%91%e5%99%a88-%e6%8a%bd%e8%b1%a1%e8%af%ad%e6%b3%95%e6%a0%91/



Go GC 三色标记法

Posted by 夏泽民

https://opensource.com/article/20/6/debug-go-delve https://developer.51cto.com/art/202007/620659.htm Go GC 怎么标记内存?颜色是什么含义?图解三色标记法 Go GC 的作用是回收不再使用的内存。实现的算法是并发的三色标记和清除回收法。本中文,我们研究三色标记法,以及各个颜色的不同用处。



antlr hive

Posted by 夏泽民

hive是使用antlr来解析的



antlr4go

Posted by 夏泽民

https://github.com/bramp/antlr4-grammars https://github.com/bramp/antlr4-grammars/tree/master/xml https://github.com/bramp/antlr4-grammars/blob/master/json/json_test.go 安装 $curl -O https://www.antlr.org/download/antlr-4.8-complete.jar $java jar /Users/antlr-4.8-complete.jar 错误: 找不到或无法加载主类 jar 注意命令是java -jar $java -jar /Users/antlr-4.8-complete.jar ANTLR Parser Generator Version 4.8 -o __ specify output directory where all output is generated -lib __ specify location of grammars, tokens files -atn generate rule augmented transition network diagrams -encoding __ specify grammar file encoding; e.g., euc-jp -message-format __ specify output style for messages in antlr, gnu, vs2005 -long-messages show exception details when available for errors and warnings -listener generate parse tree listener (default) -no-listener don’t generate parse tree listener -visitor generate parse tree visitor -no-visitor don’t generate parse tree visitor (default) -package ___ specify a package/namespace for the generated code -depend generate file dependencies -D



antlr4

Posted by 夏泽民

ANTLR(ANother Tool for Language Recognition)是一个ALL(*)的词法分析器, 功能和yacc类似. 应用很多, 可以解析大量语言和自定义语言, 官方也提供了不同语言的语法文件.



Search

Popular posts

Anything in here will be replaced on browsers that support the canvas element

Recent posts

This blog is maintained by 夏泽民

Get in touch with me at 465474307@qq.com

Subscribe to our mailing list

* indicates required