- changed milestone to ET_2013_05
- removed comment
Use Parsing Expression Grammar for Par Files
Piraha is a parsing framework/library based on Parsing Expression Grammars (PEGs). This allows you to define the grammar of a language using a simple regular-expression-type language, and Piraha will use this to decode an input file into a hierarchical data structure of the parsed data (a "parse tree"). See http://code.google.com/p/piraha-peg/, http://en.wikipedia.org/wiki/Parsing_expression_grammar.
I've hacked a version of Cactus to use Piraha for parameter parsing. Please take a look:
https://svn.cactuscode.org/flesh/branches/with_piraha
This version is able to run the ET testsuite.
This version can understand the variables $parfile, $ENV{name}, and $pi (which is 3.14...). Variables can be standalone, or be substituted from inside strings.
It can understand mathematical expressions including grouping, order of operation, and a few functions (sin, cos, tan, exp, sqrt). Other parameters from the parameter file are available for use in mathematical expressions.
Some debug printing is in place so you can get an idea of what's going on.
Keyword:
Comments (5)
-
-
- changed milestone to ET_2013_11
- removed comment
-
- changed status to open
- assigned issue to
- changed milestone to ET_2014_05
- removed comment
-
reporter - changed status to resolved
- removed comment
-
- edited description
- changed status to closed
- Log in to comment