ruby-ll 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fd55a2428a6cd20f170e26bae7dda7aa26b8f281
4
- data.tar.gz: 315611a356d9591994d3261a89fac9c02b62ee22
3
+ metadata.gz: a058e52fdce3a69cfacb367d31f25d9322b09d3a
4
+ data.tar.gz: 66c890ff03310a459735f8c14d2a452f4415e550
5
5
  SHA512:
6
- metadata.gz: cc4d32bd6782556ece7e8f982ba8861592b88fcb63b1e4c5fbeb6820143a17a53f8886f1f6ca093b122bf8a42ed4b63ad2455413c65a488c3a1452b0a6a4f327
7
- data.tar.gz: 8daaa50d482348a3e31afee4b03320486fcd30cca6d7d8ee4bdd579f722ceb3f90e76d1ca196660f499bdc0d27a7d8abe5d350ec9d048c972dbca22f6349fddf
6
+ metadata.gz: b2635328c10c6b8a4c9570e997a2e9ecd0536fa767b03b62306f0eb9285c984e6b68b22bb1519164c1cef5c4a12cc3c2f3537f7aefc874464c2d4834b36edea2
7
+ data.tar.gz: 8dfcc7a62283212ff857fd2ff2b33b68f78b2ee095021975900ddbd55f7abf7fc7795cd9a4081c2109a8e72b17cd21d9924c93b7a29daf9d5fcf77844cfca109
data/.yardopts CHANGED
@@ -11,3 +11,4 @@
11
11
  ./doc/*.md
12
12
  LICENSE
13
13
  CONTRIBUTING.md
14
+ CHANGELOG.md
data/README.md CHANGED
@@ -80,6 +80,24 @@ parsing simply call the `parse` method:
80
80
  The return value of this method is whatever the root rule (= the first rule
81
81
  defined) returned.
82
82
 
83
+ ## Parser Input
84
+
85
+ For a parser to work it must receive its input from a separate lexer. To pass
86
+ input to the parser you must define the method `each_token` in an `%inner`
87
+ block. This method should yield an Array containing two values:
88
+
89
+ 1. The token type as a Symbol (e.g. `:T_STRING`)
90
+ 2. The token value, this can be any type of value
91
+
92
+ The last Array yielded by this method should be `[-1, -1]` to signal the end of
93
+ the input. For example:
94
+
95
+ def each_token
96
+ yield [:T_STRING, 'foo']
97
+ yield [:T_STRING, 'bar']
98
+ yield [-1, -1]
99
+ end
100
+
83
101
  ## Error Handling
84
102
 
85
103
  Parser errors are handled by `LL::Driver#parser_error`. By default this method
@@ -28,20 +28,6 @@ void ll_driver_config_free(DriverConfig *config)
28
28
  free(config);
29
29
  }
30
30
 
31
- /**
32
- * Marks various members of the DriverConfig to ensure they are not garbage
33
- * collected until at least the next GC run.
34
- */
35
- void ll_driver_config_mark(DriverConfig *config)
36
- {
37
- long index;
38
-
39
- FOR(index, config->actions_count)
40
- {
41
- rb_gc_mark(config->action_names[index]);
42
- }
43
- }
44
-
45
31
  /**
46
32
  * Allocates a new DriverConfig.
47
33
  */
@@ -51,8 +37,9 @@ VALUE ll_driver_config_allocate(VALUE klass)
51
37
 
52
38
  return Data_Wrap_Struct(
53
39
  klass,
54
- ll_driver_config_mark,
55
- ll_driver_config_free, config
40
+ NULL,
41
+ ll_driver_config_free,
42
+ config
56
43
  );
57
44
  }
58
45
 
data/lib/ll/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module LL
2
- VERSION = '1.1.2'
2
+ VERSION = '1.1.3'
3
3
  end # LL
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-ll
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yorick Peterse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-15 00:00:00.000000000 Z
11
+ date: 2015-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ast
@@ -149,7 +149,6 @@ files:
149
149
  - README.md
150
150
  - bin/ruby-ll
151
151
  - doc/DCO.md
152
- - doc/changelog.md
153
152
  - doc/css/common.css
154
153
  - ext/c/driver.c
155
154
  - ext/c/driver.h
data/doc/changelog.md DELETED
@@ -1,30 +0,0 @@
1
- # Changelog
2
-
3
- This document contains details of the various releases and their release dates.
4
- Dates are in the format `yyyy-mm-dd`.
5
-
6
- ## 1.1.2 - 2015-02-16
7
-
8
- The file `ll/setup` now also loads `LL::ConfigurationCompiler` to ensure that
9
- the `TYPES` array (and thus `LL::Driver#id_to_type`) can be used outside of
10
- ruby-ll itself.
11
-
12
- ## 1.1.1 - 2015-02-16
13
-
14
- Parser errors produced by ruby-ll's own parser/grammar now include the line
15
- number/column number whenever possible.
16
-
17
- ## 1.1.0 - 2015-02-16
18
-
19
- This release changes the way error handling is done. Instead of having multiple,
20
- separate error callbacks there's now only one error callback:
21
- `LL::Driver#parser_error`. See commit 22b6081e37509d10e3b31d6593b0a7f2e5fd7839
22
- for more information.
23
-
24
- While this change technically breaks backwards compatibility I do not consider
25
- the old error handling system part of the public API, mainly due to it being
26
- extremely painful to use.
27
-
28
- ## 1.0.0 - 2015-02-13
29
-
30
- The first public release of ruby-ll!