Sponsored Link •
|
Summary
My answer to YACC and Lex, the YARD parser version 1.0, is now online at SourceForge.net.
Advertisement
|
Due to my distaste for parser generation tools like YACC and Lex and being such a completely unreasonable guy, I decided to write my own recursive descent parser. I first did it in Delphi, then I did it in Heron. Now I just finished version 1.0 of the YARD parser for C++ and I've posted it to SourceForge.net.
The YARD parser is a data-type agnostic CFG parser tool written using template metaprogramming techniques in C++. The YARD parser was designed to be as compact and flexible as possible.
The YARD parser has a significantly different design than its closest cousin, the boost::spirit library, because the grammar productions are defined directly as meta-functions, and there is no funky operator overloading. Semantic actions are defined as template specializations. See my earlier post on Static versus Dynamic Event Handlers in C++.
The YARD parser source code comes with a XML parser as way of a demonstration, of the ease of use etc. There is also a very simple built-in tokenizer for those who might want to use YARD as a powerful lexical analyzer.
Have an opinion? Readers have already posted 5 comments about this weblog entry. Why not add yours?
If you'd like to be notified whenever Christopher Diggins adds a new entry to his weblog, subscribe to his RSS feed.
Christopher Diggins is a software developer and freelance writer. Christopher loves programming, but is eternally frustrated by the shortcomings of modern programming languages. As would any reasonable person in his shoes, he decided to quit his day job to write his own ( www.heron-language.com ). Christopher is the co-author of the C++ Cookbook from O'Reilly. Christopher can be reached through his home page at www.cdiggins.com. |
Sponsored Links
|