-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Ronald Franco edited this page Dec 22, 2018
·
12 revisions
The provided AFG-Parser is a set of C++ header files for parsing Attribute-Flow Grammars (AFG). The Attribute-Flow grammar is a novel grammar proposed for expressing formal languages and has EBNF-like syntax. The syntax for an AFG is discussed further on the Attribute Flow Grammars (AFG) wiki page.
The AFG-Parser enables the target AFG to be written in C++. Inline grammar specifications can mix freely with other C++ code and are immediately executable, e.g. no code generation required.
- parser.h: Defines the BaseParser and Parser class and contains code for the parsing engine.
- parsetree.h: Defines the ParseTree class that outlines a data structure that is a representation of a parse tree for some input.
- prettyparser.h: Defines the PrettyParser class which allows the user to print a representation of ParseTree and BaseParser objects.
- tokenizer.h: Defines the Tokenizer class. An instance of this class is used as input to the parsing engine.
- flextokenizer.h: Defines the FlexTokenizer class. An instance of this class can be used to tokenize input using Flex.
- tokenstream.h: Defines the TokenStream and parsing_error class which enables flow variables to be of a non-primitive type.