--- 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/52] 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/52] make-pystub _bin/shwrap/optview_gen core/optview_gen.py frontend/option_def.py [3/52] make-pystub _bin/shwrap/option_gen frontend/option_gen.py asdl/ast.py frontend/builtin_def.py frontend/option_def.py [4/52] 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/52] optview_gen > _gen/core/optview.h [6/52] consts_gen cpp _gen/frontend/id_kind.asdl [7/52] cxx opt '' mycpp/bump_leak_heap.cc _build/obj/cxx-opt/mycpp/bump_leak_heap.o [8/52] consts_gen cpp-consts _gen/frontend/consts [9/52] asdl_main cpp core/value.asdl _gen/core/value.asdl _gen/core/value.asdl_debug.py [10/52] asdl_main cpp data_lang/nil8.asdl _gen/data_lang/nil8.asdl _gen/data_lang/nil8.asdl_debug.py [11/52] asdl_main cpp --no-pretty-print-methods asdl/hnode.asdl _gen/asdl/hnode.asdl _gen/asdl/hnode.asdl_debug.py [12/52] asdl_main cpp display/pretty.asdl _gen/display/pretty.asdl _gen/display/pretty.asdl_debug.py [13/52] asdl_main cpp core/runtime.asdl _gen/core/runtime.asdl _gen/core/runtime.asdl_debug.py [14/52] consts_gen cpp _gen/frontend/option.asdl [15/52] asdl_main cpp --no-pretty-print-methods frontend/types.asdl _gen/frontend/types.asdl _gen/frontend/types.asdl_debug.py [16/52] asdl_main cpp yaks/yaks.asdl _gen/yaks/yaks.asdl _gen/yaks/yaks.asdl_debug.py [17/52] asdl_main cpp frontend/syntax.asdl _gen/frontend/syntax.asdl _gen/frontend/syntax.asdl_debug.py [18/52] cxx opt '' _gen/frontend/id_kind.asdl.cc _build/obj/cxx-opt/_gen/frontend/id_kind.asdl.o [19/52] cxx opt '' mycpp/gc_iolib.cc _build/obj/cxx-opt/mycpp/gc_iolib.o [20/52] cxx opt '' mycpp/gc_builtins.cc _build/obj/cxx-opt/mycpp/gc_builtins.o [21/52] cxx opt '' _gen/display/pretty.asdl.cc _build/obj/cxx-opt/_gen/display/pretty.asdl.o [22/52] cxx opt '' mycpp/gc_mops.cc _build/obj/cxx-opt/mycpp/gc_mops.o [23/52] cxx opt '' cpp/data_lang.cc _build/obj/cxx-opt/cpp/data_lang.o [24/52] cxx opt '' mycpp/gc_mylib.cc _build/obj/cxx-opt/mycpp/gc_mylib.o [25/52] cxx opt '' mycpp/hash.cc _build/obj/cxx-opt/mycpp/hash.o [26/52] cxx opt '' _gen/core/runtime.asdl.cc _build/obj/cxx-opt/_gen/core/runtime.asdl.o [27/52] cxx asan '' mycpp/bump_leak_heap.cc _build/obj/cxx-asan/mycpp/bump_leak_heap.o [28/52] cxx opt '' _gen/core/value.asdl.cc _build/obj/cxx-opt/_gen/core/value.asdl.o [29/52] cxx opt '' mycpp/mark_sweep_heap.cc _build/obj/cxx-opt/mycpp/mark_sweep_heap.o [30/52] cxx asan '' mycpp/gc_iolib.cc _build/obj/cxx-asan/mycpp/gc_iolib.o [31/52] cxx asan '' mycpp/gc_builtins.cc _build/obj/cxx-asan/mycpp/gc_builtins.o [32/52] cxx asan '' mycpp/gc_mops.cc _build/obj/cxx-asan/mycpp/gc_mops.o [33/52] cxx asan '' mycpp/hash.cc _build/obj/cxx-asan/mycpp/hash.o [34/52] cxx asan '' mycpp/gc_mylib.cc _build/obj/cxx-asan/mycpp/gc_mylib.o [35/52] cxx asan '' mycpp/mark_sweep_heap.cc _build/obj/cxx-asan/mycpp/mark_sweep_heap.o [36/52] cxx opt '' _gen/data_lang/nil8.asdl.cc _build/obj/cxx-opt/_gen/data_lang/nil8.asdl.o [37/52] cxx opt '' _gen/frontend/syntax.asdl.cc _build/obj/cxx-opt/_gen/frontend/syntax.asdl.o [38/52] cxx opt '' _gen/frontend/consts.cc _build/obj/cxx-opt/_gen/frontend/consts.o [39/52] cxx opt '' cpp/frontend_match.cc _build/obj/cxx-opt/cpp/frontend_match.o [40/52] cxx asan '' mycpp/gc_str.cc _build/obj/cxx-asan/mycpp/gc_str.o [41/52] cxx opt '' _gen/yaks/yaks.asdl.cc _build/obj/cxx-opt/_gen/yaks/yaks.asdl.o [42/52] cxx opt '' mycpp/gc_str.cc _build/obj/cxx-opt/mycpp/gc_str.o [43/52] cxx opt '-Ivendor -std=c++17' prebuilt/datalog/dataflow.cc _build/obj/datalog/dataflow.o [44/52] LINK cxx opt '-lstdc++fs' _bin/datalog/dataflow _build/obj/datalog/dataflow.o [45/52] make-pystub _bin/shwrap/mycpp_main mycpp/mycpp_main.py mycpp/const_pass.py mycpp/control_flow_pass.py mycpp/cppgen_pass.py mycpp/crash.py mycpp/debug_pass.py mycpp/format_strings.py mycpp/ir_pass.py mycpp/pass_state.py mycpp/util.py mycpp/visitor.py _bin/datalog/dataflow [46/52] gen-oils-for-unix yaks_main yaks _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: DATAFLOW mycpp pass: IMPL [47/52] 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:1422: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:1510:24: warning: unused variable 'node' [-Wunused-variable] hnode::External* node = static_cast(UP_node); ^~~~ [48/52] 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_iolib.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 [49/52] 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)))] ) ] ) ] ) [50/52] wrap-cc _gen/yaks/examples/hello.yaks.cc yaks hello _gen/yaks/examples/hello_raw.yaks.cc "" _gen/yaks/examples/hello.yaks.cc [51/52] cxx asan '' _gen/yaks/examples/hello.yaks.cc _build/obj/cxx-asan/_gen/yaks/examples/hello.yaks.o [52/52] 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_iolib.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