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
47
48
|
# File 'lib/l43_peg/combinators.rb', line 47
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
56
|
# File 'lib/l43_peg/combinators.rb', line 56
def lazy(name: nil) = Lazy.lazy(self, name:)
|
#many(name: nil, min: 0, max: nil) ⇒ Object
58
59
|
# File 'lib/l43_peg/combinators.rb', line 58
def many(name: nil, min: 0, max: nil) =
Combinators::Many.many(self, name:, min:, max:)
|
#map(name: nil, fn: nil, box: nil, &mapper) ⇒ Object
61
62
|
# File 'lib/l43_peg/combinators.rb', line 61
def map(name: nil, fn: nil, box: nil, &mapper) =
Combinators::Map.map(self, name:, fn:, box:, &mapper)
|
#map_error(name: nil, reason: nil) ⇒ Object
64
65
|
# File 'lib/l43_peg/combinators.rb', line 64
def map_error(name: nil, reason: nil) =
Combinators::MapError.map_error(self, name:, reason:)
|
#satisfy(name: nil, fn: nil, &satisfier) ⇒ Object
67
68
|
# File 'lib/l43_peg/combinators.rb', line 67
def satisfy(name: nil, fn: nil, &satisfier) =
Combinators::Satisfy.satisfy(self, name:, fn:, &satisfier)
|