编写一个简单的解析器 [英] Writing a simple parser
本文介绍了编写一个简单的解析器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要写一个简单的解析器到一种领域特定的语言。
它需要有适当的运算符评价顺序的基本算术和一个语法调用底层环境的函数,可以重载。
编写这样的解析器最简单的方法是什么?有什么东西我可以适应或使用开箱?我用C ++编写。
I need to write a simple parser to a sort of Domain Specific Language.
It needs to have basic arithmatics with proper operators evaluation order and a syntax to call functions of the underlying environment which can be overloaded.
What is the simplest way to write such a parser? Is there something I can adapt or use out of the box? I'm writing in C++.
推荐答案
查看生成精神。
这篇关于编写一个简单的解析器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文