-
Notifications
You must be signed in to change notification settings - Fork 2
Introduction
Ronald Franco edited this page Dec 26, 2018
·
10 revisions
In this section, we introduce the C++11 header files that make up the Attribute-Flow Parser Library. The remainder of this wiki discuss the details of Attribute-Flow Grammars and the Attribute-Flow Parser Library. Finally, we provide a collection of C++ programs that implement different AFParsers to perform various tasks.
-
parser.h:
- Defines the BaseParser and Parser classes
- Defines the parsing engine
- Defines operator overloads that create AFParser objects
-
parsetree.h:
- Defines the ParseTree class
- Represents a parse tree for some input
-
prettyparser.h:
- Defines the PrettyParser class
- Allows printing of ParseTree objects to Graphviz Dot and stdout
- Allows printing of BaseParser objects to stdout
-
tokenizer.h:
- Defines the Tokenizer class
- Holds input for AFParser objects
-
flextokenizer.h:
- Defines the FlexTokenizer class
- Tokenizes input using Flex
- Can tokenize string or file descriptor
-
tokenstream.h:
- Defines the TokenStream and parsing_error class
- Handles extraction and storing of semantic value into out-flow variable
- Allows flow variables to be of a non-primitive type