### Hierarchy

- GenLex

### Implements

- GenLex

### Implemented by

- GenLex

## Index

### Methods

- get
- keywords
- setSeparatorRepetition
- setSeparators
- setSeparatorsParser
- tokenize
- tokens
- use

## Methods

### get

- get(tokenName: string): Token<any>

- - Defined in masala-parser.d.ts:883

  #### Parameters

  - ##### tokenName: string

  #### Returns Token<any>

### keywords

- keywords(tokens: string[]): Token<string>[]

- - Defined in masala-parser.d.ts:881

  tonkenize all items, given them the name of the token Exemple : keywords(['AND', 'OR']) will create the tokens named 'AND' and 'OR' with C.string('AND'), C.string('OR)

  #### Parameters

  - ##### tokens: string[]

  #### Returns Token<string>[]

### setSeparatorRepetition

- setSeparatorRepetition(repeat: boolean): GenLex

- - Defined in masala-parser.d.ts:874

  Should separators be repeated ?

  `separators.optrep().then(myToken()).then(separators.optrep())`

  #### Parameters

  - ##### repeat: boolean

    default is true

  #### Returns GenLex

### setSeparators

- setSeparators(spacesCharacters: string): GenLex

- - Defined in masala-parser.d.ts:858

  #### Parameters

  - ##### spacesCharacters: string

  #### Returns GenLex

### setSeparatorsParser

- setSeparatorsParser<T>(parser: IParser<T>): GenLex

- - Defined in masala-parser.d.ts:866

  Select the parser used by genlex. It will be used as `separator.optrep().then(token).then(separator.optrep())`. So the separator must not be optional or it will make an infinite loop. The separation in your text can't be a strict one-time separation with Genlex.

  #### Type parameters

  - #### T

  #### Parameters

  - ##### parser: IParser<T>

  #### Returns GenLex

### tokenize

- tokenize<T, P>(parser: P, name: string, precedence?: number): P

- - Defined in masala-parser.d.ts:852

  #### Type parameters

  - #### T

  - #### P: IParser<T>

  #### Parameters

  - ##### parser: P

    parser of the token

  - ##### name: string

    token name

  - ##### Optional precedence: number

    the token with lowest precedence is taken before others.

    Choice with grammar is made after token selection !

  #### Returns P

### tokens

- tokens(): TokenCollection

- - Defined in masala-parser.d.ts:856

  #### Returns TokenCollection

### use

- use<T, P>(grammar: P): P

- - Defined in masala-parser.d.ts:854

  #### Type parameters

  - #### T

  - #### P: IParser<T>

  #### Parameters

  - ##### grammar: P

  #### Returns P

Generated using TypeDoc