unlogic
|
#include "Parser.h"
Go to the source code of this file.
Typedefs | |
using | G = ParserGrammarType |
using | ValueType = ParserValueType |
Functions | |
bf::DefineTerminal< G, R"(given)"> | KW_GIVEN (SyntaxKeyword) |
bf::DefineTerminal< G, R"(calc)"> | KW_CALC (SyntaxKeyword) |
bf::DefineTerminal< G, R"(plot)"> | KW_PLOT (SyntaxKeyword) |
bf::DefineTerminal< G, R"(on)"> | KW_ON (SyntaxKeyword) |
bf::DefineTerminal< G, R"(as)"> | KW_AS (SyntaxKeyword) |
bf::DefineTerminal< G, R"(\d+(\.\d+)?)", double > | NUMBER (SyntaxLiteral, [](auto const &tok) -> ValueType { return std::stod(std::string(tok.raw));}) |
bf::DefineTerminal< G, R"([a-zA-Z]+)", std::string > | IDENTIFIER (SyntaxIdentifier, [](auto const &tok) -> ValueType { return std::string(tok.raw);}) |
bf::DefineTerminal< G, R"(\^)"> | OP_EXP (bf::Right, SyntaxOperator) |
bf::DefineTerminal< G, R"(\*)"> | OP_MUL (bf::Left, SyntaxOperator) |
bf::DefineTerminal< G, R"(\/)"> | OP_DIV (bf::Left, SyntaxOperator) |
bf::DefineTerminal< G, R"(\+)"> | OP_ADD (bf::Left, SyntaxOperator) |
bf::DefineTerminal< G, R"(\-)"> | OP_SUB (bf::Left, SyntaxOperator) |
bf::DefineTerminal< G, R"(=)"> | OP_ASN (bf::Left, SyntaxOperator) |
bf::DefineTerminal< G, R"(\()"> PAR_OPEN(SyntaxGrouper);bf::DefineTerminal< G, R"(\))"> | PAR_CLOSE (SyntaxGrouper) |
bf::DefineTerminal< G, R"(\[)"> | BRK_OPEN (SyntaxGrouper) |
bf::DefineTerminal< G, R"(\])"> | BRK_CLOSE (SyntaxGrouper) |
bf::DefineTerminal< G, R"(;)"> | STMT_DELIMITER (SyntaxOperator) |
bf::DefineTerminal< G, R"(,)"> | SEPARATOR (SyntaxOperator) |
Variables | |
bf::DefineNonTerminal< G, std::vector< std::string > > | identifier_list |
bf::DefineNonTerminal< G, std::unique_ptr< Node > > | expression |
bf::DefineNonTerminal< G, std::vector< std::unique_ptr< Node > > > | expression_list |
bf::DefineNonTerminal< G, std::unique_ptr< Node > > | function_call |
bf::DefineNonTerminal< G, std::unique_ptr< Node > > | function_definition |
bf::DefineNonTerminal< G > | variable_definition = (KW_GIVEN + IDENTIFIER + OP_ASN + expression) |
bf::DefineNonTerminal< G, std::unique_ptr< Node > > | plot_command |
bf::DefineNonTerminal< G, std::unique_ptr< Node > > | statement |
bf::DefineNonTerminal< G, std::vector< std::unique_ptr< Node > > > | statement_list |
bf::DefineNonTerminal< G, std::unique_ptr< Node > > | scoped_block |
bf::DefineNonTerminal< G, std::unique_ptr< Node > > | program |
using G = ParserGrammarType |
Definition at line 5 of file Parser.cpp.
using ValueType = ParserValueType |
Definition at line 6 of file Parser.cpp.
bf::DefineTerminal< G, R"(\])"> BRK_CLOSE | ( | SyntaxGrouper | ) |
bf::DefineTerminal< G, R"(\[)"> BRK_OPEN | ( | SyntaxGrouper | ) |
bf::DefineTerminal< G, R"([a-zA-Z]+)", std::string > IDENTIFIER | ( | SyntaxIdentifier | , |
[] (auto const &tok) -> ValueType { return std::string(tok.raw);} | |||
) |
bf::DefineTerminal< G, R"(as)"> KW_AS | ( | SyntaxKeyword | ) |
bf::DefineTerminal< G, R"(calc)"> KW_CALC | ( | SyntaxKeyword | ) |
bf::DefineTerminal< G, R"(given)"> KW_GIVEN | ( | SyntaxKeyword | ) |
bf::DefineTerminal< G, R"(on)"> KW_ON | ( | SyntaxKeyword | ) |
bf::DefineTerminal< G, R"(plot)"> KW_PLOT | ( | SyntaxKeyword | ) |
bf::DefineTerminal< G, R"(\d+(\.\d+)?)", double > NUMBER | ( | SyntaxLiteral | , |
[] (auto const &tok) -> ValueType { return std::stod(std::string(tok.raw));} | |||
) |
bf::DefineTerminal< G, R"(\+)"> OP_ADD | ( | bf::Left | , |
SyntaxOperator | |||
) |
bf::DefineTerminal< G, R"(=)"> OP_ASN | ( | bf::Left | , |
SyntaxOperator | |||
) |
bf::DefineTerminal< G, R"(\/)"> OP_DIV | ( | bf::Left | , |
SyntaxOperator | |||
) |
bf::DefineTerminal< G, R"(\^)"> OP_EXP | ( | bf::Right | , |
SyntaxOperator | |||
) |
bf::DefineTerminal< G, R"(\*)"> OP_MUL | ( | bf::Left | , |
SyntaxOperator | |||
) |
bf::DefineTerminal< G, R"(\-)"> OP_SUB | ( | bf::Left | , |
SyntaxOperator | |||
) |
bf::DefineTerminal< G, R"(\()"> PAR_OPEN(SyntaxGrouper);bf::DefineTerminal< G, R"(\))"> PAR_CLOSE | ( | SyntaxGrouper | ) |
bf::DefineTerminal< G, R"(,)"> SEPARATOR | ( | SyntaxOperator | ) |
bf::DefineTerminal< G, R"(;)"> STMT_DELIMITER | ( | SyntaxOperator | ) |
Definition at line 82 of file Parser.cpp.
Definition at line 58 of file Parser.cpp.
Definition at line 75 of file Parser.cpp.
Definition at line 125 of file Parser.cpp.
bf::DefineNonTerminal<G, std::vector<std::string> > identifier_list |
Definition at line 42 of file Parser.cpp.
Definition at line 148 of file Parser.cpp.
Definition at line 190 of file Parser.cpp.
Definition at line 183 of file Parser.cpp.
Definition at line 155 of file Parser.cpp.
Definition at line 166 of file Parser.cpp.
bf::DefineNonTerminal<G> variable_definition = (KW_GIVEN + IDENTIFIER + OP_ASN + expression) |
Definition at line 144 of file Parser.cpp.