Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hammer
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Denley Lam
hammer
Commits
3fefa204
Commit
3fefa204
authored
11 years ago
by
Dan Hirsch
Committed by
Meredith L. Patterson
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
We declared some functions that were never implemented. Implement them.
parent
87c380f8
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/hammer.c
+4
-0
4 additions, 0 deletions
src/hammer.c
src/hammer.h
+2
-1
2 additions, 1 deletion
src/hammer.h
src/parsers/indirect.c
+4
-0
4 additions, 0 deletions
src/parsers/indirect.c
with
10 additions
and
1 deletion
src/hammer.c
+
4
−
0
View file @
3fefa204
...
...
@@ -62,6 +62,10 @@ HParseResult* h_parse__m(HAllocator* mm__, const HParser* parser, const uint8_t*
return
backends
[
parser
->
backend
]
->
parse
(
mm__
,
parser
,
&
input_stream
);
}
void
h_parse_result_free__m
(
HAllocator
*
alloc
,
HParseResult
*
result
)
{
h_parse_result_free
(
result
);
}
void
h_parse_result_free
(
HParseResult
*
result
)
{
if
(
result
==
NULL
)
return
;
h_delete_arena
(
result
->
arena
);
...
...
This diff is collapsed.
Click to expand it.
src/hammer.h
+
2
−
1
View file @
3fefa204
...
...
@@ -126,6 +126,7 @@ typedef struct HCFChoice_ HCFChoice;
typedef
struct
HRVMProg_
HRVMProg
;
typedef
struct
HParserVtable_
HParserVtable
;
// TODO: Make this internal
typedef
struct
HParser_
{
const
HParserVtable
*
vtable
;
HParserBackend
backend
;
...
...
@@ -586,7 +587,7 @@ char* h_write_result_unamb(const HParsedToken* tok);
* Format token to the given output stream. Indent starting at
* [indent] spaces, with [delta] spaces between levels.
*/
HAMMER_FN_DECL
(
void
,
h_pprint
,
FILE
*
stream
,
const
HParsedToken
*
tok
,
int
indent
,
int
delta
);
void
h_pprint
(
FILE
*
stream
,
const
HParsedToken
*
tok
,
int
indent
,
int
delta
);
/**
* Build parse tables for the given parser backend. See the
...
...
This diff is collapsed.
Click to expand it.
src/parsers/indirect.c
+
4
−
0
View file @
3fefa204
...
...
@@ -21,6 +21,10 @@ static const HParserVtable indirect_vt = {
.
compile_to_rvm
=
h_not_regular
,
};
void
h_bind_indirect__m
(
HAllocator
*
mm__
,
HParser
*
indirect
,
const
HParser
*
inner
)
{
h_bind_indirect
(
indirect
,
inner
);
}
void
h_bind_indirect
(
HParser
*
indirect
,
const
HParser
*
inner
)
{
assert_message
(
indirect
->
vtable
==
&
indirect_vt
,
"You can only bind an indirect parser"
);
indirect
->
env
=
(
void
*
)
inner
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment