Open virtualtam opened 7 years ago
I've started experimenting with Hoa\Compiler
, which is a PHP library to define grammars and generate the corresponding tokenizer/lexer/parser:
Documentation:
Example grammars:
Experiment code and notes can be found at https://github.com/virtualtam/hoa-netscape-bookmark-parser
Interesting use of the PHP DOMDocument API:
It would be more elegant and maintainable to describe the Netscape variants as a grammar, and generate/write a corresponding tokenizer/lexer/parser to process data.
Inspired by:
See: