-
Notifications
You must be signed in to change notification settings - Fork 2
Home
yassir RAMDANI edited this page Sep 15, 2020
·
3 revisions
A universal lexer library in Swift.
In computer science a Lexer or a tokenizer is a program that converts a sequence of characters (raw string) into a sequence of tokens.
SwiLex is a universal lexer which means that you can use it to build any lexer only by defining your tokens in a Swift enum (in few lines of code).
And soon with SwiParse it will allow to build a full Parser.
- Tokens defined using only a simple
SwiLexable
enum. - Support conditional tokens with custom modes.
- Support actions on each match by implementing the
onLex(raw: Substring)
function. - Errors with line number and the issue's substring.
- Add detailed documentation with more examples.
- Support Cocoapods and Carthage.
- 🔥 Create SwiParse, a tool that can be linked to SwiLex to generate a full parser. (in progress ...) 🔥
A mistake? A bug? Please report it by opening an issue or via twitter.