c_lexer 2.5.1.2.0 → 2.5.3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/appveyor.yml +1 -0
- data/c_lexer.gemspec +1 -1
- data/ext/lexer/emit_tables.h +5 -5
- data/ext/lexer/lexer.c +3654 -3647
- data/ext/lexer/lexer.h +29 -29
- data/ext/lexer/lexer.rl +508 -508
- data/ext/lexer/{literal.h → literal/literal.h} +2 -2
- data/ext/lexer/literal/methods.h +1 -1
- data/ext/lexer/stack_state/cmdarg.h +47 -0
- data/ext/lexer/stack_state/cond.h +47 -0
- data/ext/lexer/{stack.h → stack_state/stack.h} +0 -0
- data/ext/lexer/{stack_state.h → stack_state/stack_state.h} +2 -2
- data/lib/c_lexer/version.rb +1 -1
- metadata +9 -9
- data/ext/lexer/cmdarg.h +0 -47
- data/ext/lexer/cond.h +0 -47
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 800cd59a14ae069faa79e1c07c8a04cd63f4e8efb6183ba57a33bf4d6a3b2697
|
4
|
+
data.tar.gz: d09202687206aa93d1448f0f04066e8c40d3eacb854e34723266e094b1f9df70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a31f6aa1012e0af53247327d703be8fd2eb38ca8821eb09b60c6142e9f315c6959669b8069aa58ca38108a9becd99e62f33fb37e17228cb9ae3d82d8c251af7c
|
7
|
+
data.tar.gz: 2c6b79d9c25f5dc8c2132bb268a23a66f2177ad2cf751ab16c4fc7ec9d3d758dcb1badd26df7d2cb5f665d196b333c5bf42b4dffeb28d9cd21303e1027a0d46e
|
data/Gemfile.lock
CHANGED
data/appveyor.yml
CHANGED
data/c_lexer.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.extensions = ['ext/lexer/extconf.rb']
|
23
23
|
|
24
24
|
spec.add_dependency 'ast', '~> 2.4.0'
|
25
|
-
spec.add_dependency 'parser', '= 2.5.
|
25
|
+
spec.add_dependency 'parser', '= 2.5.3.0'
|
26
26
|
|
27
27
|
spec.add_development_dependency 'bundler', '~> 1.16'
|
28
28
|
spec.add_development_dependency 'rake', '~> 10.0'
|
data/ext/lexer/emit_tables.h
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
#define try_mapping(str, token) if (strcmp(value_str, str) == 0) { emit_token(
|
1
|
+
#define try_mapping(str, token) if (strcmp(value_str, str) == 0) { emit_token(lexer, token, value, start, end); return; }
|
2
2
|
#define invalid_mapping rb_raise(rb_eArgError, "Invalid punctuation token: %s", value_str);
|
3
3
|
|
4
|
-
static void emit_table_PUNCTUATION(
|
4
|
+
static void emit_table_PUNCTUATION(Lexer *lexer, VALUE value, long start, long end)
|
5
5
|
{
|
6
6
|
const char *value_str = RSTRING_PTR(value);
|
7
7
|
|
@@ -59,7 +59,7 @@ static void emit_table_PUNCTUATION(lexer_state *state, VALUE value, long start,
|
|
59
59
|
invalid_mapping;
|
60
60
|
}
|
61
61
|
|
62
|
-
static void emit_table_PUNCTUATION_BEGIN(
|
62
|
+
static void emit_table_PUNCTUATION_BEGIN(Lexer *lexer, VALUE value, long start, long end)
|
63
63
|
{
|
64
64
|
const char *value_str = RSTRING_PTR(value);
|
65
65
|
|
@@ -76,7 +76,7 @@ static void emit_table_PUNCTUATION_BEGIN(lexer_state *state, VALUE value, long s
|
|
76
76
|
invalid_mapping;
|
77
77
|
}
|
78
78
|
|
79
|
-
static void emit_table_KEYWORDS(
|
79
|
+
static void emit_table_KEYWORDS(Lexer *lexer, VALUE value, long start, long end)
|
80
80
|
{
|
81
81
|
const char *value_str = RSTRING_PTR(value);
|
82
82
|
|
@@ -126,7 +126,7 @@ static void emit_table_KEYWORDS(lexer_state *state, VALUE value, long start, lon
|
|
126
126
|
invalid_mapping;
|
127
127
|
}
|
128
128
|
|
129
|
-
static void emit_table_KEYWORDS_BEGIN(
|
129
|
+
static void emit_table_KEYWORDS_BEGIN(Lexer *lexer, VALUE value, long start, long end)
|
130
130
|
{
|
131
131
|
const char *value_str = RSTRING_PTR(value);
|
132
132
|
|