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
Vyrus
hammer
Commits
a88c6c8a
Commit
a88c6c8a
authored
11 years ago
by
Meredith L. Patterson
Browse files
Options
Downloads
Plain Diff
Merge pull request #7 from zaxtax/regex
Adding epislon and nothing
parents
875c9b9c
e69fd2e5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/parsers/epsilon.c
+5
-0
5 additions, 0 deletions
src/parsers/epsilon.c
src/parsers/nothing.c
+6
-1
6 additions, 1 deletion
src/parsers/nothing.c
with
11 additions
and
1 deletion
src/parsers/epsilon.c
+
5
−
0
View file @
a88c6c8a
...
...
@@ -8,10 +8,15 @@ static HParseResult* parse_epsilon(void* env, HParseState* state) {
return
res
;
}
static
bool
episilon_ctrvm
(
HRVMProg
*
prog
,
void
*
env
)
{
return
true
;
}
static
const
HParserVtable
epsilon_vt
=
{
.
parse
=
parse_epsilon
,
.
isValidRegular
=
h_true
,
.
isValidCF
=
h_true
,
.
compile_to_rvm
=
episilon_ctrvm
,
};
static
const
HParser
epsilon_p
=
{
...
...
This diff is collapsed.
Click to expand it.
src/parsers/nothing.c
+
6
−
1
View file @
a88c6c8a
#include
"parser_internal.h"
static
HParseResult
*
parse_nothing
()
{
// not a mistake, this parser always fails
return
NULL
;
}
static
bool
nothing_ctrvm
(
HRVMProg
*
prog
,
void
*
env
)
{
h_rvm_insert_insn
(
prog
,
RVM_MATCH
,
0x00FF
);
return
true
;
}
static
const
HParserVtable
nothing_vt
=
{
.
parse
=
parse_nothing
,
.
isValidRegular
=
h_true
,
.
isValidCF
=
h_true
,
.
compile_to_rvm
=
nothing_ctrvm
,
};
const
HParser
*
h_nothing_p
()
{
...
...
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