[This is preliminary documentation and is subject to change.]
Provides code analysis-related base contracts/models for writing compilers and various textual processors.
JSON, C#, Laconic parsers are implemented using this concept
Classes
| Class | Description | |
|---|---|---|
| CodeAnalysisException |
Base exception thrown by the framework
| |
| CodeProcessorException |
Thrown by code processors such as lexers, parsers , symantic analyzers, compilers etc...
| |
| CommonCodeProcessor |
Provides base implementation for common code processors
| |
| Language |
Represents and abstraction of the language
| |
| LazyFSMState TToken |
Represents a state object for Lazy Finate State Machine that enumerates tokes from IEnumerable(Token)
and does not support a notion of index addressing
| |
| Lexer TToken |
Performs lexical analysis of the source code in particular language
Allows to enumerate over source as typed Token stream - depending on implementation enumeration may do
lexical analysis token-by-token or in chunks with every enumerator advance
| |
| Message |
Represents a message emitted from code-analyzing entities such as lexers, parsers, semantic analyzers and compilers.
Messages have severity type like warning, info or error etc.
| |
| MessageList |
Provides a list of messages, this class is not thread-safe
| |
| ObjectResultAnalysisContext TObject |
A context that can hold analysis result as TObject.
This class is useful for cases like dynamic language parsers (i.e. JSON)
| |
| Parser TLexer |
Performs parsing of token streams provided by lexers
| |
| PatternSearch |
Provides Token-pattern matching utilities
| |
| SourceRefCommonCodeProcessor |
Provides base implementation for common code processors
| |
| StringEscapeErrorException | ||
| Token |
Represents a lexical token of the language. This is an abstract class that particular language implementations must extend
to define language-specific token types
| |
| Tokenized TToken |
Provides read-only view over TokenList
| |
| TokenList TToken |
A list of tokens
| |
| UnspecifiedLanguage |
Represents Unspecified unknown language
|
Interfaces
| Interface | Description | |
|---|---|---|
| IAnalysisContext |
Describes an entity that retains state during analysis, such as: module compiler, project compiler, code unit translator etc.
This entity may also contain compiler/parser/lexer options etc.
| |
| ICodeProcessor |
Describes an entity that may process source code in some language
| |
| ILanguageProcessorNotifications |
Describes an entity capable of receiving messages as they are emitted by entities such as parsers and compilers
| |
| ILexer |
Describes general lexer interface.
Lexers turn string source input which is obtained via ISourceText implementation (i.e. FileSource,WebSource...)
into tokenized stream. Some lexer implementations may support lazy analysis, that is - source text analysis which is done
in chunks when lexer is iterated over, others may lex the whole source text at once
| |
| IParser |
Describes general parser interface
| |
| IProjectItem |
Represents an item that is a part of some project, i.e. a CS source file in CSharp project
|
Delegates
| Delegate | Description | |
|---|---|---|
| LazyFSMPredicate TToken |
Lazy Finate State Machine (FSM) predicate, tries to match condition and returns appropriate next action
|
Enumerations
| Enumeration | Description | |
|---|---|---|
| FSMI |
Describes transition instructions for Finate State Machine (FSM)
| |
| LanguageFamily |
Defines various languages
| |
| MessageType |
Message type like: Info, Warning, Error
| |
| TokenKind |
Provides language-agnostic token classification
|