language

Some fools attempt at an interpreted language
Log | Files | Refs

commit 5697d91cdc11f8af8bbba5d817e38e2c0aaf2b1d
parent e35b2ed9a0cdad6df2f4c2860ac4c237c674ec3f
Author: Paul Longtine <paullongtine@gmail.com>
Date:   Thu Apr  7 22:00:28 2016

More progress. Added two new instructions and revised instruction set

Diffstat:
 doc/SPECIFICATION            |  81 ++++++++++++------------
 src/lc/bytecode.py           |   8 ++-
 src/lc/interpreter.py        | 150 +++++++++++++++++++++++++++++++++++---------
 src/lc/lexer.py              |   3 +-
 src/lc/main.py               |   4 +-
 src/lc/memonic.py            |  68 ++++++++++++++++++++-
 src/lc/parser.py             |  95 +++++++++++++++++++---------
 src/lc/test_files/testing.ti |  14 +---
 src/vm/inc/ins_def.h         |   2 +-
 src/vm/inc/ins_mdata.h       |  20 +++---
 src/vm/src/ins_def.c         |  32 +++++++--
 11 files changed, 356 insertions(+), 121 deletions(-)

diff --git a/doc/SPECIFICATION b/doc/SPECIFICATION @@ -21,14 +21,15 @@ are deemed inferior. 3 PLIST - Parameter list 4 FUNC - Function 5 OBJECT - Object/Class - 6 G_INT - Generic integer - 7 G_FLOAT - Generic double - 8 G_CHAR - Generic character - 9 G_STR - Generic string -10 S_ARRAY - Static array -11 D_ARRAY - Dynamic array -12 H_TABLE - Hashtable -13 G_FIFO - Stack + 6 G_PTR - Generic pointer + 7 G_INT - Generic integer + 8 G_FLOAT - Generic double + 9 G_CHAR - Generic character +10 G_STR - Generic string +11 S_ARRAY - Static array +12 D_ARRAY - Dynamic array +13 H_TABLE - Hashtable +14 G_FIFO - Stack RUNTIME @@ -175,6 +176,7 @@ OPCODE SPEC -------------------------------------------------------------------------------- Keywords: TOS - 'Top Of Stack' The top element + TBI - 'To be Implemented' S<[variable]> - Static Arguement. N<[variable]> - Name. A<[variable]> - Address Arguement. @@ -204,9 +206,8 @@ Hex | Memnonic | arguments - description Types are in the air at this moment. I'll detail what types there are when the time comes ------------------------------------------------------------------------------- -30 TYPEOF - returns type structure on TOS - (used for comparing types) -31 CAST S<type> - Tries to cast TOS to <type> +30 TYPEOF - pushes type of TOS on to the stack TBI +31 CAST S<type> - Tries to cast TOS to <type> TBI ------------------------------------------------------------------------------- 4 - Binary Ops OPS take the two top elements of the stack, preform an operation and push @@ -216,18 +217,18 @@ the result on the stack. 41 SUB - subtracts 42 MULT - multiplies 43 DIV - divides -44 POW - power, TOS^TOS1 -45 BRT - base root, TOS root TOS1 -46 SIN - sine -47 COS - cosine -48 TAN - tangent -49 ISIN - inverse sine -4A ICOS - inverse consine -4B ITAN - inverse tangent -4C MOD - modulus -4D OR - or's -4E XOR - xor's -4F NAND - and's +44 POW - power, TOS^TOS1 TBI +45 BRT - base root, TOS root TOS1 TBI +46 SIN - sine TBI +47 COS - cosine TBI +48 TAN - tangent TBI +49 ISIN - inverse sine TBI +4A ICOS - inverse consine TBI +4B ITAN - inverse tangent TBI +4C MOD - modulus TBI +4D OR - or's TBI +4E XOR - xor's TBI +4F NAND - and's TBI ------------------------------------------------------------------------------- 5 - Conditional Expressions @@ -258,27 +259,27 @@ to TOS 72 IFDO - If TOS is TRUE, do until done, if not, jump to done 73 ELSE - Chained with an IFDO statement, if IFDO fails, execute ELSE block until DONE is reached. +74 JTR - jump-to-return. TBI +75 JTE - jump-to-error. Error object on TOS TBI +7D ERR - Start error block, uses TOS to evaluate error TBI 7E DONE - End of block 7F CALL N<ref> - Calls function, pushes return value on to STACK. ------------------------------------------------------------------------------- -8 - Manipulating High-order Object Variables +8 - Generic object interface For arrays, key-value arrays, etc ------------------------------------------------------------------------------- -80 PUSH - Push TOS on to TOS1, expects TOS1 to be an object hat - supports the scheme. +80 PUSH N<ref> - Call 'push' method of <ref> TBI -81 DEL - Delete element in structure at TOS (assumes index of - sorts) for <ref> object. +81 DEL N<ref> - Call 'delete' method of <ref> TBI -82 GET - Gets key, TOS must be a keyed datastructure, and TOS1 must be - a string that is a key in TOS. +82 GET N<ref> - Call 'get' method of <ref> TBI -83 GETP N<ref> - Get property of <ref> in object contained in TOS. pushes - to stack +83 GETP N<ref> - Get property of <ref> in object contained in TOS. pushes TBI + to stack -84 CALLM N<ref> - Call method of <ref> in object contained in TOS. Uses - arguement stack +84 CALLM N<ref> - Call method of <ref> in object contained in TOS. Uses TBI + arguement stack ------------------------------------------------------------------------------- F - Functions/classes ------------------------------------------------------------------------------- @@ -286,26 +287,26 @@ FF DEFUN N<ref> S<type> D<args> - Un-funs everything. no, no- it defines a function. D<ref> is its name, S<type> is the return value, D<args> is the args. -FE DECLASS N<ref> D<args> - Defines a class. +FE DECLASS N<ref> D<args> - Defines a class. TBI -F1 NEW N<ref> - Instantiates class +F1 NEW N<ref> - Instantiates class TBI F0 RETURN - Returns from function ------------------------------------------------------------------------------- 0 - SPECIAL BYTES ------------------------------------------------------------------------------- -00 NULL - Terminator byte +00 NULL - -01 SYNC S<level> - Updates global namespace with global namespace cache of +01 SYNC S<level> - Updates global namespace with global namespace cache of TBI current thread -02 PRINT - Prints whatever is on the TOS. +02 PRINT - Prints whatever is on the TOS. TBI 03 FREE - Pops & Deletes TOS 0E ARGB - Builds arguement stack -0F LIBC A<ref> - Library call +0F LIBC A<ref> - Library call TBI _______________________________________________________________________________ COMPILER/TRANSLATOR/ASSEMBLER SHINDIGS diff --git a/src/lc/bytecode.py b/src/lc/bytecode.py @@ -0,0 +1,8 @@ +class FunctionCall(): + def __init__(self, label, arguements): + self.label = label + self.arguements = arguements + +class IntegerConstant(): + def __init__(self, value): + self.value = int(value[0][0]) diff --git a/src/lc/interpreter.py b/src/lc/interpreter.py @@ -1,4 +1,30 @@ from parser import * +from lexer import * +from bytecode import * +from memonic import * + +def token_split(tokenstring, esc_chars, split_chars, include_splitter=True): + tokens = [] + tmp = [] + capturing = False + for x in tokenstring: + if x in esc_chars[0]: + capturing = esc_chars[0].index(x) + tmp.append(x) + elif x in esc_chars[1]: + if esc_chars[1][capturing] == x: + capturing = False + tmp.append(x) + elif include_splitter or not x in split_chars or capturing: + tmp.append(x) + + if x in split_chars and not capturing: + tokens.append(tmp) + tmp = [] + if len(tmp) > 0: + tokens.append(tmp) + + return tokens class AbstractToken(): def __init__(self, interpreter_instance, raw_data): @@ -16,32 +42,16 @@ class AbstractToken(): class Label(AbstractToken): def update(self): - pass + self.expr.append(self.data) def action(self): pass class Arguements(AbstractToken): def update(self): - tokens = [] - tmp = [] - capturing = False - esc_chars = [["[", "("], ["]", ")"]] - for x in self.data[1:-1]: - if x in esc_chars[0]: - capturing = esc_chars[0].index(x) - tmp.append(x) - elif x in esc_chars[1]: - if esc_chars[1][capturing] == x: - capturing = False - tmp.append(x) - elif x != ",": - tmp.append(x) - - if x == "," and not capturing: - tokens.append(tmp) - tmp = [] - tokens.append(tmp) + tokens = token_split(self.data[1:-1], + [["[", "("], ["]", ")"]], + [","], include_splitter = False) for t in tokens: self.expr.append(Expression(self.i, t)) @@ -52,8 +62,17 @@ class Arguements(AbstractToken): class Type(AbstractToken): def update(self): - pass - + n = None + for x, t in enumerate(self.i.p.defined_types): + r = t.match(self.data, 0) + if r[0]: + n = x + + if n == None: + print("INVALID TYPE") + + self.expr.append(n) + def action(self): pass @@ -64,8 +83,8 @@ class Parameters(AbstractToken): if x != "(" and x != ")" and x != ",": tmp.append(x) elif x == "," or x == ")": - t = Type(self.i, tmp[0]) - l = Label(self.i, tmp[1]) + t = Type(self.i, tmp[:-1]) + l = Label(self.i, tmp[1:]) self.expr.append([t, l]) tmp = [] @@ -74,8 +93,83 @@ class Parameters(AbstractToken): class Expression(AbstractToken): def update(self): - pass - + self.func_call = Statement( + "func_call", + expression=[ + self.i.p.label_def, + self.i.p.paramlist_def, + ], + init=(lambda x,y: FunctionCall(Label(x,y[0]), + Arguements(x,y[1]))) + ) + self.integer = Statement( + "integer", + expression=[ + self.i.p.int_def + ], + init=(lambda x,y: IntegerConstant(y)) + ) + self.label = Statement( + "label", + expression=[ + self.i.p.label_def + ], + init=(lambda x,y: Label(x, y)) + ) + + self.identifiers = [ + self.func_call, + self.integer, + self.label + ] + + self.operators = [ + ["+", OP_ADD], + ["-", OP_SUB], + ["*", OP_MULT], + ["/", OP_DIV], + ["==", OP_EQ], + [">", OP_GTHAN], + ["<", OP_LTHAN], + [">=", OP_GTHAN_EQ], + ["=<", OP_LTHAN_EQ] + ] + self.operator_names = map(lambda x: x[0], self.operators) + + self.group_char = [["[", "("], ["]", ")"]] + + t = token_split(self.data, + self.group_char, + self.operator_names) + + if len(t) == 0: + t = self.data + + subexpr = [] + for n,x in enumerate(t): + if x[-1] in self.operator_names: + subexpr.append( + self.operators[ self.operator_names.index(x[-1]) ][1]) + d = x[:-1] + else: + d = x + + if d[0] == "(": + subexpr.append(Expression(self.i, d[1:-1])) + else: + for o in self.identifiers: + r = o.match(d) + if r: + subexpr.append(o.action(self.i, r)) + if len(subexpr) == 3: + self.expr.append(subexpr) + self.subexpr = [] + + if len(subexpr) > 0: + self.expr.append(subexpr) + + print(self.expr) + def action(self): pass @@ -93,10 +187,6 @@ class Interpreter(): for self.line in self.program: self.line.append(self.line[0].action(self)) - def loop_until_ready(self): - for self.line in self.program: - self.line[2].action() - def eval_label(self, index): return(Label(self, self.line[1][index][0])) diff --git a/src/lc/lexer.py b/src/lc/lexer.py @@ -2,6 +2,7 @@ import re class AtomicSymbol(): def __init__(self, symbol): + self.raw = symbol self.symbol = re.compile(symbol) def match(self, tokenstring, index): @@ -112,6 +113,8 @@ class Statement(): rv = [] index = 0 for e in self.expr: + if index >= len(tokenstring): + return False r = e.match(tokenstring, index) if r[0]: rv.append(r[1]) diff --git a/src/lc/main.py b/src/lc/main.py @@ -3,3 +3,7 @@ if __name__ == "__main__": import sys t = Interpreter(sys.argv[1]) + for l in t.program: + for e in l[2]: + #print("{} : {}".format(e, e.expr)) + pass diff --git a/src/lc/memonic.py b/src/lc/memonic.py @@ -0,0 +1,68 @@ +OP_NULL = 0x00 +OP_SYNC = 0x01 +OP_PRINT = 0x02 +OP_ARGB = 0x0E +OP_LIBC = 0x0F + +OP_POP = 0x10 +OP_ROT = 0x11 +OP_DUP = 0x12 +OP_ROT_THREE = 0x13 + +OP_DEC = 0x20 +OP_LOV = 0x21 +OP_STV = 0x22 +OP_CTV = 0x23 +OP_CTS = 0x24 + +OP_TYPEOF = 0x30 +OP_CAST = 0x31 + +OP_ADD = 0x40 +OP_SUB = 0x41 +OP_MULT = 0x42 +OP_DIV = 0x43 +OP_POW = 0x44 +OP_BRT = 0x45 +OP_SIN = 0x46 +OP_COS = 0x47 +OP_TAN = 0x48 +OP_ISIN = 0x49 +OP_ICOS = 0x4A +OP_ITAN = 0x4B +OP_MOD = 0x4C +OP_BOR = 0x4D +OP_BXOR = 0x4E +OP_BNAND = 0x4F + +OP_GTHAN = 0x50 +OP_LTHAN = 0x51 +OP_GTHAN_EQ = 0x52 +OP_LTHAN_EQ = 0x53 +OP_EQ = 0x54 +OP_NOT = 0x55 +OP_OR = 0x56 +OP_AND = 0x57 + +OP_STARTL = 0x60 +OP_CLOOP = 0x61 +OP_BREAK = 0x62 +OP_ENDL = 0x63 + +OP_GOTO = 0x70 +OP_JUMPF = 0x71 +OP_IFDO = 0x72 +OP_ELSE = 0x73 +OP_DONE = 0x7E +OP_CALL = 0x7F + +OP_PUSH = 0x80 +OP_DEL = 0x81 +OP_GET = 0x82 +OP_GETP = 0x83 +OP_CALLM = 0x84 + +OP_RETURN = 0xF0 +OP_NEW = 0xF1 +OP_DECLASS = 0xFE +OP_DEFUN = 0xFF diff --git a/src/lc/parser.py b/src/lc/parser.py @@ -1,5 +1,4 @@ from lexer import * - class Parser(): def __init__(self, file_name): self.splitters = [ @@ -12,6 +11,10 @@ class Parser(): "{", "}", ",", + "\+", + "\-", + "\*", + "\/", " " ] self.end_statements = [ @@ -30,14 +33,23 @@ class Parser(): ] self.defined_types = [ + "void", + "_addr", + "_type", + "_plist", + "_sub", + "object", "int", "float", + "char", + "string", + "s_array", "array", - "object", - "ptr" + "hashtable", + "stack" ] - self.number_def = AtomicSymbol("[0-9]+") + self.int_def = AtomicSymbol("[0-9]+") self.type_def = InclusiveSymbol(self.defined_types) self.label_def = ExclusiveSymbol(self.defined_types + @@ -50,7 +62,7 @@ class Parser(): self.expr_def = PolySymbol( [ self.label_def, - self.number_def, + self.int_def, AtomicSymbol("\("), AtomicSymbol("\)"), AtomicSymbol("\+"), @@ -69,22 +81,23 @@ class Parser(): AtomicSymbol(":") ]) - self.active_tokens = [ - Statement( + self.statement_codeblock_begin = Statement( "codeblock_begin", expression=[ AtomicSymbol("{") ], init=(lambda x: []) - ), - Statement( + ) + + self.statement_codeblock_end = Statement( "codeblock_end", expression=[ AtomicSymbol("}") ], init=(lambda x: []) - ), - Statement( + ) + + self.statement_if = Statement( "if", expression=[ AtomicSymbol("if"), @@ -92,16 +105,18 @@ class Parser(): AtomicSymbol(":") ], init=(lambda x: [x.eval_expr(1)]) - ), - Statement( + ) + + self.statement_else = Statement( "else", expression=[ AtomicSymbol("else"), AtomicSymbol(":") ], init=(lambda x: []) - ), - Statement( + ) + + self.statement_for = Statement( "for", expression=[ AtomicSymbol("for"), @@ -109,8 +124,9 @@ class Parser(): AtomicSymbol(":") ], init=(lambda x: [x.eval_expr(1)]) - ), - Statement( + ) + + self.statement_while = Statement( "while", expression=[ AtomicSymbol("while"), @@ -118,14 +134,16 @@ class Parser(): AtomicSymbol(":") ], init=(lambda x: [x.eval_expr(1)]) - ), - Statement( + ) + + self.statement_func = Statement( "function", expression=[ AtomicSymbol("func"), self.label_def, self.paramlist_def, - AtomicSymbol("->"), + AtomicSymbol("-"), + AtomicSymbol(">"), self.type_def, AtomicSymbol(":") ], @@ -133,10 +151,11 @@ class Parser(): lambda x: [ x.eval_label(1), x.eval_param(2), - x.eval_type(4) + x.eval_type(5) ]) - ), - Statement( + ) + + self.statement_inst = Statement( "instantiation", expression=[ self.type_def, @@ -150,8 +169,9 @@ class Parser(): x.eval_label(1), x.eval_expr(3) ]) - ), - Statement( + ) + + self.statement_assign = Statement( "assignment", expression=[ self.label_def, @@ -163,8 +183,9 @@ class Parser(): x.eval_label(0), x.eval_expr(2) ]) - ), - Statement( + ) + + self.statement_call = Statement( "func_call", expression=[ self.label_def, @@ -175,8 +196,9 @@ class Parser(): x.eval_label(0), x.eval_args(1) ]) - ), - Statement( + ) + + self.statement_expression = Statement( "expression", expression=[ self.expr_def, @@ -184,6 +206,19 @@ class Parser(): ], init=(lambda x: [x.eval_expr(0)]) ) + + self.active_tokens = [ + self.statement_codeblock_begin, + self.statement_codeblock_end, + self.statement_if, + self.statement_else, + self.statement_for, + self.statement_while, + self.statement_func, + self.statement_inst, + self.statement_assign, + self.statement_call, + self.statement_expression ] data="" with open(file_name, 'r') as program: @@ -197,7 +232,7 @@ class Parser(): def get_statements(self): rv = [] - for l in self.lines: + for num, l in enumerate(self.lines): for a in self.active_tokens: r = a.match(l) if r: diff --git a/src/lc/test_files/testing.ti b/src/lc/test_files/testing.ti @@ -1,4 +1,4 @@ -func some_important_function (int x, int y, int z) -> int: +func test (int x, int y, int z) -> int: { int c = (x * y) + z; if c > 3: @@ -10,18 +10,14 @@ func some_important_function (int x, int y, int z) -> int: int x = 3; -array y = [ "Symbols suck", 32, "I know, right?" ]; +string y = "strings"; if x == 3: { print("Potatoes are good for \"the\" soul."); } -for x in test(y): -{ - print(x); -} - -some_important_function(3, 4, some_important_function(2, 3)); +int z = test(3, test(2*3, 2, 6), 1 * 2); -test(test()); +print(y); +print(z); diff --git a/src/vm/inc/ins_def.h b/src/vm/inc/ins_def.h @@ -72,6 +72,8 @@ void _ins_def_BNAND (rt_t*, bc_cont*); void _ins_def_GTHAN (rt_t*, bc_cont*); void _ins_def_LTHAN (rt_t*, bc_cont*); +void _ins_def_GTHAN_EQ (rt_t*, bc_cont*); +void _ins_def_LTHAN_EQ (rt_t*, bc_cont*); void _ins_def_EQ (rt_t*, bc_cont*); void _ins_def_NOT (rt_t*, bc_cont*); void _ins_def_OR (rt_t*, bc_cont*); diff --git a/src/vm/inc/ins_mdata.h b/src/vm/inc/ins_mdata.h @@ -61,10 +61,12 @@ \ /* GTHAN */ INS_MDATA[0x50] = encode(0, A_BYTE, A_BYTE, A_BYTE); \ /* LTHAN */ INS_MDATA[0x51] = encode(0, A_BYTE, A_BYTE, A_BYTE); \ -/* EQ */ INS_MDATA[0x52] = encode(0, A_BYTE, A_BYTE, A_BYTE); \ -/* NOT */ INS_MDATA[0x53] = encode(0, A_BYTE, A_BYTE, A_BYTE); \ -/* OR */ INS_MDATA[0x54] = encode(0, A_BYTE, A_BYTE, A_BYTE); \ -/* AND */ INS_MDATA[0x55] = encode(0, A_BYTE, A_BYTE, A_BYTE); \ +/* G_THAN_EQ */ INS_MDATA[0x52] = encode(0, A_BYTE, A_BYTE, A_BYTE); \ +/* G_LHAN_EQ */ INS_MDATA[0x53] = encode(0, A_BYTE, A_BYTE, A_BYTE); \ +/* EQ */ INS_MDATA[0x54] = encode(0, A_BYTE, A_BYTE, A_BYTE); \ +/* NOT */ INS_MDATA[0x55] = encode(0, A_BYTE, A_BYTE, A_BYTE); \ +/* OR */ INS_MDATA[0x56] = encode(0, A_BYTE, A_BYTE, A_BYTE); \ +/* AND */ INS_MDATA[0x57] = encode(0, A_BYTE, A_BYTE, A_BYTE); \ \ /* STARTL */ INS_MDATA[0x60] = encode(0, A_BYTE, A_BYTE, A_BYTE); \ /* CLOOP */ INS_MDATA[0x61] = encode(0, A_BYTE, A_BYTE, A_BYTE); \ @@ -138,10 +140,12 @@ \ /* GTHAN */ INS_ADATA[0x50] = encode(0, BTOI, BTOI, BTOI); \ /* LTHAN */ INS_ADATA[0x51] = encode(0, BTOI, BTOI, BTOI); \ -/* EQ */ INS_ADATA[0x52] = encode(0, BTOI, BTOI, BTOI); \ -/* NOT */ INS_ADATA[0x53] = encode(0, BTOI, BTOI, BTOI); \ -/* OR */ INS_ADATA[0x54] = encode(0, BTOI, BTOI, BTOI); \ -/* AND */ INS_ADATA[0x55] = encode(0, BTOI, BTOI, BTOI); \ +/* G_THAN_EQ */ INS_ADATA[0x52] = encode(0, BTOI, BTOI, BTOI); \ +/* G_LHAN_EQ */ INS_ADATA[0x53] = encode(0, BTOI, BTOI, BTOI); \ +/* EQ */ INS_ADATA[0x54] = encode(0, BTOI, BTOI, BTOI); \ +/* NOT */ INS_ADATA[0x55] = encode(0, BTOI, BTOI, BTOI); \ +/* OR */ INS_ADATA[0x56] = encode(0, BTOI, BTOI, BTOI); \ +/* AND */ INS_ADATA[0x57] = encode(0, BTOI, BTOI, BTOI); \ \ /* STARTL */ INS_ADATA[0x60] = encode(0, BTOI, BTOI, BTOI); \ /* CLOOP */ INS_ADATA[0x61] = encode(0, BTOI, BTOI, BTOI); \ diff --git a/src/vm/src/ins_def.c b/src/vm/src/ins_def.c @@ -56,10 +56,12 @@ void init_ins_def( void ) INS_DEF[0x50] = _ins_def_GTHAN; INS_DEF[0x51] = _ins_def_LTHAN; - INS_DEF[0x52] = _ins_def_EQ; - INS_DEF[0x53] = _ins_def_NOT; - INS_DEF[0x54] = _ins_def_OR; - INS_DEF[0x55] = _ins_def_AND; + INS_DEF[0x51] = _ins_def_GTHAN_EQ; + INS_DEF[0x52] = _ins_def_LTHAN_EQ; + INS_DEF[0x53] = _ins_def_EQ; + INS_DEF[0x54] = _ins_def_NOT; + INS_DEF[0x55] = _ins_def_OR; + INS_DEF[0x56] = _ins_def_AND; INS_DEF[0x60] = _ins_def_STARTL; INS_DEF[0x61] = _ins_def_CLOOP; @@ -355,6 +357,28 @@ void _ins_def_LTHAN (rt_t* ctx, bc_cont* line) pc_inc(ctx->pc, 1); } +void _ins_def_GTHAN_EQ (rt_t* ctx, bc_cont* line) +{ + var_cont* A = stk_pop(ctx->stack); + var_cont* B = stk_pop(ctx->stack); + + var_cont* C = (var_gthan(A, B) || var_eq(A, B)); + + stk_push(ctx->stack, C); + + pc_inc(ctx->pc, 1); +} +void _ins_def_LTHAN_EQ (rt_t* ctx, bc_cont* line) +{ + var_cont* A = stk_pop(ctx->stack); + var_cont* B = stk_pop(ctx->stack); + + var_cont* C = (var_lthan(A, B) || var_eq(A, B)); + + stk_push(ctx->stack, C); + + pc_inc(ctx->pc, 1); +} void _ins_def_EQ (rt_t* ctx, bc_cont* line) { var_cont* A = stk_pop(ctx->stack);