Commit Graph

30 Commits (eddd2ae7001b0995a1e895b8ced05f45abee0e73)

Author SHA1 Message Date
Aadhavan Srinivasan d4e3942d27 Added Match() and FindStringSubmatch(); removed old code; updated comments 2 months ago
Aadhavan Srinivasan f15a5cae34 Store all states visited in a single run of 'addStateToList()' in a slice 2 months ago
Aadhavan Srinivasan 22ead83625 Fixed assertion matching 2 months ago
Aadhavan Srinivasan 3604486a9b Used Pike's algorithm (an extension to Thompson's algorithm) (see Russ Cox's 2nd article); I think I almost have a working PCRE-style engine 2 months ago
Aadhavan Srinivasan ccf3b3b299 More progress on implementing PCRE matching 2 months ago
Aadhavan Srinivasan ed4ffde64e REFACTOR NEEDED: Added another special case; insert instead of appending into currentStates 2 months ago
Aadhavan Srinivasan fbc9bea9fb Commented out unused functions; use new nfaState parameters 2 months ago
Aadhavan Srinivasan 858e535fba Continued implementing Thompson's algorithm 2 months ago
Aadhavan Srinivasan 7c62ba6bfd Started implementing Thompson's algorithm for matching, because the old one was completely backtracking (so it would enter infinite loops on something like '(a*)*' )
The git diff claims that a ton of code was changed, but most of it was just indentation changes.
2 months ago
Aadhavan Srinivasan d4e8cb74fd Replaced pointer to nfaState with nfaState 2 months ago
Aadhavan Srinivasan 3ce611d121 More work towards implementing PCRE matching 2 months ago
Aadhavan Srinivasan 753e973d82 Started rewrite of matching algorithm, got concatenation and alternation done, kleene and zero-state stuff is next 3 months ago
Aadhavan Srinivasan ad273b0c68 Trying to emulate backtracking by using string pointers within threads (something similar to rsc's 2nd regexp article) 3 months ago
Aadhavan Srinivasan bc32e0cb76 Started working on converting to PCRE matching rules (prefer left branch of alternation) 3 months ago
Aadhavan Srinivasan b6ab54f6dd Reset threads when findAllSubmatchHelper is called 3 months ago
Aadhavan Srinivasan a46d2f4546 Updated comments 3 months ago
Aadhavan Srinivasan c88ebd1aa5 Added comments explaining what a Match is 3 months ago
Aadhavan Srinivasan 6d692d0dfc Rename Group.toString() to Group.String() 3 months ago
Aadhavan Srinivasan b5e6bc112c Wrote 'reg.FindSubmatch()' which returns the leftmost match with submatches, renamed 'isValid' to 'IsValid' to export it, renamed 'ToString' to 'String' 3 months ago
Aadhavan Srinivasan 6869cd00a2 Return error instead of nil when 'Find' fails 3 months ago
Aadhavan Srinivasan 037ac75ea6 Wrote new method to return 0-group of leftmost match; reorganized some functions for better clarity; made 'FindNthMatch' a method 3 months ago
Aadhavan Srinivasan b685d2fd5f Renamed 'findAllMatchesHelper' to 'findAllSubmatchHelper' 3 months ago
Aadhavan Srinivasan e22822e619 Renamed 'FindAllMatches' to 'FindAll' and made it a method; made it return a slice of 0-groups; the functionality of 'FindAllMatches' is now in 'FindAllSubmatch' 3 months ago
Aadhavan Srinivasan 0d19664044 Cleared up some comments, wrote a skeleton for FindAllString 3 months ago
Aadhavan Srinivasan 1bfb09b6c7 Made 'FindString' a method of 'Reg' 3 months ago
Aadhavan Srinivasan b8f5b9af7c Updated one more reference to epsilon 3 months ago
Aadhavan Srinivasan be60f2fb51 Updated references to 'epsilon' 3 months ago
Aadhavan Srinivasan 93474c5159 Renamed 'state' to 'nfaState' because 'state' by itself means nothing 3 months ago
Aadhavan Srinivasan 289bba35e2 Updated assertion constants so that they aren't exported 3 months ago
Aadhavan Srinivasan aef8152fc1 Renamed package 'greg' to 'regex' 3 months ago