Class: RParsec::FragmentParser

Inherits:
Parser
  • Object
show all
Defined in:
lib/rparsec/fragment_parser.rb

Overview

:nodoc:

Constant Summary

Constants inherited from Parser

Parser::MyMonad

Constants included from Functors

RParsec::Functors::And, RParsec::Functors::At, RParsec::Functors::BitAnd, RParsec::Functors::Call, RParsec::Functors::Compare, RParsec::Functors::Dec, RParsec::Functors::Div, RParsec::Functors::Eq, RParsec::Functors::Feed, RParsec::Functors::Fst, RParsec::Functors::Ge, RParsec::Functors::Gt, RParsec::Functors::Id, RParsec::Functors::Idn, RParsec::Functors::Inc, RParsec::Functors::Le, RParsec::Functors::Lt, RParsec::Functors::Match, RParsec::Functors::Minus, RParsec::Functors::Mod, RParsec::Functors::Mul, RParsec::Functors::Ne, RParsec::Functors::Neg, RParsec::Functors::Not, RParsec::Functors::Or, RParsec::Functors::Plus, RParsec::Functors::Power, RParsec::Functors::Snd, RParsec::Functors::Succ, RParsec::Functors::To_a, RParsec::Functors::To_f, RParsec::Functors::To_i, RParsec::Functors::To_s, RParsec::Functors::To_sym, RParsec::Functors::Union, RParsec::Functors::Xor

Instance Attribute Summary

Attributes inherited from Parser

#name

Attributes included from Monad

#this

Instance Method Summary collapse

Methods inherited from Parser

#>>, #atomize, #bindn, #catchp, #delimited, #delimited1, #expect, #followed, #fragment, #infixl, #infixn, #infixr, #lexeme, #lookahead, #many, #many_, #map, #mapn, #nested, #not, #optional, #parse, #peek, #postfix, #prefix, #repeat, #repeat_, #separated, #separated1, #seq, #some, #some_, #to_s, #token, #|

Methods included from Monad

#bind, #initMonad, #map, #plus, #seq, #value

Methods included from Functors

#compose, #const, #curry, #flip, make_curry, make_reverse_curry, #nth, #power, #repeat, #reverse_curry, #reverse_uncurry, #uncurry

Instance Method Details

#_parse(ctxt) ⇒ Object



6
7
8
9
10
# File 'lib/rparsec/fragment_parser.rb', line 6

def _parse ctxt
  ind = ctxt.index
  return false unless @parser._parse ctxt
  ctxt.retn(ctxt.src[ind, ctxt.index - ind])
end