wincent Wincent Colaiuta's weblog

« January 2007 | Archives index | March 2007 »

February 27, 2007

Walrus r100, 2 items changed

Use dynamic specify blocks in acceptance specs for better reporting and granularity

Posted 3:00 PM

February 26, 2007

Walrus r99, 7 items changed

Tweaks to get StringParslets, RegexpParslets and accumulators working in conjunction with compiled numeric literal expressions

Posted 9:06 PM

Walrus r98, 1 item changed

Use 'Literal' abstract superclass to make lower-level subclasses like StringLiteral redundant; can do the work in place of SymbolLiteral, NumericLiteral etc also

Posted 8:53 PM

Walrus r97, 5 items changed

Collapse SingleQuotedStringLiteral and DoubleQuotedStringLiteral functionality into StringLiteral superclass; the subclasses are no longer needed

Posted 8:45 PM

Walrus r96, 9 items changed

Store original source text in AST nodes so that the compiler doesn't have to re-invent the wheel rebuilding strings containing Ruby expressions

Posted 8:28 PM

Walrus r95, 1 item changed

Correct svn:ignore property on ext/jindex

Posted 7:27 PM

Walrus r94, 6 items changed

Compilation of 'silent' directive

Posted 7:26 PM

Walrus r93, 21 items changed

Compilation of the 'echo' directive

Posted 7:17 PM

Walrus r92, 1 item changed

Remove comment

Posted 6:01 PM

Walrus r91, 1 item changed

Remove diff code from acceptance spec pending better implementation

Posted 6:01 PM

Walrus r90, 1 item changed

Update specs to allow additional here document options

Posted 6:00 PM

Walrus r89, 8 items changed

Compilation of 'raw' directives and extensive specs to confirm behaviour

Posted 4:35 PM

Walrus r88, 10 items changed

Move extensions into 'ext' subdir to match standard conventions for gems

Posted 2:59 PM

Walrus r87, 13 items changed

Remove tests made redundant by specs

Posted 12:05 PM

Walrus r86, 6 items changed

jindex C extension

Posted 11:37 AM

Walrus r85, 2 items changed

Convert Pathname to String prior to sending "sub" message; spec tweaks and notes on coordinates

Posted 9:18 AM

February 25, 2007

Walrus r84, 8 items changed

Fix namespace woes with judicious ordering of 'requires', appropriate nesting, and use of class_eval and module_eval to prevent unwanted pollution

Posted 7:16 PM

Walrus r83, 30 items changed

More specs; fix UTF-8 issues ('jindex' method); temporarily work around namespace clashes in code generated by the compiler by renaming top-level module

Posted 6:38 PM

February 24, 2007

Walrus r82, 10 items changed

Add high-level acceptance specs

Posted 6:13 PM

Walrus r81, 6 items changed

Compiler now slurps the newline trailing a comment if the comment is the only thing on the line

Posted 5:01 PM

Walrus r80, 6 items changed

Return ArrayResult instances rather than Arrays to avoid polluting the Array namespace

Posted 4:36 PM

Walrus r79, 29 items changed

Massive changes under the hood to the location-tracking system requiring wide-reaching changes and re-writes of almost all the core classes: get rid of OmissionData class (omitted data really is omitted now and not recorded anywhere, only the starting and ending line and column coordinates of the omission are taken into consideration and the data is then discarded); SkippedSubstringExceptions now include starting and endling line and column coordinates; ParseErrors now include coordinates; MemoizingCache now uses line and column coordinates instead of a single location index (position in input stream); no longer include "rightmost" subexception when raising a ParseError, instead just include coordinates; ParseError now encapsulates line and column start and end points instead of just "line_offset" and "column_offset"; ParseError now has a richer, human-friendly "inspect" method; the lowest level parslets (StringParslet and RegexpParslet) now do full coordinate tracking (line and column start and end points) rather than just offset tracking; generated Node subclasses no longer have an "omitted" accessor (in fact, the "omitted" accessor has been removed everywhere that it formerly appeared because omitted data is no longer retained); the skipping and location tracking code in many ParsletCombination subclasses has been made much "DRYer" by moving location tracking responsibility into the ParserState class; updated LocationTracking module to provide nil-friendly accessors and use absolute coordinates rather than offsets; new StringResult class (String subclass) enables coordinate accessors to be added to a class that behaves just like String, these objects can be returned as parse results and there is no need to clutter the String namespace with Walrus-specific methods; likewise for for Array, a new subclass called ArrayResult has been added (although it has not been "hooked up" yet); updated and added specs to match all this new/modified behaviour

