#include <gtest/gtest.h>
#include <buffalo/buffalo.h>
#include <cmath>
Go to the source code of this file.
◆ OP_MUL()
◆ TEST() [1/4]
TEST |
( |
Parser |
, |
|
|
Construction |
|
|
) |
| |
◆ TEST() [2/4]
TEST |
( |
Parser |
, |
|
|
Evaluation |
|
|
) |
| |
◆ TEST() [3/4]
TEST |
( |
Tokenization |
, |
|
|
Permissive |
|
|
) |
| |
◆ TEST() [4/4]
TEST |
( |
Tokenization |
, |
|
|
Strict |
|
|
) |
| |
◆ expression
Initial value:
bf::DefineNonTerminal< G > expression
bf::DefineTerminal< G, R"(\*)"> OP_MUL(bf::Left)
bf::DefineTerminal< G, R"(\()"> PAR_OPEN;bf::DefineTerminal< G, R"(\))"> PAR_CLOSE
bf::DefineTerminal< G, R"(\+)"> OP_ADD(bf::Left)
bf::DefineTerminal< G, R"(\^)"> OP_EXP(bf::Right)
bf::DefineTerminal< G, R"(\d+(\.\d+)?)", double > NUMBER([](auto const &tok) { return std::stod(std::string(tok.raw));})
bf::DefineTerminal< G, R"(\/)"> OP_DIV(bf::Left)
bf::DefineTerminal< G, R"(\-)"> OP_SUB(bf::Left)
Definition at line 30 of file buffalo.test.cpp.
◆ NUMBER
bf::DefineTerminal< G, R"(\d+(\.\d+)?)", double > NUMBER([](auto const &tok) { return std::stod(std::string(tok.raw));}) |
( |
[] (auto const &tok) { return std::stod(std::string(tok.raw));} |
| ) |
|
◆ OP_ADD
◆ OP_DIV
◆ OP_EXP
◆ OP_SUB
◆ PAR_CLOSE
◆ statement