--- byo run-tests: yaks/TEST.sh test-hello (nvalue.List items: [ (nvalue.Symbol s:module) (nvalue.Symbol s:hello) (nvalue.List items: [ (nvalue.Symbol s:func) (nvalue.Symbol s:main) (nvalue.List items: [ (nvalue.Symbol s:"=>") (nvalue.List items: [ (nvalue.List items: [ (nvalue.Symbol s:argv) (nvalue.List items: [(nvalue.Symbol s:List) (nvalue.Symbol s:Str)] ) ] ) ] ) (nvalue.Symbol s:Int) ] ) (nvalue.List items: [(nvalue.Symbol s:call) (nvalue.Symbol s:print) (nvalue.Str s:hello)] ) (nvalue.List items:[(nvalue.Symbol s:return) (nvalue.Int i:42)]) ] ) ] ) (Program main_module: foo modules: [ (Module name: hello defs: [ (mod_def.Func name: main sig: (Signature params:[(NameType name:argv typ:(ktype.List T:(ktype__Str)))] return_type:(ktype__Int)) statements: [(stmt.Return e:(Int i:42 loc:(Token path:path chunk:chunk start:0 length:3)))] ) ] ) ] ) #include "mycpp/runtime.h" namespace hello { int main(List* argv) { return 42; } } // namespace hello OK test-hello-cpp [1/48] make-pystub _bin/shwrap/consts_gen frontend/consts_gen.py _devbuild/gen/hnode_asdl.py _devbuild/gen/types_asdl.py asdl/ast.py asdl/gen_cpp.py asdl/pybase.py asdl/runtime.py asdl/util.py asdl/visitor.py frontend/builtin_def.py frontend/id_kind_def.py frontend/option_def.py mycpp/mops.py mycpp/mylib.py pylib/collections_.py [2/48] make-pystub _bin/shwrap/optview_gen core/optview_gen.py frontend/option_def.py [3/48] make-pystub _bin/shwrap/option_gen frontend/option_gen.py asdl/ast.py frontend/builtin_def.py frontend/option_def.py [4/48] make-pystub _bin/shwrap/asdl_main asdl/asdl_main.py asdl/ast.py asdl/front_end.py asdl/gen_cpp.py asdl/gen_python.py asdl/util.py asdl/visitor.py [5/48] make-pystub _bin/shwrap/mycpp_main mycpp/mycpp_main.py mycpp/ir_pass.py mycpp/const_pass.py mycpp/cppgen_pass.py mycpp/crash.py mycpp/debug_pass.py mycpp/control_flow_pass.py mycpp/format_strings.py mycpp/pass_state.py mycpp/util.py mycpp/visitor.py [6/48] optview_gen > _gen/core/optview.h [7/48] consts_gen cpp _gen/frontend/id_kind.asdl [8/48] consts_gen cpp-consts _gen/frontend/consts [9/48] asdl_main cpp --no-pretty-print-methods asdl/hnode.asdl _gen/asdl/hnode.asdl _gen/asdl/hnode.asdl_debug.py [10/48] asdl_main cpp data_lang/nil8.asdl _gen/data_lang/nil8.asdl _gen/data_lang/nil8.asdl_debug.py [11/48] asdl_main cpp core/value.asdl _gen/core/value.asdl _gen/core/value.asdl_debug.py [12/48] asdl_main cpp core/runtime.asdl _gen/core/runtime.asdl _gen/core/runtime.asdl_debug.py [13/48] cxx opt '' mycpp/bump_leak_heap.cc _build/obj/cxx-opt/mycpp/bump_leak_heap.o [14/48] consts_gen cpp _gen/frontend/option.asdl [15/48] asdl_main cpp display/pretty.asdl _gen/display/pretty.asdl _gen/display/pretty.asdl_debug.py [16/48] asdl_main cpp --no-pretty-print-methods frontend/types.asdl _gen/frontend/types.asdl _gen/frontend/types.asdl_debug.py [17/48] asdl_main cpp yaks/yaks.asdl _gen/yaks/yaks.asdl _gen/yaks/yaks.asdl_debug.py [18/48] asdl_main cpp frontend/syntax.asdl _gen/frontend/syntax.asdl _gen/frontend/syntax.asdl_debug.py [19/48] cxx opt '' mycpp/gc_mops.cc _build/obj/cxx-opt/mycpp/gc_mops.o [20/48] cxx opt '' _gen/frontend/id_kind.asdl.cc _build/obj/cxx-opt/_gen/frontend/id_kind.asdl.o [21/48] cxx opt '' mycpp/gc_builtins.cc _build/obj/cxx-opt/mycpp/gc_builtins.o [22/48] cxx opt '' _gen/display/pretty.asdl.cc _build/obj/cxx-opt/_gen/display/pretty.asdl.o [23/48] cxx opt '' cpp/data_lang.cc _build/obj/cxx-opt/cpp/data_lang.o [24/48] cxx opt '' mycpp/gc_mylib.cc _build/obj/cxx-opt/mycpp/gc_mylib.o [25/48] cxx opt '' mycpp/hash.cc _build/obj/cxx-opt/mycpp/hash.o [26/48] cxx opt '' _gen/core/runtime.asdl.cc _build/obj/cxx-opt/_gen/core/runtime.asdl.o [27/48] cxx asan '' mycpp/bump_leak_heap.cc _build/obj/cxx-asan/mycpp/bump_leak_heap.o [28/48] cxx opt '' mycpp/mark_sweep_heap.cc _build/obj/cxx-opt/mycpp/mark_sweep_heap.o [29/48] cxx asan '' mycpp/gc_builtins.cc _build/obj/cxx-asan/mycpp/gc_builtins.o [30/48] cxx opt '' _gen/core/value.asdl.cc _build/obj/cxx-opt/_gen/core/value.asdl.o [31/48] cxx asan '' mycpp/gc_mops.cc _build/obj/cxx-asan/mycpp/gc_mops.o [32/48] cxx asan '' mycpp/gc_mylib.cc _build/obj/cxx-asan/mycpp/gc_mylib.o [33/48] cxx asan '' mycpp/hash.cc _build/obj/cxx-asan/mycpp/hash.o [34/48] cxx asan '' mycpp/mark_sweep_heap.cc _build/obj/cxx-asan/mycpp/mark_sweep_heap.o [35/48] cxx opt '' _gen/data_lang/nil8.asdl.cc _build/obj/cxx-opt/_gen/data_lang/nil8.asdl.o [36/48] cxx opt '' cpp/frontend_match.cc _build/obj/cxx-opt/cpp/frontend_match.o [37/48] cxx opt '' _gen/frontend/consts.cc _build/obj/cxx-opt/_gen/frontend/consts.o [38/48] cxx opt '' _gen/frontend/syntax.asdl.cc _build/obj/cxx-opt/_gen/frontend/syntax.asdl.o [39/48] cxx opt '' _gen/yaks/yaks.asdl.cc _build/obj/cxx-opt/_gen/yaks/yaks.asdl.o [40/48] cxx asan '' mycpp/gc_str.cc _build/obj/cxx-asan/mycpp/gc_str.o [41/48] cxx opt '' mycpp/gc_str.cc _build/obj/cxx-opt/mycpp/gc_str.o [42/48] gen-oils-for-unix yaks_main _gen/yaks/yaks_main.mycpp yaks/preamble.h asdl/format.py asdl/runtime.py core/error.py core/num.py data_lang/j8.py data_lang/j8_lite.py display/ansi.py display/pretty.py pylib/cgi.py yaks/gen_cpp.py yaks/transform.py yaks/yaks_main.py mycpp: LOADING asdl/format.py asdl/runtime.py core/error.py core/num.py data_lang/j8.py data_lang/j8_lite.py display/ansi.py display/pretty.py pylib/cgi.py yaks/gen_cpp.py yaks/transform.py yaks/yaks_main.py mycpp pass: IR mycpp pass: CONST mycpp pass: FORWARD DECL mycpp pass: PROTOTYPES mycpp pass: CONTROL FLOW mycpp pass: IMPL [43/48] cxx opt '' _gen/yaks/yaks_main.mycpp.cc _build/obj/cxx-opt/_gen/yaks/yaks_main.mycpp.o _gen/yaks/yaks_main.mycpp.cc: In member function 'void format::_PrettyPrinter::PrintNode(hnode_asdl::hnode_t*, format::ColorOutput*, int)': _gen/yaks/yaks_main.mycpp.cc:1418:24: warning: unused variable 'node' [-Wunused-variable] hnode::External* node = static_cast(UP_node); ^~~~ _gen/yaks/yaks_main.mycpp.cc: In function 'bool format::_TrySingleLine(hnode_asdl::hnode_t*, format::ColorOutput*, int)': _gen/yaks/yaks_main.mycpp.cc:1506:24: warning: unused variable 'node' [-Wunused-variable] hnode::External* node = static_cast(UP_node); ^~~~ _gen/yaks/yaks_main.mycpp.cc: In member function 'void j8::InstancePrinter::_PrintSparseArray(value_asdl::value::SparseArray*, int)': _gen/yaks/yaks_main.mycpp.cc:2053:8: warning: variable 'first' set but not used [-Wunused-but-set-variable] bool first; ^~~~~ [44/48] LINK cxx opt '' _bin/cxx-opt/yaks/yaks_main.mycpp _build/obj/cxx-opt/_gen/yaks/yaks_main.mycpp.o _build/obj/cxx-opt/_gen/core/runtime.asdl.o _build/obj/cxx-opt/_gen/core/value.asdl.o _build/obj/cxx-opt/cpp/data_lang.o _build/obj/cxx-opt/cpp/frontend_match.o _build/obj/cxx-opt/_gen/data_lang/nil8.asdl.o _build/obj/cxx-opt/_gen/display/pretty.asdl.o _build/obj/cxx-opt/_gen/frontend/consts.o _build/obj/cxx-opt/_gen/frontend/id_kind.asdl.o _build/obj/cxx-opt/_gen/frontend/syntax.asdl.o _build/obj/cxx-opt/mycpp/bump_leak_heap.o _build/obj/cxx-opt/mycpp/gc_builtins.o _build/obj/cxx-opt/mycpp/gc_mops.o _build/obj/cxx-opt/mycpp/gc_mylib.o _build/obj/cxx-opt/mycpp/gc_str.o _build/obj/cxx-opt/mycpp/hash.o _build/obj/cxx-opt/mycpp/mark_sweep_heap.o _build/obj/cxx-opt/_gen/yaks/yaks.asdl.o [45/48] yaks cpp yaks/examples/hello.yaks > _gen/yaks/examples/hello_raw.yaks.cc (nvalue.List items: [ (nvalue.Symbol s:module) (nvalue.Symbol s:hello) (nvalue.List items: [ (nvalue.Symbol s:func) (nvalue.Symbol s:main) (nvalue.List items: [ (nvalue.Symbol s:"=>") (nvalue.List items: [ (nvalue.List items: [ (nvalue.Symbol s:argv) (nvalue.List items: [(nvalue.Symbol s:List) (nvalue.Symbol s:Str)] ) ] ) ] ) (nvalue.Symbol s:Int) ] ) (nvalue.List items: [(nvalue.Symbol s:call) (nvalue.Symbol s:print) (nvalue.Str s:hello)] ) (nvalue.List items:[(nvalue.Symbol s:return) (nvalue.Int i:42)]) ] ) ] ) (Program main_module: foo modules: [ (Module name: hello defs: [ (mod_def.Func name: main sig: (Signature params: [(NameType name:argv typ:(ktype.List T:(ktype.Str)))] return_type: ...0x3ffffffc ) statements: [(stmt.Return e:(Int i:42 loc:(Token path:path chunk:chunk start:0 length:3)))] ) ] ) ] ) [46/48] wrap-cc _gen/yaks/examples/hello.yaks.cc yaks hello _gen/yaks/examples/hello_raw.yaks.cc "" _gen/yaks/examples/hello.yaks.cc [47/48] cxx asan '' _gen/yaks/examples/hello.yaks.cc _build/obj/cxx-asan/_gen/yaks/examples/hello.yaks.o [48/48] LINK cxx asan '' _bin/cxx-asan/yaks/examples/hello.yaks _build/obj/cxx-asan/_gen/yaks/examples/hello.yaks.o _build/obj/cxx-asan/mycpp/bump_leak_heap.o _build/obj/cxx-asan/mycpp/gc_builtins.o _build/obj/cxx-asan/mycpp/gc_mops.o _build/obj/cxx-asan/mycpp/gc_mylib.o _build/obj/cxx-asan/mycpp/gc_str.o _build/obj/cxx-asan/mycpp/hash.o _build/obj/cxx-asan/mycpp/mark_sweep_heap.o + nq-run status _bin/cxx-asan/yaks/examples/hello.yaks + local -n out_status=status + shift + local __status + set +o errexit + set -o errexit + _bin/cxx-asan/yaks/examples/hello.yaks + __status=42 + set -o errexit + out_status=42 + set -o errexit + nq-assert 42 = 42 + test 42 = 42 + exit 0 OK test-syntax-errors (print "hi") (nvalue.List items:[(nvalue.Symbol s:print) (nvalue.Str s:hi)]) Traceback (most recent call last): File "yaks/yaks_main.py", line 151, in main(sys.argv) File "yaks/yaks_main.py", line 123, in main prog = transform.Transform(nval) File "/home/uke/oil/yaks/transform.py", line 248, in Transform module = TransformModule(mod_n) File "/home/uke/oil/yaks/transform.py", line 208, in TransformModule mod_name = MustBeSymbol(mod_n[1]) File "/home/uke/oil/yaks/transform.py", line 22, in MustBeSymbol raise AssertionError('Expected Symbol, got %s' % nval) AssertionError: Expected Symbol, got (nvalue.Str s:hi) + (nvalue.Symbol s:"+") Traceback (most recent call last): File "yaks/yaks_main.py", line 151, in main(sys.argv) File "yaks/yaks_main.py", line 123, in main prog = transform.Transform(nval) File "/home/uke/oil/yaks/transform.py", line 247, in Transform mod_n = MustBeList(nval) File "/home/uke/oil/yaks/transform.py", line 29, in MustBeList raise AssertionError('Expected List, got %s' % nval) AssertionError: Expected List, got (nvalue.Symbol s:"+") (print Unexpected EOF while parsing J8 (line 2, offset 7-7: 'int\n') (print)oops Unexpected trailing input (line 1, offset 7-11: 'int)oops\n') OK devtools/byo.sh: 3 tests passed. yaks/yaks.asdl -> (asdl_main) -> _devbuild/gen/yaks_asdl.py Success: no issues found in 1 source file