summaryrefslogtreecommitdiff
path: root/src/input.c
Commit message (Collapse)AuthorAgeFilesLines
* various refcount fixesAdrian Thurston2021-01-031-2/+2
| | | | | | - added downref when undoing a tree push - using correct opcode for undoing pushing stream - added an upref when sending back ignored trees
* moved source files into commit repositoryAdrian Thurston2020-03-141-0/+759
|
* moved the original colm src dir to /colmAdrian Thurston2019-09-081-740/+0
|
* added a get option to retrieve auto_trim from bytecodeAdrian Thurston2019-05-231-10/+14
|
* added and auto_trim flag to stream anad inputAdrian Thurston2019-05-221-0/+10
| | | | | When set to true, all tree prints to the stream or sends to the input will result in a trim. Achieved by passing trim to the generic print.
* make location file name and column available in Colm codeAdrian Thurston2018-12-021-2/+2
|
* don't create an empty run buf every time we hit stream endAdrian Thurston2018-07-131-20/+0
|
* fix for optimized append wherby we were not respecting run_buf->offsetAdrian Thurston2018-07-131-1/+1
|
* some improvements to the (still broken) optimized appendAdrian Thurston2018-07-131-39/+25
| | | | Split up the optimized append between input struct and stream.
* delegate splitting to the stream_impl classAdrian Thurston2018-07-131-11/+9
|
* various input cleanup, removed line info from input_impl_seqAdrian Thurston2018-07-121-119/+50
|
* split stream funcs out of input.cAdrian Thurston2018-07-121-573/+2
|
* some work on optimized input append, still disabledAdrian Thurston2018-07-121-35/+84
|
* split SOURCE type into SOURCE for opened files and ACCUM for RT textAdrian Thurston2018-07-121-69/+69
|
* some function name changes, added disabled optimizationsAdrian Thurston2018-07-121-71/+101
|
* freeing leaked bufs from input.cAdrian Thurston2018-07-111-21/+37
|
* replace eof_sent in input interface with bit in pda_runAdrian Thurston2018-07-101-2/+0
|
* some cleanup of eof interfaceAdrian Thurston2018-07-101-10/+4
| | | | | Still have two bools concerning eof. Can't unify these yet ... need break down the two concepts to try to unify.
* eof funcs can come out of stream interfaceAdrian Thurston2018-07-101-44/+27
|
* more separation of input and streamAdrian Thurston2018-07-101-109/+47
|
* removed parser from input, initting with input takes pointer to input_tAdrian Thurston2018-07-091-6/+2
|
* separating the input from stream typeAdrian Thurston2018-07-081-14/+40
|
* some improvements to the the stream funcsAdrian Thurston2018-07-071-43/+37
|
* some better organization of the stream funcsAdrian Thurston2018-07-061-5/+14
|
* skip arg to get_parse_block needs to be a pointerAdrian Thurston2018-07-041-9/+9
| | | | | | Previously, all the pushed back text went to the top-level stream and it was okay to not persist between data calls. Since we started pushing back to the sub-streams we need to persist this using a pointer in the interface.
* don't recurse into source streams when unsetting eof sent flagAdrian Thurston2018-07-041-6/+6
|
* reusing stream impls when parsing from 'input'Adrian Thurston2018-07-041-2/+8
| | | | | | | | To detect parsing from a top level input and to avoid appending it to a parser's top level (thus creating a tree), added a new type for input so we can replace the parser's top level. This change forces us to a two level structure where stream seq is at the top and stream data underneath. Requires us to hack the destructor so that we don't multiple delete the stream impl.
* use stream_impl_ct directlyAdrian Thurston2018-07-021-1/+1
| | | | Don't put it behind a stream_impl_seq
* when undoing consume of tree there might be some empty source bufsAdrian Thurston2018-07-021-36/+60
| | | | | Also added a type to the stream_impl impls so we can verify we have the right thing.
* again more input push/pop balance fixesAdrian Thurston2018-06-271-37/+94
|
* more input push/pop balance fixesAdrian Thurston2018-06-271-179/+136
|
* balancing pushes and pullsAdrian Thurston2018-06-251-13/+18
|
* some simplification of tree functionsAdrian Thurston2018-06-251-26/+11
|
* only need the type in the seq_buf and it doesn't need 'data'Adrian Thurston2018-06-251-66/+52
|
* removed the data section from the top level run buf typeAdrian Thurston2018-06-251-89/+2
| | | | data is entirely contained to the sub-types
* added colm_program as an arg to input functionsAdrian Thurston2018-06-251-55/+55
| | | | need this to perform input logging
* stash the head when consuming a tree and pop it when undoingAdrian Thurston2018-06-251-7/+6
|
* limit the undoing of consumed dataAdrian Thurston2018-06-251-15/+38
| | | | | | When undoing the consume of make sure we don't send back more than we took out. Once we hit the limit then move backwards to the previous stream, which we now stash.
* split the run_buf into two structs, one for seq, one for dataAdrian Thurston2018-06-231-62/+70
| | | | Detangling the different types of stream.
* can now simplify stream_impl_seq (top level stream)Adrian Thurston2018-06-181-11/+0
|
* added location information to stream interfacesAdrian Thurston2018-06-181-0/+4
| | | | | Last of the interface making, allows us to strip down stream_impl into just funcs pointer, making it entirely abstract.
* wrapped eof_sent in stream funcsAdrian Thurston2018-06-181-0/+26
|
* collect and file operations only need to be in stream_impl_dataAdrian Thurston2018-06-181-13/+9
|
* added close_stream to stream funcsAdrian Thurston2018-06-181-0/+15
|
* added print_tree to stream funcsAdrian Thurston2018-06-181-0/+20
| | | | | Selects between file and collect. Will want to also ensure only called on a "data" stream_impl.
* added stream funcs for collect and flushAdrian Thurston2018-06-181-3/+31
|
* some org of stream_funcsAdrian Thurston2018-06-181-27/+33
|
* removing some direct access to stream_implAdrian Thurston2018-06-181-8/+7
|
* moved stream destructor code to respective callbacksAdrian Thurston2018-06-181-47/+41
|
* use a define to declare multiple stream funcsAdrian Thurston2018-06-181-46/+49
| | | | | Using this technique so we don't need to cast individual functions and don't lose type checking on the signatures.