bgporter + parsing   3

Introducing the Boost parser framework
One of the more complicated tasks for a C++ programmer is coding a parser within a reasonable time period. Using the GNU Flex/Bison or ANTLR parser generator typically makes sense when you're developing a compiler for a full-blown language like SQL or C++; but for grammars with a simpler Backus Naur Form (BNF), the steep learning curve of these tools don't always justify the investment. Another alternative is to use regular-expression libraries that come bundled with standard Linux® distributions or the Boost regex or tokenizer libraries, but these don't scale well with more involved grammars.

This article introduces the highly scalable Spirit parser framework from Boost. This parser generator works on an Extended Backus Naur Form (EBNF) specification coded in C++, significantly reducing development time. For further reading, see the very detailed Spirit documentation.
C++  parsing  boost 
december 2008 by bgporter
Simple Top-Down Parsing in Python
In the early seventies, Vaughan Pratt published an elegant improvement to recursive-descent in his paper Top-down Operator Precedence. Pratt's algorithm associates semantics with tokens instead of grammar rules, and uses a simple 'binding power' mechanism
python  parsing 
july 2008 by bgporter

Copy this bookmark:



description:


tags: