summaryrefslogtreecommitdiffstats
path: root/match.c
Commit message (Collapse)AuthorAgeFilesLines
* Code cleanup. All private functions static. Private stuffKaz Kylheku2009-11-281-58/+29
| | | | in regex module not exposed in header. Etc.
* Switching to keyword symbols for :args and :nothrow.Kaz Kylheku2009-11-241-11/+11
|
* Changes to make the code portable to C++ compilers, whichKaz Kylheku2009-11-241-1/+3
| | | | can be taken advantage of for better diagnostics.
* Renaming global variables that denote symbols, such that theyKaz Kylheku2009-11-241-55/+54
| | | | have a _s suffix.
* Improving portability. It is no longer assumed that pointersKaz Kylheku2009-11-231-7/+8
| | | | | | | | can be converted to a type long and vice versa. The configure script tries to detect the appropriate type to use. Also, some run-time checking is performed in the streams module to detect which conversions specifier strings to use for printing numbers.
* Introducing symbol packages. Internal symbols are now inKaz Kylheku2009-11-211-40/+50
| | | | | | | | | | a system package instead of being hacked with the $ prefix. Keyword symbols are provided. In the matcher, evaluation is tightened up. Keywords, nil and t are not bindeable, and errors are thrown if attempts are made to bind them. Destructuring in dest_bind is strict in the number of items. String streams are exploited to print bindings to objects that are not strings or characters. Numerous bugfixes.
* * unwind.c (uw_throw): If streams are not initialized,Kaz Kylheku2009-11-201-0/+1
| | | | | | we have an unhandled exception too early in initialization. Use C stream to print an error message and abort. Using the nil stream variable will just cause a recursion bomb.
* * match.c (dest_bind): Extended to handle more general formsKaz Kylheku2009-11-201-15/+12
| | | | | | | by using eval_form rather than direct symbol binding lookups. False positive return fixed. (match_line): Fixed merge to use eval_from rather than direct symbol binding.
* Changing ``obj_t *'' occurences to a ``val'' typedef. (Ideally,Kaz Kylheku2009-11-201-228/+228
| | | | | we wouldn't have to declare object variables at all, so why use an obtuse syntax to do so?)
* * match.c (match_line, match_files): Fix broken behavior of collectKaz Kylheku2009-11-181-6/+2
| | | | that doesn't match anything.
* More removal of C99 wide character I/O, and tightening upKaz Kylheku2009-11-171-18/+24
| | | | of standard conformance.
* Warning fixes.Kaz Kylheku2009-11-171-1/+1
|
* Fixes for compliance to C89.Kaz Kylheku2009-11-171-1/+2
|
* Big round of changes to switch the code base to use the streamKaz Kylheku2009-11-161-122/+139
| | | | | | | | | | | | | | | | | abstraction instead of directly using C standard I/O, to eliminate most uses of C formatted I/O, and fix numerous bugs, such variadic argument lists which lack a terminating ``nao'' sentinel. Bug 28033 is addressed by this patch, since streams no longer provide printf-compatible formatting. The native formatter is extended with some additional capabilities to take over. The work on literal objects is expanded and they are now used throughout the code base. Fixed bad realloc in string output stream: reallocating by number of wide chars rather than bytes.
* Continuing wchar_t conversion. Making sure all stdio callsKaz Kylheku2009-11-121-9/+9
| | | | | use wide character functions so that there is no illicit mixing. (But the goal is to replace this usage with txr streams).
* Big conversion to wide characters and UTF-8 support.Kaz Kylheku2009-11-111-114/+119
| | | | | | | | | This is incomplete. There are too many dependencies on wide character support from the C stream I/O library, and implicit use of some encoding which may not be UTF-8. The regex code does not handle wide characters properly. Character type is still int in some places, rather than wchar_t. Test suite passes though.
* Changing representation of objects to allow the NUM type to beKaz Kylheku2009-11-091-3/+3
| | | | | | | | unboxed. If the lowest bit of the obj_t * pointer is 1, then the remaining bits are a number. A lot of assumptions are made: - the long type can be converted to and from a pointer - two's complement. - behavior of << and >> operators when the sign bit is involved.
* Throw exception on stream error during close, or I/O operations. ThisKaz Kylheku2009-11-061-2/+2
| | | | | | is needed for pipes that terminate abnormally or return failed termination. Pipe and stdio streams have an extra description field so they are printed in a readable way.
* Version 019txr-019Kaz Kylheku2009-11-031-4/+4
| | | | | | Regexps can be bound to variables. New freeform directive.
* Change the freeform line catenation semantics to terminationKaz Kylheku2009-11-031-3/+3
| | | | rather than separation.
* Got regex working over lazy strings from freeform.Kaz Kylheku2009-11-021-7/+5
| | | | Bugfixes.
* Implement custom separator and limit in freeform.Kaz Kylheku2009-11-021-1/+10
|
* Start of implementation for freestyle matching.Kaz Kylheku2009-11-021-4/+31
| | | | | | | | | | | Lazy strings implemented, incompletely. Changed string function to implicitly strdup; non-strdup version changed to string_own. Fixed wrong uses of strdup rather than chk_strdup. Functions added to regex module to provide regex matching as a state machine to which characters are fed.
* Trivial change allows regexps to be bound to variables,Kaz Kylheku2009-10-301-0/+2
| | | | | and used for matching. This Just Works because of the way match_line treats variables.
* Starting txr git.graftedtxr-018Kaz Kylheku2009-10-301-11/+22
|
* txr-017 2009-10-17txr-017Kaz Kylheku2017-07-311-16/+32
| | | | Note: Version 016 ChangeLog message incorrect.
* txr-016 2009-10-16txr-016Kaz Kylheku2017-07-311-22/+61
|
* txr-015 2009-10-15txr-015Kaz Kylheku2017-07-311-0/+1643