unlogic
Loading...
Searching...
No Matches
Parser.h
Go to the documentation of this file.
1#ifndef UNLOGIC_PARSER_H
2#define UNLOGIC_PARSER_H
3
4#include <buffalo/buffalo.h>
5#include <memory>
6#include "Node.h"
7
8namespace unlogic
9{
18
19 using ParserValueType = std::variant<double, std::string, std::vector<std::string>, UniqueNode, std::vector<UniqueNode>>;
20 using ParserGrammarType = bf::GrammarDefinition<ParserValueType, SyntaxHighlightingGroup>;
21
22 extern bf::NonTerminal<ParserGrammarType> &unlogic_program;
23} // namespace unlogic
24
25#endif // UNLOGIC_PARSER_H
std::unique_ptr< Node > UniqueNode
Definition Node.h:30
std::variant< double, std::string, std::vector< std::string >, UniqueNode, std::vector< UniqueNode > > ParserValueType
Definition Parser.h:19
bf::GrammarDefinition< ParserValueType, SyntaxHighlightingGroup > ParserGrammarType
Definition Parser.h:20
SyntaxHighlightingGroup
Definition Parser.h:11
@ SyntaxKeyword
Definition Parser.h:13
@ SyntaxOperator
Definition Parser.h:12
@ SyntaxIdentifier
Definition Parser.h:14
@ SyntaxLiteral
Definition Parser.h:15
@ SyntaxGrouper
Definition Parser.h:16
bf::NonTerminal< ParserGrammarType > & unlogic_program
Definition Parser.cpp:200