aboutsummaryrefslogtreecommitdiff
path: root/spec/spec.go (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Absorb spec/EuAndreh2024-11-291-382/+0
|
* Avoid panic on spelling inconsistencies errorsRyo Nihei2022-03-211-5/+7
| | | | close #5
* Disallow upper cases in an identifierRyo Nihei2021-09-241-1/+1
|
* Add name field to the lexical specificationRyo Nihei2021-09-181-0/+7
|
* Generate constant values representing mode IDs, mode names, kind IDs, and ↵Ryo Nihei2021-09-181-15/+139
| | | | kind names
* Define a lexical specification interfaceRyo Nihei2021-09-111-2/+2
|
* Change APIsRyo Nihei2021-08-011-61/+92
| | | | | | | | | | | | | | | | | | | | | | Change fields of tokens, results of lexical analysis, as follows: - Rename: mode -> mode_id - Rename: kind_id -> mode_kind_id - Add: kind_id The kind ID is unique across all modes, but the mode kind ID is unique only within a mode. Change fields of a transition table as follows: - Rename: initial_mode -> initial_mode_id - Rename: modes -> mode_names - Rename: kinds -> kind_names - Rename: specs[].kinds -> specs[].kind_names - Rename: specs[].dfa.initial_state -> specs[].dfa.initial_state_id Change public types defined in the spec package as follows: - Rename: LexModeNum -> LexModeID - Rename: LexKind -> LexKindName - Add: LexKindID - Add: StateID
* Add unique kind IDs to tokensRyo Nihei2021-08-011-0/+14
|
* Allow duplicate names between fragments and non-fragmentsRyo Nihei2021-05-271-3/+12
|
* Add fragment expressionRyo Nihei2021-05-251-5/+6
| | | | A fragment entry is defined by an entry whose `fragment` field is `true`, and is referenced by a fragment expression (`\f{...}`).
* Add --compression-level option to compile commandRyo Nihei2021-05-111-8/+10
| | | | --compression-level specifies a compression level. The default value is 2.
* Change type of acceping_states to sliceRyo Nihei2021-05-071-1/+1
|
* Add transition table compressorRyo Nihei2021-05-071-3/+23
|
* Add lex modeRyo Nihei2021-05-041-3/+72
| | | | | | | | | | lex mode is a feature that separates transition tables per each mode. The lexer starts from an initial state indicated by `initial_state` field and transitions between modes according to `push` and `pop` fields. The initial state will always be `default`. Currently, maleeni doesn't provide the ability to change the initial state. You can specify the modes of each lex entry using `modes` field. When the mode isn't indicated explicitly, the entries have `default` mode.
* Add validation of lexical specs and improve error messagesRyo Nihei2021-04-171-7/+82
|
* Add types of lexical specificationsRyo Nihei2021-02-161-0/+28
APIs of compiler and driver packages use these types. Because CompiledLexSpec struct a lexer takes has kind names of lexical specification entries, the lexer sets them to tokens.