[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: DSL in lua
- From: Vasiliy Tolstov <v.tolstov@...>
- Date: Thu, 6 Dec 2012 10:54:10 +0400
Where i can find some exmples for creating such parser?
2012/12/6 steve donovan <steve.j.donovan@gmail.com>:
> An entertaining project (or maybe it already exists?) would be a
> lpeg-based DSL generation tool
>
> You would give it something like:
>
> MUST directory STRING {
> owner IDEN
> group IDEN
> mode STRING
> action IDEN
> }
>
> which would match this syntax (there MUST be a directory clause)
>
> directory "/etc/" {
> owner root
> group wheel
> mode "0755"
> action create
> }
>
> and create a parser that brings this in as a table structure. ( It
> would issue sensible errors at the right place, which is a tricky
> thing with lpeg)
--
Vasiliy Tolstov,
Clodo.ru
e-mail: v.tolstov@selfip.ru
jabber: vase@selfip.ru