Languages Features Creators Calendar CSV Resources Blog About Pricing Add Language
GitHub icon

Jison Lex

Jison Lex - Programming language

< >

Jison Lex is a programming language created in 2013 by Zachary Carter.

#945on PLDB 10Years Old 341Users
0Books 0Papers 0Repos

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';} "$" {return '$';} "<<EOF>>" {return '$';} "." {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 Token Example
Booleans true false
farcaster.html · jison-lex.html · gfa-basic.html

View source

- Build the next great programming language · Search · v2023 · Day 208 · Docs · Acknowledgements · Traffic · Traffic Today · Mirrors · GitHub · feedback@pldb.com