|
Mercury library
1.0
Translation of CFG grammars into an object model (Bachelor's thesis).
|
A default implementation of ITokenizer interface using Microsoft Regular Expressions.
Splits tokens in the following fashion:
More...
Public Member Functions | |
| Tokenizer () | |
| Creates a default tokenizer More... | |
| Tokenizer (IEnumerable< char > alpha) | |
| Creates a tokenizer with custom alpha characters More... | |
| Tokenizer (IEnumerable< char > alpha, IEnumerable< string > keywords, TokenizerOptions options) | |
| Creates a tokenizer with custom alphanumeric characters, keywords and options. More... | |
| IList< Token > | Tokenize (string input) |
| Splits source string into tokens. More... | |
Properties | |
| string[] | Keywords [get, set] |
| Tokenizer keywords. More... | |
| char[] | Alpha [get, set] |
| Alpha characters. More... | |
| TokenizerOptions | Options [get, set] |
| Tokenizer options. More... | |
A default implementation of ITokenizer interface using Microsoft Regular Expressions.
Splits tokens in the following fashion:
alpha parameter, otherwise will be marked as stringDefinition at line 71 of file Tokenizer.cs.
| Mercury.Scanning.Tokenizer.Tokenizer | ( | ) |
Creates a default tokenizer
Definition at line 141 of file Tokenizer.cs.
| Mercury.Scanning.Tokenizer.Tokenizer | ( | IEnumerable< char > | alpha | ) |
Creates a tokenizer with custom alpha characters
| alpha | Custom alphanumeric characters. |
Definition at line 147 of file Tokenizer.cs.
| Mercury.Scanning.Tokenizer.Tokenizer | ( | IEnumerable< char > | alpha, |
| IEnumerable< string > | keywords, | ||
| TokenizerOptions | options | ||
| ) |
Creates a tokenizer with custom alphanumeric characters, keywords and options.
| alpha | Custom alphanumeric characters. |
| keywords | Keywords. |
| options | Tokenizer options. |
Definition at line 158 of file Tokenizer.cs.
| IList<Token> Mercury.Scanning.Tokenizer.Tokenize | ( | string | input | ) |
Splits source string into tokens.
| input | Source string. |
Implements Mercury.Scanning.ITokenizer.
Definition at line 196 of file Tokenizer.cs.
|
getset |
Alpha characters.
Definition at line 187 of file Tokenizer.cs.
|
getset |
Tokenizer keywords.
Definition at line 184 of file Tokenizer.cs.
|
getset |
Tokenizer options.
Definition at line 190 of file Tokenizer.cs.
1.8.7