Source Code Scanners is the high performance library of visual components for C++ Builder and Delphi intended for creating analyzers and parsers of source codes. It includes components of the C++ lexical analyzer and the C++ preprocessor, but also contains the full set of base classes, which provides a possibility to create lexers and parsers of any other languages. These components may be used to build applications, which require the C++ source code analyzing (tools of helps creating; calculators of expessions; designers of source codes; interpreters and compilers of C-like languages and etc.). The lexical analyzer uses DFAs (Deterministic Finite Automata) to match tokens found on the character input stream. DFAs are defined by the set of regular expressions in a source code and are created at runtime. More than one automaton (lexical class, lexical tree) may be defined. Actions attached to regular expressions (which are executed when that expression has been matched on the input stream) may switch from one lexical class to another. The TLexTree class maintains converting a set of regular expressions into the DFA array. Source Code Scanners provides also classes, which support a work with command-line options, calculating of constant expressions and etc. The source code of Source Code Scanners is available in Professional edition. |