I need to parse non-XML or JSON markup into element trees in PHP. I am sure that there are libraries for this kind of thing, but I cannot find anything for me.
The problem is that it is not XML or JSON; This is a series of obscure markups for which there are no specialized parsers. Thus, I am looking for a general parser that can implement any markup in the form of a tree of elements.
Alternatively, articles on how to write them. I wrote a recursive parser before, but I'm not sure how to approach the creation of a universal reusable one.
source share