tags:

views:

74

answers:

1

I want to learn the basics of Parsing with C++.

For that matter I thought of a simple Configuration Language that might look like this:

/*
    same comment syntax as in C++

    keywords:
        "section" = begins a new section block
        "var"     = defines a new var
        ...
*/
section MySection {  // also valid: section "MySection" { ... }
    var someVar = "foo";
    section stuff {
        var things = "data";
    };
};

Dummy grammar:

"section" <section_name> "{" <block> "}" ";"
"var" <name> "=" <value> ";"

Now I wonder where I would find a beginners tutorial that might cover this Project?

+4  A: 

The wikipedia entry on recursive descent parsers should get you started.

IVlad
The Example program on TOW is pretty straightforwarded, though not exactly what i'm looking for... but still +1 for the link
nebukadnezzar