Generate parser at runtime from rules database?
16 Sep 2006 16:00:15 -0400

          From comp.compilers

Related articles
Generate parser at runtime from rules database? (2006-09-16)
| List of all articles for this month |

Newsgroups: comp.compilers
Date: 16 Sep 2006 16:00:15 -0400
Organization: Compilers Central
Keywords: parse, question
Posted-Date: 16 Sep 2006 16:00:15 EDT

We have a set of rules stored in a database that conform to a formal
grammar; I have used Boost/Spirit to write a parser to check that the
rules themselves conform to the expected grammar.

However, it is necessary, at runtime to read a rule from the DB and
check some value string against the rule to make sure that it is valid.

For example:

DIR_PATH rule:


DIR_PATH example value:

C:\Test Path\Test File_Name.ext


Are there any C++ tools that will allow me to parse these rule/data
sets at runtime?


Stuart Smith
[Assuming your grammar is fixed, any parser generator such as yacc will
generate a C callable parser. -John]

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.