Commit 31577241 authored by Jamie A. Jennings's avatar Jamie A. Jennings

Cleaned up some debugging print statements

parent c57b136c
Pipeline #65318858 passed with stage
in 1 minute and 9 seconds
......@@ -294,11 +294,6 @@ function convert_bracket(pt, sref)
if compflag then
table.remove(exps, 1)
end
if not (exps[1] and (not exps[2]) and (exps[1].type=="form.exp")) then
print("***")
table.print(exps)
print("***")
end
assert(exps[1] and (not exps[2]) and (exps[1].type=="form.exp"))
-- strip off the outer 'form.exp'
exps = exps[1].subs
......@@ -458,7 +453,7 @@ function ast.ambient_raw_exp(ex)
end
function convert_exp(pt, sref)
if pt==nil then error("pt is nil:" .. debug.traceback()) end --TEMP FIXME
assert(pt, "internal error: parse tree argument to convert_exp is nil")
local sref = common.source.new{s=pt.s, e=pt.e, origin=sref.origin, text=sref.text, parent=sref.parent}
local subs = pt.subs and filter(not_atmosphere, pt.subs)
local function convert1(pt)
......@@ -626,18 +621,6 @@ local function convert_stmt(pt, sref)
public_bindings = subs[1].subs
private_bindings = {}
end
-- if #private_bindings == 0 then
-- if #public_bindings == 1 then
-- print("******************************************************************")
-- print("* Found an old-style grammar that will still work (1 binding) *")
-- print("******************************************************************")
-- else
-- print("******************************************************************")
-- print("* More than one public binding... this will become an error *")
-- print("******************************************************************")
-- end
-- end
local function convert_rules(rules)
return filter(function(obj) return obj; end,
map(function(sub)
......
......@@ -555,7 +555,6 @@ end
local function ref(a, env, prefix, messages)
local pat, path, err = env:lookup(a.localname, a.packagename)
local name = common.compose_id{a.packagename, a.localname}
-- if pat then print("*** ref: found " .. name .. " at " .. list.tostring(path)); end
if (not pat) then
if err=="novalue" then
raise_error("identifier being defined, " .. a.packagename
......
......@@ -142,7 +142,7 @@ local shunting_yard_explist;
local handle_statement;
local function shunting_yard_exp(exp, attribute_table)
if infix.DEBUG then print("*** entering shunting_yard_exp with: ", exp.type, " ", exp.data) end
if infix.DEBUG then print("infix.DEBUG: entering shunting_yard_exp with ", exp.type, " ", exp.data) end
local function map_shunting_yard_exp(ls)
return map(function(e) return shunting_yard_exp(e, attribute_table) end, ls)
end
......@@ -228,7 +228,7 @@ local function shunting_yard_exp(exp, attribute_table)
data=exp.data,
subs=newsubs}
else
if infix.DEBUG then print("*** skipping: ", exp.type, " ", exp.data) end
if infix.DEBUG then print("infix.DEBUG: skipping ", exp.type, " ", exp.data) end
return exp
end
end
......
......@@ -198,6 +198,7 @@ function create_rpl_1_1_engine(e)
end
-- UNUSED:
function create_rpl_1_2_engine(e)
-- common.notes = true
......@@ -237,13 +238,6 @@ function create_rpl_1_3_engine(e)
local ok, pkg, messages = e:import("rosie/rpl_1_3", ".")
assert(ok, util.table_to_pretty_string(messages, false))
-- local e = rosie.engine.new()
-- parse_block = rosie.env.compile.make_parse_block(preparse, stmt, e.compiler.version, infix.to_prefix)
-- parse_expression = rosie.env.compile.make_parse_expression(exp, infix.to_prefix)
-- e.compiler.parse_block = parse_block
-- e.compiler.parse_expression = parse_expression
-- e.compiler.version = common.rpl_version.new(1,3)
local version = common.rpl_version.new(1, 3)
local rplx_preparse, errs = e:compile("preparse")
assert(rplx_preparse, errs and util.table_to_pretty_string(errs) or "no err info")
......
......@@ -394,20 +394,6 @@ local function bracket(e, a, input, start, expected, nextpos)
subresult_expected = (not a.complement) and expected or (not expected)
end
local result = expression(e, a.cexp, input, start, subresult_expected, nextpos)
-- if ast.simple_charset_p(a.cexp) then
-- result = cs_simple(e, a.cexp, input, start, subresult_expected, nextpos)
-- elseif ast.choice.is(a.cexp) then
-- result = choice(e, a.cexp, input, start, subresult_expected, nextpos)
-- elseif ast.bracket.is(a.cexp) then
-- result = bracket(e, a.cexp, input, start, subresult_expected, nextpos)
-- elseif ast.cs_intersection.is(a.cexp) then
-- throw("character set intersection is not implemented", a)
-- elseif ast.cs_difference.is(a.cexp) then
-- throw("character set difference is not implemented", a)
-- else
-- assert(false, "trace: unknown cexp inside bracket: " .. tostring(a.cexp))
-- end
-- print("*** bracket intermediate result:"); for k,v in pairs(result) do print(k,v) end
if a.complement then
result.match = not result.match
end
......
......@@ -55,11 +55,7 @@ function ui.properties(name, obj, colorstring)
end
local function filter_match(key, filter)
if filter == "*" then
return true
else
return key==filter -- TEMP
end
return (filter == "*") or (key==filter)
end
local function apply_filter(tbl, name_filter)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment