OILS / cpp / osh_tdop.cc View on Github | oilshell.org

16 lines, 6 significant
1#include "osh.h" // for arith_parse
2
3// This code structure is odd because frontend/tdop.py would allow multiple
4// TDOP parser. Since we only have one, we just hard-code it in C++.
5
6namespace tdop {
7
8LeftInfo* ParserSpec::LookupLed(Id_t id) {
9 return &(arith_parse::kLeftLookup[id]);
10}
11
12NullInfo* ParserSpec::LookupNud(Id_t id) {
13 return &(arith_parse::kNullLookup[id]);
14}
15
16} // namespace tdop