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
1
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
Sven M. Hallberg
hammer
Commits
1f047d9f
Commit
1f047d9f
authored
10 years ago
by
Meredith L. Patterson
Browse files
Options
Downloads
Patches
Plain Diff
Tests run now, all fail, I'm doing something wrong
parent
fb5054b6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/bindings/lua/hammer.lua
+7
-5
7 additions, 5 deletions
src/bindings/lua/hammer.lua
with
7 additions
and
5 deletions
src/bindings/lua/hammer.lua
+
7
−
5
View file @
1f047d9f
local
ffi
=
require
(
"ffi"
)
ffi
.
cdef
[[
static const BYTE_BIG_ENDIAN = 0x1
static const BIT_BIG_ENDIAN = 0x2
static const BYTE_LITTLE_ENDIAN = 0x0
static const BIT_LITTLE_ENDIAN = 0x0
typedef enum HParserBackend_ {
PB_MIN = 0,
PB_PACKRAT = PB_MIN, // PB_MIN is always the default.
...
...
@@ -74,6 +69,8 @@ typedef struct HParser_ {
HCFChoice *desugared;
} HParser;
typedef struct HAllocator_ HAllocator;
typedef HParsedToken* (*HAction)(const HParseResult *p, void* user_data);
typedef bool (*HPredicate)(HParseResult *p, void* user_data);
typedef HParser* (*HContinuation)(HAllocator *mm__, const HParsedToken *x, void *env);
...
...
@@ -127,6 +124,11 @@ HParser* h_get_value(const char* name);
HParser* h_bind(const HParser *p, HContinuation k, void *env);
int h_compile(HParser* parser, HParserBackend backend, const void* params);
static const uint8_t BYTE_BIG_ENDIAN = 0x1;
static const uint8_t BIT_BIG_ENDIAN = 0x2;
static const uint8_t BYTE_LITTLE_ENDIAN = 0x0;
static const uint8_t BIT_LITTLE_ENDIAN = 0x0;
]]
local
h
=
ffi
.
load
(
"hammer"
)
...
...
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