From 0d12813013528d87fecda9dbb52745376608cd48 Mon Sep 17 00:00:00 2001 From: Austin Appleby Date: Sat, 2 Nov 2024 18:20:41 -0700 Subject: [PATCH] checkpoint, just indentation fixes and some minor in_libs fixes --- examples/c_lexer/c_lexer.hancho | 28 +++++++++--------- examples/c_parser/c_parser.hancho | 24 ++++++++-------- examples/json/json.hancho | 48 +++++++++++++++---------------- examples/regex/regex.hancho | 40 +++++++++++++------------- examples/toml/toml.hancho | 18 ++++++------ examples/tutorial/tutorial.hancho | 10 +++---- tests/tests.hancho | 8 +++--- 7 files changed, 88 insertions(+), 88 deletions(-) diff --git a/examples/c_lexer/c_lexer.hancho b/examples/c_lexer/c_lexer.hancho index bba93d5..c1c6b5b 100644 --- a/examples/c_lexer/c_lexer.hancho +++ b/examples/c_lexer/c_lexer.hancho @@ -2,24 +2,24 @@ # Matcheroni C lexer demo lib = hancho( - hancho.base_rules.cpp_lib, - hancho.cpp_config, - in_srcs = ["CLexer.cpp", "CToken.cpp"], - out_lib = "c_lexer.a", + hancho.base_rules.cpp_lib, + hancho.cpp_config, + in_srcs = ["CLexer.cpp", "CToken.cpp"], + out_lib = "c_lexer.a", ) hancho( - hancho.base_rules.cpp_test, - hancho.cpp_config, - in_srcs = "c_lexer_test.cpp", - in_libs = lib, - out_bin = "c_lexer_test", + hancho.base_rules.cpp_test, + hancho.cpp_config, + in_srcs = "c_lexer_test.cpp", + in_libs = lib, + out_bin = "c_lexer_test", ) hancho( - hancho.base_rules.cpp_bin, - hancho.cpp_config, - in_srcs = "c_lexer_benchmark.cpp", - in_libs = lib, - out_bin = "c_lexer_benchmark", + hancho.base_rules.cpp_bin, + hancho.cpp_config, + in_srcs = "c_lexer_benchmark.cpp", + in_libs = lib, + out_bin = "c_lexer_benchmark", ) diff --git a/examples/c_parser/c_parser.hancho b/examples/c_parser/c_parser.hancho index 4b20a41..ffff0af 100644 --- a/examples/c_parser/c_parser.hancho +++ b/examples/c_parser/c_parser.hancho @@ -2,23 +2,23 @@ # C parser example (not finished) lib = hancho( - hancho.base_rules.cpp_lib, - hancho.cpp_config, - in_srcs = ["CContext.cpp", "CNode.cpp", "CScope.cpp"], - out_lib = "c_parser.a", + hancho.base_rules.cpp_lib, + hancho.cpp_config, + in_srcs = ["CContext.cpp", "CNode.cpp", "CScope.cpp"], + out_lib = "c_parser.a", ) hancho( - hancho.base_rules.cpp_bin, - hancho.cpp_config, - in_srcs = "c_parser_benchmark.cpp", - in_libs = [hancho.c_lexer.lib, lib], - out_bin = "c_parser_benchmark", + hancho.base_rules.cpp_bin, + hancho.cpp_config, + in_srcs = "c_parser_benchmark.cpp", + in_libs = [hancho.c_lexer.lib, lib], + out_bin = "c_parser_benchmark", ) # Broken? #rules.c_test( -# "c_parser_test.cpp", -# "c_parser_test", -# libs = [c_lexer.c_lexer_lib, c_parser_lib], +# "c_parser_test.cpp", +# "c_parser_test", +# libs = [c_lexer.c_lexer_lib, c_parser_lib], #) diff --git a/examples/json/json.hancho b/examples/json/json.hancho index c954e13..103f28b 100644 --- a/examples/json/json.hancho +++ b/examples/json/json.hancho @@ -2,40 +2,40 @@ # Matcheroni JSON parser example lib = hancho( - hancho.base_rules.cpp_lib, - hancho.cpp_config, - in_srcs = ["json_matcher.cpp", "json_parser.cpp"], - out_lib = "json_parser.a", + hancho.base_rules.cpp_lib, + hancho.cpp_config, + in_srcs = ["json_matcher.cpp", "json_parser.cpp"], + out_lib = "json_parser.a", ) hancho( - hancho.base_rules.cpp_bin, - hancho.cpp_config, - in_srcs = "json_conformance.cpp", - in_libs = lib, - out_bin = "json_conformance", + hancho.base_rules.cpp_bin, + hancho.cpp_config, + in_srcs = "json_conformance.cpp", + in_libs = lib, + out_bin = "json_conformance", ) hancho( - hancho.base_rules.cpp_bin, - hancho.cpp_config, - in_srcs = "json_benchmark.cpp", - in_libs = lib, - out_bin = "json_benchmark", + hancho.base_rules.cpp_bin, + hancho.cpp_config, + in_srcs = "json_benchmark.cpp", + in_libs = lib, + out_bin = "json_benchmark", ) hancho( - hancho.base_rules.cpp_bin, - hancho.cpp_config, - in_srcs = "json_demo.cpp", - in_libs = lib, - out_bin = "json_demo", + hancho.base_rules.cpp_bin, + hancho.cpp_config, + in_srcs = "json_demo.cpp", + in_libs = lib, + out_bin = "json_demo", ) hancho( - hancho.base_rules.cpp_test, - hancho.cpp_config, - in_srcs = "json_test.cpp", - in_libs = lib, - out_bin = "json_test", + hancho.base_rules.cpp_test, + hancho.cpp_config, + in_srcs = "json_test.cpp", + in_libs = lib, + out_bin = "json_test", ) diff --git a/examples/regex/regex.hancho b/examples/regex/regex.hancho index 7dc96fe..981516d 100644 --- a/examples/regex/regex.hancho +++ b/examples/regex/regex.hancho @@ -13,33 +13,33 @@ lib = hancho( - hancho.base_rules.cpp_lib, - hancho.cpp_config, - in_srcs = "regex_parser.cpp", - out_lib = "regex_parser.a", + hancho.base_rules.cpp_lib, + hancho.cpp_config, + in_srcs = "regex_parser.cpp", + out_lib = "regex_parser.a", ) hancho( - hancho.base_rules.cpp_bin, - hancho.cpp_config, - in_srcs = "regex_demo.cpp", - in_libs = lib, - out_bin = "regex_demo", + hancho.base_rules.cpp_bin, + hancho.cpp_config, + in_srcs = "regex_demo.cpp", + in_libs = lib, + out_bin = "regex_demo", ) hancho( - hancho.base_rules.cpp_bin, - hancho.cpp_config, - in_srcs = "regex_benchmark.cpp", - in_libs = lib, - out_bin = "regex_benchmark", - sys_libs = ["boost_system", "boost_regex"], + hancho.base_rules.cpp_bin, + hancho.cpp_config, + in_srcs = "regex_benchmark.cpp", + in_libs = lib, + out_bin = "regex_benchmark", + sys_libs = ["-lboost_system", "-lboost_regex"], ) hancho( - hancho.base_rules.cpp_test, - hancho.cpp_config, - in_srcs = "regex_test.cpp", - in_libs = lib, - out_bin = "regex_test", + hancho.base_rules.cpp_test, + hancho.cpp_config, + in_srcs = "regex_test.cpp", + in_libs = lib, + out_bin = "regex_test", ) diff --git a/examples/toml/toml.hancho b/examples/toml/toml.hancho index 282b70b..1585f75 100644 --- a/examples/toml/toml.hancho +++ b/examples/toml/toml.hancho @@ -2,16 +2,16 @@ # TOML parser example lib = hancho( - hancho.base_rules.cpp_lib, - hancho.cpp_config, - in_srcs = "toml_parser.cpp", - out_lib = "toml_parser.a", + hancho.base_rules.cpp_lib, + hancho.cpp_config, + in_srcs = "toml_parser.cpp", + out_lib = "toml_parser.a", ) hancho( - hancho.base_rules.cpp_test, - hancho.cpp_config, - in_srcs = "toml_test.cpp", - in_libs = lib, - out_bin = "toml_test", + hancho.base_rules.cpp_test, + hancho.cpp_config, + in_srcs = "toml_test.cpp", + in_libs = lib, + out_bin = "toml_test", ) diff --git a/examples/tutorial/tutorial.hancho b/examples/tutorial/tutorial.hancho index e290e9c..41ece9d 100644 --- a/examples/tutorial/tutorial.hancho +++ b/examples/tutorial/tutorial.hancho @@ -10,9 +10,9 @@ hancho(hancho.base_rules.cpp_test, hancho.cpp_config, in_srcs = "json_tut2a.cpp" hancho(hancho.base_rules.cpp_test, hancho.cpp_config, in_srcs = "json_tut2b.cpp", out_bin = "json_tut2b") hancho( - hancho.base_rules.cpp_bin, - hancho.cpp_config, - in_srcs = "tiny_c_parser.cpp", - in_libs = [hancho.c_lexer.lib, hancho.c_parser.lib], - out_bin = "tiny_c_parser", + hancho.base_rules.cpp_bin, + hancho.cpp_config, + in_srcs = "tiny_c_parser.cpp", + in_libs = [hancho.c_lexer.lib, hancho.c_parser.lib], + out_bin = "tiny_c_parser", ) diff --git a/tests/tests.hancho b/tests/tests.hancho index 583aa48..1c2060d 100644 --- a/tests/tests.hancho +++ b/tests/tests.hancho @@ -13,8 +13,8 @@ #) hancho( - hancho.base_rules.cpp_test, - hancho.cpp_config, - in_srcs = "parseroni_test.cpp", - out_bin = "parseroni_test", + hancho.base_rules.cpp_test, + hancho.cpp_config, + in_srcs = "parseroni_test.cpp", + out_bin = "parseroni_test", )