<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Replace implementation of Atomise to improve performanceCharlie Stanton2023-04-211-16/+29
|
* All registers are now lists of atoms instead of lists of valuesCharlie Stanton2023-04-212-19/+30
| | | | This is to reduce the amount of translating between them that needs to be done
* Improves performance by being more explicit about memory allocation in walk.goCharlie Stanton2023-04-211-29/+32
|
* Changes the implementation of Atomise and Compound to no longer use goroutinesCharlie Stanton2023-04-214-123/+80
| | | | This results in a massive performance boost, ~4x speedup
* Add :xyz: replacement syntax that removes whatever is before it and inserts ↵Charlie Stanton2023-04-213-5/+41
| | | | whatever is inside it
* Adds String methods to all SubexASTs for debugging purposesCharlie Stanton2023-04-211-0/+51
|
* Add a and A commands for global substitutionCharlie Stanton2023-04-212-4/+12
|
* Radically changes precedences so concatenation is now the strongestCharlie Stanton2023-04-211-13/+13
| | | | We'll see if this sticks
* Add ^xyz^ as a shorthand for ="xyz"= in subexCharlie Stanton2023-04-212-8/+19
|
* Add subex syntax to copy across booleans, numbers, strings and valuesCharlie Stanton2023-04-213-1/+137
|
* Adds some shorthands for substituting the beginning and end of the path registerCharlie Stanton2023-04-202-16/+53
|
* Properly exports all SubexASTsCharlie Stanton2023-04-202-59/+59
|
* Replaces the inflexible delete all with separate DeleteValue and DeletePath ↵Charlie Stanton2023-04-202-4/+10
| | | | commands
* Add ~xyz~ shorthand for =`xyz`=Charlie Stanton2023-04-201-1/+10
|
* Add a shorthand for subexes that start and end with `, ~, = or "Charlie Stanton2023-04-201-1/+7
|
* Fix bug that would crash if given an empty subexCharlie Stanton2023-04-201-1/+5
|
* Remove the @, ~ and # syntax for terminal literalsCharlie Stanton2023-04-201-30/+0
|
* Replaces the start and end terminals of strings with a single terminal, with ↵Charlie Stanton2023-04-202-16/+17
| | | | " as a literal for it
* Change output syntax to =xyz= instead of "xyz"Charlie Stanton2023-04-201-3/+3
| | | | This frees up " to be used for a string terminal literal
* Adds a substitute path command: SCharlie Stanton2023-04-203-52/+44
|
* Adds non-string literal syntax to subexCharlie Stanton2023-04-202-0/+89
|
* Remove filters and various commands that are no longer wantedCharlie Stanton2023-04-206-720/+4
| | | | These have all been made redundant by the incredible substitute command
* Remove the need for a semicolon after each commandCharlie Stanton2023-04-202-11/+3
|
* Add commands to append to and swap with the path and X registersCharlie Stanton2023-04-202-1/+33
|
* Adds the noop command 'o'Charlie Stanton2023-04-191-0/+2
|
* Adds casting all other types to strings by simply putting them in a stringCharlie Stanton2023-04-191-0/+8
|
* Upgrades the substitute command to also act as a filterCharlie Stanton2023-04-192-4/+20
| | | | Substitute now captures the command after it and only runs it if the substitution is a success
* Implements subex substitutions for the value registerCharlie Stanton2023-04-191-1/+17
|
* Replaces the workspace with 3 distinct registers: path, value and xregCharlie Stanton2023-04-193-28/+65
| | | | | | workspace contained a list of WalkItems, pairs of paths and values. The new system can still hold a list of values but only one path, which is in itself a list of values. The X register is miscellaneous. All 3 hold a list of values (which are JSON tokens)
* Adds parsing substitute commands, though executing them currently does nothingCharlie Stanton2023-04-195-5/+66
|
* Changes the parsing API for subex to be more suitable to being part of a ↵Charlie Stanton2023-04-193-54/+60
| | | | larger program
* Adds a dummy method to atom so the compiler checks that only valid atoms are ↵Charlie Stanton2023-04-192-11/+27
| | | | allowed
* Adds the NOT operatorCharlie Stanton2023-04-193-0/+41
|
* Adds the reciprocal operatorCharlie Stanton2023-04-193-0/+51
|
* Fixes internal error messages for arithmetic functionsCharlie Stanton2023-04-191-4/+4
|
* Adds the negate operatorCharlie Stanton2023-04-193-0/+49
| | | | Negates all of the numbers produced by its content subex
* Combines sum and product into an arithmetic state that contains a function ↵Charlie Stanton2023-04-193-115/+101
| | | | | | for it's operation Creates arithmetic.go which will house all of these functions
* Adds product/and operatorCharlie Stanton2023-04-193-22/+87
|
* Adjusts the sum operator to act as boolean OR when all inputs are booleansCharlie Stanton2023-04-191-5/+15
|
* Replaces a few instances of SubexStates with pointers as they should beCharlie Stanton2023-04-192-2/+2
| | | | This potentially avoids bugs/errors and also improves the performance of pruning
* Changes parser so the storing operator is postfix instead of prefixCharlie Stanton2023-04-191-14/+10
|
* Replaces the parent/child implementation for operators like store and sum ↵Charlie Stanton2023-04-193-168/+119
| | | | | | | | | with an output stack Previously a store state was a parent of another state machine that it would run inside of itself in order to capture the output to be stored. This was limited as the greedyness of the child would not be transferred to the parent. The new implementation gives states more control over the output state and turns it into a stack. By pushing to the stack before the child and popping afterwards, all of the child's output can be retrieved while the child is very much part of the complete machine.
* Adds casting strings to numbers in the sum operatorCharlie Stanton2023-04-193-31/+109
|
* Creates functions for compounding atoms back into values in the walk module ↵Charlie Stanton2023-04-182-73/+98
| | | | and uses them in subex/main
* Refactors store and sum states to use the new SubexParentState for states ↵Charlie Stanton2023-04-181-53/+104
| | | | that run machines within themselves
* Fixes bug where stores wouldn't work inside other stores sometimesCharlie Stanton2023-04-181-1/+1
| | | | Something like $a($b(test)..."$b") wouldn't work as expected, this works now
* Adds the sum operatorCharlie Stanton2023-04-183-9/+78
| | | | Currently doesn't parse strings as each atom is considered independantly. Instead individual characters in strings can be cast
* Removes try, maybe, maximise and minimiseCharlie Stanton2023-04-182-63/+1
| | | | These are no longer necessary and have been replaced by repeat
* Adds the repeat construct, obsoleting maximise, minimise, try, maybe and ↵Charlie Stanton2023-04-183-12/+151
| | | | | | probably more The repeat construct repeats a subex a number of times, this number is based on a provided list which is ordered by priority and can be unbounded.
* Fix bug where SubexStoreState is sometimes not a pointerCharlie Stanton2023-03-151-1/+1
|