WIP: factorization of lexer and parser implementation - gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/expr-print.lua
diff options
context:
space:
mode:
authorFrancesco Abbate <francesco.bbt@gmail.com>2013年05月10日 18:07:56 +0200
committerFrancesco Abbate <francesco.bbt@gmail.com>2013年05月10日 18:07:56 +0200
commit204fa404431f9c619f0dfc5ae3efc463749fa8ed (patch)
tree825fc39707d7c7b3e734c5ffb3fd04af8f325530 /expr-print.lua
parent58dd27ba0c1776644db561cc4d565a281e2f7b2b (diff)
downloadgsl-shell-204fa404431f9c619f0dfc5ae3efc463749fa8ed.tar.gz
WIP: factorization of lexer and parser implementation
Diffstat (limited to 'expr-print.lua')
-rw-r--r--expr-print.lua 5
1 files changed, 3 insertions, 2 deletions
diff --git a/expr-print.lua b/expr-print.lua
index 5d106296..03b1e185 100644
--- a/expr-print.lua
+++ b/expr-print.lua
@@ -1,7 +1,8 @@
+local expr_lexer = require 'expr-lexer'
+
local format, concat = string.format, table.concat
--- TODO: this information is duplicated from expr-parser => remove the duplication
-local oper_table = {['+'] = 0, ['-'] = 0, ['*'] = 1, ['/'] = 1, ['^'] = 2, ['='] = 3, ['>'] = 3, ['<'] = 3, ['%'] = -1}
+local oper_table = expr_lexer.operators
local ex_print
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月12日 03:14:04 +0000

AltStyle によって変換されたページ (->オリジナル) /