[Aeditor-talk] Regexp assertions
Simon Strandgaard
neoneye at adslhome.dk
Sat Dec 13 10:41:20 EST 2003
On Fri, 2003-12-12 at 21:46, Mark wrote:
> the [...] format is now working for non capturing grouping
Add this illegal testcase, it may surprise you.
compile("a[xy)b") # compiles fine, shouldn't it fail?
> I've almost finished working on assertions with the following working
> <1,5> repeat
I think I read that perl6 also has inverse ranges, so that ATOM<!3,5>
are equal to ( ATOM<0,2> | ATOM<6,> ) not sure though
> <digit> named character class
> <[0-9]> explicit character class
> <-[0-9]> inverse character class
>
> I still need to work on more complicated assertions such as
> < <digit> - [0-2] > which would match all digits except 0,1 and 2, and code
> assertions.
Yes thats not trivial. the #parse_charclass will require some rewrite.
The variable 'symbols' (also 'inverse_symbols'), are an Array
containing either
A) letter 'Y'
B) letter-range 'X'..'Z'
Some sort of add/subtract for this array seems to be necessary.
> I have a couple of questions
>
> I want to add some new classes for code assertions and closures,
>
> CodeBlock
> CodeAssertion
> Closure
>From my brief understanding of perl6, the only thing which are the
difference on {closure} and <codeassertion>, are that codeassert ignores
the result ? Is that correct?
If this is the case, then I would join the 2 classes. Perhaps call the
class 'InlineCode'... and have a boolean which indicates weather the
result should be ignored or not.
> am I right in thinking that abstractsyntax.rb is the best place to put them?
Exactly.
> Also I'm making a list of features that I still need. Would it be best to put
> it in the TODO file or to set up a seperate TODO file for Perl6 features?
make it separate, 'TODO.perl6', 'README.perl6' ... etc.
except for 'CHANGES'.
The last week I have been sick.. now my headache are gone, and I am
ready to work again. I will focus on implementing a better
scanner-routine for Repeat.
--
Simon Strandgaard
More information about the Aeditor-talk
mailing list