MCPcopy Create free account
hub / github.com/boostorg/parser / main

Function main

test/tracing.cpp:52–487  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50 parse(u32str, with_globals(p, globals), trace::on)
51
52int main()
53{
54 std::string const str = "";
55 std::string const char_range = "xyz";
56
57 std::cout << "----------------------------------------\n"
58 << "| repeat()[] |\n"
59 << "----------------------------------------\n";
60
61 PARSE(repeat(42)[char_]);
62 PARSE(repeat(i)[char_]);
63 PARSE(repeat(42, 42)[char_]);
64 PARSE(repeat(i, i)[char_]);
65 PARSE(repeat(42, 84)[char_]);
66 PARSE(repeat(i, i2)[char_]);
67 PARSE(repeat(0, Inf)[char_]);
68 PARSE(repeat(1, Inf)[char_]);
69 PARSE(repeat(2, Inf)[char_]);
70
71 std::cout << "\n\n"
72 << "----------------------------------------\n"
73 << "| operator* |\n"
74 << "----------------------------------------\n";
75
76 PARSE(*char_);
77 PARSE(*(*char_ >> char_));
78
79 std::cout << "\n\n"
80 << "----------------------------------------\n"
81 << "| operator+ |\n"
82 << "----------------------------------------\n";
83
84 PARSE(+char_);
85 PARSE(+(*char_ >> char_));
86
87 std::cout << "\n\n"
88 << "----------------------------------------\n"
89 << "| operator% |\n"
90 << "----------------------------------------\n";
91
92 PARSE(int_ % char_);
93 PARSE(int_ % ',');
94
95 std::cout << "\n\n"
96 << "----------------------------------------\n"
97 << "| operator- (unary) |\n"
98 << "----------------------------------------\n";
99
100 PARSE(-char_);
101 PARSE(-(*char_ >> char_));
102
103 std::cout << "\n\n"
104 << "----------------------------------------\n"
105 << "| operator| |\n"
106 << "----------------------------------------\n";
107
108 PARSE(char_ | int_ | float_);
109

Callers

nothing calls this directly

Calls 10

repeatFunction · 0.85
attrFunction · 0.85
litFunction · 0.85
quoted_stringClass · 0.85
int_Class · 0.85
if_Function · 0.85
switch_Function · 0.85
transformFunction · 0.50
stringClass · 0.50
withMethod · 0.45

Tested by

no test coverage detected