summary refs log tree commit diff stats
path: root/testp.lua
diff options
context:
space:
mode:
Diffstat (limited to 'testp.lua')
-rw-r--r--testp.lua34
1 files changed, 17 insertions, 17 deletions
diff --git a/testp.lua b/testp.lua
index 44bd5a3..4b6434a 100644
--- a/testp.lua
+++ b/testp.lua
@@ -1,5 +1,5 @@
 --[[
-    This file is part of parser.lua - table based parsing
+    This file is part of Cratera Compiler
     Copyright (C) 2019  Soni L.
 
     This program is free software: you can redistribute it and/or modify
@@ -16,7 +16,7 @@
     along with this program.  If not, see <https://www.gnu.org/licenses/>.
 --]]
 
-local parser = require "parser"
+local parser = require "cratera.parser"
 
 local caseno = 0
 local function case()
@@ -76,7 +76,7 @@ do -- trim left spaces
 end -- trim left spaces
 
 do -- lua tokens
-    local luatokens = require "luatokens"
+    local luatokens = require "cratera.luatokens"
     local tokens = luatokens.defs
     local state, err, etoken, estate = parser.parse(tokens, [["hello world"]])
     local case = case()
@@ -96,7 +96,7 @@ do -- lua tokens
 end -- lua tokens
 
 do -- more lua tokens
-    local luatokens = require "luatokens"
+    local luatokens = require "cratera.luatokens"
     local tokens = luatokens.defs
     local state, err, etoken, estate = parser.parse(tokens, [["\a\b\f\n\r\t\v\\\"\'\z        \x41\65\
 "]])
@@ -117,7 +117,7 @@ do -- more lua tokens
 end -- lua tokens
 
 do -- even more lua tokens
-    local luatokens = require "luatokens"
+    local luatokens = require "cratera.luatokens"
     local tokens = luatokens.defs
     local state, err, etoken, estate = parser.parse(tokens, [["\u{000000000000000000000000000000000000000000000000000000000000041}"]])
     local case = case()
@@ -137,7 +137,7 @@ do -- even more lua tokens
 end -- lua tokens
 
 do -- even more lua tokens
-    local luatokens = require "luatokens"
+    local luatokens = require "cratera.luatokens"
     local tokens = luatokens.defs
     local state, err, etoken, estate = parser.parse(tokens, [["\u{7F}""\u{80}""\u{7FF}""\u{800}""\u{FFFF}""\u{10000}""\u{1FFFFF}""\u{200000}""\u{3FFFFFF}""\u{4000000}""\u{7FFFFFFF}"]])
     local case = case()
@@ -177,7 +177,7 @@ do -- even more lua tokens
 end -- lua tokens
 
 do -- simple lua tokens
-    local luatokens = require "luatokens"
+    local luatokens = require "cratera.luatokens"
     local tokens = luatokens.defs
     local state, err, etoken, estate = parser.parse(tokens, [[[""]])
     local case = case()
@@ -198,7 +198,7 @@ do -- simple lua tokens
 end -- lua tokens
 
 do -- simple long string
-    local luatokens = require "luatokens"
+    local luatokens = require "cratera.luatokens"
     local tokens = luatokens.defs
     local state, err, etoken, estate = parser.parse(tokens, [=[[[]]]=])
     local case = case()
@@ -218,7 +218,7 @@ do -- simple long string
 end -- long string
 
 do -- long string with depth 1
-    local luatokens = require "luatokens"
+    local luatokens = require "cratera.luatokens"
     local tokens = luatokens.defs
     local state, err, etoken, estate = parser.parse(tokens, [==[[=[]=]]==])
     local case = case()
@@ -238,7 +238,7 @@ do -- long string with depth 1
 end -- long string
 
 do -- long string with "nested" long string
-    local luatokens = require "luatokens"
+    local luatokens = require "cratera.luatokens"
     local tokens = luatokens.defs
     local state, err, etoken, estate = parser.parse(tokens, [==[[=[[[]]]=]]==])
     local case = case()
@@ -258,7 +258,7 @@ do -- long string with "nested" long string
 end -- long string
 
 do -- long string edge cases
-    local luatokens = require "luatokens"
+    local luatokens = require "cratera.luatokens"
     local tokens = luatokens.defs
     local state, err, etoken, estate = parser.parse(tokens, "[==[]=]==][==[]]==][=[] ]=][[\n]][[\n ]]")
     local case = case()
@@ -286,7 +286,7 @@ do -- long string edge cases
 end -- long string
 
 do -- keywords
-    local luatokens = require "luatokens"
+    local luatokens = require "cratera.luatokens"
     local tokens = luatokens.defs
     local state, err, etoken, estate = parser.parse(tokens, [[
      and       break     do        else      elseif    end
@@ -330,7 +330,7 @@ do -- keywords
 end -- keywords
 
 do -- "other tokens"
-    local luatokens = require "luatokens"
+    local luatokens = require "cratera.luatokens"
     local tokens = luatokens.defs
     local state, err, etoken, estate = parser.parse(tokens, [[
      +     -     *     /     %     ^     #
@@ -386,7 +386,7 @@ do -- "other tokens"
 end -- "other tokens"
 
 do -- long comments
-    local luatokens = require "luatokens"
+    local luatokens = require "cratera.luatokens"
     local tokens = luatokens.defs
     local state, err, etoken, estate = parser.parse(tokens, [==[--[[
       
@@ -406,7 +406,7 @@ do -- long comments
 end -- long comments
 
 do -- numbers
-    local luatokens = require "luatokens"
+    local luatokens = require "cratera.luatokens"
     local tokens = luatokens.defs
     local state, err, etoken, estate = parser.parse(tokens, [[
      3   345   0xff   0xBEBADA
@@ -453,8 +453,8 @@ do -- numbers
 end -- numbers
 
 do -- FUCK
-    local luatokens = require "luatokens"
-    local luatokens_file = io.open("./luatokens.lua", "r")
+    local luatokens = require "cratera.luatokens"
+    local luatokens_file = io.open("./cratera/luatokens.lua", "r")
     local tokens = luatokens.defs
     local state, err, etoken, estate = parser.parse(tokens, function() return luatokens_file:read(8192) end)
     local case = case()