MCPcopy Create free account
hub / github.com/Genivia/RE-flex / parse2

Method parse2

lib/pattern.cpp:1032–1158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1030}
1031
1032void Pattern::parse2(
1033 bool begin,
1034 Location& loc,
1035 Positions& firstpos,
1036 Positions& lastpos,
1037 bool& nullable,
1038 Follow& followpos,
1039 Lazy& lazyidx,
1040 Lazypos& lazypos,
1041 Mods modifiers,
1042 Locations& lookahead,
1043 Iter& iter)
1044{
1045 DBGLOG("BEGIN parse2(%u)", loc);
1046 Positions a_pos;
1047 Char c;
1048 if (begin)
1049 {
1050 while (true)
1051 {
1052 if (opt_.x)
1053 while (std::isspace(at(loc)))
1054 ++loc;
1055 if (at(loc) == '^')
1056 {
1057 pos_add(a_pos, Position(loc++));
1058 begin = false;
1059 }
1060 else if (escapes_at(loc, "ABb<>"))
1061 {
1062 pos_add(a_pos, Position(loc));
1063 loc += 2;
1064 if (begin)
1065 {
1066 bol_ = false;
1067 begin = false;
1068 }
1069 }
1070 else
1071 {
1072 if (escapes_at(loc, "ij"))
1073 {
1074 bol_ = false;
1075 begin = false;
1076 }
1077 break;
1078 }
1079 }
1080 }
1081 if (begin || ((c = at(loc)) != '\0' && c != '|' && c != ')'))
1082 {
1083 parse3(
1084 begin,
1085 loc,
1086 firstpos,
1087 lastpos,
1088 nullable,
1089 followpos,

Callers

nothing calls this directly

Calls 12

atFunction · 0.85
PositionClass · 0.85
swapMethod · 0.80
locMethod · 0.80
anchorMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
posMethod · 0.45
findMethod · 0.45
emptyMethod · 0.45
lazyMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected