<- Back to shtanton's homepage
summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Adds the character range mapping syntaxHEADmainCharlie Stanton2022-12-243-0/+98
| | | | | | | Ranges of characters can be mapped with [] For example, capitalisation of a letter: [a-z=A-Z] Caesar cipher shift of 1: [a-zA-Z=b-zaB-ZA]
* Remove the redundant regex implementationCharlie Stanton2022-12-243-191/+0
|
* Changes main to read input from stdin. Prunes states that won't wouldn't ↵Charlie Stanton2022-12-232-16/+38
| | | | ever reach the front of the state priority queue.
* Expressions inside stores are now subexes instead of regexesCharlie Stanton2022-12-224-18/+25
| | | | | This simplifies things by no longer needing a regex implementation It also enables transforming text as it is being read into a slot
* Adds try, maybe and join operators with !, ? and ; respectivelyCharlie Stanton2022-09-233-6/+79
|
* Initial commitCharlie Stanton2022-09-218-0/+624
Parses and executes substitute expressions (subexes) So far subex has the following operations: - Concatenation of a and b with ab - Or with | - Repeat maximally with * - Repeat minimally with - - Copy a specific character 'a' - Copy any character '.' - Store text matching a regex into slot 's': `$s(regex)` - Output text in "" including loading from slots with '$' Regexes support all the same operations as subexes minus storing and outputting This first implementation gives very little thought to efficiency Example: ./main 'according to all known laws of aviation' '$1(.-)$m(( .* )| ).*"$m$1"' This swaps the first and last words of the input string