├── .github ├── ISSUE_TEMPLATE │ ├── bad_parse.md │ ├── codegen_bug.md │ └── panic.md └── report-issue.sh ├── .gitignore ├── .rustfmt.toml ├── .travis.yml ├── CHANGELOG.md ├── CONTRIBUTING.md ├── Cargo.toml ├── FAQ.md ├── IMPLEMENTATION_DEFINED.md ├── LICENSE.txt ├── README.md ├── benches ├── examples.rs └── parens.rs ├── fuzz ├── .gitignore ├── Cargo.toml ├── afl │ ├── garbage.rs │ └── inputs │ │ ├── compound.c │ │ ├── decl.c │ │ ├── init.c │ │ ├── ret_0.c │ │ └── ret_expr.c └── fuzz_targets │ ├── garbage.rs │ └── hfuzz.rs ├── minimizer ├── README.md ├── conditions │ ├── output_contains.sh │ ├── return_code_equals.sh │ └── return_code_is_not.sh ├── minimize.sh └── run_cargo.sh ├── mycpp ├── reference ├── if_state.dot └── if_state.svg ├── rustfmt.toml ├── saltwater-codegen ├── Cargo.toml ├── expr.rs ├── lib.rs ├── static_init.rs └── stmt.rs ├── saltwater-parser ├── Cargo.toml ├── analyze │ ├── expr.rs │ ├── init.rs │ ├── mod.rs │ └── stmt.rs ├── arch │ ├── mod.rs │ └── x64.rs ├── data │ ├── ast.rs │ ├── error.rs │ ├── hir.rs │ ├── lex.rs │ ├── mod.rs │ └── types.rs ├── fold.rs ├── headers │ ├── stdarg.h │ └── stddef.h ├── intern.rs ├── lex │ ├── cpp.rs │ ├── files.rs │ ├── mod.rs │ ├── replace.rs │ └── tests.rs ├── lib.rs ├── macros.rs └── parse │ ├── decl.rs │ ├── expr.rs │ ├── mod.rs │ └── stmt.rs ├── src ├── R2D2-Scream.ogg └── main.rs └── tests ├── c-testsuite.sh ├── csmith.sh ├── fuzz.sh ├── headers.rs ├── hfuzz.sh ├── jit.rs ├── pre-commit.sh ├── runner-tests ├── conditional.c ├── cpp │ ├── define │ │ ├── double-function.c │ │ ├── function.c │ │ ├── multiple-tokens.c │ │ ├── syntax-error.c │ │ ├── syntax-error2.c │ │ ├── triple-function.c │ │ └── wrong-args.c │ ├── if │ │ ├── 0.c │ │ ├── defined.c │ │ ├── elif.c │ │ ├── elif2.c │ │ ├── elif3.c │ │ ├── elif4.c │ │ ├── nested.c │ │ └── trailing.c │ ├── include │ │ ├── local-relative-parent.c │ │ ├── local.c │ │ ├── local.h │ │ ├── permission_denied.c │ │ ├── subdir-local.c │ │ └── subdir │ │ │ ├── a.h │ │ │ └── b.h │ └── overflow.c ├── decls │ ├── abstract_param_in_definition.c │ ├── alignment │ │ ├── 0.c │ │ └── 1.c │ ├── bad_signature_for_main │ │ ├── 0.c │ │ ├── 1.c │ │ ├── 2.c │ │ ├── 3.c │ │ └── 4.c │ ├── big_array.c │ ├── declare_global.c │ ├── declare_local.c │ ├── declare_local_function │ │ ├── 0.c │ │ └── 1.c │ ├── enum_overflow.c │ ├── enum_self_assign.c │ ├── exotic_qualifiers.c │ ├── float-limits.c │ ├── forward_declaration │ │ ├── 0.c │ │ ├── 1.c │ │ ├── 2.c │ │ ├── 3.c │ │ ├── 4.c │ │ ├── 5.c │ │ └── 6.c │ ├── forward_struct_declaration.c │ ├── function │ │ ├── 0.c │ │ ├── 1.c │ │ ├── 2.c │ │ ├── 3.c │ │ ├── 4.c │ │ ├── 5.c │ │ ├── 6.c │ │ ├── decay-ptr.c │ │ ├── qualifiers.c │ │ └── typedef.c │ ├── infer_array_bounds │ │ ├── 0.c │ │ ├── 1.c │ │ ├── 2.c │ │ └── 3.c │ ├── large_locals.c │ ├── linkage │ │ ├── 0.c │ │ ├── 1.c │ │ ├── 2.c │ │ ├── 3.c │ │ ├── 4.c │ │ ├── 5.c │ │ └── extern_after_static.c │ ├── multiple_initializers.c │ ├── overflow_array_size.c │ ├── recursive_struct.c │ ├── redefinition │ │ ├── 0.c │ │ ├── 1.c │ │ └── 2.c │ ├── scope │ │ ├── 0.c │ │ └── 1.c │ ├── static_initializers.c │ ├── string.c │ ├── struct.c │ ├── struct_and_enum │ │ ├── 0.c │ │ ├── 1.c │ │ ├── 2.c │ │ └── 3.c │ ├── struct_initializers.c │ ├── syntax.c │ ├── test_decl_after_init │ │ ├── 0.c │ │ └── 1.c │ ├── test_decl_and_func_definition │ │ ├── 0.c │ │ ├── 1.c │ │ └── 2.c │ ├── test_different_types.c │ ├── test_initializers │ │ ├── 0.c │ │ ├── 1.c │ │ ├── 2.c │ │ ├── 3.c │ │ ├── 4.c │ │ ├── 5.c │ │ ├── 6.c │ │ ├── 7.c │ │ └── 8.c │ ├── typedef │ │ ├── 0.c │ │ ├── 1.c │ │ ├── 2.c │ │ ├── 3.c │ │ ├── 4.c │ │ ├── 5.c │ │ ├── 6.c │ │ ├── 7.c │ │ ├── 8.c │ │ ├── 9.c │ │ ├── enums_members_are_same_scope.c │ │ ├── inner_scope.c │ │ └── tags_are_different_scope.c │ ├── union │ │ ├── 0.c │ │ └── 1.c │ └── useless_declaration.c ├── expr │ ├── add │ │ ├── 0.c │ │ ├── 1.c │ │ ├── 2.c │ │ └── 3.c │ ├── arrays │ │ ├── 0.c │ │ ├── 1.c │ │ ├── 2.c │ │ ├── 3.c │ │ ├── 4.c │ │ ├── 5.c │ │ └── 6.c │ ├── arrays_are_commutative.c │ ├── assign │ │ ├── 0.c │ │ ├── 1.c │ │ ├── 10.c │ │ ├── 11.c │ │ ├── 12.c │ │ ├── 13.c │ │ ├── 2.c │ │ ├── 3.c │ │ ├── 4.c │ │ ├── 5.c │ │ ├── 6.c │ │ ├── 7.c │ │ ├── 8.c │ │ ├── 9.c │ │ ├── compound_int.c │ │ ├── compound_struct.c │ │ ├── pointer_math.c │ │ └── struct_align.c │ ├── band │ │ ├── 0.c │ │ ├── 1.c │ │ ├── 2.c │ │ ├── 3.c │ │ ├── 4.c │ │ └── 5.c │ ├── bnot │ │ ├── 0.c │ │ ├── 1.c │ │ ├── 2.c │ │ ├── 3.c │ │ ├── 4.c │ │ └── 5.c │ ├── bor │ │ ├── 0.c │ │ ├── 1.c │ │ ├── 2.c │ │ ├── 3.c │ │ ├── 4.c │ │ └── 5.c │ ├── cmp │ │ ├── 0.c │ │ ├── 1.c │ │ ├── 2.c │ │ ├── 3.c │ │ ├── 4.c │ │ ├── 5.c │ │ ├── 6.c │ │ ├── 7.c │ │ ├── 8.c │ │ └── 9.c │ ├── comma │ │ ├── 0.c │ │ ├── 1.c │ │ └── 2.c │ ├── cstruct │ │ ├── 0.c │ │ ├── 1.c │ │ ├── 2.c │ │ └── 3.c │ ├── div │ │ ├── 0.c │ │ ├── 1.c │ │ ├── 2.c │ │ ├── 3.c │ │ └── 4.c │ ├── enumeration │ │ ├── 0.c │ │ └── 1.c │ ├── explicit_casts │ │ ├── 0.c │ │ ├── 1.c │ │ ├── 2.c │ │ ├── 3.c │ │ ├── 4.c │ │ ├── 5.c │ │ ├── 6.c │ │ ├── 7.c │ │ └── 8.c │ ├── implicit_casts │ │ ├── 0.c │ │ ├── 1.c │ │ ├── 2.c │ │ ├── 3.c │ │ ├── 4.c │ │ ├── 5.c │ │ ├── 6.c │ │ ├── 7.c │ │ ├── 8.c │ │ └── 9.c │ ├── lnot │ │ ├── 0.c │ │ ├── 1.c │ │ ├── 2.c │ │ ├── 3.c │ │ ├── 4.c │ │ ├── 5.c │ │ ├── 6.c │ │ ├── 7.c │ │ └── 8.c │ ├── logical_exprs │ │ ├── 0.c │ │ ├── 1.c │ │ ├── 2.c │ │ ├── 3.c │ │ └── 4.c │ ├── modulo │ │ ├── 0.c │ │ ├── 1.c │ │ ├── 2.c │ │ ├── 3.c │ │ └── 4.c │ ├── mul │ │ ├── 0.c │ │ ├── 1.c │ │ ├── 2.c │ │ ├── 3.c │ │ └── 4.c │ ├── multistrings.c │ ├── negate │ │ ├── 0.c │ │ ├── 1.c │ │ ├── 2.c │ │ └── 3.c │ ├── overflow │ │ ├── 0.c │ │ ├── 1.c │ │ ├── 2.c │ │ ├── 3.c │ │ ├── 4.c │ │ └── 5.c │ ├── pointers │ │ ├── 0.c │ │ ├── 1.c │ │ ├── 2.c │ │ ├── 3.c │ │ ├── 4.c │ │ ├── 5.c │ │ ├── 6.c │ │ ├── 7.c │ │ └── 8.c │ ├── primary.c │ ├── shift │ │ ├── 0.c │ │ ├── 1.c │ │ ├── 2.c │ │ ├── 3.c │ │ ├── 4.c │ │ └── 5.c │ ├── sizeof.c │ ├── strings.c │ ├── sub │ │ ├── 0.c │ │ ├── 1.c │ │ ├── 2.c │ │ ├── 3.c │ │ └── 4.c │ ├── ternary │ │ ├── 1.c │ │ ├── 2.c │ │ ├── 3.c │ │ ├── 4.c │ │ ├── 5.c │ │ ├── 6.c │ │ ├── 7.c │ │ ├── 8.c │ │ └── 9.c │ ├── typedef_cast.c │ ├── typedef_sizeof.c │ ├── unary_plus │ │ ├── 0.c │ │ └── 1.c │ ├── undeclared │ │ ├── 0.c │ │ ├── 1.c │ │ ├── 2.c │ │ ├── 3.c │ │ ├── 4.c │ │ ├── 5.c │ │ ├── 6.c │ │ └── 7.c │ ├── union.c │ └── xor │ │ ├── 0.c │ │ ├── 1.c │ │ ├── 2.c │ │ ├── 3.c │ │ └── 4.c ├── factorial.c ├── fibonacci.c ├── func │ ├── declaration_before_definition.c │ ├── extern_call.c │ ├── func_pointers │ │ ├── 0.c │ │ ├── 1.c │ │ └── 2.c │ ├── intern_call.c │ ├── nested.c │ ├── no_prototype.c │ ├── paren.c │ ├── qualifiers.c │ ├── recursion.c │ ├── undefined.c │ ├── varargs.c │ ├── void-pointer.c │ └── void.c ├── fuzz │ ├── 185.c │ ├── 261.c │ ├── 282.c │ ├── abstract-decl.c │ ├── deref-noop.c │ ├── invalid-sizeof.c │ └── switch-while.c ├── hello_world.c ├── index.c ├── io.c ├── lex │ ├── unicode.c │ └── unterminated.c ├── limits │ ├── sizeof.c │ └── unary.c ├── no_type.c ├── overflow.c ├── readme.c ├── ret.c ├── segfault.c ├── simple │ ├── empty_program_is_err.c │ ├── multiple_errors │ │ ├── 0.c │ │ └── 1.c │ └── only_bad_tokens_are_error │ │ ├── 0.c │ │ └── 1.c └── stmt │ ├── branch_return │ ├── 0.c │ ├── 1.c │ ├── 2.c │ ├── 3.c │ └── 4.c │ ├── do_loop.c │ ├── do_loop │ └── 0.c │ ├── for_loop │ ├── 0.c │ ├── 1.c │ └── 2.c │ ├── goto │ ├── 0.c │ └── 1.c │ ├── label.c │ ├── main_is_special.c │ ├── pointer_cast.c │ ├── return_type │ ├── 0.c │ ├── 1.c │ └── 2.c │ ├── scope │ ├── 0.c │ ├── 1.c │ ├── 2.c │ ├── 3.c │ ├── 4.c │ ├── 5.c │ ├── 6.c │ ├── 7.c │ ├── 8.c │ └── 9.c │ ├── strlen.c │ ├── switch │ ├── 0.c │ ├── 1.c │ ├── 2.c │ ├── 3.c │ ├── 4.c │ ├── 5.c │ ├── 6.c │ ├── 7.c │ ├── 8.c │ └── 9.c │ ├── syntax_errors │ ├── 0.c │ ├── 1.c │ └── 2.c │ ├── void.c │ └── while_loop │ ├── 0.c │ ├── 1.c │ └── 2.c ├── runner.rs ├── stack-overflow.rs ├── stack-overflow ├── aggregate_init.c ├── decl-analyze.c ├── decl.c ├── expr.c ├── scalar_init.c ├── stmt.c └── unary_analyze.c ├── utils └── mod.rs └── varargs.rs /.github/ISSUE_TEMPLATE/bad_parse.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/.github/ISSUE_TEMPLATE/bad_parse.md -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/codegen_bug.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/.github/ISSUE_TEMPLATE/codegen_bug.md -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/panic.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/.github/ISSUE_TEMPLATE/panic.md -------------------------------------------------------------------------------- /.github/report-issue.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/.github/report-issue.sh -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/.gitignore -------------------------------------------------------------------------------- /.rustfmt.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/.rustfmt.toml -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/.travis.yml -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/Cargo.toml -------------------------------------------------------------------------------- /FAQ.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/FAQ.md -------------------------------------------------------------------------------- /IMPLEMENTATION_DEFINED.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/IMPLEMENTATION_DEFINED.md -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/LICENSE.txt -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/README.md -------------------------------------------------------------------------------- /benches/examples.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/benches/examples.rs -------------------------------------------------------------------------------- /benches/parens.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/benches/parens.rs -------------------------------------------------------------------------------- /fuzz/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/fuzz/.gitignore -------------------------------------------------------------------------------- /fuzz/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/fuzz/Cargo.toml -------------------------------------------------------------------------------- /fuzz/afl/garbage.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/fuzz/afl/garbage.rs -------------------------------------------------------------------------------- /fuzz/afl/inputs/compound.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/fuzz/afl/inputs/compound.c -------------------------------------------------------------------------------- /fuzz/afl/inputs/decl.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/fuzz/afl/inputs/decl.c -------------------------------------------------------------------------------- /fuzz/afl/inputs/init.c: -------------------------------------------------------------------------------- 1 | int a[]={1,1+23,3}; 2 | -------------------------------------------------------------------------------- /fuzz/afl/inputs/ret_0.c: -------------------------------------------------------------------------------- 1 | int main(void) { 2 | return 0; 3 | } 4 | -------------------------------------------------------------------------------- /fuzz/afl/inputs/ret_expr.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/fuzz/afl/inputs/ret_expr.c -------------------------------------------------------------------------------- /fuzz/fuzz_targets/garbage.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/fuzz/fuzz_targets/garbage.rs -------------------------------------------------------------------------------- /fuzz/fuzz_targets/hfuzz.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/fuzz/fuzz_targets/hfuzz.rs -------------------------------------------------------------------------------- /minimizer/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/minimizer/README.md -------------------------------------------------------------------------------- /minimizer/conditions/output_contains.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/minimizer/conditions/output_contains.sh -------------------------------------------------------------------------------- /minimizer/conditions/return_code_equals.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/minimizer/conditions/return_code_equals.sh -------------------------------------------------------------------------------- /minimizer/conditions/return_code_is_not.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/minimizer/conditions/return_code_is_not.sh -------------------------------------------------------------------------------- /minimizer/minimize.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/minimizer/minimize.sh -------------------------------------------------------------------------------- /minimizer/run_cargo.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/minimizer/run_cargo.sh -------------------------------------------------------------------------------- /mycpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/mycpp -------------------------------------------------------------------------------- /reference/if_state.dot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/reference/if_state.dot -------------------------------------------------------------------------------- /reference/if_state.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/reference/if_state.svg -------------------------------------------------------------------------------- /rustfmt.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/rustfmt.toml -------------------------------------------------------------------------------- /saltwater-codegen/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-codegen/Cargo.toml -------------------------------------------------------------------------------- /saltwater-codegen/expr.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-codegen/expr.rs -------------------------------------------------------------------------------- /saltwater-codegen/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-codegen/lib.rs -------------------------------------------------------------------------------- /saltwater-codegen/static_init.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-codegen/static_init.rs -------------------------------------------------------------------------------- /saltwater-codegen/stmt.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-codegen/stmt.rs -------------------------------------------------------------------------------- /saltwater-parser/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-parser/Cargo.toml -------------------------------------------------------------------------------- /saltwater-parser/analyze/expr.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-parser/analyze/expr.rs -------------------------------------------------------------------------------- /saltwater-parser/analyze/init.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-parser/analyze/init.rs -------------------------------------------------------------------------------- /saltwater-parser/analyze/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-parser/analyze/mod.rs -------------------------------------------------------------------------------- /saltwater-parser/analyze/stmt.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-parser/analyze/stmt.rs -------------------------------------------------------------------------------- /saltwater-parser/arch/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-parser/arch/mod.rs -------------------------------------------------------------------------------- /saltwater-parser/arch/x64.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-parser/arch/x64.rs -------------------------------------------------------------------------------- /saltwater-parser/data/ast.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-parser/data/ast.rs -------------------------------------------------------------------------------- /saltwater-parser/data/error.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-parser/data/error.rs -------------------------------------------------------------------------------- /saltwater-parser/data/hir.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-parser/data/hir.rs -------------------------------------------------------------------------------- /saltwater-parser/data/lex.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-parser/data/lex.rs -------------------------------------------------------------------------------- /saltwater-parser/data/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-parser/data/mod.rs -------------------------------------------------------------------------------- /saltwater-parser/data/types.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-parser/data/types.rs -------------------------------------------------------------------------------- /saltwater-parser/fold.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-parser/fold.rs -------------------------------------------------------------------------------- /saltwater-parser/headers/stdarg.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-parser/headers/stdarg.h -------------------------------------------------------------------------------- /saltwater-parser/headers/stddef.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-parser/headers/stddef.h -------------------------------------------------------------------------------- /saltwater-parser/intern.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-parser/intern.rs -------------------------------------------------------------------------------- /saltwater-parser/lex/cpp.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-parser/lex/cpp.rs -------------------------------------------------------------------------------- /saltwater-parser/lex/files.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-parser/lex/files.rs -------------------------------------------------------------------------------- /saltwater-parser/lex/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-parser/lex/mod.rs -------------------------------------------------------------------------------- /saltwater-parser/lex/replace.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-parser/lex/replace.rs -------------------------------------------------------------------------------- /saltwater-parser/lex/tests.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-parser/lex/tests.rs -------------------------------------------------------------------------------- /saltwater-parser/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-parser/lib.rs -------------------------------------------------------------------------------- /saltwater-parser/macros.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-parser/macros.rs -------------------------------------------------------------------------------- /saltwater-parser/parse/decl.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-parser/parse/decl.rs -------------------------------------------------------------------------------- /saltwater-parser/parse/expr.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-parser/parse/expr.rs -------------------------------------------------------------------------------- /saltwater-parser/parse/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-parser/parse/mod.rs -------------------------------------------------------------------------------- /saltwater-parser/parse/stmt.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/saltwater-parser/parse/stmt.rs -------------------------------------------------------------------------------- /src/R2D2-Scream.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/src/R2D2-Scream.ogg -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/src/main.rs -------------------------------------------------------------------------------- /tests/c-testsuite.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/c-testsuite.sh -------------------------------------------------------------------------------- /tests/csmith.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/csmith.sh -------------------------------------------------------------------------------- /tests/fuzz.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/fuzz.sh -------------------------------------------------------------------------------- /tests/headers.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/headers.rs -------------------------------------------------------------------------------- /tests/hfuzz.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/hfuzz.sh -------------------------------------------------------------------------------- /tests/jit.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/jit.rs -------------------------------------------------------------------------------- /tests/pre-commit.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/pre-commit.sh -------------------------------------------------------------------------------- /tests/runner-tests/conditional.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/conditional.c -------------------------------------------------------------------------------- /tests/runner-tests/cpp/define/double-function.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/cpp/define/double-function.c -------------------------------------------------------------------------------- /tests/runner-tests/cpp/define/function.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/cpp/define/function.c -------------------------------------------------------------------------------- /tests/runner-tests/cpp/define/multiple-tokens.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/cpp/define/multiple-tokens.c -------------------------------------------------------------------------------- /tests/runner-tests/cpp/define/syntax-error.c: -------------------------------------------------------------------------------- 1 | // compile-fail 2 | #define f( 3 | -------------------------------------------------------------------------------- /tests/runner-tests/cpp/define/syntax-error2.c: -------------------------------------------------------------------------------- 1 | // compile-fail 2 | #define f(a 2) 3 | -------------------------------------------------------------------------------- /tests/runner-tests/cpp/define/triple-function.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/cpp/define/triple-function.c -------------------------------------------------------------------------------- /tests/runner-tests/cpp/define/wrong-args.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/cpp/define/wrong-args.c -------------------------------------------------------------------------------- /tests/runner-tests/cpp/if/0.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/cpp/if/0.c -------------------------------------------------------------------------------- /tests/runner-tests/cpp/if/defined.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/cpp/if/defined.c -------------------------------------------------------------------------------- /tests/runner-tests/cpp/if/elif.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/cpp/if/elif.c -------------------------------------------------------------------------------- /tests/runner-tests/cpp/if/elif2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/cpp/if/elif2.c -------------------------------------------------------------------------------- /tests/runner-tests/cpp/if/elif3.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/cpp/if/elif3.c -------------------------------------------------------------------------------- /tests/runner-tests/cpp/if/elif4.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/cpp/if/elif4.c -------------------------------------------------------------------------------- /tests/runner-tests/cpp/if/nested.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/cpp/if/nested.c -------------------------------------------------------------------------------- /tests/runner-tests/cpp/if/trailing.c: -------------------------------------------------------------------------------- 1 | // compile-fail 2 | #if 1; 3 | #endif 4 | -------------------------------------------------------------------------------- /tests/runner-tests/cpp/include/local-relative-parent.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/cpp/include/local-relative-parent.c -------------------------------------------------------------------------------- /tests/runner-tests/cpp/include/local.c: -------------------------------------------------------------------------------- 1 | // code: 2 2 | #include"local.h" 3 | -------------------------------------------------------------------------------- /tests/runner-tests/cpp/include/local.h: -------------------------------------------------------------------------------- 1 | int main() { return 2; } 2 | -------------------------------------------------------------------------------- /tests/runner-tests/cpp/include/permission_denied.c: -------------------------------------------------------------------------------- 1 | // compile-fail 2 | #include 3 | -------------------------------------------------------------------------------- /tests/runner-tests/cpp/include/subdir-local.c: -------------------------------------------------------------------------------- 1 | // code: 3 2 | #include "subdir/a.h" 3 | int main() { 4 | return a + b; 5 | } 6 | -------------------------------------------------------------------------------- /tests/runner-tests/cpp/include/subdir/a.h: -------------------------------------------------------------------------------- 1 | #include "b.h" 2 | int a = 1; 3 | -------------------------------------------------------------------------------- /tests/runner-tests/cpp/include/subdir/b.h: -------------------------------------------------------------------------------- 1 | int b = 2; 2 | -------------------------------------------------------------------------------- /tests/runner-tests/cpp/overflow.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/cpp/overflow.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/abstract_param_in_definition.c: -------------------------------------------------------------------------------- 1 | // fail 2 | int f(int) { return 1; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/decls/alignment/0.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/alignment/0.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/alignment/1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/alignment/1.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/bad_signature_for_main/0.c: -------------------------------------------------------------------------------- 1 | // fail 2 | int main(int); 3 | -------------------------------------------------------------------------------- /tests/runner-tests/decls/bad_signature_for_main/1.c: -------------------------------------------------------------------------------- 1 | // fail 2 | int main(char **); 3 | -------------------------------------------------------------------------------- /tests/runner-tests/decls/bad_signature_for_main/2.c: -------------------------------------------------------------------------------- 1 | // fail 2 | int main(int, char **, ...); 3 | -------------------------------------------------------------------------------- /tests/runner-tests/decls/bad_signature_for_main/3.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/bad_signature_for_main/3.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/bad_signature_for_main/4.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/bad_signature_for_main/4.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/big_array.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/big_array.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/declare_global.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/declare_global.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/declare_local.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/declare_local.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/declare_local_function/0.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/declare_local_function/0.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/declare_local_function/1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/declare_local_function/1.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/enum_overflow.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/enum_overflow.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/enum_self_assign.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/enum_self_assign.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/exotic_qualifiers.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/exotic_qualifiers.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/float-limits.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/float-limits.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/forward_declaration/0.c: -------------------------------------------------------------------------------- 1 | // succeeds 2 | extern struct s my_s; int main(){} 3 | -------------------------------------------------------------------------------- /tests/runner-tests/decls/forward_declaration/1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/forward_declaration/1.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/forward_declaration/2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/forward_declaration/2.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/forward_declaration/3.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/forward_declaration/3.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/forward_declaration/4.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/forward_declaration/4.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/forward_declaration/5.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/forward_declaration/5.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/forward_declaration/6.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/forward_declaration/6.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/forward_struct_declaration.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/forward_struct_declaration.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/function/0.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/function/0.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/function/1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/function/1.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/function/2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/function/2.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/function/3.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/function/3.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/function/4.c: -------------------------------------------------------------------------------- 1 | // fail 2 | int f(int, void); 3 | -------------------------------------------------------------------------------- /tests/runner-tests/decls/function/5.c: -------------------------------------------------------------------------------- 1 | // fail 2 | int f(..., void); 3 | -------------------------------------------------------------------------------- /tests/runner-tests/decls/function/6.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/function/6.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/function/decay-ptr.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/function/decay-ptr.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/function/qualifiers.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/function/qualifiers.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/function/typedef.c: -------------------------------------------------------------------------------- 1 | // no-main 2 | typedef int puts(void); 3 | -------------------------------------------------------------------------------- /tests/runner-tests/decls/infer_array_bounds/0.c: -------------------------------------------------------------------------------- 1 | // succeeds 2 | int a[] = {1, 2, 3}; int main(){} 3 | -------------------------------------------------------------------------------- /tests/runner-tests/decls/infer_array_bounds/1.c: -------------------------------------------------------------------------------- 1 | // fail 2 | int a[][] = {{1}}; 3 | -------------------------------------------------------------------------------- /tests/runner-tests/decls/infer_array_bounds/2.c: -------------------------------------------------------------------------------- 1 | // succeeds 2 | int a[][3] = {{1, 2, 3}}; int main(){} 3 | -------------------------------------------------------------------------------- /tests/runner-tests/decls/infer_array_bounds/3.c: -------------------------------------------------------------------------------- 1 | // fail 2 | int a[][1] = {{1, 2, 3}}; int main(){} 3 | -------------------------------------------------------------------------------- /tests/runner-tests/decls/large_locals.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/large_locals.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/linkage/0.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/linkage/0.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/linkage/1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/linkage/1.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/linkage/2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/linkage/2.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/linkage/3.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/linkage/3.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/linkage/4.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/linkage/4.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/linkage/5.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/linkage/5.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/linkage/extern_after_static.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/linkage/extern_after_static.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/multiple_initializers.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/multiple_initializers.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/overflow_array_size.c: -------------------------------------------------------------------------------- 1 | // compile-fail 2 | int a[-1u]; 3 | -------------------------------------------------------------------------------- /tests/runner-tests/decls/recursive_struct.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/recursive_struct.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/redefinition/0.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/redefinition/0.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/redefinition/1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/redefinition/1.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/redefinition/2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/redefinition/2.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/scope/0.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/scope/0.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/scope/1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/scope/1.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/static_initializers.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/static_initializers.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/string.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/string.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/struct.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/struct.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/struct_and_enum/0.c: -------------------------------------------------------------------------------- 1 | // fail 2 | enum e; 3 | -------------------------------------------------------------------------------- /tests/runner-tests/decls/struct_and_enum/1.c: -------------------------------------------------------------------------------- 1 | // fail 2 | enum; 3 | -------------------------------------------------------------------------------- /tests/runner-tests/decls/struct_and_enum/2.c: -------------------------------------------------------------------------------- 1 | // fail 2 | union; 3 | -------------------------------------------------------------------------------- /tests/runner-tests/decls/struct_and_enum/3.c: -------------------------------------------------------------------------------- 1 | // fail 2 | struct; 3 | -------------------------------------------------------------------------------- /tests/runner-tests/decls/struct_initializers.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/struct_initializers.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/syntax.c: -------------------------------------------------------------------------------- 1 | // fail 2 | union int w= 3 | -------------------------------------------------------------------------------- /tests/runner-tests/decls/test_decl_after_init/0.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/test_decl_after_init/0.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/test_decl_after_init/1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/test_decl_after_init/1.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/test_decl_and_func_definition/0.c: -------------------------------------------------------------------------------- 1 | // fail 2 | int i, main(void) { return 0; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/decls/test_decl_and_func_definition/1.c: -------------------------------------------------------------------------------- 1 | // fail 2 | int main(void) { return 0; }, i; 3 | -------------------------------------------------------------------------------- /tests/runner-tests/decls/test_decl_and_func_definition/2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/test_decl_and_func_definition/2.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/test_different_types.c: -------------------------------------------------------------------------------- 1 | // fail 2 | int i; long i; 3 | -------------------------------------------------------------------------------- /tests/runner-tests/decls/test_initializers/0.c: -------------------------------------------------------------------------------- 1 | // fail 2 | char c = '🙃'; 3 | -------------------------------------------------------------------------------- /tests/runner-tests/decls/test_initializers/1.c: -------------------------------------------------------------------------------- 1 | // fail 2 | int a[-1]; 3 | -------------------------------------------------------------------------------- /tests/runner-tests/decls/test_initializers/2.c: -------------------------------------------------------------------------------- 1 | // fail 2 | int i = {}; 3 | -------------------------------------------------------------------------------- /tests/runner-tests/decls/test_initializers/3.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/test_initializers/3.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/test_initializers/4.c: -------------------------------------------------------------------------------- 1 | // no-main 2 | int *s = (void*)0; 3 | -------------------------------------------------------------------------------- /tests/runner-tests/decls/test_initializers/5.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/test_initializers/5.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/test_initializers/6.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/test_initializers/6.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/test_initializers/7.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/test_initializers/7.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/test_initializers/8.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/test_initializers/8.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/typedef/0.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/typedef/0.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/typedef/1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/typedef/1.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/typedef/2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/typedef/2.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/typedef/3.c: -------------------------------------------------------------------------------- 1 | // succeeds 2 | int main() { 3 | typedef void v; 4 | } 5 | -------------------------------------------------------------------------------- /tests/runner-tests/decls/typedef/4.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/typedef/4.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/typedef/5.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/typedef/5.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/typedef/6.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/typedef/6.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/typedef/7.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/typedef/7.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/typedef/8.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/typedef/8.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/typedef/9.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/typedef/9.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/typedef/enums_members_are_same_scope.c: -------------------------------------------------------------------------------- 1 | // compile-fail 2 | typedef int I; 3 | enum E { I }; 4 | -------------------------------------------------------------------------------- /tests/runner-tests/decls/typedef/inner_scope.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/typedef/inner_scope.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/typedef/tags_are_different_scope.c: -------------------------------------------------------------------------------- 1 | // no-main 2 | typedef int I; 3 | enum I { A }; 4 | -------------------------------------------------------------------------------- /tests/runner-tests/decls/union/0.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/union/0.c -------------------------------------------------------------------------------- /tests/runner-tests/decls/union/1.c: -------------------------------------------------------------------------------- 1 | // fail 2 | union { int i; float f; } u = 3; 3 | -------------------------------------------------------------------------------- /tests/runner-tests/decls/useless_declaration.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/decls/useless_declaration.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/add/0.c: -------------------------------------------------------------------------------- 1 | // succeeds 2 | int main() { return 0 + 0; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/add/1.c: -------------------------------------------------------------------------------- 1 | // code: 2 2 | int main() { return 1 + 1; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/add/2.c: -------------------------------------------------------------------------------- 1 | // code: 6 2 | int main() { return 1 + 2 + 3; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/add/3.c: -------------------------------------------------------------------------------- 1 | // code: 4 2 | int main() { return 1.6 + 2.5; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/arrays/0.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/arrays/0.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/arrays/1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/arrays/1.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/arrays/2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/arrays/2.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/arrays/3.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/arrays/3.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/arrays/4.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/arrays/4.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/arrays/5.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/arrays/5.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/arrays/6.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/arrays/6.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/arrays_are_commutative.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/arrays_are_commutative.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/assign/0.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/assign/0.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/assign/1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/assign/1.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/assign/10.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/assign/10.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/assign/11.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/assign/11.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/assign/12.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/assign/12.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/assign/13.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/assign/13.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/assign/2.c: -------------------------------------------------------------------------------- 1 | // code: 2 2 | float f = -.515; int main () { return -(f *= 4); } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/assign/3.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/assign/3.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/assign/4.c: -------------------------------------------------------------------------------- 1 | // code: 0 2 | int main () { float f = 3; return f -= 2.1; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/assign/5.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/assign/5.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/assign/6.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/assign/6.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/assign/7.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/assign/7.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/assign/8.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/assign/8.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/assign/9.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/assign/9.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/assign/compound_int.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/assign/compound_int.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/assign/compound_struct.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/assign/compound_struct.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/assign/pointer_math.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/assign/pointer_math.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/assign/struct_align.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/assign/struct_align.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/band/0.c: -------------------------------------------------------------------------------- 1 | // code: 1 2 | int main() { return 1 & 1; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/band/1.c: -------------------------------------------------------------------------------- 1 | // code: 2 2 | int main() { return 2 & 3; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/band/2.c: -------------------------------------------------------------------------------- 1 | // code: 0 2 | int main() { return 0 & 10; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/band/3.c: -------------------------------------------------------------------------------- 1 | // code: 7 2 | int main() { return -65 & 7; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/band/4.c: -------------------------------------------------------------------------------- 1 | // fail 2 | int main() { return 65 & 1.5; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/band/5.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/band/5.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/bnot/0.c: -------------------------------------------------------------------------------- 1 | // code: 0 2 | int main() { return ~-1; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/bnot/1.c: -------------------------------------------------------------------------------- 1 | // code: 1 2 | int main() { return ~-2; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/bnot/2.c: -------------------------------------------------------------------------------- 1 | // code: 0 2 | int main() { return ~0 + 1; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/bnot/3.c: -------------------------------------------------------------------------------- 1 | // code: 0 2 | int main() { return ~1 + 2; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/bnot/4.c: -------------------------------------------------------------------------------- 1 | // fail 2 | int main() { return ~1.2; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/bnot/5.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/bnot/5.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/bor/0.c: -------------------------------------------------------------------------------- 1 | // code: 3 2 | int main() { return 1 | 2; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/bor/1.c: -------------------------------------------------------------------------------- 1 | // code: 0 2 | int main() { return 0 | 0; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/bor/2.c: -------------------------------------------------------------------------------- 1 | // code: 105 2 | int main() { return 105 | 0; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/bor/3.c: -------------------------------------------------------------------------------- 1 | // code: 0 2 | int main() { return (-1 | 0) + 1; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/bor/4.c: -------------------------------------------------------------------------------- 1 | // fail 2 | int main() { return 1 | 1.5; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/bor/5.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/bor/5.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/cmp/0.c: -------------------------------------------------------------------------------- 1 | // code: 1 2 | int main() { return 1 == 1; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/cmp/1.c: -------------------------------------------------------------------------------- 1 | // code: 1 2 | int main() { return 1 != 0; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/cmp/2.c: -------------------------------------------------------------------------------- 1 | // code: 1 2 | int main() { return 1 > 0; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/cmp/3.c: -------------------------------------------------------------------------------- 1 | // code: 1 2 | int main() { return 10 >= 0; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/cmp/4.c: -------------------------------------------------------------------------------- 1 | // code: 1 2 | int main() { return 12 < 24; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/cmp/5.c: -------------------------------------------------------------------------------- 1 | // code: 1 2 | int main() { return 12 <= 12; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/cmp/6.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/cmp/6.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/cmp/7.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/cmp/7.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/cmp/8.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/cmp/8.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/cmp/9.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/cmp/9.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/comma/0.c: -------------------------------------------------------------------------------- 1 | // code: 2 2 | int main() { return 1, 2; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/comma/1.c: -------------------------------------------------------------------------------- 1 | // code: 2 2 | int main() { return 1 + 1, 2.4; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/comma/2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/comma/2.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/cstruct/0.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/cstruct/0.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/cstruct/1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/cstruct/1.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/cstruct/2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/cstruct/2.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/cstruct/3.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/cstruct/3.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/div/0.c: -------------------------------------------------------------------------------- 1 | // code: 5 2 | int main() { return 10 / 2; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/div/1.c: -------------------------------------------------------------------------------- 1 | // code: 0 2 | int main() { return 0 / 1; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/div/2.c: -------------------------------------------------------------------------------- 1 | // code: 1 2 | int main() { return 4 / 3; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/div/3.c: -------------------------------------------------------------------------------- 1 | // code: 1 2 | int main() { return 3.1 / 3.0; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/div/4.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/div/4.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/enumeration/0.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/enumeration/0.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/enumeration/1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/enumeration/1.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/explicit_casts/0.c: -------------------------------------------------------------------------------- 1 | // succeeds 2 | int main() { return (short)0; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/explicit_casts/1.c: -------------------------------------------------------------------------------- 1 | // succeeds 2 | int main() { return (int)0.3; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/explicit_casts/2.c: -------------------------------------------------------------------------------- 1 | // succeeds 2 | int main() { return (_Bool)0.0; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/explicit_casts/3.c: -------------------------------------------------------------------------------- 1 | // succeeds 2 | int main() { return (float)0; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/explicit_casts/4.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/explicit_casts/4.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/explicit_casts/5.c: -------------------------------------------------------------------------------- 1 | // succeeds 2 | int main() { (void)5; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/explicit_casts/6.c: -------------------------------------------------------------------------------- 1 | // fail 2 | int main() { return (void)5; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/explicit_casts/7.c: -------------------------------------------------------------------------------- 1 | // fail 2 | void f() { return (void)5; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/explicit_casts/8.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/explicit_casts/8.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/implicit_casts/0.c: -------------------------------------------------------------------------------- 1 | // code: 2 2 | int main() { return 1 + 1.0; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/implicit_casts/1.c: -------------------------------------------------------------------------------- 1 | // succeeds 2 | int main() { return 1 - 1.0; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/implicit_casts/2.c: -------------------------------------------------------------------------------- 1 | // code: 1 2 | int main() { return 1 * 1.0; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/implicit_casts/3.c: -------------------------------------------------------------------------------- 1 | // code: 1 2 | int main() { return 1 / 1.0; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/implicit_casts/4.c: -------------------------------------------------------------------------------- 1 | // code: 1 2 | int main() { return 1 == 1.0; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/implicit_casts/5.c: -------------------------------------------------------------------------------- 1 | // code: 1 2 | int main() { return 12.0 == 12; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/implicit_casts/6.c: -------------------------------------------------------------------------------- 1 | // code: 1 2 | int main() { return 12.0 <= 12; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/implicit_casts/7.c: -------------------------------------------------------------------------------- 1 | // code: 1 2 | int main() { return 1 + 2 > 1; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/implicit_casts/8.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/implicit_casts/8.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/implicit_casts/9.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/implicit_casts/9.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/lnot/0.c: -------------------------------------------------------------------------------- 1 | // code: 0 2 | int main() { return !1; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/lnot/1.c: -------------------------------------------------------------------------------- 1 | // code: 0 2 | int main() { return !1.0; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/lnot/2.c: -------------------------------------------------------------------------------- 1 | // code: 1 2 | int main() { return !0; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/lnot/3.c: -------------------------------------------------------------------------------- 1 | // code: 1 2 | int main() { return !0.0; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/lnot/4.c: -------------------------------------------------------------------------------- 1 | // code: 1 2 | int main() { return !(short)0; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/lnot/5.c: -------------------------------------------------------------------------------- 1 | // code: 1 2 | int main() { return !(unsigned)0; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/lnot/6.c: -------------------------------------------------------------------------------- 1 | // code: 1 2 | int main() { return !(_Bool)0; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/lnot/7.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/lnot/7.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/lnot/8.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/lnot/8.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/logical_exprs/0.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/logical_exprs/0.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/logical_exprs/1.c: -------------------------------------------------------------------------------- 1 | // code: 1 2 | int main() { return 2 || 0; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/logical_exprs/2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/logical_exprs/2.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/logical_exprs/3.c: -------------------------------------------------------------------------------- 1 | // code: 0 2 | int main() { return 2 && 0; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/logical_exprs/4.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/logical_exprs/4.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/modulo/0.c: -------------------------------------------------------------------------------- 1 | // code: 0 2 | int main() { return 6 % 3; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/modulo/1.c: -------------------------------------------------------------------------------- 1 | // code: 1 2 | int main() { return 7 % 3; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/modulo/2.c: -------------------------------------------------------------------------------- 1 | // code: 0 2 | int main() { return -7 % 3 + 1; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/modulo/3.c: -------------------------------------------------------------------------------- 1 | // fail 2 | int main() { return 1.0 % 2; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/modulo/4.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/modulo/4.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/mul/0.c: -------------------------------------------------------------------------------- 1 | // code: 10 2 | int main() { return 1 * 10; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/mul/1.c: -------------------------------------------------------------------------------- 1 | // code: 0 2 | int main() { return 1 * 0; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/mul/2.c: -------------------------------------------------------------------------------- 1 | // code: 60 2 | int main() { return 3 * 4 * 5; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/mul/3.c: -------------------------------------------------------------------------------- 1 | // code: 4 2 | int main() { return 2.3 * 2.1; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/mul/4.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/mul/4.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/multistrings.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/multistrings.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/negate/0.c: -------------------------------------------------------------------------------- 1 | // code: 4 2 | int main() { return -(-4); } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/negate/1.c: -------------------------------------------------------------------------------- 1 | // code: 0 2 | int main() { return -(-0); } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/negate/2.c: -------------------------------------------------------------------------------- 1 | // code: 0 2 | int main() { return -(1) + 1; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/negate/3.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/negate/3.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/overflow/0.c: -------------------------------------------------------------------------------- 1 | // fail 2 | int i = 1 << -1; 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/overflow/1.c: -------------------------------------------------------------------------------- 1 | // fail 2 | int i = 1 >> -1; 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/overflow/2.c: -------------------------------------------------------------------------------- 1 | // fail 2 | int i = 1 << 65; 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/overflow/3.c: -------------------------------------------------------------------------------- 1 | // succeeds 2 | int i = 1 >> 65; int main() { return i; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/overflow/4.c: -------------------------------------------------------------------------------- 1 | // fail 2 | int i = 1/0; 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/overflow/5.c: -------------------------------------------------------------------------------- 1 | // fail 2 | int i = 1%0; 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/pointers/0.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/pointers/0.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/pointers/1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/pointers/1.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/pointers/2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/pointers/2.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/pointers/3.c: -------------------------------------------------------------------------------- 1 | // fail 2 | int *p = &0; 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/pointers/4.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/pointers/4.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/pointers/5.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/pointers/5.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/pointers/6.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/pointers/6.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/pointers/7.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/pointers/7.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/pointers/8.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/pointers/8.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/primary.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/primary.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/shift/0.c: -------------------------------------------------------------------------------- 1 | // code: 2 2 | int main() { return 1 << 1; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/shift/1.c: -------------------------------------------------------------------------------- 1 | // code: 16 2 | int main() { return 2 << 3; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/shift/2.c: -------------------------------------------------------------------------------- 1 | // code: 0 2 | int main() { return 1 >> 1; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/shift/3.c: -------------------------------------------------------------------------------- 1 | // code: 0 2 | int main() { return 1 >> 10; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/shift/4.c: -------------------------------------------------------------------------------- 1 | // fail 2 | int main() { return 1 >> 10.0; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/shift/5.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/shift/5.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/sizeof.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/sizeof.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/strings.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/strings.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/sub/0.c: -------------------------------------------------------------------------------- 1 | // code: 0 2 | int main() { return 0 - 0; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/sub/1.c: -------------------------------------------------------------------------------- 1 | // code: 2 2 | int main() { return 3 - 1; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/sub/2.c: -------------------------------------------------------------------------------- 1 | // code: 11 2 | int main() { return 10 - (1 - 2); } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/sub/3.c: -------------------------------------------------------------------------------- 1 | // code: 2 2 | int main() { return 6.1 - 3.2; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/sub/4.c: -------------------------------------------------------------------------------- 1 | // code: 255 2 | int main() { return (unsigned char)(0u - 1); } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/ternary/1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/ternary/1.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/ternary/2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/ternary/2.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/ternary/3.c: -------------------------------------------------------------------------------- 1 | // code: 4 2 | int main() { return 2 > 1 ? 4 : 255; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/ternary/4.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/ternary/4.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/ternary/5.c: -------------------------------------------------------------------------------- 1 | // code: 13 2 | int main() { return 5 < 7 ? 13 : 51; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/ternary/6.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/ternary/6.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/ternary/7.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/ternary/7.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/ternary/8.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/ternary/8.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/ternary/9.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/ternary/9.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/typedef_cast.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/typedef_cast.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/typedef_sizeof.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/typedef_sizeof.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/unary_plus/0.c: -------------------------------------------------------------------------------- 1 | // code: 1 2 | int main() { return +1; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/unary_plus/1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/unary_plus/1.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/undeclared/0.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/undeclared/0.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/undeclared/1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/undeclared/1.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/undeclared/2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/undeclared/2.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/undeclared/3.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/undeclared/3.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/undeclared/4.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/undeclared/4.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/undeclared/5.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/undeclared/5.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/undeclared/6.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/undeclared/6.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/undeclared/7.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/undeclared/7.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/union.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/union.c -------------------------------------------------------------------------------- /tests/runner-tests/expr/xor/0.c: -------------------------------------------------------------------------------- 1 | // code: 0 2 | int main() { return 0 ^ 0; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/xor/1.c: -------------------------------------------------------------------------------- 1 | // code: 1 2 | int main() { return 1 ^ 0; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/xor/2.c: -------------------------------------------------------------------------------- 1 | // code: 7 2 | int main() { return 5 ^ 2; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/xor/3.c: -------------------------------------------------------------------------------- 1 | // fail 2 | int main() { return 5.2 ^ 1.2; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/expr/xor/4.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/expr/xor/4.c -------------------------------------------------------------------------------- /tests/runner-tests/factorial.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/factorial.c -------------------------------------------------------------------------------- /tests/runner-tests/fibonacci.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/fibonacci.c -------------------------------------------------------------------------------- /tests/runner-tests/func/declaration_before_definition.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/func/declaration_before_definition.c -------------------------------------------------------------------------------- /tests/runner-tests/func/extern_call.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/func/extern_call.c -------------------------------------------------------------------------------- /tests/runner-tests/func/func_pointers/0.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/func/func_pointers/0.c -------------------------------------------------------------------------------- /tests/runner-tests/func/func_pointers/1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/func/func_pointers/1.c -------------------------------------------------------------------------------- /tests/runner-tests/func/func_pointers/2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/func/func_pointers/2.c -------------------------------------------------------------------------------- /tests/runner-tests/func/intern_call.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/func/intern_call.c -------------------------------------------------------------------------------- /tests/runner-tests/func/nested.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/func/nested.c -------------------------------------------------------------------------------- /tests/runner-tests/func/no_prototype.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/func/no_prototype.c -------------------------------------------------------------------------------- /tests/runner-tests/func/paren.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/func/paren.c -------------------------------------------------------------------------------- /tests/runner-tests/func/qualifiers.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/func/qualifiers.c -------------------------------------------------------------------------------- /tests/runner-tests/func/recursion.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/func/recursion.c -------------------------------------------------------------------------------- /tests/runner-tests/func/undefined.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/func/undefined.c -------------------------------------------------------------------------------- /tests/runner-tests/func/varargs.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/func/varargs.c -------------------------------------------------------------------------------- /tests/runner-tests/func/void-pointer.c: -------------------------------------------------------------------------------- 1 | // no-main 2 | int signal(int, void*); 3 | -------------------------------------------------------------------------------- /tests/runner-tests/func/void.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/func/void.c -------------------------------------------------------------------------------- /tests/runner-tests/fuzz/185.c: -------------------------------------------------------------------------------- 1 | // compile-fail 2 | int i = {1, {1}}; 3 | -------------------------------------------------------------------------------- /tests/runner-tests/fuzz/261.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/fuzz/261.c -------------------------------------------------------------------------------- /tests/runner-tests/fuzz/282.c: -------------------------------------------------------------------------------- 1 | // compile-fail 2 | // https://github.com/jyn514/rcc/issues/282 3 | I[K?*"":""] 4 | -------------------------------------------------------------------------------- /tests/runner-tests/fuzz/abstract-decl.c: -------------------------------------------------------------------------------- 1 | // compile-error 2 | int (), i; 3 | -------------------------------------------------------------------------------- /tests/runner-tests/fuzz/deref-noop.c: -------------------------------------------------------------------------------- 1 | // compile-fail 2 | int Z[--*""]; 3 | -------------------------------------------------------------------------------- /tests/runner-tests/fuzz/invalid-sizeof.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/fuzz/invalid-sizeof.c -------------------------------------------------------------------------------- /tests/runner-tests/fuzz/switch-while.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/fuzz/switch-while.c -------------------------------------------------------------------------------- /tests/runner-tests/hello_world.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/hello_world.c -------------------------------------------------------------------------------- /tests/runner-tests/index.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/index.c -------------------------------------------------------------------------------- /tests/runner-tests/io.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/io.c -------------------------------------------------------------------------------- /tests/runner-tests/lex/unicode.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/lex/unicode.c -------------------------------------------------------------------------------- /tests/runner-tests/lex/unterminated.c: -------------------------------------------------------------------------------- 1 | // compile-error 2 | " 3 | -------------------------------------------------------------------------------- /tests/runner-tests/limits/sizeof.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/limits/sizeof.c -------------------------------------------------------------------------------- /tests/runner-tests/limits/unary.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/limits/unary.c -------------------------------------------------------------------------------- /tests/runner-tests/no_type.c: -------------------------------------------------------------------------------- 1 | // no-main 2 | i; 3 | -------------------------------------------------------------------------------- /tests/runner-tests/overflow.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/overflow.c -------------------------------------------------------------------------------- /tests/runner-tests/readme.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/readme.c -------------------------------------------------------------------------------- /tests/runner-tests/ret.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/ret.c -------------------------------------------------------------------------------- /tests/runner-tests/segfault.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/segfault.c -------------------------------------------------------------------------------- /tests/runner-tests/simple/empty_program_is_err.c: -------------------------------------------------------------------------------- 1 | // fail 2 | -------------------------------------------------------------------------------- /tests/runner-tests/simple/multiple_errors/0.c: -------------------------------------------------------------------------------- 1 | // errors: 2 2 | int f(int) { return; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/simple/multiple_errors/1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/simple/multiple_errors/1.c -------------------------------------------------------------------------------- /tests/runner-tests/simple/only_bad_tokens_are_error/0.c: -------------------------------------------------------------------------------- 1 | // fail 2 | ` 3 | -------------------------------------------------------------------------------- /tests/runner-tests/simple/only_bad_tokens_are_error/1.c: -------------------------------------------------------------------------------- 1 | // fail 2 | `int main(){} 3 | -------------------------------------------------------------------------------- /tests/runner-tests/stmt/branch_return/0.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/branch_return/0.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/branch_return/1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/branch_return/1.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/branch_return/2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/branch_return/2.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/branch_return/3.c: -------------------------------------------------------------------------------- 1 | // fail 2 | int f() {} 3 | -------------------------------------------------------------------------------- /tests/runner-tests/stmt/branch_return/4.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/branch_return/4.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/do_loop.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/do_loop.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/do_loop/0.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/do_loop/0.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/for_loop/0.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/for_loop/0.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/for_loop/1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/for_loop/1.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/for_loop/2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/for_loop/2.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/goto/0.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/goto/0.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/goto/1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/goto/1.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/label.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/label.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/main_is_special.c: -------------------------------------------------------------------------------- 1 | // succeeds 2 | int main() {} 3 | -------------------------------------------------------------------------------- /tests/runner-tests/stmt/pointer_cast.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/pointer_cast.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/return_type/0.c: -------------------------------------------------------------------------------- 1 | // fail 2 | int main(void) { return; } 3 | -------------------------------------------------------------------------------- /tests/runner-tests/stmt/return_type/1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/return_type/1.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/return_type/2.c: -------------------------------------------------------------------------------- 1 | // fail 2 | int f() {} 3 | -------------------------------------------------------------------------------- /tests/runner-tests/stmt/scope/0.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/scope/0.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/scope/1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/scope/1.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/scope/2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/scope/2.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/scope/3.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/scope/3.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/scope/4.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/scope/4.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/scope/5.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/scope/5.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/scope/6.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/scope/6.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/scope/7.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/scope/7.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/scope/8.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/scope/8.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/scope/9.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/scope/9.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/strlen.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/strlen.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/switch/0.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/switch/0.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/switch/1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/switch/1.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/switch/2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/switch/2.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/switch/3.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/switch/3.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/switch/4.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/switch/4.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/switch/5.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/switch/5.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/switch/6.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/switch/6.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/switch/7.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/switch/7.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/switch/8.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/switch/8.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/switch/9.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/switch/9.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/syntax_errors/0.c: -------------------------------------------------------------------------------- 1 | // fail 2 | int main() { ] 3 | -------------------------------------------------------------------------------- /tests/runner-tests/stmt/syntax_errors/1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/syntax_errors/1.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/syntax_errors/2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/syntax_errors/2.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/void.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/void.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/while_loop/0.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/while_loop/0.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/while_loop/1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/while_loop/1.c -------------------------------------------------------------------------------- /tests/runner-tests/stmt/while_loop/2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner-tests/stmt/while_loop/2.c -------------------------------------------------------------------------------- /tests/runner.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/runner.rs -------------------------------------------------------------------------------- /tests/stack-overflow.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/stack-overflow.rs -------------------------------------------------------------------------------- /tests/stack-overflow/aggregate_init.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/stack-overflow/aggregate_init.c -------------------------------------------------------------------------------- /tests/stack-overflow/decl-analyze.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/stack-overflow/decl-analyze.c -------------------------------------------------------------------------------- /tests/stack-overflow/decl.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/stack-overflow/decl.c -------------------------------------------------------------------------------- /tests/stack-overflow/expr.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/stack-overflow/expr.c -------------------------------------------------------------------------------- /tests/stack-overflow/scalar_init.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/stack-overflow/scalar_init.c -------------------------------------------------------------------------------- /tests/stack-overflow/stmt.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/stack-overflow/stmt.c -------------------------------------------------------------------------------- /tests/stack-overflow/unary_analyze.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/stack-overflow/unary_analyze.c -------------------------------------------------------------------------------- /tests/utils/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/utils/mod.rs -------------------------------------------------------------------------------- /tests/varargs.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jyn514/saltwater/HEAD/tests/varargs.rs --------------------------------------------------------------------------------