lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello all,

I'm trying to learn the usage of lpeg and i need a push to the right direction on the following problem:

I will parse files with the following structure:

blockname1 {
  key1 value1
  key2 value2
  blockname2 {
    key3 value3
    blockname3 {
      key4 value4
    }
    key5 value5
  }
}

there are named blocks of datas, the datas are several key/value pairs or other named blocks of datas. Seem simple, but i don't get a right grammar for this syntax.
Can someone give me a start for this?

Thanks Martin