-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
4,126 additions
and
4,125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
# matcheroni/build.hancho | ||
|
||
print("Building Matcheroni with Hancho") | ||
|
||
hancho.build_tag = "debug" | ||
|
||
c_lexer = hancho.load("examples/c_lexer/c_lexer.hancho") | ||
c_parser = hancho.load("examples/c_parser/c_parser.hancho", | ||
c_lexer_lib = c_lexer.c_lexer_lib) | ||
hancho.rules = hancho.load("config/rules.hancho") | ||
hancho.c_lexer = hancho.load("examples/c_lexer/c_lexer.hancho") | ||
hancho.c_parser = hancho.load("examples/c_parser/c_parser.hancho") | ||
|
||
hancho.rules.c_library("examples/ini/ini_parser.cpp", "examples/ini/ini_parser.a") | ||
|
||
hancho.load("examples/ini/ini.hancho") | ||
hancho.load("examples/json/json.hancho") | ||
hancho.load("examples/regex/regex.hancho") | ||
hancho.load("examples/toml/toml.hancho") | ||
hancho.load("tests/tests.hancho") | ||
hancho.load("examples/tutorial/tutorial.hancho", c_lexer_lib=c_lexer.c_lexer_lib, c_parser_lib = c_parser.c_parser_lib) | ||
hancho.load("examples/tutorial/tutorial.hancho") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
#------------------------------------------------------------------------------- | ||
# Matcheroni C lexer demo | ||
|
||
rules = hancho.load("{repo_path}/config/rules.hancho") | ||
|
||
c_lexer_lib = rules.c_library( | ||
c_lexer_lib = hancho.rules.c_library( | ||
["CLexer.cpp", "CToken.cpp"], | ||
"c_lexer.a", | ||
) | ||
|
||
rules.c_test( | ||
hancho.rules.c_test( | ||
"c_lexer_test.cpp", | ||
"c_lexer_test", | ||
libs = c_lexer_lib, | ||
quiet = True, | ||
) | ||
|
||
rules.c_binary( | ||
hancho.rules.c_binary( | ||
"c_lexer_benchmark.cpp", | ||
"c_lexer_benchmark", | ||
libs = c_lexer_lib, | ||
) | ||
|
||
hancho.lib = c_lexer_lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
#------------------------------------------------------------------------------- | ||
# Matcheroni JSON parser example | ||
|
||
rules = hancho.load("{repo_path}/config/rules.hancho") | ||
|
||
json_parser = rules.c_library( | ||
json_parser = hancho.rules.c_library( | ||
["json_matcher.cpp", "json_parser.cpp"], | ||
"json_parser.a", | ||
) | ||
|
||
rules.c_binary( | ||
hancho.rules.c_binary( | ||
"json_conformance.cpp", | ||
"json_conformance", | ||
libs = json_parser | ||
) | ||
|
||
rules.c_binary( | ||
hancho.rules.c_binary( | ||
"json_benchmark.cpp", | ||
"json_benchmark", | ||
libs = json_parser, | ||
) | ||
|
||
rules.c_binary( | ||
hancho.rules.c_binary( | ||
"json_demo.cpp", | ||
"json_demo", | ||
libs = json_parser, | ||
) | ||
|
||
rules.c_test( | ||
hancho.rules.c_test( | ||
"json_test.cpp", | ||
"json_test", | ||
libs = json_parser, | ||
quiet = True | ||
) | ||
|
||
hancho.lib = json_parser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
#------------------------------------------------------------------------------- | ||
# Tutorial examples | ||
|
||
rules = hancho.load("{repo_path}/config/rules.hancho") | ||
hancho.rules.c_test("json_tut0a.cpp", "json_tut0a", command_path="{repo_path}", quiet = True) | ||
hancho.rules.c_test("json_tut1a.cpp", "json_tut1a", command_path="{repo_path}", quiet = True) | ||
hancho.rules.c_test("json_tut1b.cpp", "json_tut1b", command_path="{repo_path}", quiet = True) | ||
hancho.rules.c_test("json_tut1c.cpp", "json_tut1c", command_path="{repo_path}", quiet = True) | ||
hancho.rules.c_test("json_tut2a.cpp", "json_tut2a", command_path="{repo_path}", quiet = True) | ||
hancho.rules.c_test("json_tut2b.cpp", "json_tut2b", command_path="{repo_path}", quiet = True) | ||
|
||
rules.c_test("json_tut0a.cpp", "json_tut0a", command_path="{repo_path}", quiet = True) | ||
rules.c_test("json_tut1a.cpp", "json_tut1a", command_path="{repo_path}", quiet = True) | ||
rules.c_test("json_tut1b.cpp", "json_tut1b", command_path="{repo_path}", quiet = True) | ||
rules.c_test("json_tut1c.cpp", "json_tut1c", command_path="{repo_path}", quiet = True) | ||
rules.c_test("json_tut2a.cpp", "json_tut2a", command_path="{repo_path}", quiet = True) | ||
rules.c_test("json_tut2b.cpp", "json_tut2b", command_path="{repo_path}", quiet = True) | ||
|
||
rules.c_binary( | ||
hancho.rules.c_binary( | ||
"tiny_c_parser.cpp", | ||
"tiny_c_parser", | ||
libs = [hancho.c_lexer_lib, hancho.c_parser_lib], | ||
libs = [hancho.c_lexer.lib, hancho.c_parser.lib], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters