Here is an example of a grammer:http://json.org and here is a straightforward translation into a regex based parser JSON parser as a single Perl Regex. This might be a model for the parser you require. (Straightforward in the sense of a one-to-one translation, not in the sense of simple.)
In reply to Re^3: How would you parse this?
by hdb
in thread How would you parse this?
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |