stred-go

Stred: Streaming Tree Editor. Like sed but for JSON. This is the go implementation
git clone https://shtanton.xyz/git/stred-go.git
Log | Files | Refs | README

DateCommit messageAuthorFiles+-
2023-07-21 18:53Adds an incredibly simple equality operatorCharlie Stanton3+32-1
2023-07-21 15:42Reimplements inserting basic values using subexesCharlie Stanton3+105-75
2023-07-21 12:00Fixes JSONWriter to work with implicit data structuresCharlie Stanton3+322-46
2023-07-19 11:16Removes lots of old atom based code from walkCharlie Stanton4+0-360
2023-07-19 11:01Removes redundant json readers and writersCharlie Stanton4+0-910
2023-07-19 10:57Huge refactor to a more value based system, doing away with terminals. Also introduces unit testingCharlie Stanton23+2105-643
2023-05-12 13:25Adds the json_array IO formatCharlie Stanton4+289-3
2023-05-12 10:37Move reading and writing of tokens into a separate package to prepare for other input and output formatsCharlie Stanton7+677-633
2023-04-26 14:04Document branchingCharlie Stanton1+2-0
2023-04-26 14:02Add labels and branches with the : and b commandsCharlie Stanton3+54-2
2023-04-26 13:41Store stred programs as a flat list of commands with no nesting, using a new jump command to simulate command blocksCharlie Stanton3+114-56
2023-04-26 12:01Fix README mistakeCharlie Stanton1+2-2
2023-04-26 12:00Fix README formattingCharlie Stanton1+2-2
2023-04-26 11:56Clarify part of the example in READMECharlie Stanton1+1-0
2023-04-26 11:52Adds a worked example to the READMECharlie Stanton1+105-0
2023-04-26 10:57Add Y and Z registersCharlie Stanton4+39-3
2023-04-26 10:06Fix formatting in README.mdCharlie Stanton1+1-1
2023-04-26 10:04Update subex , literal to no longer include terminalsCharlie Stanton3+8-8
2023-04-26 09:58Slightly improve code quality of JSONIn.ReadCharlie Stanton1+1-2
2023-04-26 09:40Refactor out from JSONIn.Read the code that pops the first value from the readBufferCharlie Stanton1+28-41
2023-04-26 09:35Update fillReadBuffer to use an empty structure as the root structure instead of a dedicated JSONInRoot structureCharlie Stanton1+10-9
2023-04-26 09:30Improve the way state is tracked in fillReadBufferCharlie Stanton1+103-74
2023-04-26 08:24Fix minor bug with a few cases where fillReadBuffer was returning the wrong structureCharlie Stanton1+2-2
2023-04-25 17:33Improves RunTransducer by reusing state slices for states and newStatesCharlie Stanton1+4-1
2023-04-25 16:42Replace readString in walk/read.go with a faster implementation that makes better use of the buffer systemCharlie Stanton1+100-90
2023-04-25 16:27Completely rewrites the JSON parser to make more extensive use of slices and decrease the number mallocsCharlie Stanton2+317-137
2023-04-25 13:20Separates JSON parsing code into its own fileCharlie Stanton2+285-278
2023-04-25 12:55Refactor Atom and Value code out of walk.go and into separate filesCharlie Stanton3+185-174
2023-04-25 12:28Fixes more README formattingCharlie Stanton1+2-2
2023-04-25 12:25Fix README markdown formattingCharlie Stanton1+6-6
2023-04-25 12:18Adds a draft READMECharlie Stanton1+166-0
2023-04-25 09:20Make state.path immutable so it can be a reference instead of copied, improving performanceCharlie Stanton2+1-12
2023-04-25 08:56Now uses a buffered output for writing to improve performanceCharlie Stanton2+24-20
2023-04-25 08:48Improves performance of pruneStates by modifying states in placeCharlie Stanton1+7-5
2023-04-25 08:26Refines storing and loading to use ids generated when the subex is compiled instead of the runesCharlie Stanton5+120-70
2023-04-24 18:28Simplify the OutputStack, improves performance by simplifying from an interface to a single structCharlie Stanton1+21-25
2023-04-24 18:12Adds a check to end subex execution early if no viable branches remainCharlie Stanton1+3-0
2023-04-24 18:02Improves performance of reading JSON stringsCharlie Stanton1+39-42
2023-04-24 12:16WalkItems are now made of Atoms instead of WalkValues, and I have rolled my own JSON parser and serialiserCharlie Stanton3+417-295
2023-04-24 12:09Remove redundant subex/main.main functionCharlie Stanton1+0-49
2023-04-21 15:22Replaces the interfaces implementation of Atom with a tagged union based implementationCharlie Stanton5+157-82
2023-04-21 14:31Replace implementation of Atomise to improve performanceCharlie Stanton1+29-16
2023-04-21 14:17All registers are now lists of atoms instead of lists of valuesCharlie Stanton2+30-19
2023-04-21 13:25Improves performance by being more explicit about memory allocation in walk.goCharlie Stanton1+32-29
2023-04-21 11:51Changes the implementation of Atomise and Compound to no longer use goroutinesCharlie Stanton4+80-124
2023-04-21 10:19Add :xyz: replacement syntax that removes whatever is before it and inserts whatever is inside itCharlie Stanton3+41-5
2023-04-21 10:18Adds String methods to all SubexASTs for debugging purposesCharlie Stanton1+51-0
2023-04-21 09:42Add a and A commands for global substitutionCharlie Stanton2+12-4
2023-04-21 09:26Radically changes precedences so concatenation is now the strongestCharlie Stanton1+13-13
2023-04-21 09:06Add ^xyz^ as a shorthand for ="xyz"= in subexCharlie Stanton2+19-8
2023-04-21 08:53Add subex syntax to copy across booleans, numbers, strings and valuesCharlie Stanton3+137-1
2023-04-20 15:57Adds some shorthands for substituting the beginning and end of the path registerCharlie Stanton2+53-16
2023-04-20 14:31Properly exports all SubexASTsCharlie Stanton2+59-59
2023-04-20 13:48Replaces the inflexible delete all with separate DeleteValue and DeletePath commandsCharlie Stanton2+10-4
2023-04-20 13:30Add ~xyz~ shorthand for =`xyz`=Charlie Stanton1+10-1
2023-04-20 13:20Add a shorthand for subexes that start and end with `, ~, = or "Charlie Stanton1+7-1
2023-04-20 13:08Fix bug that would crash if given an empty subexCharlie Stanton1+5-1
2023-04-20 12:57Remove the @, ~ and # syntax for terminal literalsCharlie Stanton1+0-30
2023-04-20 11:33Replaces the start and end terminals of strings with a single terminal, with " as a literal for itCharlie Stanton2+17-16
2023-04-20 11:31Change output syntax to =xyz= instead of "xyz"Charlie Stanton1+3-3
2023-04-20 11:05Adds a substitute path command: SCharlie Stanton3+44-52
2023-04-20 10:42Adds non-string literal syntax to subexCharlie Stanton2+89-0
2023-04-20 08:59Remove filters and various commands that are no longer wantedCharlie Stanton6+4-721
2023-04-20 08:36Remove the need for a semicolon after each commandCharlie Stanton2+3-11
2023-04-20 08:25Add commands to append to and swap with the path and X registersCharlie Stanton2+34-2
2023-04-19 16:05Adds the noop command 'o'Charlie Stanton1+2-0
2023-04-19 16:02Adds casting all other types to strings by simply putting them in a stringCharlie Stanton1+8-0
2023-04-19 15:54Upgrades the substitute command to also act as a filterCharlie Stanton2+21-5
2023-04-19 15:25Implements subex substitutions for the value registerCharlie Stanton1+17-1
2023-04-19 15:00Replaces the workspace with 3 distinct registers: path, value and xregCharlie Stanton3+65-28
2023-04-19 14:19Adds parsing substitute commands, though executing them currently does nothingCharlie Stanton5+66-5
2023-04-19 13:34Changes the parsing API for subex to be more suitable to being part of a larger programCharlie Stanton3+60-54
2023-04-19 13:13Adds a dummy method to atom so the compiler checks that only valid atoms are allowedCharlie Stanton2+27-11
2023-04-19 12:58Adds the NOT operatorCharlie Stanton3+41-0
2023-04-19 12:48Adds the reciprocal operatorCharlie Stanton3+51-0
2023-04-19 12:47Fixes internal error messages for arithmetic functionsCharlie Stanton1+4-4
2023-04-19 12:23Adds the negate operatorCharlie Stanton3+49-0
2023-04-19 12:10Combines sum and product into an arithmetic state that contains a function for it's operationCharlie Stanton3+101-115
2023-04-19 11:59Adds product/and operatorCharlie Stanton3+87-22
2023-04-19 11:41Adjusts the sum operator to act as boolean OR when all inputs are booleansCharlie Stanton1+15-5
2023-04-19 11:31Replaces a few instances of SubexStates with pointers as they should beCharlie Stanton2+2-2
2023-04-19 11:22Changes parser so the storing operator is postfix instead of prefixCharlie Stanton1+10-14
2023-04-19 10:18Replaces the parent/child implementation for operators like store and sum with an output stackCharlie Stanton3+119-168
2023-04-19 08:48Adds casting strings to numbers in the sum operatorCharlie Stanton3+109-31
2023-04-18 16:07Creates functions for compounding atoms back into values in the walk module and uses them in subex/mainCharlie Stanton2+99-73
2023-04-18 15:35Refactors store and sum states to use the new SubexParentState for states that run machines within themselvesCharlie Stanton1+104-53
2023-04-18 15:00Fixes bug where stores wouldn't work inside other stores sometimesCharlie Stanton1+1-1
2023-04-18 14:07Adds the sum operatorCharlie Stanton3+78-9
2023-04-18 13:04Removes try, maybe, maximise and minimiseCharlie Stanton2+1-63
2023-04-18 11:47Adds the repeat construct, obsoleting maximise, minimise, try, maybe and probably moreCharlie Stanton3+151-12
2023-03-15 20:58Fix bug where SubexStoreState is sometimes not a pointerCharlie Stanton1+1-1
2023-03-15 20:11Fixes strings being wrapped in quotes twice when outputtingCharlie Stanton1+2-2
2023-03-05 10:00Renames TransducerOutput to OutputContent (and related types) and moves into main/subexstate.goCharlie Stanton4+28-29
2023-03-05 09:11Changes the slot map so only runes can be used as slotsCharlie Stanton2+5-7
2023-03-05 09:08Renames walk.Datum to walk.AtomCharlie Stanton5+114-98
2023-03-05 08:39Refactors out terminator literal stuff into a separate parsing functionCharlie Stanton1+37-117
2023-02-26 10:04Adds syntax to recognise and deal with starting and ending arrays, maps and stringsCharlie Stanton1+123-0
2023-02-26 09:37Replace append with walk.ConcatData in many places to fix bug to do with semantics of appendCharlie Stanton3+11-7
2023-02-26 08:57Converts subex output back into WalkValues and prints for easier debuggingCharlie Stanton2+92-3
2023-02-22 20:52Modify subex to take JSON split into "data"Charlie Stanton6+167-100
2023-02-19 09:27Move JSON serialising, deserialising and walking code into a separate packageCharlie Stanton7+396-381
2023-02-19 09:13Removes obsolete subex code from main/main.goCharlie Stanton1+0-580
2023-02-19 08:59Introduces subex processingCharlie Stanton6+636-4
2022-09-21 19:44Adds the or operator |Charlie Stanton1+34-2
2022-09-21 18:37Implements the first version of subexCharlie Stanton1+564-0
2022-09-21 18:37Adds some new commandsCharlie Stanton4+309-16
2022-08-27 17:11Adds new filtersCharlie Stanton3+87-41
2022-08-26 17:15Adds a bunch of new path pattern featuresCharlie Stanton4+101-44
2022-08-26 10:51Refactors some stuff and adds lexing and parsingCharlie Stanton8+594-123
2022-08-23 21:09Initial commitCharlie Stanton6+593-0