Skip to content

Commit

Permalink
make all hancho load paths relative
Browse files Browse the repository at this point in the history
  • Loading branch information
aappleby committed Mar 15, 2024
1 parent 79411ce commit fca2476
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/c_lexer/c_lexer.hancho
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Matcheroni C lexer demo
from hancho import *

rules = load("config/rules.hancho")
rules = load("../../config/rules.hancho")

c_lexer_lib = rules.c_library(
["CLexer.cpp", "CToken.cpp"],
Expand Down
2 changes: 1 addition & 1 deletion examples/c_parser/c_parser.hancho
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# C parser example (not finished)
from hancho import *

rules = load("config/rules.hancho")
rules = load("../../config/rules.hancho")
c_lexer = load("../c_lexer/c_lexer.hancho")

c_parser_lib = rules.c_library(
Expand Down
2 changes: 1 addition & 1 deletion examples/ini/ini.hancho
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
# INI parser example
from hancho import *

rules = load("config/rules.hancho")
rules = load("../../config/rules.hancho")

ini_parser_lib = rules.c_library("ini_parser.cpp", "ini_parser.a")
2 changes: 1 addition & 1 deletion examples/json/json.hancho
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Matcheroni JSON parser example
from hancho import *

rules = load("config/rules.hancho")
rules = load("../../config/rules.hancho")

json_parser = rules.c_library(
["json_matcher.cpp", "json_parser.cpp"],
Expand Down
2 changes: 1 addition & 1 deletion examples/regex/regex.hancho
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Matcheroni regex parsing example
from hancho import *

rules = load("config/rules.hancho")
rules = load("../../config/rules.hancho")

# These are the various regex libraries that Matcheroni can be benchmarked
# against. CTRE and SRELL require that you copy their header into matcheroni/.
Expand Down
2 changes: 1 addition & 1 deletion examples/toml/toml.hancho
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# TOML parser example
from hancho import *

rules = load("config/rules.hancho")
rules = load("../../config/rules.hancho")

toml_lib = rules.c_library(
"toml_parser.cpp",
Expand Down
6 changes: 3 additions & 3 deletions examples/tutorial/tutorial.hancho
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# Tutorial examples
from hancho import *

rules = load("config/rules.hancho")
c_lexer = load("examples/c_lexer/c_lexer.hancho")
c_parser = load("examples/c_parser/c_parser.hancho")
rules = load("../../config/rules.hancho")
c_lexer = load("../c_lexer/c_lexer.hancho")
c_parser = load("../c_parser/c_parser.hancho")

rules.c_test("json_tut0a.cpp", "json_tut0a", quiet = True)
rules.c_test("json_tut1a.cpp", "json_tut1a", quiet = True)
Expand Down
2 changes: 1 addition & 1 deletion tests/tests.hancho
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Tests
from hancho import *

rules = load("config/rules.hancho")
rules = load("../config/rules.hancho")

#build obj/matcheroni/Matcheroni.hpp.iwyu : iwyu matcheroni/Matcheroni.hpp
#build obj/matcheroni/Parseroni.hpp.iwyu : iwyu matcheroni/Parseroni.hpp
Expand Down

0 comments on commit fca2476

Please sign in to comment.