Interface ILexer
Describes general lexer interface. Lexer 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
Inherited Members
Namespace: Azos.CodeAnalysis
Assembly: Azos.dll
Syntax
public interface ILexer : ICodeProcessor
Properties
AllAnalyzed
Returns true when the whole input source has been analyzed. This property is always true for lexers that do not support lazy analysis
Declaration
bool AllAnalyzed { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Source
References source code text that was lexed
Declaration
ISourceText Source { get; }
Property Value
Type | Description |
---|---|
ISourceText |
SourceCodeReference
References source code that was lexed
Declaration
SourceCodeRef SourceCodeReference { get; }
Property Value
Type | Description |
---|---|
SourceCodeRef |
TokenStream
Enumerates Token stream - depending on implementation enumeration may do lexical analysis token-by-token or in chunks with every enumerator advance
Declaration
IEnumerable<Token> TokenStream { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Token> |
Methods
AnalyzeAll()
If lexer supports lazy analysis, forces analysis of the whole source
Declaration
void AnalyzeAll()