Skip to content

macabeus/ElixirRegexpParser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

A simple project (for studying purposes) to parse regex with combine library.

RegexpParser.parse("er?lx.r\\s[^abc]+\\w?\\W{2}\\d") 
> [
    %RegexpParser.Character{char: "e", quantifier: nil},
    %RegexpParser.Character{char: "r", quantifier: %RegexpParser.Quantifier{max: 1, min: 0}},
    %RegexpParser.Character{char: "l", quantifier: nil},
    %RegexpParser.Character{char: "x", quantifier: nil},
    %RegexpParser.Dot{quantifier: nil},
    %RegexpParser.Character{char: "r", quantifier: nil},
    %RegexpParser.BackslashLetter{backslash_letter: "s", quantifier: nil},
    %RegexpParser.List{characters: ["a", "b", "c"], except: true, quantifier: %RegexpParser.Quantifier{max: nil, min: 1}},
    %RegexpParser.BackslashLetter{backslash_letter: "w", quantifier: %RegexpParser.Quantifier{max: 1, min: 0}},
    %RegexpParser.BackslashLetter{backslash_letter: "W", quantifier: %RegexpParser.Quantifier{max: 2, min: 2}},
    %RegexpParser.BackslashLetter{backslash_letter: "d", quantifier: nil}
  ]

TODO

Metacharacters Implemented
Dot Yes!
Backslash-letter Yes!
Lists Yes!
Quantifiers Yes!
Anchors No
Escape No
Or No
Group No

About

A simple project to parse regexp with parser combinator

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages