[BangPypers] python for parsing

Rahul R rahul8590 at gmail.com
Sun May 23 22:32:50 CEST 2010


On Mon, May 24, 2010 at 12:00 AM, Dhananjay Nene
<dhananjay.nene at gmail.com>wrote:

> On Mon, May 24, 2010 at 12:51 AM, Rahul R <rahul8590 at gmail.com> wrote:
>
> > Hello everyone ,
> > I am new to this community . recently i attended a python workshop in my
> > college and got a lot mesmerised by the language so finally decided to
> port
> > my mini project which i have partially written using LEX and Yacc into
> > python. i would be glad if you could provide me some valuable suggestions
> > on
> > how to go about doing so.
> >
> > I had once found pyparsing http://pyparsing.wikispaces.com/ quite nice
> though I used it in a casual experiment.
>
> I had documented my usage here :
>
> http://codeblog.dhananjaynene.com/2010/01/extracting-data-using-recursive-descent-parsing/which
> hopefully should indicate how its usage is in many ways far simpler
> than traditional lex/yacc one.
>
> Dhananjay
>
>
>
Thanks   Dhananjay & Noufal , now i have tons of options. But then again i
am trying to find the most suitable one for my program.
Well basically what i am trying to achieve is to create my own syntax
(reasonably simple ) which will help the user to write simple HTML ( +CSS
hopefully) pages without actually coding any of it .

i.e for example

if the user writes

this is heading
============          -->  { the '=' would be a token for headers }

the rest paragraph


the equivalent html generated could be

<h1>  this is heading  </h1>
<p> the rest paragraph </p>

besides i am also trying to incorporate inline CSS and other basic
functualities .


More information about the BangPypers mailing list