Name Description Size Coverage
DFA.h Tables representing a deterministic finite automaton for matching regular expressions. 1057 -
DFAState.h 1570 -
LexUtil.h 457 -
Main.cpp Processes a .lex file and produces .h and .cpp files which implement a lexical analyzer. The .lex file is a text file with one token definition per line. Each line is of the form: <TOKEN_NAME> = <pattern> where <pattern> is either a regular expression (e.g [0-9]) or a double-quoted literal string. 7495 -
NFA.cpp 1275 -
NFA.h A nondeterministic finite automaton for matching regular expressions. The NFA is initialized with a number of regular expressions, and then matches a string against all of them simultaneously. 1722 -
NFAState.h 4354 -
NFAtoDFA.h Converts a nondeterministic finite automaton to a deterministic finite automaton. Since NFAs and DFAs differ only in that an NFA allows multiple states at the same time, we can find each possible combination of simultaneous NFA states and give this combination a label. These labelled nodes are our DFA nodes, since we can only be in one such unique set of NFA states at a time. As an NFA can end up in multiple accept states at the same time (for instance, the token "while" is valid for both WHILE and IDENTIFIER), we disambiguate by preferring the first matching regex (in terms of the order in which they were added to the NFA). 6011 -
RegexNode.cpp 4403 -
RegexNode.h Represents a node in the parse tree of a regular expression. 1684 -
RegexParser.cpp 4734 -
RegexParser.h Turns a simple regular expression into a parse tree. The regular expression syntax supports only the basic quantifiers ('*', '+', and '?'), alternation ('|'), character sets ('[a-z]'), and groups ('()'). 1734 -
sksl.lex 3505 -
TransitionTable.cpp 8905 -
TransitionTable.h 367 -