FeynmanTech

CLX

Mar 19th, 2015
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.58 KB | None | 0 0
  1.  
  2. --# Main
  3. -- CL Parser
  4.  
  5. src = {}
  6. src.factorial = [[
  7. function factorial : num, cval {
  8. if $cval ~= 0 {
  9. if $num <= 1 {
  10. return $cval;
  11. } else {
  12. return factorial($num - 1, $cval * $num);
  13. };
  14. } else {
  15. return factorial($num - 1, $num);
  16. };
  17. };
  18. print(factorial(10,0));
  19. ]]
  20.  
  21. src.errors = [[
  22. $nd += 1;
  23.  
  24. $nd = 1;
  25. $nd += "test";
  26.  
  27. $str = "string";
  28. $str++;
  29. ]]
  30. src.typetest = [[
  31. type number : $value=0 {
  32. @mult : $num {
  33. return $value * $num;
  34. };
  35. @add : $num {
  36. return $value + $num;
  37. };
  38. @get : null {
  39. return $value;
  40. };
  41. };
  42. ##doesn't work yet
  43. type logger : $t=0 {
  44. @print : $title, $val {
  45. print($title, $t, $val);
  46. };
  47. };
  48.  
  49. new logger: disp(": ");
  50. logger > print("title", "val);
  51.  
  52. new number:zero();
  53. print "0*10: " .. @zero>mult(10);
  54.  
  55. new number : three(3);
  56. print "3*6: " .. @three>mult(6);
  57. print "3+10: " .. @three > add (10);
  58.  
  59. print "Value of @three: " .. @three > get();
  60. ]]
  61.  
  62. -- Use this function to perform your initial setup
  63. function setup()
  64. local t = os.clock()
  65. parse(src.typetest)
  66. end
  67.  
  68. -- This function gets called once every frame
  69. function draw()
  70. -- This sets a dark background color
  71. background(40, 40, 50)
  72.  
  73. -- This sets the line thickness
  74. strokeWidth(5)
  75.  
  76. -- Do your drawing here
  77.  
  78. end
  79.  
  80.  
  81. --# StrOps
  82. function getArgsFromString(argStr)
  83. local args = {}
  84. local aPos, aCount, aCurrent, aLevel, aLChar = 1, 1, "", 0, ""
  85. local aChars = {["("] = ")", ["{"] = "}"}
  86. local aStr = ""
  87. --print(argStr)
  88. while aPos <= #argStr do
  89. local cc = argStr:sub(aPos, aPos)
  90. aStr = aStr .. cc .. ": level " .. aLevel .. ", end " .. aLChar .. "\n"
  91. if cc == "(" or cc == "{" then
  92. aLevel = aLevel + 1
  93. aLChar = aChars[cc]
  94. aCurrent = aCurrent .. cc
  95. elseif cc == aLChar then
  96. aLevel = aLevel - 1
  97. aCurrent = aCurrent .. cc
  98. aLChar = ""
  99. elseif (cc == "," and aLevel == 0) or aPos >= #argStr then
  100. if aPos >= #argStr and cc ~= "," then
  101. aCurrent = aCurrent .. cc
  102. end
  103. table.insert(args, aCurrent)
  104. --print("Arg: ", aCurrent)
  105. aCurrent = ""
  106. aPos = aPos + 1
  107. else
  108. aCurrent = aCurrent .. cc
  109. end
  110. --print(cc)
  111. aPos = aPos + 1
  112. end
  113. return args
  114. end
  115.  
  116. --# Parse
  117. function trim(s)
  118. return (tostring(s):gsub("^%s*(.-)%s*$", "%1"))
  119. end
  120.  
  121. local key, proc, rank = {}, {}, {}
  122.  
  123. local vars = {}
  124.  
  125. local types = {}
  126.  
  127. local objects = {}
  128.  
  129. -- for $varname : start, end, step { statement; };
  130. key["for"] = "for%s-%$(%S+)%s-:%s-([^,]-),%s-([^,{]-),%s-([^{]-)%s-(%b{});"
  131. proc["for"] = function(lvars, var, start, stop, step, src)
  132. lvars[var] = start
  133. while tonumber(lvars[var]) <= tonumber(stop) do
  134. parse(src:sub(2, -2), lvars)
  135. lvars[var] = lvars[var] + eval(step, lvars)
  136. end
  137. end
  138. rank["for"] = 0
  139. -- while conditions { statement; };
  140. key["while"] = "while%s-([^{]-)%s-(%b{});"
  141. proc["while"] = function(lvars, conditions, src)
  142. --lvars[var] = start
  143. while isTrue(conditions, lvars) do
  144. parse(src:sub(2, -2), lvars)
  145. end
  146. end
  147. rank["while"] = 0
  148.  
  149. -- if conditions { statement; };
  150. key["if"] = "if%s-([^{]-)%s-(%b{});"
  151. proc["if"] = function(lvars, conditions, src)
  152. --lvars[var] = start
  153. if isTrue(conditions, lvars) then
  154. parse(src:sub(2, -2), lvars)
  155. end
  156. end
  157. rank["if"] = 0
  158.  
  159. key["if.-{.-}%s-else%s-%b{}"] = "if%s-([^{]-)%s-(%b{})%s-else%s-(%b{});"
  160. proc["if.-{.-}%s-else%s-%b{}"] = function(lvars, conditions, src, src2)
  161. --lvars[var] = start
  162. if isTrue(conditions, lvars) then
  163. parse(src:sub(2, -2), lvars)
  164. else
  165. parse(src2:sub(2, -2), lvars)
  166. end
  167. end
  168. rank["if.-{.-}%s-else%s-%b{}"] = 1
  169.  
  170. key["if.-{.-}%s-elseif"] = "if%s-([^{]-)%s-(%b{})%s-(elseif%s-[^}]+%s-%b{}.-;~)"
  171. proc["if.-{.-}%s-elseif"] = function(lvars, conditions, src, chunk2)
  172. --lvars[var] = start
  173. if isTrue(conditions, lvars) then
  174. parse(src:sub(2, -2), lvars)
  175. else
  176. parse(chunk2:sub(5, -1), lvars)
  177. end
  178. end
  179. rank["if.-{.-}%s-elseif"] = 2
  180.  
  181. key["return"] = "return(.-);"
  182. proc["return"] = function(lvars, args)
  183. --print("Returning...")
  184. args = trim(args)
  185. --[[
  186. _RETURN = ""
  187. for arg in args:gmatch("([^,]-),") do
  188. _RETURN = eval(arg, lvars)
  189. end
  190. --]]
  191. _RETURN = eval(args, lvars)
  192. --print(_RETURN)
  193. end
  194. rank["return"] = 0
  195.  
  196. key["print"] = "print%s+(.-);"
  197. proc["print"] = function(lvars, stuff)
  198. stuff = "," .. stuff .. ","
  199. for v in stuff:gmatch(",%s-(.-),") do
  200. print(eval(v, lvars))
  201. end
  202. end
  203. rank["print"] = 2
  204.  
  205. --[[
  206. EXAMPLE TYPEDEF:
  207. local name = {}
  208. name.__src = {}
  209. name.__run = {}
  210. name.__src.method1 = {"$arg1, $arg2"}
  211. name.__run.method1 = function(arg1, arg2) end
  212. name.__args = "$parameter1=def_val"
  213. name.__vars = {}
  214. name.__vars.parameter1 = "def_val"
  215. types[tn] = name
  216. --]]
  217. key["type"] = "type%s+(%S-)%s-:%s-([^{]-)%s-(%b{});"
  218. proc["type"]= function(lvars, name, vars, src)
  219. local t = {}
  220. t.__methods = {}
  221. t.__src = {}
  222. t.__vars = {}
  223. t.__args = vars
  224. t.__run = {}
  225. for v in (vars..","):gmatch("([^,]+)%s-,") do
  226. t.__vars[v:match("(%w+)%s-=%s-[^,+]")] = v:match("%w+%s-=%s-([^,-])")
  227. end
  228. for method, args, body in src:gmatch("@(%w+)%s-:%s-([^{]+)(%b{});") do
  229. t.__src[method] = {args, body:sub(2,-2)}
  230. t.__run[method] = function(self, arg) parse(self.__src[method][2], arg) end
  231. end
  232. types[name] = t
  233. end
  234. rank.typedef = 2
  235.  
  236. key["new"] = "new%s+([%w_]+)%s-:%s-([%w_]+)%s-(%b());"
  237. proc["new"] = function(lvars, t, name, args)
  238. if types[t] then
  239. objects[name] = types[t]
  240. local arg = getArgsFromString(args:sub(2,-2))
  241. local a = 1
  242. for av in types[t].__args:gmatch("([%w_]+)") do
  243. arg[av] = arg[a]
  244. --print(av, arg[a])
  245. a = a + 1
  246. end
  247. for i, v in pairs(arg) do
  248. objects[name].__vars[i] = v
  249. end
  250. objects[name].__type = t
  251. else
  252. clError("new " .. t .. ":" .. name .. args, "Use of undeclared type " .. t)
  253. end
  254. end
  255.  
  256. --@name>method(args);
  257. --@[%w_]+%s-%>%s-[%w_]+%s-%b();
  258. key["%@%s-[%w_]+%s->%s-[%w_]+%s-%b()"] = "%@%s-([%w_]+)%s->%s-([%w_]+)%s-(%b())"
  259. proc["%@%s-[%w_]+%s->%s-[%w_]+%s-%b()"] = function(lvars, obj, method, args)
  260. if objects[obj] and objects[obj].__src[method] then
  261. local arg = getArgsFromString(args:sub(2,-2))
  262. local a = 1
  263. for i, v in ipairs(arg) do
  264. arg[i] = eval(v, lvars)
  265. --print(i, v)
  266. end
  267. for av in objects[obj].__src[method][1]:gmatch("([%w_]+)") do
  268. arg[av] = eval(arg[a], lvars)
  269. --print(av, arg[a])
  270. a = a + 1
  271. end
  272. for i, v in pairs(objects[obj].__vars) do
  273. arg[i] = eval(v, lvars)
  274. end
  275. objects[obj].__run[method](objects[obj], arg)
  276. elseif objects[obj] and not objects[obj].__src[method] then
  277. clError(
  278. obj..">"..method..args,
  279. "Attempt to call undefined method "..method.." of "..objects[obj].__type.." "..obj
  280. )
  281. else
  282. clError(obj..">"..method..args, "Attempt to call method "..method.." of null object")
  283. end
  284. end
  285. rank["%@%s-[%w_]+%s->%s-[%w_]+%s-%b()"] = 2
  286.  
  287. function runMethod(str, lvars)
  288. _RETURN = nil
  289. parse(str, lvars)
  290. return _RETURN
  291. end
  292.  
  293. local ops, opProc = {}, {}
  294.  
  295. ops["="] = "$([%w_]+)%s-=%s-([^;]+);"
  296. opProc["="] = function(lvars, var, val)
  297. vars[var] = eval(val, lvars)
  298. end
  299.  
  300. ops["+="] = "$([%w_]+)%s-%+%s-=%s-([^;]+);"
  301. opProc["+="] = function(lvars, var, val)
  302. if not vars[var] then
  303. clError("$"..var.."+="..val, "Operation on undefined variable "..var)
  304. return
  305. end
  306. local res = eval(val, lvars)
  307. if not(tonumber(res)) then
  308. clError("$"..var.."+="..val, "Operation on numeric $" .. var .. " using non-numeric value")
  309. return
  310. end
  311. vars[var] = vars[var] + eval(val, lvars)
  312. end
  313.  
  314. ops["++"] = "$([%w_]+)%s-%+%s-%+%s-;"
  315. opProc["++"] = function(lvars, var, val)
  316. if not vars[var] then
  317. clError("$"..var.."++", "Operation on undefined variable "..var)
  318. return
  319. elseif not tonumber(vars[var]) then
  320. clError("$"..var.."++", "Numeric operation on variable "..var .. " of non-numeric type " .. type(vars[var]))
  321. return
  322. end
  323. vars[var] = vars[var] + 1
  324. end
  325.  
  326. ops["-="] = "$([%w_]+)%s-%-%s-=%s-([^;]+);"
  327. opProc["-="] = function(lvars, var, val)
  328. if not vars[var] then
  329. clError("$"..var.."-="..val, "Operation on undefined variable "..var)
  330. return
  331. elseif not tonumber(vars[var]) then
  332. clError("$"..var.."+="..val, "Numeric operation on variable "..var .. " of non-numeric type " .. type(vars[var]))
  333. return
  334. end
  335. local res = eval(val, lvars)
  336. if not(tonumber(res)) then
  337. clError("$"..var.."-="..val, "Operation on numeric $" .. var .. " using non-numeric value")
  338. return
  339. end
  340. vars[var] = vars[var] + eval(val, lvars)
  341. end
  342.  
  343. ops["--"] = "$([%w_]+)%s-%-%s-%-%s-;"
  344. opProc["--"] = function(lvars, var, val)
  345. if not vars[var] then
  346. clError("$"..var.."--", "Operation on undefined variable "..var)
  347. return
  348. elseif not tonumber(vars[var]) then
  349. clError("$"..var.."++", "Numeric operation on variable "..var .. " of non-numeric type " .. type(vars[var]))
  350. return
  351. end
  352. vars[var] = vars[var] - 1
  353. end
  354.  
  355. ops[".="] = "$([%w_]+)%s-%.%s-=%s-([^;]+);"
  356. opProc[".="] = function(lvars, var, val)
  357. if not vars[var] then
  358. clError("$"..var..".="..val, "Operation on undefined variable "..var)
  359. return
  360. end
  361. vars[var] = tostring(vars[var]) .. tostring(eval(val, lvars))
  362. end
  363.  
  364. --[[
  365. local preProc, preFunc = {}, {}
  366. preProc.def = "def%s-(%S+)%s+([^\n]+)"
  367. preFunc.def = function(src, n, v)
  368. return src:gsub("@" .. n, v)
  369. end
  370. ]]
  371.  
  372. local func = {}
  373. _RETURNSTACK ={}
  374.  
  375. key["function"] = "function%s-(%w-)%s-:%s-(.-)(%b{});"
  376. proc["function"] = function(lvars, name, args, src)
  377. --print("Defining function " .. name)
  378. local s = "return function("
  379. args = trim(args:gsub("%s", "") .. ",")
  380. local a = {}
  381. for arg in args:gmatch("([^,]-),") do
  382. --s = s .. arg .. ","
  383. table.insert(a, arg)
  384. end
  385. s = s .. table.concat(a, ",") .. ")\nlocal lvars = {}\n"
  386. for i, v in ipairs(a) do
  387. s = s .. "lvars['" .. v .. "']=" .. v .. "\n"
  388. end
  389. s = s .. "parse([[" .. src:sub(2, -2) .. "]], lvars)\n return _RETURN end"
  390. --print(s)
  391. local f, err = loadstring(s)
  392. if f then
  393. func[name] = f()
  394. --print(name, func[name])
  395. else
  396. print(err)
  397. end
  398. end
  399.  
  400. func.print = function(lvars, ...)
  401. local t = {}
  402. for i, v in ipairs{...} do
  403. table.insert(t, eval(v, lvars))
  404. end
  405. print(unpack(t))
  406. end
  407.  
  408. func.set = function(lvars, name, val)
  409. vars[name] = val
  410. end
  411.  
  412. func.lua = function(lvars, s) return loadstring(s:gsub("vars", "({...})[1]"))(vars) end
  413.  
  414. getFunc = function(n)
  415. --print(n, func[n])
  416. return func[n]
  417. end
  418.  
  419. CL_LOC = ""
  420.  
  421. function clError(loc, msg)
  422. print('Error: ' .. loc .. '\n' .. msg)
  423. end
  424.  
  425. function eval(statement, lvars)
  426. statement = tostring(statement)
  427. lvars = lvars or {}
  428. local value
  429. for i, v in pairs(lvars) do
  430. statement = statement:gsub("%$" .. tostring(i), trim(v))
  431. end
  432. for i, v in pairs(vars) do
  433. statement = statement:gsub("%$" .. tostring(i), trim(v))
  434. end
  435. --[[
  436. string.gsub(statement, "([%w_]+)%s-(%b%(%))", function(active, argStr)
  437. local args = {}
  438. for arg in argStr:gmatch("([^,]-),") do
  439. arg = trim(arg)
  440. arg = eval(arg, lvars) or arg
  441. table.insert(args, arg)
  442. end
  443. if func[active] then
  444. local r = func[active](unpack(args))
  445. return r or ""
  446. end
  447. end)
  448. --]]
  449. statement = statement:gsub("(%@%s-[%w_]+%s->%s-[%w_]+%s-%b())", "runMethod[[%1]]")
  450. for i, v in pairs(func) do
  451. statement = string.gsub(statement, i.."%s-(%b())", "(getFunc('"..i.."))%1")
  452. end
  453. local f, err = loadstring("return " .. statement)
  454. local s, val = pcall(f)
  455. if not err then value = val or statement else value = statement end
  456. return value
  457. end
  458.  
  459. function isTrue(statement, lvars)
  460. statement = tostring(statement)
  461. lvars = lvars or {}
  462. local value
  463. for i, v in pairs(lvars) do
  464. statement = statement:gsub("%$" .. tostring(i), trim(v))
  465. end
  466. for i, v in pairs(vars) do
  467. statement = statement:gsub("%$" .. tostring(i), trim(v))
  468. end
  469. statement = statement:gsub("([%w_]-)%s-(%b%(%))", function(active, argStr)
  470. local args = {}
  471. for arg in argStr:gmatch("([^,]-),") do
  472. arg = trim(arg)
  473. arg = eval(arg, lvars) or arg
  474. table.insert(args, arg)
  475. end
  476. local r = func[active](unpack(args))
  477. return r or ""
  478. end)
  479. local f, err = loadstring("return " .. statement)
  480. if not err then value = f() else value = statement end
  481. return value, err
  482. end
  483.  
  484. function parse(str, lvars)
  485. --[[
  486. for i, v in pairs(preProc) do
  487. --print(preFunc[i])
  488. str = str:gsub(v, preFunc[i])
  489. end
  490. --]]
  491. lvars = lvars or {}
  492. while str:match(" ") do
  493. str = str:gsub(" ", " ")
  494. end
  495. str = str:gsub("%[#.-#%]", "")
  496. str = str:gsub("##.-\n", "")
  497. local pos = 0
  498. local p = true
  499. while (pos < #str) and p do
  500. local active = str:sub(pos, str:find("[^%w_]", pos) -1)
  501. if str:sub(pos, pos+1):find("%s") then
  502. pos = pos + 1
  503. elseif str:sub(pos, pos) == "$" then
  504. for i, v in pairs(ops) do
  505. if str:find(v, pos) == pos then
  506. local opStr = trim(str:sub(pos, str:find(";", pos + 1)))
  507. opProc[i](lvars, opStr:match(ops[i]))
  508. pos = str:find(";", pos + 1)
  509. end
  510. end
  511. elseif key[active] and str:find(key[active], pos-1) == pos then
  512. local b, e = str:find(key[active], pos-1)
  513. proc[active](lvars or {}, str:match(key[active], pos-1))
  514. pos = pos + e - b
  515. elseif func[active] then
  516. local argStr = (str:match("%b()", pos):sub(2, -2) .. ","):gsub(",%s+", ",")
  517. --[=[
  518. local args = {}
  519. local aPos, aCount, aCurrent, aLevel, aLChar = 1, 1, "", 0, ""
  520. local aChars = {["("] = ")", ["{"] = "}"}
  521. --[[
  522. for arg in argStr:gmatch("([^,]-),") do
  523. arg = trim(arg)
  524. arg = eval(arg, lvars) or arg
  525. table.insert(args, arg)
  526. end
  527. --[
  528. --]]
  529. local aStr = ""
  530. --print(argStr)
  531. while aPos <= #argStr do
  532. local cc = argStr:sub(aPos, aPos)
  533. aStr = aStr .. cc .. ": level " .. aLevel .. ", end " .. aLChar .. "\n"
  534. if cc == "(" or cc == "{" then
  535. aLevel = aLevel + 1
  536. aLChar = aChars[cc]
  537. aCurrent = aCurrent .. cc
  538. elseif cc == aLChar then
  539. aLevel = aLevel - 1
  540. aCurrent = aCurrent .. cc
  541. aLChar = ""
  542. elseif cc == "," and aLevel == 0 then
  543. table.insert(args, aCurrent)
  544. --print("Arg: ", aCurrent)
  545. aCurrent = ""
  546. aPos = aPos + 1
  547. else
  548. aCurrent = aCurrent .. cc
  549. end
  550. --print(cc)
  551. aPos = aPos + 1
  552.  
  553. end
  554. --print(aStr)
  555. --print(table.concat(args, "; "))
  556. --]=]
  557. local args = getArgsFromString(argStr)
  558. func[active](lvars, unpack(args))
  559. pos = str:find("%)%s-;", pos+1) + 1
  560. else
  561. local r, match = -1, ""
  562. for i, v in pairs(key) do
  563. local b, e = str:find(v, pos-1)
  564. if (b == pos) and e then
  565. if rank[i] > r then
  566. r = rank[i]
  567. match = i
  568. end
  569. end
  570. end
  571. if r == -1 then
  572. pos = pos + 1
  573. else
  574. --print("match")
  575. local b, e = str:find(key[match], pos-1)
  576. proc[match](lvars or {}, str:match(key[match], pos-1))
  577. pos = pos + e - b
  578. match = true
  579. end
  580. end
  581. --[[
  582. _LOG = (_LOG or "") .. str:sub(1, pos-1) .. "#" .. str:sub(pos+1, -1) .. "\n" .. ("-"):rep(50) .. "\n"
  583. saveProjectTab("Log", "--[=[" .. _LOG .. "--]=]")
  584. --]]
  585. end
  586. end
  587.  
  588. --[[
  589. local LuaChunk = {}
  590. LuaChunk.__src = {}
  591. LuaChunk.__run = {}
  592. LuaChunk.__src.run = {"$arg1"}
  593. LuaChunk.__run.run = function(self, arg1) print(arg1[1], self.__vars.parameter1) end
  594. LuaChunk.__args = "$parameter1=def_val"
  595. LuaChunk.__vars = {}
  596. LuaChunk.__vars.parameter1 = "def_val"
  597. types["LuaChunk"] = LuaChunk
  598. --]]
  599. --# Log
  600. --[=[#nd += 1;
  601.  
  602. $nd = 1;
  603. $nd += "test";
  604.  
  605. $str = "string";
  606. $str++;
  607.  
  608. new not_type : test ("type_args");
  609.  
  610. typedef testType : $testvar {
  611. @printstuff : none {
  612. print($testvar);
  613. };
  614. };
  615. new testType:typetest(10);
  616. @testType>printstuff();
  617. @stuff > stuff(stuff);
  618.  
  619. --------------------------------------------------
  620. $nd += 1#
  621.  
  622. $nd = 1;
  623. $nd += "test";
  624.  
  625. $str = "string";
  626. $str++;
  627.  
  628. new not_type : test ("type_args");
  629.  
  630. typedef testType : $testvar {
  631. @printstuff : none {
  632. print($testvar);
  633. };
  634. };
  635. new testType:typetest(10);
  636. @testType>printstuff();
  637. @stuff > stuff(stuff);
  638.  
  639. --------------------------------------------------
  640. $nd += 1;#
  641. $nd = 1;
  642. $nd += "test";
  643.  
  644. $str = "string";
  645. $str++;
  646.  
  647. new not_type : test ("type_args");
  648.  
  649. typedef testType : $testvar {
  650. @printstuff : none {
  651. print($testvar);
  652. };
  653. };
  654. new testType:typetest(10);
  655. @testType>printstuff();
  656. @stuff > stuff(stuff);
  657.  
  658. --------------------------------------------------
  659. $nd += 1;
  660. #
  661. $nd = 1;
  662. $nd += "test";
  663.  
  664. $str = "string";
  665. $str++;
  666.  
  667. new not_type : test ("type_args");
  668.  
  669. typedef testType : $testvar {
  670. @printstuff : none {
  671. print($testvar);
  672. };
  673. };ł
  674. new testType:typetest(10);
  675. @testType>printstuff();
  676. @stuff > stuff(stuff);
  677.  
  678. --------------------------------------------------
  679. $nd += 1;
  680. #$nd = 1;
  681. $nd += "test";
  682.  
  683. $str = "string";
  684. $str++;
  685.  
  686. new not_type : test ("type_args");
  687.  
  688. typedef testType : $testvar {
  689. @printstuff : none {
  690. print($testvar);
  691. };
  692. };
  693. new testType:typetest(10);
  694. @testType>printstuff();
  695. @stuff > stuff(stuff);
  696.  
  697. --------------------------------------------------
  698. $nd += 1;
  699.  
  700. #nd = 1;
  701. $nd += "test";
  702.  
  703. $str = "string";
  704. $str++;
  705.  
  706. new not_type : test ("type_args");
  707.  
  708. typedef testType : $testvar {
  709. @printstuff : none {
  710. print($testvar);
  711. };
  712. };
  713. new testType:typetest(10);
  714. @testType>printstuff();
  715. @stuff > stuff(stuff);
  716.  
  717. --------------------------------------------------
  718. $nd += 1;
  719.  
  720. $nd = 1#
  721. $nd += "test";
  722.  
  723. $str = "string";
  724. $str++;
  725.  
  726. new not_type : test ("type_args");
  727.  
  728. typedef testType : $testvar {
  729. @printstuff : none {
  730. print($testvar);
  731. };
  732. };
  733. new testType:typetest(10);
  734. @testType>printstuff();
  735. @stuff > stuff(stuff);
  736.  
  737. --------------------------------------------------
  738. $nd += 1;
  739.  
  740. $nd = 1;#$nd += "test";
  741.  
  742. $str = "string";
  743. $str++;
  744.  
  745. new not_type : test ("type_args");
  746.  
  747. typedef testType : $testvar {
  748. @printstuff : none {
  749. print($testvar);
  750. };
  751. };
  752. new testType:typetest(10);
  753. @testType>printstuff();
  754. @stuff > stuff(stuff);
  755.  
  756. --------------------------------------------------
  757. $nd += 1;
  758.  
  759. $nd = 1;
  760. #nd += "test";
  761.  
  762. $str = "string";
  763. $str++;
  764.  
  765. new not_type : test ("type_args");
  766.  
  767. typedef testType : $testvar {
  768. @printstuff : none {
  769. print($testvar);
  770. };
  771. };
  772. new testType:typetest(10);
  773. @testType>printstuff();
  774. @stuff > stuff(stuff);
  775.  
  776. --------------------------------------------------
  777. $nd += 1;
  778.  
  779. $nd = 1;
  780. $nd += "test"#
  781.  
  782. $str = "string";
  783. $str++;
  784.  
  785. new not_type : test ("type_args");
  786.  
  787. typedef testType : $testvar {
  788. @printstuff : none {
  789. print($testvar);
  790. };
  791. };
  792. new testType:typetest(10);
  793. @testType>printstuff();
  794. @stuff > stuff(stuff);
  795.  
  796. --------------------------------------------------
  797. $nd += 1;
  798.  
  799. $nd = 1;
  800. $nd += "test";#
  801. $str = "string";
  802. $str++;
  803.  
  804. new not_type : test ("type_args");
  805.  
  806. typedef testType : $testvar {
  807. @printstuff : none {
  808. print($testvar);
  809. };
  810. };
  811. new testType:typetest(10);
  812. @testType>printstuff();
  813. @stuff > stuff(stuff);
  814.  
  815. --------------------------------------------------
  816. $nd += 1;
  817.  
  818. $nd = 1;
  819. $nd += "test";
  820. #
  821. $str = "string";
  822. $str++;
  823.  
  824. new not_type : test ("type_args");
  825.  
  826. typedef testType : $testvar {
  827. @printstuff : none {
  828. print($testvar);
  829. };
  830. };
  831. new testType:typetest(10);
  832. @testType>printstuff();
  833. @stuff > stuff(stuff);
  834.  
  835. --------------------------------------------------
  836. $nd += 1;
  837.  
  838. $nd = 1;
  839. $nd += "test";
  840. #$str = "string";
  841. $str++;
  842.  
  843. new not_type : test ("type_args");
  844.  
  845. typedef testType : $testvar {
  846. @printstuff : none {
  847. print($testvar);
  848. };
  849. };
  850. new testType:typetest(10);
  851. @testType>printstuff();
  852. @stuff > stuff(stuff);
  853.  
  854. --------------------------------------------------
  855. $nd += 1;
  856.  
  857. $nd = 1;
  858. $nd += "test";
  859.  
  860. #str = "string";
  861. $str++;
  862.  
  863. new not_type : test ("type_args");
  864.  
  865. typedef testType : $testvar {
  866. @printstuff : none {
  867. print($testvar);
  868. };
  869. };
  870. new testType:typetest(10);
  871. @testType>printstuff();
  872. @stuff > stuff(stuff);
  873.  
  874. --------------------------------------------------
  875. $nd += 1;
  876.  
  877. $nd = 1;
  878. $nd += "test";
  879.  
  880. $str = "string"#
  881. $str++;
  882.  
  883. new not_type : test ("type_args");
  884.  
  885. typedef testType : $testvar {
  886. @printstuff : none {
  887. print($testvar);
  888. };
  889. };
  890. new testType:typetest(10);
  891. @testType>printstuff();
  892. @stuff > stuff(stuff);
  893.  
  894. --------------------------------------------------
  895. $nd += 1;
  896.  
  897. $nd = 1;
  898. $nd += "test";
  899.  
  900. $str = "string";#$str++;
  901.  
  902. new not_type : test ("type_args");
  903.  
  904. typedef testType : $testvar {
  905. @printstuff : none {
  906. print($testvar);
  907. };
  908. };
  909. new testType:typetest(10);
  910. @testType>printstuff();
  911. @stuff > stuff(stuff);
  912.  
  913. --------------------------------------------------
  914. $nd += 1;
  915.  
  916. $nd = 1;
  917. $nd += "test";
  918.  
  919. $str = "string";
  920. #str++;
  921.  
  922. new not_type : test ("type_args");
  923.  
  924. typedef testType : $testvar {
  925. @printstuff : none {
  926. print($testvar);
  927. };
  928. };
  929. new testType:typetest(10);
  930. @testType>printstuff();
  931. @stuff > stuff(stuff);
  932.  
  933. --------------------------------------------------
  934. $nd += 1;
  935.  
  936. $nd = 1;
  937. $nd += "test";
  938.  
  939. $str = "string";
  940. $str++#
  941.  
  942. new not_type : test ("type_args");
  943.  
  944. typedef testType : $testvar {
  945. @printstuff : none {
  946. print($testvar);
  947. };
  948. };
  949. new testType:typetest(10);
  950. @testType>printstuff();
  951. @stuff > stuff(stuff);
  952.  
  953. --------------------------------------------------
  954. $nd += 1;
  955.  
  956. $nd = 1;
  957. $nd += "test";
  958.  
  959. $str = "string";
  960. $str++;#
  961. new not_type : test ("type_args");
  962.  
  963. typedef testType : $testvar {
  964. @printstuff : none {
  965. print($testvar);
  966. };
  967. };
  968. new testType:typetest(10);
  969. @testType>printstuff();
  970. @stuff > stuff(stuff);
  971.  
  972. --------------------------------------------------
  973. $nd += 1;
  974.  
  975. $nd = 1;
  976. $nd += "test";
  977.  
  978. $str = "string";
  979. $str++;
  980. #new not_type : test ("type_args");
  981.  
  982. typedef testType : $testvar {
  983. @printstuff : none {
  984. print($testvar);
  985. };
  986. };
  987. new testType:typetest(10);
  988. @testType>printstuff();
  989. @stuff > stuff(stuff);
  990.  
  991. --------------------------------------------------
  992. $nd += 1;
  993.  
  994. $nd = 1;
  995. $nd += "test";
  996.  
  997. $str = "string";
  998. $str++;
  999.  
  1000. #ew not_type : test ("type_args");
  1001.  
  1002. typedef testType : $testvar {
  1003. @printstuff : none {
  1004. print($testvar);
  1005. };
  1006. };
  1007. new testType:typetest(10);
  1008. @testType>printstuff();
  1009. @stuff > stuff(stuff);
  1010.  
  1011. --------------------------------------------------
  1012. $nd += 1;
  1013.  
  1014. $nd = 1;
  1015. $nd += "test";
  1016.  
  1017. $str = "string";
  1018. $str++;
  1019.  
  1020. new not_type : test ("type_args")#
  1021.  
  1022. typedef testType : $testvar {
  1023. @printstuff : none {
  1024. print($testvar);
  1025. };
  1026. };
  1027. new testType:typetest(10);
  1028. @testType>printstuff();
  1029. @stuff > stuff(stuff);
  1030.  
  1031. --------------------------------------------------
  1032. $nd += 1;
  1033.  
  1034. $nd = 1;
  1035. $nd += "test";
  1036.  
  1037. $str = "string";
  1038. $str++;
  1039.  
  1040. new not_type : test ("type_args");#
  1041. typedef testType : $testvar {
  1042. @printstuff : none {
  1043. print($testvar);
  1044. };
  1045. };
  1046. new testType:typetest(10);
  1047. @testType>printstuff();
  1048. @stuff > stuff(stuff);
  1049.  
  1050. --------------------------------------------------
  1051. $nd += 1;
  1052.  
  1053. $nd = 1;
  1054. $nd += "test";
  1055.  
  1056. $str = "string";
  1057. $str++;
  1058.  
  1059. new not_type : test ("type_args");
  1060. #typedef testType : $testvar {
  1061. @printstuff : none {
  1062. print($testvar);
  1063. };
  1064. };
  1065. new testType:typetest(10);
  1066. @testType>printstuff();
  1067. @stuff > stuff(stuff);
  1068.  
  1069. --------------------------------------------------
  1070. $nd += 1;
  1071.  
  1072. $nd = 1;
  1073. $nd += "test";
  1074.  
  1075. $str = "string";
  1076. $str++;
  1077.  
  1078. new not_type : test ("type_args");
  1079.  
  1080. #ypedef testType : $testvar {
  1081. @printstuff : none {
  1082. print($testvar);
  1083. };
  1084. };
  1085. new testType:typetest(10);
  1086. @testType>printstuff();
  1087. @stuff > stuff(stuff);
  1088.  
  1089. --------------------------------------------------
  1090. $nd += 1;
  1091.  
  1092. $nd = 1;
  1093. $nd += "test";
  1094.  
  1095. $str = "string";
  1096. $str++;
  1097.  
  1098. new not_type : test ("type_args");
  1099.  
  1100. t#pedef testType : $testvar {
  1101. @printstuff : none {
  1102. print($testvar);
  1103. };
  1104. };
  1105. new testType:typetest(10);
  1106. @testType>printstuff();
  1107. @stuff > stuff(stuff);
  1108.  
  1109. --------------------------------------------------
  1110. $nd += 1;
  1111.  
  1112. $nd = 1;
  1113. $nd += "test";
  1114.  
  1115. $str = "string";
  1116. $str++;
  1117.  
  1118. new not_type : test ("type_args");
  1119.  
  1120. ty#edef testType : $testvar {
  1121. @printstuff : none {
  1122. print($testvar);
  1123. };
  1124. };
  1125. new testType:typetest(10);
  1126. @testType>printstuff();
  1127. @stuff > stuff(stuff);
  1128.  
  1129. --------------------------------------------------
  1130. $nd += 1;
  1131.  
  1132. $nd = 1;
  1133. $nd += "test";
  1134.  
  1135. $str = "string";
  1136. $str++;
  1137.  
  1138. new not_type : test ("type_args");
  1139.  
  1140. typ#def testType : $testvar {
  1141. @printstuff : none {
  1142. print($testvar);
  1143. };
  1144. };
  1145. new testType:typetest(10);
  1146. @testType>printstuff();
  1147. @stuff > stuff(stuff);
  1148.  
  1149. --------------------------------------------------
  1150. $nd += 1;
  1151.  
  1152. $nd = 1;
  1153. $nd += "test";
  1154.  
  1155. $str = "string";
  1156. $str++;
  1157.  
  1158. new not_type : test ("type_args");
  1159.  
  1160. type#ef testType : $testvar {
  1161. @printstuff : none {
  1162. print($testvar);
  1163. };
  1164. };
  1165. new testType:typetest(10);
  1166. @testType>printstuff();
  1167. @stuff > stuff(stuff);
  1168.  
  1169. --------------------------------------------------
  1170. $nd += 1;
  1171.  
  1172. $nd = 1;
  1173. $nd += "test";
  1174.  
  1175. $str = "string";
  1176. $str++;
  1177.  
  1178. new not_type : test ("type_args");
  1179.  
  1180. typed#f testType : $testvar {
  1181. @printstuff : none {
  1182. print($testvar);
  1183. };
  1184. };
  1185. new testType:typetest(10);
  1186. @testType>printstuff();
  1187. @stuff > stuff(stuff);
  1188.  
  1189. --------------------------------------------------
  1190. $nd += 1;
  1191.  
  1192. $nd = 1;
  1193. $nd += "test";
  1194.  
  1195. $str = "string";
  1196. $str++;
  1197.  
  1198. new not_type : test ("type_args");
  1199.  
  1200. typede# testType : $testvar {
  1201. @printstuff : none {
  1202. print($testvar);
  1203. };
  1204. };
  1205. new testType:typetest(10);
  1206. @testType>printstuff();
  1207. @stuff > stuff(stuff);
  1208.  
  1209. --------------------------------------------------
  1210. $nd += 1;
  1211.  
  1212. $nd = 1;
  1213. $nd += "test";
  1214.  
  1215. $str = "string";
  1216. $str++;
  1217.  
  1218. new not_type : test ("type_args");
  1219.  
  1220. typedef#testType : $testvar {
  1221. @printstuff : none {
  1222. print($testvar);
  1223. };
  1224. };
  1225. new testType:typetest(10);
  1226. @testType>printstuff();
  1227. @stuff > stuff(stuff);
  1228.  
  1229. --------------------------------------------------
  1230. $nd += 1;
  1231.  
  1232. $nd = 1;
  1233. $nd += "test";
  1234.  
  1235. $str = "string";
  1236. $str++;
  1237.  
  1238. new not_type : test ("type_args");
  1239.  
  1240. typedef #estType : $testvar {
  1241. @printstuff : none {
  1242. print($testvar);
  1243. };
  1244. };
  1245. new testType:typetest(10);
  1246. @testType>printstuff();
  1247. @stuff > stuff(stuff);
  1248.  
  1249. --------------------------------------------------
  1250. $nd += 1;
  1251.  
  1252. $nd = 1;
  1253. $nd += "test";
  1254.  
  1255. $str = "string";
  1256. $str++;
  1257.  
  1258. new not_type : test ("type_args");
  1259.  
  1260. typedef t#stType : $testvar {
  1261. @printstuff : none {
  1262. print($testvar);
  1263. };
  1264. };
  1265. new testType:typetest(10);
  1266. @testType>printstuff();
  1267. @stuff > stuff(stuff);
  1268.  
  1269. --------------------------------------------------
  1270. $nd += 1;
  1271.  
  1272. $nd = 1;
  1273. $nd += "test";
  1274.  
  1275. $str = "string";
  1276. $str++;
  1277.  
  1278. new not_type : test ("type_args");
  1279.  
  1280. typedef te#tType : $testvar {
  1281. @printstuff : none {
  1282. print($testvar);
  1283. };
  1284. };
  1285. new testType:typetest(10);
  1286. @testType>printstuff();
  1287. @stuff > stuff(stuff);
  1288.  
  1289. --------------------------------------------------
  1290. $nd += 1;
  1291.  
  1292. $nd = 1;
  1293. $nd += "test";
  1294.  
  1295. $str = "string";
  1296. $str++;
  1297.  
  1298. new not_type : test ("type_args");
  1299.  
  1300. typedef tes#Type : $testvar {
  1301. @printstuff : none {
  1302. print($testvar);
  1303. };
  1304. };
  1305. new testType:typetest(10);
  1306. @testType>printstuff();
  1307. @stuff > stuff(stuff);
  1308.  
  1309. --------------------------------------------------
  1310. $nd += 1;
  1311.  
  1312. $nd = 1;
  1313. $nd += "test";
  1314.  
  1315. $str = "string";
  1316. $str++;
  1317.  
  1318. new not_type : test ("type_args");
  1319.  
  1320. typedef test#ype : $testvar {
  1321. @printstuff : none {
  1322. print($testvar);
  1323. };
  1324. };
  1325. new testType:typetest(10);
  1326. @testType>printstuff();
  1327. @stuff > stuff(stuff);
  1328.  
  1329. --------------------------------------------------
  1330. $nd += 1;
  1331.  
  1332. $nd = 1;
  1333. $nd += "test";
  1334.  
  1335. $str = "string";
  1336. $str++;
  1337.  
  1338. new not_type : test ("type_args");
  1339.  
  1340. typedef testT#pe : $testvar {
  1341. @printstuff : none {
  1342. print($testvar);
  1343. };
  1344. };
  1345. new testType:typetest(10);
  1346. @testType>printstuff();
  1347. @stuff > stuff(stuff);
  1348.  
  1349. --------------------------------------------------
  1350. $nd += 1;
  1351.  
  1352. $nd = 1;
  1353. $nd += "test";
  1354.  
  1355. $str = "string";
  1356. $str++;
  1357.  
  1358. new not_type : test ("type_args");
  1359.  
  1360. typedef testTy#e : $testvar {
  1361. @printstuff : none {
  1362. print($testvar);
  1363. };
  1364. };
  1365. new testType:typetest(10);
  1366. @testType>printstuff();
  1367. @stuff > stuff(stuff);
  1368.  
  1369. --------------------------------------------------
  1370. $nd += 1;
  1371.  
  1372. $nd = 1;
  1373. $nd += "test";
  1374.  
  1375. $str = "string";
  1376. $str++;
  1377.  
  1378. new not_type : test ("type_args");
  1379.  
  1380. typedef testTyp# : $testvar {
  1381. @printstuff : none {
  1382. print($testvar);
  1383. };
  1384. };
  1385. new testType:typetest(10);
  1386. @testType>printstuff();
  1387. @stuff > stuff(stuff);
  1388.  
  1389. --------------------------------------------------
  1390. $nd += 1;
  1391.  
  1392. $nd = 1;
  1393. $nd += "test";
  1394.  
  1395. $str = "string";
  1396. $str++;
  1397.  
  1398. new not_type : test ("type_args");
  1399.  
  1400. typedef testType#: $testvar {
  1401. @printstuff : none {
  1402. print($testvar);
  1403. };
  1404. };
  1405. new testType:typetest(10);
  1406. @testType>printstuff();
  1407. @stuff > stuff(stuff);
  1408.  
  1409. --------------------------------------------------
  1410. $nd += 1;
  1411.  
  1412. $nd = 1;
  1413. $nd += "test";
  1414.  
  1415. $str = "string";
  1416. $str++;
  1417.  
  1418. new not_type : test ("type_args");
  1419.  
  1420. typedef testType # $testvar {
  1421. @printstuff : none {
  1422. print($testvar);
  1423. };
  1424. };
  1425. new testType:typetest(10);
  1426. @testType>printstuff();
  1427. @stuff > stuff(stuff);
  1428.  
  1429. --------------------------------------------------
  1430. --]=]
Advertisement
Add Comment
Please, Sign In to add comment