readme
来自「用YACC实现的一个小的编译工具」· 代码 · 共 21 行
TXT
21 行
EXAMPLE 5: POLISHThis example shows how Memphis can be used to processGentle structures in C/C++ code.Like Memphis, Gentle supports domains types and pattern matching.Unlike Memphis, Gentle provides a high level of abstraction to expresslanguage recognition, transformation, and code generation in a uniform way. Combining Gentle and Memphis allows one to use a specialized andproductive compiler description language for the translation tasks of anapplication, and also to use C/C++ programming e.g. to implement the userinterface. Memphis enables seamless integration of Gentle and C/C++.The example defines a domain type for symbolic expressionsand gives a grammar to construct these expressions from linear input.It gives two procedures to emit such expressions in "polish" and in"reverse polish notation". The first procedure is a Gentle predicate,the second one is a Memphis function.(Requires Gentle 98 or higher)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?