aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser.cpp
AgeCommit message (Collapse)AuthorFilesLines
2012-11-21support "\" and <n>\ commands to insert and read integers in the current ↵Robin Haberkorn1-0/+64
radix from/to the buffer * uncommon radices are allowed but reading stops on non-alphanumeric characters (and characters on allowed by the current radix)
2012-11-21Gq command to insert Q-Register at current DOTRobin Haberkorn1-0/+1
2012-11-21<n>A command to get ASCII code from buffer (at position DOT+n)Robin Haberkorn1-0/+9
classic TECO's append-buffer command is not supported * currently, num_sign is implied for A, that is -A will retrieve the value before DOT, while "A" will retrieve after (not at) DOT
2012-11-20fixed rubout of macro invocations: goto tables and q-registers are allocated ↵Robin Haberkorn1-20/+13
on the C++ call stack and configured to not emit undo tokens this introduces additional logic but has the huge advantage that the tables can be freed after the macro invocation. if undo tokens were emitted, the tables had to be kept in the undo stack so they can be restored during rubout. this however would be both complicated and unnecessarily inefficient since the tables would reach their initial state during rubout and be deallocated anyways. * similar (but not strictly necessary optimizations) can be performed for macro invocations * also wrapper Q-Register setting/getting -> will allow a custom "*" register getter (e.g. calculates buffer position on the fly)
2012-11-20cleanup macro execution functions: common namespace, Execute::file() uses ↵Robin Haberkorn1-28/+61
Execute::macro()
2012-11-20local Q-Register tables; :M commandRobin Haberkorn1-19/+71
* munged files use the same local Q-Registers as commandline * :M calls macro without new set of local registers (local register names refer to the parent macro level) * only .x names accepted at the moment. for string building characters, this will like stay that way (cannot refer to extended/long names)
2012-11-20errors when label cannot be found at end of macro invocationRobin Haberkorn1-0/+5
* on the command line the line terminating <ESC> is not accepted when a label was not found
2012-11-20goto table cleanupRobin Haberkorn1-2/+2
2012-11-20make goto tables local to macro invocation: they are declared on the C++ ↵Robin Haberkorn1-0/+6
callstack since macro invocations result in nested macro_execute() calls otherwise a macro could set labels with program counters which are invalid in other macros/the command line
2012-11-20support special "{" alternate escape character: is only terminated by a ↵Robin Haberkorn1-7/+23
matching *balanced* "}" this eases writing nested macros
2012-11-20disable ^U string building characters (by default)Robin Haberkorn1-13/+17
some method to reenable it will be developed in the future (perhaps using a separate command, or a special modifier which reverses a string commands default handling of building character)
2012-11-20QRegister push-down stack: [x and ]x commandsRobin Haberkorn1-0/+3
* rubout is quite tricky but ensures minimal memory copying
2012-11-20ED flags making 0-Register hook execution configurableRobin Haberkorn1-0/+14
* teco.ini updated as well
2012-11-20Scintilla command ES accepting string parameter: if empty, pop value from ↵Robin Haberkorn1-15/+25
stack otherwise pass string
2012-11-20cleanup strings[0] before invoking done(): can only be a preliminary solutionRobin Haberkorn1-7/+9
2012-11-20first working draft of syntax highlighting support and related necessary ↵Robin Haberkorn1-1/+15
features
2012-11-18avoid using Scintilla's SAVEPOINT mechanism altogether: fixes some ↵Robin Haberkorn1-0/+5
destructive commands * the only thing gained from (partially) using that mechanism is that no explicit calls to set the dirty-status of a buffer are necessary * however it had many disadvantages: * setting the buffer clean had to be done manually anyway (see previous commits) * when changing Q-Registers without affecting the current document, a flag had to be used to prevent setting the current document dirty * last but not least, it introduced a dependency on the order of the destructive operation and its UNDO token. * the UNDO token could trigger a SAVEPOINTLEFT notification resulting in additional rubout tokens to be pushed on the stack which screws the rubout stack. this can be avoided by clever ordering of the operations * using an explicit ring.dirtify() is therefore much better
2012-11-16scroll caret into view after text insertionRobin Haberkorn1-1/+3
2012-11-16support different kinds of runtime errors (using C++ exceptions)Robin Haberkorn1-57/+65
* also added some additional range checks (e.g. X command)
2012-11-16support EF and EX arguments. FALSE (>= 0) means to refuse closing/exiting if ↵Robin Haberkorn1-0/+10
the current file / any file is dirty (modified) -EF and -EX may be used to enforce a close/quit without saving
2012-11-15minor change to avoid compiler warningRobin Haberkorn1-1/+1
2012-11-15added Interface class to ease porting SciTECO to other platforms (toolkits)Robin Haberkorn1-57/+57
* will support Scintilla with Scinterm/NCurses * changes are in such a way that the generated machine code should have almost no overhead compared to the previous implementation (at least when compiled with optimizations)
2012-11-14minor comment fixRobin Haberkorn1-1/+1
2012-11-14error checking and colon modifier support for lots of commandsRobin Haberkorn1-42/+143
2012-11-14simplified move_lines() a bitRobin Haberkorn1-2/+1
2012-11-13EF command to close a bufferRobin Haberkorn1-0/+7
can be rubbed out!!! this works because when a buffer is closed, it is not deallocated but transferred to the undo token object which then (if run) reinserts it into the ring list. if the undo token is destroyed before it is run (eg. <ESC><ESC> pressed), the buffer will finally be deallocated.
2012-11-13<n>W, <n>V, <n>Y commandsRobin Haberkorn1-0/+56
based on Scintilla editor key commands, so they will automatically adopt to Scintilla setting changes
2012-11-13minor simplificationRobin Haberkorn1-1/+1
2012-11-13added EW...$ commandRobin Haberkorn1-1/+2
* EW$ saves file with its current filename * EW<filename>$ saves file with under the specified filename (Save As) * files are stored with absolute paths in the ring
2012-11-13reset dot on search failureRobin Haberkorn1-5/+6
2012-11-13support :S...$ commandRobin Haberkorn1-0/+3
2012-11-13added support for string match characters (match spec to regexp compiler)Robin Haberkorn1-4/+216
2012-11-13fixed undoing of setting Q-Register stringRobin Haberkorn1-2/+1
2012-11-13Search command: use clever circular stack for the last (-n) matches for n < ↵Robin Haberkorn1-11/+9
0 in <n>S...$ * the requested number of occurrences is usually much smaller than the number of bytes in the document * still, (n) can be arbitrarily large, so allocate that stack
2012-11-13when doing a reverse search, allocate array of matches (since it can ↵Robin Haberkorn1-1/+3
currently get very large)
2012-11-13<x[,y]>S...$ command (only regexp searching at the moment)Robin Haberkorn1-3/+130
2012-11-12distinguish between GOTO, LOOP and CONDITIONAL parse-only modes: fixes loop ↵Robin Haberkorn1-15/+23
branching in conditionals e.g. <0"=1;'...do something...> now works as expected
2012-11-12fix: process @ modifier in PARSE_ONLY mode; fixes alternate string escapes ↵Robin Haberkorn1-1/+4
in parse only mode
2012-11-12various arithmetic expression fixes: SUB must have higher precedence than ↵Robin Haberkorn1-0/+2
ADD; fixed num_sign (unary minus) handling
2012-11-11<x,y>Xq command, automatic profile munging, explicit munging, commandline ↵Robin Haberkorn1-0/+27
option processing, unhandled commandline options in default buffer
2012-11-11automatic support for string building charactersRobin Haberkorn1-10/+111
* also improved <n>I...$ insertion of chars from stack
2012-11-11added <n>O...$ GOTO commandRobin Haberkorn1-0/+1
2012-11-11implemented conditionals (<n>"x...|...')Robin Haberkorn1-0/+82
2012-11-11implemented F<, F>, F' and F| (flow) commandsRobin Haberkorn1-4/+79
2012-11-11support for Qx, Ux, %x and Mx commandsRobin Haberkorn1-0/+12
* Mx does not yet use local Q-registers
2012-11-11^Ux...$ command: rubout does not yet work properlyRobin Haberkorn1-0/+1
2012-11-11Q-Register table and EQx commandRobin Haberkorn1-0/+17
2012-11-10use namespace "States" instead of "states" structureRobin Haberkorn1-25/+32
has several advantages * better to read * namespace can be "extended" from everywhere allowing the declaration of states in the files that implement them * include file mess could be cleaned up a bit
2012-11-10use namespace for Modifiers instead of structureRobin Haberkorn1-14/+14
2012-11-10ensure that string argument done() handlers never get a NULL pointerRobin Haberkorn1-1/+1
* fixes EB$