lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


SPC,

I have to parse mail as well. Right now I'm using CRM-114 with TRE
regexps to do some very basic MIME handling, but it isn't very
portable. If I could have a look at your mail parser, it would help me
in more ways than one.

Mark,

Thanks for all the cool links. I'm very busy reading now. :-)

On Thu, Nov 29, 2012 at 12:54 AM, Mark Gabby <mwgabby@gmail.com> wrote:
> For example, there's no need for separate tokenization step with LPeg, and
> thus no need to try to get a tokenization program and a parser generator
> coordinating.

Actually, the "vocabulary" was designed to be used with a tokenizer.
Since I'm used to TRE regular expressions anyways, I can use lrexlib
in a tokenizer to simplify my parser design and gain fuzzy matching as
a bonus. That's something I wouldn't have thought of if you hadn't
mentioned it. Even though it wasn't your intention, I must thank you
for that as well.

The main problem that I foresee for myself is that I not only have to
build a parser for a single vocabulary, but I also have to generalize
that parser and do some meta-programming so that it will work with
other "vocabulary" documents (Diplomacy variants). That's something
that I've done before, but never in Lua and never with a construction
as complicated as a parser.

Steve D.,

Thanks for your advice. Since I have to refactor the parser and do
some meta-programming once I have it working, your suggestion that I
keep it simple is well-received. It'll get complicated enough on its
own.

Chris
--
Preference will be shown to scoring systems that emphasize solo victories.
    - Diplomacy World Cup Charter, section 7