Aadhavan Srinivasan Rockingcool
  • Joined on 2022-10-09
Rockingcool created branch posixStyleMatching in Rockingcool/kleingrep 2025-02-09 15:11:59 -06:00
Rockingcool pushed to implementPCREMatchingRules at Rockingcool/kleingrep 2025-02-09 15:08:30 -06:00
d1958f289c Commented out tests that would only pass with Longest()
15ee49f42e Rename method receivers from 'regex' to 're' (it's shorter)
b60ded4136 Don't break when a match is found, if we are looking for the longest match
9fbb99f86c Wrote example for Longest()
af15904f3b Updated documentation
Compare 9 commits »
Rockingcool pushed to implementPCREMatchingRules at Rockingcool/kleingrep 2025-02-09 14:14:35 -06:00
47f88c817f Fixed typo
835d495990 Removed capitalization for error message (staticcheck)
76e0170cb9 Removed unused function
d172a58258 Throw error if match isn't found but test.result has >0 elements
7231169270 Removed unused functions
Compare 13 commits »
Rockingcool pushed to implementPCREMatchingRules at Rockingcool/kleingrep 2025-02-08 15:07:38 -06:00
f15a5cae34 Store all states visited in a single run of 'addStateToList()' in a slice
62ca1a872a Made zeroLengthMatchState() return a pointer; reduced the number of comparisons performd by nfaState.equals
99230b49de Use new function signature for zeroLengthMatchState()
Compare 3 commits »
Rockingcool pushed to implementPCREMatchingRules at Rockingcool/kleingrep 2025-02-07 15:20:00 -06:00
22ead83625 Fixed assertion matching
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
052de55826 question() now returns 2 values
d2ad0d95a8 Modified question operator so that it doesn't create an unnecessary zero-state
ccf3b3b299 More progress on implementing PCRE matching
Compare 7 commits »
Rockingcool pushed to implementPCREMatchingRules at Rockingcool/kleingrep 2025-02-05 21:52:14 -06:00
ed4ffde64e REFACTOR NEEDED: Added another special case; insert instead of appending into currentStates
Rockingcool pushed to implementPCREMatchingRules at Rockingcool/kleingrep 2025-02-05 21:27:47 -06:00
fbc9bea9fb Commented out unused functions; use new nfaState parameters
cca8c7cda2 Got rid of transitions parameter, changed how kleene state is processed
Compare 2 commits »
Rockingcool pushed to implementPCREMatchingRules at Rockingcool/kleingrep 2025-02-05 17:02:06 -06:00
858e535fba Continued implementing Thompson's algorithm
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*)*' )
d4e8cb74fd Replaced pointer to nfaState with nfaState
3ce611d121 More work towards implementing PCRE matching
e0253dfaf3 Change kleene() to an alternation-style construct
Compare 5 commits »
Rockingcool pushed to master at Rockingcool/kleingrep 2025-02-04 06:58:29 -06:00
bc32e0cb76 Started working on converting to PCRE matching rules (prefer left branch of alternation)
ad0f7d0178 Added new state fields to tell if a state is a question or alternation
4e597f8eb1 Implemented a priority-queue to use while matching
Compare 3 commits »
Rockingcool pushed to implementPCREMatchingRules at Rockingcool/kleingrep 2025-02-03 21:02:22 -06:00
753e973d82 Started rewrite of matching algorithm, got concatenation and alternation done, kleene and zero-state stuff is next
5563a70568 Reverse the order in which I pop states for alternation, because this messes with the left branch-right branch thing
de0d7345a8 Store left and right branches of alternation separately
Compare 3 commits »
Rockingcool created branch implementPCREMatchingRules in Rockingcool/kleingrep 2025-02-03 15:50:35 -06:00
Rockingcool pushed to implementPCREMatchingRules at Rockingcool/kleingrep 2025-02-03 15:50:35 -06:00
ad273b0c68 Trying to emulate backtracking by using string pointers within threads (something similar to rsc's 2nd regexp article)
e167cdb2cb Fixed mistake in test output
1fd48ae614 Store the current string pointer as a 'thread variable' (allows us to simulate backtracking)
09812956ac Disable all optimizations
fbc9dfcc95 Trying something out; we'll see if it works
Compare 8 commits »
Rockingcool pushed to master at Rockingcool/kleingrep 2025-02-02 20:54:51 -06:00
ef476e8875 Reverse the order of the numeric range before adding it, to maintain compatibility with PCRE matching rules (even though I don't implement them, if I do in the future)
7e6b02632f Added more tests; commented out tests that I am failing
f94e3f2e71 Added comments
b129d83c3f Added function to reset threads
43aa7b5876 Updated documentation
Compare 13 commits »
Rockingcool pushed to master at Rockingcool/kleingrep 2025-02-01 11:53:46 -06:00
6d692d0dfc Rename Group.toString() to Group.String()
7c4538a259 Added 'example' file that contains testable examples
Compare 2 commits »
Rockingcool pushed to master at Rockingcool/kleingrep 2025-02-01 10:09:31 -06:00
2a9ae0b68a Wrote test for 'FindSubmatch'
783ae2ad10 Updated call to 'isValid' with call to 'IsValid'
b5e6bc112c Wrote 'reg.FindSubmatch()' which returns the leftmost match with submatches, renamed 'isValid' to 'IsValid' to export it, renamed 'ToString' to 'String'
206fea34cd Added function to return the number of subexpressions in the group
fcdb23524a Added more documentation
Compare 5 commits »
Rockingcool pushed to master at Rockingcool/kleingrep 2025-01-31 15:54:24 -06:00
ac936659b6 Updated documentation
e6dba9fdcf Updated documentation
30779a446b Updated documentation
f629a0f08f Added 'mustCompile' which panicks if there is an error compiling
Compare 4 commits »
Rockingcool pushed to master at Rockingcool/kleingrep 2025-01-31 09:52:47 -06:00
6869cd00a2 Return error instead of nil when 'Find' fails
02bc8f30a2 Added test for 'Find'
Compare 2 commits »
Rockingcool pushed to master at Rockingcool/kleingrep 2025-01-31 09:13:22 -06:00
ac05bceda3 Use method instead of function
037ac75ea6 Wrote new method to return 0-group of leftmost match; reorganized some functions for better clarity; made 'FindNthMatch' a method
e9d4e857cf Run 'TestFindAllStrings' since that function has been implemented
b685d2fd5f Renamed 'findAllMatchesHelper' to 'findAllSubmatchHelper'
8eda5055ff Replaced call to 'FindAllMatches' with call to 'FindAll' or 'FindAllSubmatch' depending on whether I need submatches
Compare 8 commits »
Rockingcool pushed to master at Rockingcool/kleingrep 2025-01-30 21:57:51 -06:00
0d19664044 Cleared up some comments, wrote a skeleton for FindAllString
Rockingcool pushed to master at Rockingcool/kleingrep 2025-01-30 21:51:46 -06:00
1bfb09b6c7 Made 'FindString' a method of 'Reg'
b0b8bf23af Updated documentation
Compare 2 commits »