Re: [BangPypers] Language Parsing and output generation

2011-08-24 Thread Dhananjay Nene
On Tue, Aug 23, 2011 at 11:15 AM, Gopalakrishnan Subramani wrote: > I could make a grammar compiled myself. I will look into SPARK.. Anybody has > experience in pyparsing http://pyparsing.wikispaces.com/ ? > Under Examples http://pyparsing.wikispaces.com/Examples Python language > example is promi

Re: [BangPypers] Language Parsing and output generation

2011-08-23 Thread Gopalakrishnan Subramani
This is not about running Lua inside Python or Python inside Lua. I will go thorough few of tools you all mentioned and will back. Making a grammar is really fun. I am more curious to know how the AST would turn to be. -- Gopal On Tue, Aug 23, 2011 at 3:04 AM, Anand Balachandran Pillai < abpi

Re: [BangPypers] Language Parsing and output generation

2011-08-23 Thread Anand Balachandran Pillai
On Tue, Aug 23, 2011 at 11:15 AM, Gopalakrishnan Subramani < gopalakrishnan.subram...@gmail.com> wrote: > I could make a grammar compiled myself. I will look into SPARK.. Anybody > has > experience in pyparsing http://pyparsing.wikispaces.com/ ? > Under Examples http://pyparsing.wikispaces.com/Exa

Re: [BangPypers] Language Parsing and output generation

2011-08-22 Thread Balachandran Sivakumar
Hi, On Tue, Aug 23, 2011 at 12:39 AM, Gopalakrishnan Subramani wrote: > > The idea is to convert the 'Description Language' code to Lua code using > Python. This involves 2 things. One is parsing and another is generation. In > between 2, I need to make a tree as a output from parser, kind of AST

Re: [BangPypers] Language Parsing and output generation

2011-08-22 Thread Gopalakrishnan Subramani
I could make a grammar compiled myself. I will look into SPARK.. Anybody has experience in pyparsing http://pyparsing.wikispaces.com/ ? Under Examples http://pyparsing.wikispaces.com/Examples Python language example is promising. Regards, Gopal On Mon, Aug 22, 2011 at 11:25 PM, Noufal Ibrahim

Re: [BangPypers] Language Parsing and output generation

2011-08-22 Thread Noufal Ibrahim
Gopalakrishnan Subramani writes: > Source language IO is very limited and it has functions to map to IO and UI. > As a total, they have around 100+ function. > > Those can be easily done in Lua. [...] For a project in one of my earlier companies, I used SPARK[1] to write a little parser for a l

Re: [BangPypers] Language Parsing and output generation

2011-08-22 Thread Gopalakrishnan Subramani
Source language IO is very limited and it has functions to map to IO and UI. As a total, they have around 100+ function. Those can be easily done in Lua. -- Gopal On Mon, Aug 22, 2011 at 6:10 PM, Senthil Kumaran wrote: > On Mon, Aug 22, 2011 at 01:09:19PM -0600, Gopalakrishnan Subramani wrote

Re: [BangPypers] Language Parsing and output generation

2011-08-22 Thread Senthil Kumaran
On Mon, Aug 22, 2011 at 01:09:19PM -0600, Gopalakrishnan Subramani wrote: > I prefer Python for this conversion. Any idea is appreciated. In your source language, do you have tools to create AST? If not, then it would be the first thing to aim for. Then you need a mechanism to translate that AST t

[BangPypers] Language Parsing and output generation

2011-08-22 Thread Gopalakrishnan Subramani
I have interesting problem to solve. We have a language called "Description Language" less widely known outside but used very much in automation domain. The examples are given below. By definition, language is readable and I could could not provide the language spec due to restriction (really close