Skip to content
/ vain Public

An extremely simple, tiny and easy to use V library for writing lexers.

Notifications You must be signed in to change notification settings

Trivaxy/vain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vain

An extremely simple, tiny and easy to use V library for writing lexers.

Usage

Vain lets you create lexer objects which act on an input string and follow a pre-defined set of rules you create to match tokens. On top of that, it allows you to process tokens on the spot (using callback functions) to convert them to a format you're more comfortable with.

Here's a usage example , which outputs:

// (WORD: My)
// (WHITESPACE: )
// (NUMBER: 100)
// (PERCENT: %)
// (WHITESPACE:)
// (WORD:awesome)
// (WHITESPACE: )
// (WORD: string)
// (EXCLAMATION: !)

About

An extremely simple, tiny and easy to use V library for writing lexers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published