Logo
Explore Help
Sign In
intercal/not-python
1
0
Fork 0
You've already forked not-python
Code Issues Pull Requests Releases Wiki Activity
Files
38b7124fe2e875d783de09ca795222fe5d713cfc
not-python/src/syn/lexer.l

29 lines
445 B
Plaintext
Raw Normal View History

Initial commit Includes: runtime base from a previous project, syn(tax) module with parser and lexer Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-09-01 17:32:48 -07:00
%%
Add lexer, parser, ast, and basic command line interaction * Add lexer and parser using lrpar crate * AST is added and constructed via lexer and parser * Command line program `not` will read a file and parse it Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-09-02 14:40:43 -07:00
[\r\n;]+ "EOL"
Initial commit Includes: runtime base from a previous project, syn(tax) module with parser and lexer Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-09-01 17:32:48 -07:00
[a-zA-Z_][a-zA-Z0-9_]* "IDENT"
:[a-zA-Z_][a-zA-Z0-9_]* "SYM"
[0-9]+ "NUM"
"([^"]|\\[rnt"'\\])+"|'([^"]|\\[rnt"'\\])+' "STRING"
Fix parser for index and call exprs, remove old test that didn't work, add visitor pattern Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-09-03 18:32:22 -07:00
= "="
Initial commit Includes: runtime base from a previous project, syn(tax) module with parser and lexer Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-09-01 17:32:48 -07:00
\|\| "||"
&& "&&"
< "<"
> ">"
<= "<="
>= ">="
!= "!="
== "=="
\+ "+"
\* "*"
/ "/"
- "-"
\( "("
\) ")"
\[ "["
\] "]"
\. "."
, ","
[\t ]+ ;
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.5 Page: 46ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API