Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

NaiveParser

Simple recursive parser.

This example demonstrates 3 parsers to parse the following hypothetical formats (just a demo):

  • .ssproj file (a root solution-describing file. Think of .sln file)
  • .ssmeta file (1st subproject data format. Think of .vcproj file)
  • .ssdata file (2nd subproject data format. Think of .vcproj file, but different grammar)

Usage:

How to implement a parser for, say, .ssproj:

  • Define your data structs (ASTs) which define an output of a parser (see project/project.h)
  • Inherit your parser class from base::Parser (see project/project_parser.h)
  • Implement your parser, using base::Parser helper methods (project/project_parser.cpp)

Same for the other two parsers. See:

  • project/project_metadata_parser.h
  • project/project_data_parser.h ... and their implementations.

example/example.cpp demonstrates, how two use all three parsers together.

Happy parsing!

About

Simple recursive parser.

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.