Posted 4:22 PM

February 22, 2007

Walrus r78, 3 items changed

Faster source string conversion method; new accessors for working with line_offset and column_offset concentrate all nil-handling into a single place

Posted 4:42 PM

Walrus r77, 4 items changed

Correct problems with 'rightmost' detection and storage

Posted 4:04 AM

Walrus r76, 12 items changed

Reworking location tracking storage: it now resides in parse results (or exceptions thrown during parse attempts) rather than being kept in instance variables on the parslets themselves; this allows the parslets to be kept re-entrant and suitable for use in threaded or recursive environments

Posted 3:40 AM

Walrus r75, 6 items changed

Specs for low-level parslet location tracking

Posted 2:52 AM

Walrus r74, 4 items changed

StringEnumerator enhancements, used to make StringParslet location tracking Mac, Windows and UNIX end-of-line-marker aware

Posted 2:30 AM

Walrus r73, 10 items changed

Lowest-level parslets (String and Regexp) now track location offset information

Posted 12:18 AM

February 21, 2007

Walrus r72, 1 item changed

Clarify newline-skipping behaviour in relation to comments in the parser

Posted 11:43 PM

Walrus r71, 3 items changed

EscapeSequence compilation; another spec for MultilineComment compilation (multiple comments)

Posted 11:18 PM

Walrus r70, 1 item changed

Change comments in RawText compiler to reflect that the pack/unpack method no longer applies by default

Posted 11:00 PM

Walrus r69, 2 items changed

Improve readability and formatting of compiled RawText by removing literal newlines and emitting one compiled line per line within each RawText instance

Posted 10:59 PM

Walrus r68, 3 items changed

Make compiled output for nested comments much neater; BlockDirective is now a subclass of DefDirective to leverage shared behaviour; initial preparation for EscapeSequence compilation

Posted 10:42 PM

Walrus r67, 1 item changed

Set ignore property on 'docs' subdirectory (docs generated by rdoc)

Posted 8:30 PM

Walrus r66, 1 item changed

Better visual layout for indicating nested comments

Posted 8:24 PM

Walrus r65, 6 items changed

Compiler now produces output for comments and multiline comments (including nested comments)

Posted 8:21 PM

Walrus r64, 4 items changed

Compiling simple templates containing raw text now works; specs to confirm it

Posted 7:38 PM

Walrus r63, 4 items changed

Human-readable output for compiled RawText nodes

Posted 6:57 PM

February 20, 2007

Walrus r62, 13 items changed

Top-level of the compiler

Posted 8:57 PM

Walrus r61, 1 item changed

Whitespace cleanup

Posted 5:55 PM

Walrus r60, 2 items changed

Minor tweaks and cleanups to grammar rules for multi-line comments, and multi-line comments with nesting; more specs for the same

Posted 5:52 PM

Walrus r59, 2 items changed

Remove 'each_char' method (now provided by jcode library); shorter, faster implementation of 'chars' method; override '[]' method to transparently provide Unicode-awareness when passed a range instance (other cases may be useful in the future but were not added because they were not required to pass all the specs); simplify code in ParserState (possible due to overridden '[]' method)

Posted 5:36 PM

Walrus r58, 2 items changed

'echo' directive and accompanying specs

Posted 4:43 PM

Walrus r57, 2 items changed

'block' directive and accompanying specs

Posted 4:37 PM

Walrus r56, 2 items changed

More specs for 'def' directive; nested 'def' blocks confirmed working

Posted 4:34 PM

Walrus r55, 3 items changed

'def' directive; initial specs; allow 'zero_or_more' method to take an optional parameter specifying a placeholder to be returned in the event that there are no matches

Posted 4:19 PM

