English 中文(简体)
最好让阿盟教文解吗?
原标题:best way to parse a language that s ALMOST Python?

Im在Stefan上使用针对具体领域的语言。 克文法非常接近于斯图尔,直到现在,我们才刚刚进行几处微薄的改动,然后将其输入<条码>。 例如,登革站由<条码>#endfor/#endwhile/#endif 替换,这样我们就能够使登革热恢复正常,而它仍是一个扼杀。

我很想知道是否有更好的办法? 就我所知,ast 硬编码为平流 the法,除http://docs.python.org/library/ast.html#module-ast外,我可以找到任何其他文件。 (以及来文方本身,我诉称)。

是否有任何人在PyParsing、ANTLR或PLY方面有个人经验?

有一些模糊的计划,将译员改成把我们的语言变为有效的陈列器,并将之变成真正的传译员,因此,我喜欢与<条码>兼容的“<<<>>>条/代码”相容的东西,但这只是一个交易商。

<>Update: 刚才我看到的是:

from __future__ import print_function, with_statement

改变山谷的路面如下。 然而,PEP 236表示,这是编辑特征的合成窗户。 难道有人能证实,试图推翻/推翻<代码>__future_不是解决我的问题的正确办法?

问题回答

PLY工程。 它很奇怪,因为它以不可怕的慢性的方式,杂乱。

弹性和升温两种均具有隐含的接口,因此有可能将弹性体作为独立的方案来管理产出。 这种“生命”得到认真维护。 同样,对于PLY的同类特征也是如此。 精心维护创建温和、暗含的独立主要方案的“名称”。

然而,PLY作为弹性/可乘的工具是相当的。 你们的所有技能都得到保留。

[领土评论]。 “Fixing” ecosoc sgrammar可能是一种浪费时间的做法。 几乎每个人都能在没有任何帮助的情况下以正确的方式生活。 核对表C Java、C++甚至帕斯卡尔法典,你发现,几乎每个人都能真正安心。 确实,人们花了很长的时间去 in忙地去做,而不需要。 如果 Java不孕,那么为什么人们做这种出色的工作?





相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...

热门标签