This website works better with JavaScript.
8534174ea1
Use pointers instead of values
Aadhavan Srinivasan
2025-02-06 22:06:22 -0500
ed4ffde64e
REFACTOR NEEDED: Added another special case; insert instead of appending into currentStates
Aadhavan Srinivasan
2025-02-05 22:51:55 -0500
fbc9bea9fb
Commented out unused functions; use new nfaState parameters
Aadhavan Srinivasan
2025-02-05 22:23:31 -0500
cca8c7cda2
Got rid of transitions parameter, changed how kleene state is processed
Aadhavan Srinivasan
2025-02-05 22:20:28 -0500
858e535fba
Continued implementing Thompson's algorithm
Aadhavan Srinivasan
2025-02-05 18:01:36 -0500
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*)*' )
Aadhavan Srinivasan
2025-02-05 12:21:04 -0500
d4e8cb74fd
Replaced pointer to nfaState with nfaState
Aadhavan Srinivasan
2025-02-05 11:32:20 -0500
3ce611d121
More work towards implementing PCRE matching
Aadhavan Srinivasan
2025-02-04 14:09:24 -0500
e0253dfaf3
Change kleene() to an alternation-style construct
Aadhavan Srinivasan
2025-02-04 14:09:04 -0500
753e973d82
Started rewrite of matching algorithm, got concatenation and alternation done, kleene and zero-state stuff is next
origin/implementPCREMatchingRules
Aadhavan Srinivasan
2025-02-03 22:00:04 -0500
5563a70568
Reverse the order in which I pop states for alternation, because this messes with the left branch-right branch thing
Aadhavan Srinivasan
2025-02-03 21:59:41 -0500
de0d7345a8
Store left and right branches of alternation separately
Aadhavan Srinivasan
2025-02-03 21:59:05 -0500
ad273b0c68
Trying to emulate backtracking by using string pointers within threads (something similar to rsc's 2nd regexp article)
Aadhavan Srinivasan
2025-02-03 16:50:11 -0500
e167cdb2cb
Fixed mistake in test output
Aadhavan Srinivasan
2025-02-03 16:49:30 -0500
1fd48ae614
Store the current string pointer as a 'thread variable' (allows us to simulate backtracking)
Aadhavan Srinivasan
2025-02-03 16:49:10 -0500
09812956ac
Disable all optimizations
Aadhavan Srinivasan
2025-02-03 16:48:09 -0500
fbc9dfcc95
Trying something out; we'll see if it works
Aadhavan Srinivasan
2025-02-03 16:47:53 -0500
bc32e0cb76
Started working on converting to PCRE matching rules (prefer left branch of alternation)
Aadhavan Srinivasan
2025-02-03 14:06:14 -0500
ad0f7d0178
Added new state fields to tell if a state is a question or alternation
Aadhavan Srinivasan
2025-02-03 14:05:53 -0500
4e597f8eb1
Implemented a priority-queue to use while matching
Aadhavan Srinivasan
2025-02-03 14:05:30 -0500
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)
posixStyleMatching
Aadhavan Srinivasan
2025-02-02 13:46:48 -0500
7e6b02632f
Added more tests; commented out tests that I am failing
Aadhavan Srinivasan
2025-02-02 13:46:08 -0500
f94e3f2e71
Added comments
Aadhavan Srinivasan
2025-02-02 12:44:06 -0500
b129d83c3f
Added function to reset threads
Aadhavan Srinivasan
2025-02-02 12:43:40 -0500
43aa7b5876
Updated documentation
Aadhavan Srinivasan
2025-02-02 12:42:38 -0500
9a3bfca313
Renamed unique_append to uniqueAppend
Aadhavan Srinivasan
2025-02-02 12:42:29 -0500
b6ab54f6dd
Reset threads when findAllSubmatchHelper is called
Aadhavan Srinivasan
2025-02-02 12:42:00 -0500
6a96c98d04
Fixed bug where the regex '(()|.)(b)' wouldn't compile
Aadhavan Srinivasan
2025-02-01 19:20:33 -0500
3cfc2a6854
Updated Makefile
Aadhavan Srinivasan
2025-02-01 18:52:26 -0500
5d7a02e796
Added gcflags to go build
Aadhavan Srinivasan
2025-02-01 18:51:58 -0500
a46d2f4546
Updated comments
Aadhavan Srinivasan
2025-02-01 18:07:31 -0500
c88ebd1aa5
Added comments explaining what a Match is
Aadhavan Srinivasan
2025-02-01 18:05:55 -0500
fd102292c6
Added example for FindSubmatch
Aadhavan Srinivasan
2025-02-01 18:05:43 -0500
6d692d0dfc
Rename Group.toString() to Group.String()
Aadhavan Srinivasan
2025-02-01 12:51:32 -0500
7c4538a259
Added 'example' file that contains testable examples
Aadhavan Srinivasan
2025-02-01 12:50:49 -0500
2a9ae0b68a
Wrote test for 'FindSubmatch'
Aadhavan Srinivasan
2025-02-01 11:09:05 -0500
783ae2ad10
Updated call to 'isValid' with call to 'IsValid'
Aadhavan Srinivasan
2025-02-01 11:06:26 -0500
b5e6bc112c
Wrote 'reg.FindSubmatch()' which returns the leftmost match with submatches, renamed 'isValid' to 'IsValid' to export it, renamed 'ToString' to 'String'
Aadhavan Srinivasan
2025-02-01 11:06:03 -0500
206fea34cd
Added function to return the number of subexpressions in the group
Aadhavan Srinivasan
2025-02-01 11:04:49 -0500
fcdb23524a
Added more documentation
Aadhavan Srinivasan
2025-02-01 11:04:24 -0500
ac936659b6
Updated documentation
Aadhavan Srinivasan
2025-01-31 16:52:26 -0500
e6dba9fdcf
Updated documentation
Aadhavan Srinivasan
2025-01-31 16:51:46 -0500
30779a446b
Updated documentation
Aadhavan Srinivasan
2025-01-31 16:46:19 -0500
f629a0f08f
Added 'mustCompile' which panicks if there is an error compiling
Aadhavan Srinivasan
2025-01-31 16:46:05 -0500
6869cd00a2
Return error instead of nil when 'Find' fails
Aadhavan Srinivasan
2025-01-31 10:52:38 -0500
02bc8f30a2
Added test for 'Find'
Aadhavan Srinivasan
2025-01-31 10:52:27 -0500
ac05bceda3
Use method instead of function
Aadhavan Srinivasan
2025-01-31 10:13:02 -0500
037ac75ea6
Wrote new method to return 0-group of leftmost match; reorganized some functions for better clarity; made 'FindNthMatch' a method
Aadhavan Srinivasan
2025-01-31 10:12:53 -0500
e9d4e857cf
Run 'TestFindAllStrings' since that function has been implemented
Aadhavan Srinivasan
2025-01-31 10:11:52 -0500
b685d2fd5f
Renamed 'findAllMatchesHelper' to 'findAllSubmatchHelper'
Aadhavan Srinivasan
2025-01-31 09:56:30 -0500
8eda5055ff
Replaced call to 'FindAllMatches' with call to 'FindAll' or 'FindAllSubmatch' depending on whether I need submatches
Aadhavan Srinivasan
2025-01-31 09:55:36 -0500
45b6566b2c
Replaced function call with method call
Aadhavan Srinivasan
2025-01-31 09:54:35 -0500
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'
Aadhavan Srinivasan
2025-01-31 09:54:05 -0500
692de2a32b
Added lookarounds and numeric ranges to documentation
Aadhavan Srinivasan
2025-01-31 09:26:21 -0500
0d19664044
Cleared up some comments, wrote a skeleton for FindAllString
Aadhavan Srinivasan
2025-01-30 22:57:35 -0500
1bfb09b6c7
Made 'FindString' a method of 'Reg'
Aadhavan Srinivasan
2025-01-30 22:51:31 -0500
b0b8bf23af
Updated documentation
Aadhavan Srinivasan
2025-01-30 22:51:16 -0500
00570f07fe
Wrote documentation on syntax
Aadhavan Srinivasan
2025-01-30 17:51:46 -0500
7431b1a7b2
Changed \Z to \z to fit with Go's naming
Aadhavan Srinivasan
2025-01-30 15:08:18 -0500
ee51e39d59
Added support for start-of-input (\A) and end-of-input (\Z) assertions
Aadhavan Srinivasan
2025-01-30 13:56:56 -0500
db7c884b83
Added test for start-of-input and end-of-input assertion
Aadhavan Srinivasan
2025-01-30 13:56:26 -0500
c3059fe899
Return a new error instead of rethrowing a non-existent error
Aadhavan Srinivasan
2025-01-30 13:47:48 -0500
4f577592ba
Added rule to run tests
Aadhavan Srinivasan
2025-01-30 13:46:41 -0500
b734d61a03
Throw error if \B is used in character class
Aadhavan Srinivasan
2025-01-30 12:27:22 -0500
00c39857eb
Rethrow errors instead of rewriting them
Aadhavan Srinivasan
2025-01-30 12:26:50 -0500
aa9e2324ee
Removed unnecessary space
Aadhavan Srinivasan
2025-01-30 11:25:19 -0500
66b96bf9e8
Updated license
Aadhavan Srinivasan
2025-01-30 11:20:05 -0500
0ac39bfb7b
Started working on package-level documentation
Aadhavan Srinivasan
2025-01-30 11:19:53 -0500
dbc9fe2c3b
Added license
Aadhavan Srinivasan
2025-01-30 11:08:28 -0500
eeeb9387d5
Updated Makefile to build library and command separately
Aadhavan Srinivasan
2025-01-30 10:58:33 -0500
57eb935bd1
Updated comment
Aadhavan Srinivasan
2025-01-30 10:48:59 -0500
cbd679949f
Updated more referencs to constants
Aadhavan Srinivasan
2025-01-30 10:47:35 -0500
a63426d965
Updated references to constants
Aadhavan Srinivasan
2025-01-30 10:47:01 -0500
2e3450285c
Renamed one more variable to avoid exporting
Aadhavan Srinivasan
2025-01-30 10:45:09 -0500
7e792f1248
Renamed more constants to avoid exporting
Aadhavan Srinivasan
2025-01-30 10:44:34 -0500
b8f5b9af7c
Updated one more reference to epsilon
Aadhavan Srinivasan
2025-01-30 10:39:00 -0500
be60f2fb51
Updated references to 'epsilon'
Aadhavan Srinivasan
2025-01-30 10:38:26 -0500
7aee4280cc
Renamed 'EPSILON' to 'epsilon' to avoid exporting
Aadhavan Srinivasan
2025-01-30 10:36:10 -0500
e01ef48cbc
Updated CONCAT to be a metacharacter instead of just a tilde, and renamed it to avoid exporting
Aadhavan Srinivasan
2025-01-30 10:34:03 -0500
93474c5159
Renamed 'state' to 'nfaState' because 'state' by itself means nothing
Aadhavan Srinivasan
2025-01-30 10:31:02 -0500
d81b2ddaaa
Renamed 'State' to 'state' to avoid exposing the insides of the engine
Aadhavan Srinivasan
2025-01-30 10:27:56 -0500
429d286439
Renamed variable to avoid conflicting with type name
Aadhavan Srinivasan
2025-01-30 10:26:31 -0500
198a2c12a7
Renamed variable to avoid conflicting with type name
Aadhavan Srinivasan
2025-01-30 10:25:24 -0500
7e88b8a4b0
Renamed variable to avoid conflicting with type name
Aadhavan Srinivasan
2025-01-30 10:24:24 -0500
af5b6ebe08
Renamed type to avoid exporting
Aadhavan Srinivasan
2025-01-30 10:23:01 -0500
289bba35e2
Updated assertion constants so that they aren't exported
Aadhavan Srinivasan
2025-01-30 10:18:18 -0500
7e6377a4c4
Updated more constants, so that they aren't exported
Aadhavan Srinivasan
2025-01-30 10:15:54 -0500
73c6a442ce
Updated nodeType constants so that they aren't exported
Aadhavan Srinivasan
2025-01-30 10:13:51 -0500
ca8f8e1030
Renamed function
Aadhavan Srinivasan
2025-01-30 10:02:59 -0500
24a5045ebe
Updated map and reduce function names so that they aren't exported
Aadhavan Srinivasan
2025-01-30 09:52:00 -0500
f6d56b74e1
Updated module name to 'kleingrep' (Let's goo!)
Aadhavan Srinivasan
2025-01-30 09:22:13 -0500
dc53951408
Update package name in import
Aadhavan Srinivasan
2025-01-30 09:15:44 -0500
aef8152fc1
Renamed package 'greg' to 'regex'
Aadhavan Srinivasan
2025-01-30 09:15:29 -0500
ca8d32cd7f
Added more tests
Aadhavan Srinivasan
2025-01-30 09:09:34 -0500
368941e5c7
Fix out-of-bounds access in genRangeInclusive
Aadhavan Srinivasan
2025-01-30 09:09:20 -0500
b9da5ec08d
Replace use of 'genRange' with 'genRangeInclusive'
Aadhavan Srinivasan
2025-01-30 09:09:03 -0500
c5a43c47f0
Update type and method references to use qualified names
Aadhavan Srinivasan
2025-01-30 09:03:37 -0500
c3c3829ac9
Move 'genRange' function to 'cmd'
Aadhavan Srinivasan
2025-01-30 09:03:07 -0500
ee6bb3959c
Removed function that wasn't being used in 'greg', moved to 'main'
Aadhavan Srinivasan
2025-01-30 08:58:43 -0500
c06d81d17d
Updated struct field reference
Aadhavan Srinivasan
2025-01-30 08:58:11 -0500