February 19, 2007

Walrus r54, 1 item changed

Specs for using here docs with 'raw' directives

Posted 8:37 PM

Walrus r53, 1 item changed

Allow here docs for 'raw' directive as well

Posted 8:35 PM

Walrus r52, 1 item changed

More specs for here documents

Posted 8:34 PM

Walrus r51, 3 items changed

Here document support

Posted 8:25 PM

Walrus r50, 2 items changed

Faster regexp for 'raw' directive

Posted 7:15 PM

Walrus r49, 3 items changed

Specs for ProcParslet

Posted 6:59 PM

Walrus r48, 89 items changed

Large-scale reorganization (nearly 4,000 lines of diffs): removing old hand-coded lexer and parser files obsoleted by the parser generator; centralize all 'require' and 'autoload' statements into a single overarching header file (saves a couple of lines or more in most files); move initialized into shared header and remove local overrides (cleaner code); use jcore library and jlength method for greater speed when determining the length of Unicode strings; initial implementation of ProcParslet class

Posted 6:18 PM

February 18, 2007

Walrus r47, 2 items changed

Performance parity achieved, memoizing now defaults to activated

Posted 12:49 PM

Walrus r46, 3 items changed

Add NoParameterMarker and ParsletRepetitionDefault files

Posted 11:20 AM

February 17, 2007

Walrus r45, 2 items changed

Reactivate previously failing specs (now working)

Posted 7:41 PM

Walrus r44, 6 items changed

Stricter identification of cache hits and misses in memoizer

Posted 6:38 PM

February 16, 2007

Walrus r43, 4 items changed

ParsletRepetitionDefault class added: allows a default substitution to be specified in the event that there are no matches for a repetition; this allows for simpler grammar rules in some cases

Posted 7:13 PM

Walrus r42, 1 item changed

Move "NoParameterMarker" class into separate file for ease of reuse elsewhere in Walrus

Posted 6:48 PM

Walrus r41, 3 items changed

Add support for many more types of Ruby expressions (and accompanying specs); allow 'silent' directive to process multiple semi-colon separated Ruby expressions; allow method parameters to be specified with or without parentheses

Posted 6:41 PM

Walrus r40, 2 items changed

Allow 'super' directive to be called with or without parentheses around the (optional) parameters

Posted 5:01 PM

Walrus r39, 6 items changed

Add 'super' directive to grammar; accompanying specs

Posted 4:42 PM

Walrus r38, 4 items changed

Specs for ParsletSequence and ParsletChoice

Posted 3:37 AM

Walrus r37, 14 items changed

'eql?' methods should use 'instance_of' rather than 'kind_of' under the covers

Posted 2:31 AM

February 15, 2007

Walrus r36, 18 items changed

Add 'hash' and 'eql?' methods to all parseable classes so that they can be used as hash keys

Posted 8:05 PM

Walrus r35, 1 item changed

Correct typo in Memoizing module (parslet -> parseable)

Posted 5:10 PM

Walrus r34, 4 items changed

Track position within input stream (to provide memoizer with coordinates)

Posted 4:57 PM

Walrus r33, 1 item changed

Add 'memoizing' accessor to Grammar class to allow memoizing to be turned on and off

Posted 3:47 PM

Walrus r32, 2 items changed

More concise implementation of default 'NoValueForKey' return value in the MemoizingCache; specs

Posted 3:41 PM

Walrus r31, 17 items changed

Add support classes and modules for memoized parsing

Posted 3:27 PM

February 14, 2007

Walrus r30, 3 items changed

Automatically anchor all Regexp parslets to the start of the input string (possible efficiency increase and slightly more readable code in the 'parse' method)

Posted 7:57 PM

Walrus r29, 2 items changed

'raw' directive (simple form) and accompanying specs; still remaining to do is the 'here doc' form

Posted 5:45 PM

Walrus r28, 2 items changed

Modify directive parsing to match Cheetah behaviour: can now explicitly mark the end of a directive with a '#', otherwise the end of the line or end of the input will be used to implicitly mark the end

Posted 5:00 PM

February 13, 2007

Walrus r27, 2 items changed

