walrat 0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/walrat.rb +70 -0
- data/lib/walrat/additions/proc.rb +32 -0
- data/lib/walrat/additions/regexp.rb +33 -0
- data/lib/walrat/additions/string.rb +99 -0
- data/lib/walrat/additions/symbol.rb +42 -0
- data/lib/walrat/and_predicate.rb +49 -0
- data/lib/walrat/array_result.rb +29 -0
- data/lib/walrat/continuation_wrapper_exception.rb +35 -0
- data/lib/walrat/grammar.rb +259 -0
- data/lib/walrat/left_recursion_exception.rb +34 -0
- data/lib/walrat/location_tracking.rb +126 -0
- data/lib/walrat/match_data_wrapper.rb +84 -0
- data/lib/walrat/memoizing.rb +55 -0
- data/lib/walrat/memoizing_cache.rb +126 -0
- data/lib/walrat/no_parameter_marker.rb +30 -0
- data/lib/walrat/node.rb +63 -0
- data/lib/walrat/not_predicate.rb +49 -0
- data/lib/walrat/parse_error.rb +48 -0
- data/lib/walrat/parser_state.rb +205 -0
- data/lib/walrat/parslet.rb +38 -0
- data/lib/walrat/parslet_choice.rb +155 -0
- data/lib/walrat/parslet_combination.rb +34 -0
- data/lib/walrat/parslet_combining.rb +190 -0
- data/lib/walrat/parslet_merge.rb +96 -0
- data/lib/walrat/parslet_omission.rb +74 -0
- data/lib/walrat/parslet_repetition.rb +114 -0
- data/lib/walrat/parslet_repetition_default.rb +77 -0
- data/lib/walrat/parslet_sequence.rb +241 -0
- data/lib/walrat/predicate.rb +68 -0
- data/lib/walrat/proc_parslet.rb +60 -0
- data/lib/walrat/regexp_parslet.rb +84 -0
- data/lib/walrat/skipped_substring_exception.rb +46 -0
- data/lib/walrat/string_enumerator.rb +47 -0
- data/lib/walrat/string_parslet.rb +89 -0
- data/lib/walrat/string_result.rb +34 -0
- data/lib/walrat/symbol_parslet.rb +82 -0
- data/lib/walrat/version.rb +26 -0
- metadata +110 -0
@@ -0,0 +1,46 @@
|
|
1
|
+
# Copyright 2007-2010 Wincent Colaiuta. All rights reserved.
|
2
|
+
# Redistribution and use in source and binary forms, with or without
|
3
|
+
# modification, are permitted provided that the following conditions are met:
|
4
|
+
#
|
5
|
+
# 1. Redistributions of source code must retain the above copyright notice,
|
6
|
+
# this list of conditions and the following disclaimer.
|
7
|
+
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
8
|
+
# this list of conditions and the following disclaimer in the documentation
|
9
|
+
# and/or other materials provided with the distribution.
|
10
|
+
#
|
11
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
12
|
+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
13
|
+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
14
|
+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
|
15
|
+
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
16
|
+
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
17
|
+
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
18
|
+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
19
|
+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
20
|
+
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
21
|
+
# POSSIBILITY OF SUCH DAMAGE.
|
22
|
+
|
23
|
+
require 'walrat'
|
24
|
+
|
25
|
+
module Walrat
|
26
|
+
# I don't really like using Exceptions for non-error situations, but it seems
|
27
|
+
# that using throw/catch here would not be adequate (not possible to embed
|
28
|
+
# information in the thrown symbol).
|
29
|
+
class SkippedSubstringException < Exception
|
30
|
+
include Walrat::LocationTracking
|
31
|
+
|
32
|
+
def initialize substring, info = {}
|
33
|
+
super substring
|
34
|
+
|
35
|
+
# TODO: this code is just like the code in ParseError. could save
|
36
|
+
# repeating it by setting up inheritance but would need to pay careful
|
37
|
+
# attention to the ordering of my rescue blocks and also change many
|
38
|
+
# instances of "kind_of" in my specs to "instance_of "
|
39
|
+
# alternatively, could look at using a mix-in
|
40
|
+
self.line_start = info[:line_start]
|
41
|
+
self.column_start = info[:column_start]
|
42
|
+
self.line_end = info[:line_end]
|
43
|
+
self.column_end = info[:column_end]
|
44
|
+
end
|
45
|
+
end # class SkippedSubstringException
|
46
|
+
end # module Walrat
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# Copyright 2007-2010 Wincent Colaiuta. All rights reserved.
|
2
|
+
# Redistribution and use in source and binary forms, with or without
|
3
|
+
# modification, are permitted provided that the following conditions are met:
|
4
|
+
#
|
5
|
+
# 1. Redistributions of source code must retain the above copyright notice,
|
6
|
+
# this list of conditions and the following disclaimer.
|
7
|
+
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
8
|
+
# this list of conditions and the following disclaimer in the documentation
|
9
|
+
# and/or other materials provided with the distribution.
|
10
|
+
#
|
11
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
12
|
+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
13
|
+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
14
|
+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
|
15
|
+
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
16
|
+
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
17
|
+
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
18
|
+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
19
|
+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
20
|
+
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
21
|
+
# POSSIBILITY OF SUCH DAMAGE.
|
22
|
+
|
23
|
+
require 'strscan'
|
24
|
+
require 'walrat'
|
25
|
+
|
26
|
+
module Walrat
|
27
|
+
# Unicode-aware (UTF-8) string enumerator.
|
28
|
+
# For Unicode support $KCODE must be set to 'U' (UTF-8).
|
29
|
+
class StringEnumerator
|
30
|
+
# Returns the char most recently scanned before the last "next" call, or
|
31
|
+
# nil if nothing previously scanned.
|
32
|
+
attr_reader :last
|
33
|
+
|
34
|
+
def initialize string
|
35
|
+
raise ArgumentError, 'nil string' if string.nil?
|
36
|
+
@scanner = StringScanner.new string
|
37
|
+
@current = nil
|
38
|
+
@last = nil
|
39
|
+
end
|
40
|
+
|
41
|
+
# This method will only work as expected if $KCODE is set to 'U' (UTF-8).
|
42
|
+
def next
|
43
|
+
@last = @current
|
44
|
+
@current = @scanner.scan(/./m) # must use multiline mode or "." won't match newlines
|
45
|
+
end
|
46
|
+
end # class StringEnumerator
|
47
|
+
end # module Walrus
|
@@ -0,0 +1,89 @@
|
|
1
|
+
# Copyright 2007-2010 Wincent Colaiuta. All rights reserved.
|
2
|
+
# Redistribution and use in source and binary forms, with or without
|
3
|
+
# modification, are permitted provided that the following conditions are met:
|
4
|
+
#
|
5
|
+
# 1. Redistributions of source code must retain the above copyright notice,
|
6
|
+
# this list of conditions and the following disclaimer.
|
7
|
+
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
8
|
+
# this list of conditions and the following disclaimer in the documentation
|
9
|
+
# and/or other materials provided with the distribution.
|
10
|
+
#
|
11
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
12
|
+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
13
|
+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
14
|
+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
|
15
|
+
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
16
|
+
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
17
|
+
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
18
|
+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
19
|
+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
20
|
+
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
21
|
+
# POSSIBILITY OF SUCH DAMAGE.
|
22
|
+
|
23
|
+
require 'walrat'
|
24
|
+
|
25
|
+
module Walrat
|
26
|
+
class StringParslet < Parslet
|
27
|
+
attr_reader :hash
|
28
|
+
|
29
|
+
def initialize string
|
30
|
+
raise ArgumentError if string.nil?
|
31
|
+
self.expected_string = string
|
32
|
+
end
|
33
|
+
|
34
|
+
def parse string, options = {}
|
35
|
+
raise ArgumentError if string.nil?
|
36
|
+
chars = StringEnumerator.new string
|
37
|
+
parsed = StringResult.new
|
38
|
+
parsed.start = [options[:line_start], options[:column_start]]
|
39
|
+
parsed.end = parsed.start
|
40
|
+
expected_string.each_char do |expected_char|
|
41
|
+
actual_char = chars.next
|
42
|
+
if actual_char.nil?
|
43
|
+
raise ParseError.new('unexpected end-of-string (expected "%s") while parsing "%s"' %
|
44
|
+
[ expected_char, expected_string ],
|
45
|
+
:line_end => parsed.line_end,
|
46
|
+
:column_end => parsed.column_end)
|
47
|
+
elsif actual_char != expected_char
|
48
|
+
raise ParseError.new('unexpected character "%s" (expected "%s") while parsing "%s"' %
|
49
|
+
[ actual_char, expected_char, expected_string],
|
50
|
+
:line_end => parsed.line_end,
|
51
|
+
:column_end => parsed.column_end)
|
52
|
+
else
|
53
|
+
if actual_char == "\r" or
|
54
|
+
(actual_char == "\n" and chars.last != "\r") # catches Mac, Windows and UNIX end-of-line markers
|
55
|
+
parsed.column_end = 0
|
56
|
+
parsed.line_end = parsed.line_end + 1
|
57
|
+
elsif actual_char != "\n" # \n is ignored if it is preceded by an \r (already counted above)
|
58
|
+
parsed.column_end = parsed.column_end + 1 # everything else gets counted
|
59
|
+
end
|
60
|
+
parsed << actual_char
|
61
|
+
end
|
62
|
+
end
|
63
|
+
parsed.source_text = parsed.to_s.clone
|
64
|
+
parsed
|
65
|
+
end
|
66
|
+
|
67
|
+
def eql?(other)
|
68
|
+
other.instance_of? StringParslet and
|
69
|
+
other.expected_string == @expected_string
|
70
|
+
end
|
71
|
+
|
72
|
+
protected
|
73
|
+
|
74
|
+
# For equality comparisons.
|
75
|
+
attr_reader :expected_string
|
76
|
+
|
77
|
+
private
|
78
|
+
|
79
|
+
def expected_string=(string)
|
80
|
+
@expected_string = (string.clone rescue string)
|
81
|
+
update_hash
|
82
|
+
end
|
83
|
+
|
84
|
+
def update_hash
|
85
|
+
# fixed offset to avoid collisions with @parseable objects
|
86
|
+
@hash = @expected_string.hash + 20
|
87
|
+
end
|
88
|
+
end # class StringParslet
|
89
|
+
end # module Walrat
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# Copyright 2007-2010 Wincent Colaiuta. All rights reserved.
|
2
|
+
# Redistribution and use in source and binary forms, with or without
|
3
|
+
# modification, are permitted provided that the following conditions are met:
|
4
|
+
#
|
5
|
+
# 1. Redistributions of source code must retain the above copyright notice,
|
6
|
+
# this list of conditions and the following disclaimer.
|
7
|
+
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
8
|
+
# this list of conditions and the following disclaimer in the documentation
|
9
|
+
# and/or other materials provided with the distribution.
|
10
|
+
#
|
11
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
12
|
+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
13
|
+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
14
|
+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
|
15
|
+
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
16
|
+
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
17
|
+
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
18
|
+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
19
|
+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
20
|
+
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
21
|
+
# POSSIBILITY OF SUCH DAMAGE.
|
22
|
+
|
23
|
+
require 'walrat'
|
24
|
+
|
25
|
+
module Walrat
|
26
|
+
class StringResult < String
|
27
|
+
include Walrat::LocationTracking
|
28
|
+
|
29
|
+
def initialize string = ""
|
30
|
+
self.source_text = string
|
31
|
+
super
|
32
|
+
end
|
33
|
+
end # class StringResult
|
34
|
+
end # module Walrat
|
@@ -0,0 +1,82 @@
|
|
1
|
+
# Copyright 2007-2010 Wincent Colaiuta. All rights reserved.
|
2
|
+
# Redistribution and use in source and binary forms, with or without
|
3
|
+
# modification, are permitted provided that the following conditions are met:
|
4
|
+
#
|
5
|
+
# 1. Redistributions of source code must retain the above copyright notice,
|
6
|
+
# this list of conditions and the following disclaimer.
|
7
|
+
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
8
|
+
# this list of conditions and the following disclaimer in the documentation
|
9
|
+
# and/or other materials provided with the distribution.
|
10
|
+
#
|
11
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
12
|
+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
13
|
+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
14
|
+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
|
15
|
+
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
16
|
+
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
17
|
+
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
18
|
+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
19
|
+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
20
|
+
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
21
|
+
# POSSIBILITY OF SUCH DAMAGE.
|
22
|
+
|
23
|
+
require 'walrat'
|
24
|
+
|
25
|
+
module Walrat
|
26
|
+
# A SymbolParslet allows for evaluation of a parslet to be deferred until
|
27
|
+
# runtime (or parse time, to be more precise).
|
28
|
+
class SymbolParslet < Parslet
|
29
|
+
attr_reader :hash
|
30
|
+
|
31
|
+
def initialize symbol
|
32
|
+
raise ArgumentError, 'nil symbol' if symbol.nil?
|
33
|
+
@symbol = symbol
|
34
|
+
|
35
|
+
# fixed offset to avoid collisions with @parseable objects
|
36
|
+
@hash = @symbol.hash + 20
|
37
|
+
end
|
38
|
+
|
39
|
+
# SymbolParslets don't actually know what Grammar they are associated with
|
40
|
+
# at the time of their definition. They expect the Grammar to be passed in
|
41
|
+
# with the options hash under the ":grammar" key.
|
42
|
+
# Raises if string is nil, or if the options hash does not include a
|
43
|
+
# :grammar key.
|
44
|
+
def parse string, options = {}
|
45
|
+
raise ArgumentError if string.nil?
|
46
|
+
raise ArgumentError unless options.has_key?(:grammar)
|
47
|
+
grammar = options[:grammar]
|
48
|
+
augmented_options = options.clone
|
49
|
+
augmented_options[:rule_name] = @symbol
|
50
|
+
augmented_options[:skipping_override] = grammar.skipping_overrides[@symbol] if grammar.skipping_overrides.has_key?(@symbol)
|
51
|
+
result = grammar.rules[@symbol].memoizing_parse(string, augmented_options)
|
52
|
+
grammar.wrap(result, @symbol)
|
53
|
+
end
|
54
|
+
|
55
|
+
# We override the to_s method as it can make parsing error messages more
|
56
|
+
# readable. Instead of messages like this:
|
57
|
+
#
|
58
|
+
# predicate not satisfied (expected "#<Walrat::SymbolParslet:0x10cd504>")
|
59
|
+
# while parsing "hello world"
|
60
|
+
#
|
61
|
+
# We can print messages like this:
|
62
|
+
#
|
63
|
+
# predicate not satisfied (expected "rule: end_of_input") while parsing
|
64
|
+
# "hello world"
|
65
|
+
def to_s
|
66
|
+
'rule: ' + @symbol.to_s
|
67
|
+
end
|
68
|
+
|
69
|
+
def ==(other)
|
70
|
+
eql?(other)
|
71
|
+
end
|
72
|
+
|
73
|
+
def eql?(other)
|
74
|
+
other.instance_of? SymbolParslet and other.symbol == @symbol
|
75
|
+
end
|
76
|
+
|
77
|
+
protected
|
78
|
+
|
79
|
+
# For equality comparisons.
|
80
|
+
attr_reader :symbol
|
81
|
+
end # class SymbolParslet
|
82
|
+
end # module Walrat
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# Copyright 2007-2010 Wincent Colaiuta. All rights reserved.
|
2
|
+
# Redistribution and use in source and binary forms, with or without
|
3
|
+
# modification, are permitted provided that the following conditions are met:
|
4
|
+
#
|
5
|
+
# 1. Redistributions of source code must retain the above copyright notice,
|
6
|
+
# this list of conditions and the following disclaimer.
|
7
|
+
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
8
|
+
# this list of conditions and the following disclaimer in the documentation
|
9
|
+
# and/or other materials provided with the distribution.
|
10
|
+
#
|
11
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
12
|
+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
13
|
+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
14
|
+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
|
15
|
+
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
16
|
+
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
17
|
+
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
18
|
+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
19
|
+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
20
|
+
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
21
|
+
# POSSIBILITY OF SUCH DAMAGE.
|
22
|
+
|
23
|
+
module Walrat
|
24
|
+
VERSION = '0.1'
|
25
|
+
COPYRIGHT = 'Copyright 2007-2010 Wincent Colaiuta'
|
26
|
+
end # module Walrat
|
metadata
ADDED
@@ -0,0 +1,110 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: walrat
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 1
|
8
|
+
version: "0.1"
|
9
|
+
platform: ruby
|
10
|
+
authors:
|
11
|
+
- Wincent Colaiuta
|
12
|
+
autorequire:
|
13
|
+
bindir: bin
|
14
|
+
cert_chain: []
|
15
|
+
|
16
|
+
date: 2010-08-21 00:00:00 +02:00
|
17
|
+
default_executable:
|
18
|
+
dependencies:
|
19
|
+
- !ruby/object:Gem::Dependency
|
20
|
+
name: rspec
|
21
|
+
prerelease: false
|
22
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
segments:
|
27
|
+
- 1
|
28
|
+
- 3
|
29
|
+
- 0
|
30
|
+
version: 1.3.0
|
31
|
+
type: :development
|
32
|
+
version_requirements: *id001
|
33
|
+
description: " Walrat is a Parsing Expression Grammar (PEG) parser generator that\n creates integrated lexers, \"packrat\" parsers, and Abstract Syntax Tree\n (AST) builders.\n"
|
34
|
+
email: win@wincent.com
|
35
|
+
executables: []
|
36
|
+
|
37
|
+
extensions: []
|
38
|
+
|
39
|
+
extra_rdoc_files: []
|
40
|
+
|
41
|
+
files:
|
42
|
+
- lib/walrat/additions/proc.rb
|
43
|
+
- lib/walrat/additions/regexp.rb
|
44
|
+
- lib/walrat/additions/string.rb
|
45
|
+
- lib/walrat/additions/symbol.rb
|
46
|
+
- lib/walrat/and_predicate.rb
|
47
|
+
- lib/walrat/array_result.rb
|
48
|
+
- lib/walrat/continuation_wrapper_exception.rb
|
49
|
+
- lib/walrat/grammar.rb
|
50
|
+
- lib/walrat/left_recursion_exception.rb
|
51
|
+
- lib/walrat/location_tracking.rb
|
52
|
+
- lib/walrat/match_data_wrapper.rb
|
53
|
+
- lib/walrat/memoizing.rb
|
54
|
+
- lib/walrat/memoizing_cache.rb
|
55
|
+
- lib/walrat/no_parameter_marker.rb
|
56
|
+
- lib/walrat/node.rb
|
57
|
+
- lib/walrat/not_predicate.rb
|
58
|
+
- lib/walrat/parse_error.rb
|
59
|
+
- lib/walrat/parser_state.rb
|
60
|
+
- lib/walrat/parslet.rb
|
61
|
+
- lib/walrat/parslet_choice.rb
|
62
|
+
- lib/walrat/parslet_combination.rb
|
63
|
+
- lib/walrat/parslet_combining.rb
|
64
|
+
- lib/walrat/parslet_merge.rb
|
65
|
+
- lib/walrat/parslet_omission.rb
|
66
|
+
- lib/walrat/parslet_repetition.rb
|
67
|
+
- lib/walrat/parslet_repetition_default.rb
|
68
|
+
- lib/walrat/parslet_sequence.rb
|
69
|
+
- lib/walrat/predicate.rb
|
70
|
+
- lib/walrat/proc_parslet.rb
|
71
|
+
- lib/walrat/regexp_parslet.rb
|
72
|
+
- lib/walrat/skipped_substring_exception.rb
|
73
|
+
- lib/walrat/string_enumerator.rb
|
74
|
+
- lib/walrat/string_parslet.rb
|
75
|
+
- lib/walrat/string_result.rb
|
76
|
+
- lib/walrat/symbol_parslet.rb
|
77
|
+
- lib/walrat/version.rb
|
78
|
+
- lib/walrat.rb
|
79
|
+
has_rdoc: true
|
80
|
+
homepage: https://wincent.com/products/walrat
|
81
|
+
licenses: []
|
82
|
+
|
83
|
+
post_install_message:
|
84
|
+
rdoc_options: []
|
85
|
+
|
86
|
+
require_paths:
|
87
|
+
- lib
|
88
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
89
|
+
requirements:
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
segments:
|
93
|
+
- 0
|
94
|
+
version: "0"
|
95
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
segments:
|
100
|
+
- 0
|
101
|
+
version: "0"
|
102
|
+
requirements: []
|
103
|
+
|
104
|
+
rubyforge_project: walrus
|
105
|
+
rubygems_version: 1.3.6
|
106
|
+
signing_key:
|
107
|
+
specification_version: 3
|
108
|
+
summary: Object-oriented templating system
|
109
|
+
test_files: []
|
110
|
+
|