I'm trying to parse the following format with PHP:

```
// This is a comment
{
this is an entry
}
{
this is another entry
}
{
entry
{entry within entry}
{entry within entry}
}

```

Maybe is just the lack of caffeine, but i can't think of a decent way of getting the contents of the curly braces.