packcr 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +21 -0
- data/README.md +73 -0
- data/lib/packcr/context.rb +1 -1
- data/lib/packcr/generated/context.rb +121 -78
- data/lib/packcr/generated/node/action_node.rb +2 -2
- data/lib/packcr/generated/node/alternate_node.rb +2 -2
- data/lib/packcr/generated/node/capture_node.rb +1 -1
- data/lib/packcr/generated/node/charclass_node.rb +9 -9
- data/lib/packcr/generated/node/eof_node.rb +1 -1
- data/lib/packcr/generated/node/error_node.rb +2 -2
- data/lib/packcr/generated/node/expand_node.rb +2 -2
- data/lib/packcr/generated/node/predicate_node.rb +2 -2
- data/lib/packcr/generated/node/quantity_node.rb +30 -31
- data/lib/packcr/generated/node/reference_node.rb +2 -2
- data/lib/packcr/generated/node/rule_node.rb +7 -7
- data/lib/packcr/generated/node/string_node.rb +4 -4
- data/lib/packcr/parser.rb +619 -613
- data/lib/packcr/templates/context/header.c.erb +3 -3
- data/lib/packcr/templates/context/source.c.erb +417 -403
- data/lib/packcr/templates/context/source.rb.erb +42 -25
- data/lib/packcr/templates/node/action.c.erb +2 -2
- data/lib/packcr/templates/node/alternate.c.erb +2 -2
- data/lib/packcr/templates/node/capture.c.erb +2 -2
- data/lib/packcr/templates/node/charclass.c.erb +4 -4
- data/lib/packcr/templates/node/charclass_any.c.erb +2 -2
- data/lib/packcr/templates/node/charclass_one.c.erb +4 -4
- data/lib/packcr/templates/node/charclass_utf8.c.erb +2 -2
- data/lib/packcr/templates/node/eof.c.erb +1 -1
- data/lib/packcr/templates/node/error.c.erb +4 -4
- data/lib/packcr/templates/node/expand.c.erb +2 -2
- data/lib/packcr/templates/node/predicate.c.erb +1 -1
- data/lib/packcr/templates/node/predicate_neg.c.erb +1 -1
- data/lib/packcr/templates/node/quantity_many.c.erb +9 -7
- data/lib/packcr/templates/node/quantity_one.c.erb +9 -7
- data/lib/packcr/templates/node/quantity_one.rb.erb +4 -4
- data/lib/packcr/templates/node/reference.c.erb +6 -6
- data/lib/packcr/templates/node/rule.c.erb +9 -9
- data/lib/packcr/templates/node/string_many.c.erb +2 -2
- data/lib/packcr/templates/node/string_one.c.erb +2 -2
- data/lib/packcr/util.rb +1 -1
- data/lib/packcr/version.rb +1 -1
- metadata +5 -3
@@ -6,8 +6,8 @@
|
|
6
6
|
<%- if !code(:eheader).empty? -%>
|
7
7
|
|
8
8
|
<%- end -%>
|
9
|
-
#ifndef
|
10
|
-
#define
|
9
|
+
#ifndef PACKCR_INCLUDED_<%= @hid %>
|
10
|
+
#define PACKCR_INCLUDED_<%= @hid %>
|
11
11
|
|
12
12
|
<%- code(:header).each do |code| -%>
|
13
13
|
<%= stream.get_code_block(code, 0, @iname) -%>
|
@@ -26,4 +26,4 @@ void <%= prefix %>_destroy(<%= prefix %>_context_t *ctx);
|
|
26
26
|
}
|
27
27
|
#endif
|
28
28
|
|
29
|
-
#endif /* !
|
29
|
+
#endif /* !PACKCR_INCLUDED_<%= @hid %> */
|