Top 1K Features Creators Events Podcasts Books Extensions Interviews Blog Explorer CSV

Jison Lex

< >

Jison Lex is an open source programming language created in 2013 by Zachary Carter.

#867on PLDB 11Years Old 0Repos
Download source code:
git clone https://github.com/zaach/jison-lex
Source Code

generates lexical analyzers. used by jison.


Example from Linguist:
%% \n+ {yy.freshLine = true;} \s+ {yy.freshLine = false;} "y{"[^}]*"}" {yytext = yytext.substr(2, yyleng - 3); return 'ACTION';} [a-zA-Z_][a-zA-Z0-9_-]* {return 'NAME';} '"'([^"]|'\"')*'"' {return 'STRING_LIT';} "'"([^']|"\'")*"'" {return 'STRING_LIT';} "|" {return '|';} "["("\]"|[^\]])*"]" {return 'ANY_GROUP_REGEX';} "(" {return '(';} ")" {return ')';} "+" {return '+';} "*" {return '*';} "?" {return '?';} "^" {return '^';} "/" {return '/';} "\\"[a-zA-Z0] {return 'ESCAPE_CHAR';} "TEMPLATEquot; {return 'TEMPLATE#39;;} "<<EOF>>" {return 'TEMPLATE#39;;} "." {return '.';} "%%" {return '%%';} "{"\d+(","\s?\d+|",")?"}" {return 'RANGE_REGEX';} /"{" %{if (yy.freshLine) { this.input('{'); return '{'; } else { this.unput('y'); }%} "}" %{return '}';%} "%{"(.|\n)*?"}%" {yytext = yytext.substr(2, yyleng - 4); return 'ACTION';} . {/* ignore bad characters */} <<EOF>> {return 'EOF';}

Language features

Feature Supported Example Token
Booleans ✓ true false

- Build the next great programming language · Add · Issues · About · Search · Keywords · Livestreams · Labs · Resources · Acknowledgements

Built with Scroll v154.3.0