summaryrefslogtreecommitdiff
path: root/colm/input.c
Commit message (Collapse)AuthorAgeFilesLines
* active realm is now stored in ProgramAdrian Thurston2013-03-291-20/+20
| | | | | No longer using a global var for the active realms. Downside is that we need to have prg available.
* various improvements supporting multiple parsers in one programAdrian Thurston2013-03-021-59/+48
| | | | | | Eliminated the init functions for the stream funcs. Using static initializers. Added function pointers to RuntimeData for fsmExec and calls to ctinput functions.
* completed removed FsmRun from InputStream interfaceAdrian Thurston2013-02-091-7/+3
|
* removed FsmRun arg from getData and getParseBlock input interfacesAdrian Thurston2013-02-091-8/+6
|
* removed the fsmrun.h header, which was emptyAdrian Thurston2013-02-091-1/+0
|
* took skip out of the getData interface, not neededAdrian Thurston2013-02-061-3/+3
|
* getData continues until length data is copiedAdrian Thurston2013-02-061-51/+31
| | | | | | The getData function now continues to fetch data until length data is copied or there is no more data. Don't need to call it in a loop, or pass in a skip argument.
* made the input stream functions staticAdrian Thurston2013-02-061-21/+21
|
* return the amount copied from getDataAdrian Thurston2013-02-051-84/+45
| | | | | | Was returning this via a pointer passed as an arg and returning the type of data block. Since getData is now used only for copying data after a successful match, we only need the length copied.
* refraining from copying in getParsBlock, basics workingAdrian Thurston2013-02-031-18/+14
|
* return pointer to data bclok from getParseBlockAdrian Thurston2013-02-021-3/+8
| | | | The next step is to use this pointer instead of the scanBuf to do the scanning.
* forked the getData input function into getParseBlockAdrian Thurston2013-02-021-0/+162
| | | | | After forking we can rework this function to return a pointer to a parse block, instead of copying data in.
* Merge branch 'copy-on-consume' into eosAdrian Thurston2013-01-281-32/+2
|\
| * removed the attach/detach callsAdrian Thurston2013-01-281-32/+2
| | | | | | | | Still need a clearBuffered call in the undoConsume, not entirely sure why.
* | experimenting with EOS, very roughAdrian Thurston2013-01-271-4/+14
|/
* added support for pushing streamsAdrian Thurston2013-01-071-17/+28
| | | | | Still need to properly handle EOF on non-accum streams that have other streams pushed.
* towards unifying input and stream typesAdrian Thurston2013-01-051-8/+15
| | | | | | Now not treating input stream any different from source stream in the parse statement. Just pass it in as a source to the parser's input stream. We are moving towards copositional input streams.
* towards compositional streamsAdrian Thurston2013-01-051-4/+4
| | | | moved attachStream calls to inside recursive getData calls
* removed pointers from FsmRun back to attached streamsAdrian Thurston2013-01-011-12/+12
| | | | | | | | | These pointers are not necessary. "Attached" means "FsmRun holds the data of" a stream. Suffices to point from stream to FsmRun and when data is copied into an FsmRun to check if there is an other FsmRun holding the stream's data. At that point the detach can occur. Also unified the two stream attach/detach functions.
* adding missing stream class renames to code generationAdrian Thurston2013-01-011-2/+2
|
* unification of stream typesAdrian Thurston2012-12-311-52/+85
| | | | | | Added function pointers for the stream functions called the parser runtime. Now using StreamFuncs as the interface to the stream. Renamed both InputStream and SourceStream to StreamImpl. This takes us closer to a unified stream type.
* getDataImpl -> getDataSourceAdrian Thurston2012-12-301-6/+6
|
* improved variable namingAdrian Thurston2012-12-301-43/+43
| | | | | SourceStream was derived from InputStream and a number of SourceStream pointers were named is. Changed to ss.
* removed unused position info from source streamAdrian Thurston2012-12-301-8/+0
|
* track eof in fd-backed source streamAdrian Thurston2012-12-301-2/+8
| | | | | Track an EOF bit in the fd-backed source stream. Don't call read on an FD that has already returned EOF. Allows ^D to work.
* removed an old debugging statementAdrian Thurston2012-12-301-4/+0
|
* name fixes Repl -> ConsAdrian Thurston2012-08-181-4/+4
|
* revert "moved 'colm' dir to 'src'"Adrian Thurston2012-08-011-0/+847
| | | | | | | | | | | Colm includes a library component with headers installed to a private dir inside include: $prefix/include/colm. We need our headers to reference each other using this colm prefix. This needs to be true for compiling our source and also for compiling external programs. It is conventient to have all the source in a directory called colm and then to use -I <source-root> when building colm. We use $prefix/include when building external programs. This reverts commit 247904a84430b8c9151fa6afb68f01b60afb92c9.
* moved 'colm' dir to 'src'Adrian Thurston2012-07-011-847/+0
|
* Some leaks plugged.Adrian Thurston2012-01-181-30/+36
|
* Copyright notice updating.Adrian Thurston2012-01-181-1/+1
|
* Fixes for the getData functions.Adrian Thurston2012-01-161-8/+12
|
* Bit of cleanup around attaching FSM run to input and source.Adrian Thurston2012-01-161-22/+22
|
* Added some more attaching/detaching code in the input stream functions.Adrian Thurston2012-01-021-4/+22
| | | | | Fixed the rubyhere test case. It cannot pull rest of line off stdin directly because the data may be on the input stream.
* Need symmetrical do/undo for append/prepend to streams. Can't use the consumeAdrian Thurston2012-01-021-38/+89
| | | | | | functions because in some instances streams are called. The undo of the prepend needs to distinguish between tree and data.
* Need to downref trees in an input destructor.Adrian Thurston2012-01-021-0/+19
|
* Cleanup.Adrian Thurston2012-01-011-81/+57
|
* Dead code cleanup.Adrian Thurston2012-01-011-110/+0
|
* Input interface improvements. Test suite passes. Much cleanup left. refs #341.Adrian Thurston2011-12-311-6/+9
|
* Don't use the source stream for prepending data. Still some inconsistenciesAdrian Thurston2011-12-311-13/+7
| | | | present. refs #341.
* Bringing back the connection between fsm runs and input streams. This allows usAdrian Thurston2011-12-311-6/+18
| | | | to clear the buffered data only when we need to. refs #341.
* Fixes for new input streams. refs #341.Adrian Thurston2011-12-311-4/+3
|
* Don't need the flush flag in input streams anymore. The parse loop decides whenAdrian Thurston2011-12-301-2/+2
| | | | to flush based on what it has/sees. refs #341.
* Bit more input interface build up. refs #341.Adrian Thurston2011-12-301-38/+60
|
* More buildup of the input interface. refs #341.Adrian Thurston2011-12-301-104/+104
|
* Bit more work on the new interface. Shaping up to something good!Adrian Thurston2011-12-301-9/+4
|
* Some renaming of the input functions. Adrian Thurston2011-12-301-13/+8
|
* Eliminating the rest of the testing functions from the input interface. Adrian Thurston2011-12-301-103/+8
| | | | refs #342.
* Don't need the push back of full buffers in the input interface since we are noAdrian Thurston2011-12-301-25/+2
| | | | longer sharing data. refs #340 #341.
* The string stream is unused. Removed.Adrian Thurston2011-12-301-43/+0
|