Bring 'set' directive online; initial specs for 'set' directive

Posted 8:57 PM

Walrus r26, 2 items changed

Wrap numeric literals, constants and identifiers in AST nodes

Posted 8:55 PM

Walrus r25, 2 items changed

More specs for 'slurp' directive; allow directives to span multiple lines by using a backslash as the last character on a line to serve as a line-continuation marker; notes for 'raw' directive

Posted 8:39 PM

Walrus r24, 2 items changed

"slurp" directive

Posted 7:32 PM

Walrus r23, 3 items changed

Nested multi-line comments

Posted 7:02 PM

Walrus r22, 1 item changed

Basic Ruby subset added to grammar (not yet tested)

Posted 2:56 PM

Walrus r21, 2 items changed

'import' and 'include' directives; many specs for testing string literal parsing

Posted 1:52 PM

Walrus r20, 2 items changed

ParsletMerge should deal with omissions at the level of the collection, not the elements inside the collection (to match the behaviour of other parslet combinations); as a side effect this enables some grammar rules to be written less verbosely (for example, a factored out predicate rule preceded by whitespace that should be omitted, like the 'directive' rules in Walrus)

Posted 12:52 PM

Walrus r19, 9 items changed

Propagate inter-token skipping parslet overrides down recursive method calls; more specs

Posted 12:21 PM

February 12, 2007

Walrus r18, 6 items changed

Back-end for overriding the default inter-token skipping parslet on a per-rule basis; specs for back-end

Posted 3:32 PM

February 11, 2007

Walrus r17, 3 items changed

Front-end for overriding the default inter-token skipping parslet on a per-rule basis; specs for front-end

Posted 11:30 AM

Walrus r16, 8 items changed

More specs for Walrus grammar; make sure that omission information is propagated from ParserState objects to dynamically created AST nodes in the Walrus::Grammar 'wrap' method

Posted 1:21 AM

February 9, 2007

Walrus r15, 5 items changed

Many specs to test the Walrus grammar; fixed a bug that caused string character enumeration to stall on hitting newlines (with accompanying specs)

Posted 12:38 PM

February 8, 2007

Walrus r14, 5 items changed

Remove debugging log statements; add new parser spec; ditch old hand-written parser; add additional require statements to top of grammar file to make it easier for people wanting to include only that file and start writing grammars

Posted 6:46 PM

Walrus r13, 9 items changed

Automatic inter-parslet skipping plus cleanup (unnecessary brackets on catch method parameter)

Posted 6:13 PM

Walrus r12, 9 items changed

More specs, strip out untouched code paths, up coverage threshhold

Posted 2:44 PM

Walrus r11, 3 items changed

More specs, enhancements to test simple AST test grammar, correct behaviour of simple Node subclasses that only wrap a single item in the default 'lexeme' instance variable

Posted 3:01 AM

Walrus r10, 2 items changed

Define a simple grammar that produces an AST

Posted 1:51 AM

February 7, 2007

Walrus r9, 2 items changed

Better encapsulation of omitted/to_s facility in dynamically-genrated Node subclasses

Posted 10:45 PM

Walrus r8, 3 items changed

Prepare for better encapsulation of omitted/to_s facility in dynamically-genrated Node subclasses

Posted 8:39 PM

Walrus r7, 1 item changed

More specs for the nested AST case

Posted 8:14 PM

Walrus r6, 3 items changed

Wrapping in AST node classes (nested case)

Posted 8:01 PM

Walrus r5, 8 items changed

Basic wrapping in AST node classes (non-nested case)

Posted 7:54 PM

February 6, 2007

Walrus r4, 2 items changed

Dead comment removal

Posted 9:04 PM

Walrus r3, 20 items changed

All parse methods now expect an optional hash parameter containing options; when parse methods call other parse methods the hash is passed on, baton-style; this allows the continuation trick to be removed from the parse method and makes program flow a little more self-evident

Posted 8:42 PM

February 1, 2007

Walrus r2, 1 item changed

Ignore coverage directory and specdoc.

Posted 5:46 PM

Walrus r1, 119 items changed

Initial import.

Posted 5:37 PM