Class: L43Peg::Parser
- Inherits:
-
Object
show all
- Defined in:
- lib/l43_peg/parser.rb,
lib/l43_peg/combinators.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
-
#boxed(box, name: nil, &mapper) ⇒ Object
-
#call(input) ⇒ Object
-
#debug(name: nil, level: 10) ⇒ Object
-
#ignore(name: nil) ⇒ Object
-
#lazy(name: nil) ⇒ Object
-
#many(name: nil, min: 0, max: nil) ⇒ Object
-
#map(name: nil, fn: nil, box: nil, &mapper) ⇒ Object
-
#map_error(name: nil, reason: nil) ⇒ Object
-
#satisfy(name: nil, fn: nil, &satisfier) ⇒ Object
Instance Attribute Details
#fn ⇒ Object
Returns the value of attribute fn.
6
7
8
|
# File 'lib/l43_peg/parser.rb', line 6
def fn
@fn
end
|
#name ⇒ Object
Returns the value of attribute name.
6
7
8
|
# File 'lib/l43_peg/parser.rb', line 6
def name
@name
end
|
Instance Method Details
#boxed(box, name: nil, &mapper) ⇒ Object
51
52
|
# File 'lib/l43_peg/combinators.rb', line 51
def boxed(box, name: nil, &mapper) =
Combinators::Boxed.boxed(self, box, name:, &mapper)
|
#call(input) ⇒ Object
8
9
10
|
# File 'lib/l43_peg/parser.rb', line 8
def call(input)
fn.(input)
end
|
#debug(name: nil, level: 10) ⇒ Object
#ignore(name: nil) ⇒ Object
#lazy(name: nil) ⇒ Object
60
|
# File 'lib/l43_peg/combinators.rb', line 60
def lazy(name: nil) = Lazy.lazy(self, name:)
|
#many(name: nil, min: 0, max: nil) ⇒ Object
62
63
|
# File 'lib/l43_peg/combinators.rb', line 62
def many(name: nil, min: 0, max: nil) =
Combinators::Many.many(self, name:, min:, max:)
|
#map(name: nil, fn: nil, box: nil, &mapper) ⇒ Object
65
66
|
# File 'lib/l43_peg/combinators.rb', line 65
def map(name: nil, fn: nil, box: nil, &mapper) =
Combinators::Map.map(self, name:, fn:, box:, &mapper)
|
#map_error(name: nil, reason: nil) ⇒ Object
68
69
|
# File 'lib/l43_peg/combinators.rb', line 68
def map_error(name: nil, reason: nil) =
Combinators::MapError.map_error(self, name:, reason:)
|
#satisfy(name: nil, fn: nil, &satisfier) ⇒ Object
71
72
|
# File 'lib/l43_peg/combinators.rb', line 71
def satisfy(name: nil, fn: nil, &satisfier) =
Combinators::Satisfy.satisfy(self, name:, fn:, &satisfier)
|