MCPcopy Create free account
hub / github.com/Genivia/ugrep / parse1

Method parse1

lib/pattern.cpp:975–1030  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

973}
974
975void Pattern::parse1(
976 bool begin,
977 Location& loc,
978 Positions& firstpos,
979 Positions& lastpos,
980 bool& nullable,
981 Follow& followpos,
982 Lazy& lazyidx,
983 Lazypos& lazypos,
984 Mods modifiers,
985 Locations& lookahead,
986 Iter& iter)
987{
988 DBGLOG("BEGIN parse1(%u)", loc);
989 parse2(
990 begin,
991 loc,
992 firstpos,
993 lastpos,
994 nullable,
995 followpos,
996 lazyidx,
997 lazypos,
998 modifiers,
999 lookahead,
1000 iter);
1001 Positions firstpos1;
1002 Positions lastpos1;
1003 bool nullable1;
1004 Lazypos lazypos1;
1005 Iter iter1;
1006 while (at(loc) == '|')
1007 {
1008 ++loc;
1009 parse2(
1010 begin,
1011 loc,
1012 firstpos1,
1013 lastpos1,
1014 nullable1,
1015 followpos,
1016 lazyidx,
1017 lazypos1,
1018 modifiers,
1019 lookahead,
1020 iter1);
1021 pos_insert(firstpos, firstpos1);
1022 pos_insert(lastpos, lastpos1);
1023 lazy_insert(lazypos, lazypos1);
1024 if (nullable1)
1025 nullable = true;
1026 if (iter1 > iter)
1027 iter = iter1;
1028 }
1029 DBGLOG("END parse1()");
1030}
1031
1032void Pattern::parse2(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected