| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Scrappy.Grep.DSL
Synopsis
- data ParserExpr
- = PChar Char
- | PString String
- | PAnyChar
- | PDigit
- | PLetter
- | PAlphaNum
- | PSpace
- | PSpaces
- | PNewline
- | POneOf String
- | PNoneOf String
- | PSeq ParserExpr ParserExpr
- | PSeqConcat ParserExpr ParserExpr
- | PAlt ParserExpr ParserExpr
- | PMany ParserExpr
- | PSome ParserExpr
- | POptional ParserExpr
- | PTry ParserExpr
- | PBetween Char Char ParserExpr
- | PCount Int ParserExpr
- | PManyTill ParserExpr ParserExpr
- | PRef String
- data MatchResult = MatchResult {
- mrFilePath :: FilePath
- mrLine :: Int
- mrCol :: Int
- mrMatchText :: String
- containsRef :: ParserExpr -> Bool
- extractRefs :: ParserExpr -> [String]
Documentation
data ParserExpr Source #
AST representation of the parsec-grep DSL
Constructors
Instances
data MatchResult Source #
A match result with position information
Constructors
| MatchResult | |
Fields
| |
Instances
| Generic MatchResult Source # | |||||
Defined in Scrappy.Grep.DSL Associated Types
| |||||
| Show MatchResult Source # | |||||
Defined in Scrappy.Grep.DSL Methods showsPrec :: Int -> MatchResult -> ShowS # show :: MatchResult -> String # showList :: [MatchResult] -> ShowS # | |||||
| Eq MatchResult Source # | |||||
Defined in Scrappy.Grep.DSL | |||||
| type Rep MatchResult Source # | |||||
Defined in Scrappy.Grep.DSL type Rep MatchResult = D1 ('MetaData "MatchResult" "Scrappy.Grep.DSL" "screp-0.1.0.0-GFQWpPufVrK2mJv5Te6tFS" 'False) (C1 ('MetaCons "MatchResult" 'PrefixI 'True) ((S1 ('MetaSel ('Just "mrFilePath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: S1 ('MetaSel ('Just "mrLine") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "mrCol") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "mrMatchText") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))) | |||||
containsRef :: ParserExpr -> Bool Source #
Check if a ParserExpr contains any PRef nodes
extractRefs :: ParserExpr -> [String] Source #
Extract all ref names from a ParserExpr