rparsec 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,21 +1,24 @@
1
- require 'rparsec/misc'
2
-
3
- #
4
- # This class represents a token during lexical analysis.
5
- #
6
- class Token
7
- extend DefHelper
8
- def_readable :kind, :text, :index
9
- #
10
- # The length of the token.
11
- #
12
- def length
13
- @text.length
14
- end
15
- #
16
- # String representation of the token.
17
- #
18
- def to_s
19
- "#{@kind}: #{@text}"
20
- end
1
+ require 'rparsec/misc'
2
+
3
+ #
4
+ # This class represents a token during lexical analysis.
5
+ #
6
+ class Token
7
+ extend DefHelper
8
+
9
+ def_readable :kind, :text, :index
10
+
11
+ #
12
+ # The length of the token.
13
+ #
14
+ def length
15
+ @text.length
16
+ end
17
+
18
+ #
19
+ # String representation of the token.
20
+ #
21
+ def to_s
22
+ "#{@kind}: #{@text}"
23
+ end
21
24
  end
@@ -1,21 +1,21 @@
1
- require 'import'
2
- require 'runit/testcase'
3
- import :id_monad, :monad
4
-
5
- class Idm
6
- include Monad
7
- MyMonad = IdMonad.new
8
- def initialize(v)
9
- initMonad(MyMonad, v);
10
- end
11
- def to_s
12
- @obj.to_s
13
- end
14
- end
15
-
16
- class SimpleMonadTest < RUNIT::TestCase
17
- def test1
18
- assert 20, Idm.new(10).map{|i|i*2}
19
- assert 10, Idm.new(10).plus(Idm.new(20))
20
- end
21
- end
1
+ require 'import'
2
+ require 'runit/testcase'
3
+ import :id_monad, :monad
4
+
5
+ class Idm
6
+ include Monad
7
+ MyMonad = IdMonad.new
8
+ def initialize(v)
9
+ initMonad(MyMonad, v);
10
+ end
11
+ def to_s
12
+ @obj.to_s
13
+ end
14
+ end
15
+
16
+ class SimpleMonadTest < RUNIT::TestCase
17
+ def test1
18
+ assert 20, Idm.new(10).map{|i|i*2}
19
+ assert 10, Idm.new(10).plus(Idm.new(20))
20
+ end
21
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.10
2
+ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: rparsec
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.4.1
7
- date: 2006-11-22
6
+ version: 0.4.2
7
+ date: 2008-04-09 00:00:00 -05:00
8
8
  summary: A Ruby Parser Combinator Framework
9
9
  require_paths:
10
- - "."
10
+ - .
11
11
  email: ajoo.email@gmail.com
12
12
  homepage:
13
13
  rubyforge_project:
@@ -18,50 +18,58 @@ bindir: bin
18
18
  has_rdoc: true
19
19
  required_ruby_version: !ruby/object:Gem::Version::Requirement
20
20
  requirements:
21
- -
22
- - ">"
23
- - !ruby/object:Gem::Version
24
- version: 0.0.0
21
+ - - ">"
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.0
25
24
  version:
26
25
  platform: ruby
26
+ signing_key:
27
+ cert_chain:
28
+ post_install_message:
27
29
  authors:
28
- - Ben Yu
30
+ - Ben Yu
29
31
  files:
30
- - rparsec/context.rb
31
- - rparsec/error.rb
32
- - rparsec/expressions.rb
33
- - rparsec/functors.rb
34
- - rparsec/id_monad.rb
35
- - rparsec/keywords.rb
36
- - rparsec/locator.rb
37
- - rparsec/misc.rb
38
- - rparsec/monad.rb
39
- - rparsec/operators.rb
40
- - rparsec/parser.rb
41
- - rparsec/parsers.rb
42
- - rparsec/parser_monad.rb
43
- - rparsec/token.rb
44
- - rparsec.rb
32
+ - rparsec/context.rb
33
+ - rparsec/error.rb
34
+ - rparsec/expressions.rb
35
+ - rparsec/functors.rb
36
+ - rparsec/id_monad.rb
37
+ - rparsec/keywords.rb
38
+ - rparsec/locator.rb
39
+ - rparsec/misc.rb
40
+ - rparsec/monad.rb
41
+ - rparsec/operators.rb
42
+ - rparsec/parser.rb
43
+ - rparsec/parser_monad.rb
44
+ - rparsec/parsers.rb
45
+ - rparsec/token.rb
46
+ - rparsec.rb
45
47
  test_files:
46
- - test/src/expression_test.rb
47
- - test/src/full_parser_test.rb
48
- - test/src/functor_test.rb
49
- - test/src/import.rb
50
- - test/src/keyword_test.rb
51
- - test/src/operator_test.rb
52
- - test/src/parser_test.rb
53
- - test/src/perf_benchmark.rb
54
- - test/src/scratch.rb
55
- - test/src/simple_monad_test.rb
56
- - test/src/simple_parser_test.rb
57
- - test/src/sql.rb
58
- - test/src/sql_parser.rb
59
- - test/src/sql_test.rb
60
- - test/src/s_expression_test.rb
61
- - test/src/tests.rb
48
+ - test/src/expression_test.rb
49
+ - test/src/full_parser_test.rb
50
+ - test/src/functor_test.rb
51
+ - test/src/import.rb
52
+ - test/src/keyword_test.rb
53
+ - test/src/operator_test.rb
54
+ - test/src/parser_test.rb
55
+ - test/src/perf_benchmark.rb
56
+ - test/src/s_expression_test.rb
57
+ - test/src/scratch.rb
58
+ - test/src/simple_monad_test.rb
59
+ - test/src/simple_parser_test.rb
60
+ - test/src/sql.rb
61
+ - test/src/sql_parser.rb
62
+ - test/src/sql_test.rb
63
+ - test/src/tests.rb
62
64
  rdoc_options: []
65
+
63
66
  extra_rdoc_files: []
67
+
64
68
  executables: []
69
+
65
70
  extensions: []
71
+
66
72
  requirements: []
67
- dependencies: []
73
+
74
+ dependencies: []
75
+