Commit Graph

136 Commits (1a890a1e75aa5212c4625efea60e6b21dd54c098)

Author SHA1 Message Date
Aadhavan Srinivasan 1a890a1e75 Refactoring - remove duplicate code
Aadhavan Srinivasan fde3784e5a Added unicode charclass support within character classes; Fixed bugs with hex classes and unicode classes
Aadhavan Srinivasan d4d606d95b Added tests for unicode character classes; more tests for hex characters
Aadhavan Srinivasan 9cd330e521 More work on unicode character class support - fix bug where all characters aren't being matched
Aadhavan Srinivasan 44d6a2005c Started working on unicode character classes
Aadhavan Srinivasan 375baa1722 Wrote more backreference tests
Aadhavan Srinivasan 2e47c631bb Updated documentation to include backreferences
Aadhavan Srinivasan 81b8b1b11c Do not validate a backreference if the group that it refers to is not valid
Aadhavan Srinivasan 2934e7a20f Wrote tests for backreferences
Aadhavan Srinivasan f466d4a8d5 More progress on backreference implementation
Aadhavan Srinivasan 8327450dd2 Started implementing backreferences (octal values should now be prefaced with \0)
Aadhavan Srinivasan 073f231b89 Added function and examples for ReplaceAllFunc()
Aadhavan Srinivasan 3b7257c921 Wrote function and example for ReplaceAllLiteral()
Aadhavan Srinivasan 668df8b70a Wrote MarshalText() and UnmarshalText() to implement TextMarshaler and TextUnmarshaler
Aadhavan Srinivasan 214acf7e0f Wrote example for ReplaceAll(); fixed out-of-bounds bug in Expand()
Aadhavan Srinivasan 50221ff4d9 Wrote ReplaceAll(), to replace all matches of the regex with a given string
Aadhavan Srinivasan 5ab95f512a Updated docs
Aadhavan Srinivasan e7da678408 Removed obsolete documentation
Aadhavan Srinivasan ab363e2766 Rewrote test for 'FindString()' to use lookarounds
Aadhavan Srinivasan c803e45415 Added example for 'FindStringSubmatch()'
Aadhavan Srinivasan 525296f239 Added examples for 'FindAllString()' , 'FindAllSubmatch()' and 'FindAllStringSubmatch()'
Aadhavan Srinivasan eb0ab9f7ec Wrote test for FindAllStringSubmatch()
Aadhavan Srinivasan 17a7dbae4c Wrote FindAllStringSubmatch()
Aadhavan Srinivasan f2279acd98 Fixed mistake in docs
Aadhavan Srinivasan d1958f289c Commented out tests that would only pass with Longest()
Aadhavan Srinivasan 15ee49f42e Rename method receivers from 'regex' to 're' (it's shorter)
Aadhavan Srinivasan b60ded4136 Don't break when a match is found, if we are looking for the longest match
Aadhavan Srinivasan 9fbb99f86c Wrote example for Longest()
Aadhavan Srinivasan af15904f3b Updated documentation
Aadhavan Srinivasan d522f50b50 Wrote new example functions
Aadhavan Srinivasan fb47e082eb Wrote new methods Expand() and preferLongest(); Use new function signatures (with preferLongest); only characters should be added to next state list
Aadhavan Srinivasan 1f5a363539 Use new function signatures (with preferLongest)
Aadhavan Srinivasan 9e12f9dcb3 Added field to Reg, denoting if we prefer longest match (POSIX style) or not (perl style)
Aadhavan Srinivasan 47f88c817f Fixed typo
Aadhavan Srinivasan 835d495990 Removed capitalization for error message (staticcheck)
Aadhavan Srinivasan 76e0170cb9 Removed unused function
Aadhavan Srinivasan d172a58258 Throw error if match isn't found but test.result has >0 elements
Aadhavan Srinivasan 7231169270 Removed unused functions
Aadhavan Srinivasan b7467a00f1 Removed priorityQueue (unused)
Aadhavan Srinivasan c6ad4caa0d Removed a bunch of unused code (let's go!!!)
Aadhavan Srinivasan 6334435b83 Updated tests since the engine uses Perl matching instead of POSIX matching; added tests for FindStringSubmatch
Aadhavan Srinivasan 78fb5606dd Use new definition of Reg
Aadhavan Srinivasan eddd2ae700 Updated documentation
Aadhavan Srinivasan c577064977 Added string field to Reg, that contains the expression string; wrote method to return the string
Aadhavan Srinivasan d4e3942d27 Added Match() and FindStringSubmatch(); removed old code; updated comments
Aadhavan Srinivasan f15a5cae34 Store all states visited in a single run of 'addStateToList()' in a slice
Aadhavan Srinivasan 62ca1a872a Made zeroLengthMatchState() return a pointer; reduced the number of comparisons performd by nfaState.equals
Aadhavan Srinivasan 99230b49de Use new function signature for zeroLengthMatchState()
Aadhavan Srinivasan 22ead83625 Fixed assertion matching
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