Thursday, June 01, 2006

June 1st, 2006 -- A new month, a new stage

Since the MiniPerl6 is finished, and it seems that there will not be big changes, I am planning moving on next stage, Pugs::Emitter::Rule::Parsec. There is no progress yet but I spent some time exploring papers on monads (most of them are published 10+ years ago) mostly for my current researching topic but also that Parsec is a monadic parser and I haven't totally understood monad.

On the other hand, I don't really like (pronounce "hate") the current MiniPerl6.grammar. It was well-formatted before :sigspace was implemented in Pugs::Compiler::Rule. But after the default-on option was implemented, I could not put extra spaces to format it well anymore. I concluded two reasons why it happened and posted a suggestion on perl.perl6.language but no one replied yet.

The two reasons (or, suggestion of changes) are:
  1. Spaces at beginning and end of rule blocks should be ignored since space before and after current rule are most likely be defined in rules using current one. (The spaces around the rule-level alternative could also be ignored).
  2. I am not sure the default rule of , I couldn't found it in S05. Currently the engine use :P5/\s+/ but I would like it to be :P5/\s*/ when it's before or after non-words and remains the same (\s+) otherwise.
I think these will help me formatting the grammar file better.


Post a Comment

Links to this post:

Create a Link

<< Home