On 12/21/12, David A. Wheeler <dwhee...@dwheeler.com> wrote:
> Alan Manuel Gloria:
>> Yes!  I found yacc/bison too difficult for me, especially regarding
>> shift/reduce and reduce/reduce conflicts (I still have no idea what
>> those are...
>
> I took a completely-classic compiler course at George Mason University
> (GMU), and I've written several parsers, usually with flex/bison or simply
> recursive descent.  I've never used an LL-parser generator, but since I've
> done recursive descent (which *is* LL by hand), as well as LALR parser
> generators, I figure it can't be too bad.  As always, avoid left-recursion.

Autodidact here, hence the weird paths I tread (^^); I completely fail
to understand LALR, and only understand recursive descent (LL by
hand), so "avoid left-recursion" is as obvious as for(x = 0; x < 42;
--x);

> Once we have an LL-grammar, we could implement it in a dozen tools and
> languages.  I'm not even planning to build a full implementation using the
> tool.. I intend to use it primarily as a check (so that I don't have to keep
> computing follow sets in my head, and finding out I'd messed up).  We need a
> Scheme implementation, and we'll have to write that anyway, so the real key
> is getting the grammar right.

Yes, that's my goal too.

>> Yes, although IMO that's fine.  My proposed approach is:
>>
>> 1.  We define some syntax for our parser parser (call it FOOPP).
>> FOOPP supports %INDENT %SAME %DEDENT internally as special guard
>> symbols, the rest of FOOPP is standard parsing lore.
>>
>> 2.  Write our parser spec in FOOPP input.
>>
>> 3.  Run FOOPP on our parser spec.  It outputs X code (where X = ANTLR
>> | Parsec | YACC | whatever).
>>
>> 4.  Process X code into target code
>>
>> 5.  Show that the target parses our examples correctly.
>
> Sounds good.  For starters I plan to make INDENT be ">" and DEDENT be "<",
> so that we don't have to solve everything simultaneously.

How about "SAME"? "|" ?? (isn't that usually used for "alternative" in
most parser parser syntaxes?)

I'm a little busy this week to next week (big Xmas celebration(s)), so
my only contributions will be random ideas, sadly.  Laptop hdd also
crashed recently, so I need to fix my new keys for proper sourceforge
access.

Sincerely,
AmkG

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Readable-discuss mailing list
Readable-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/readable-discuss

Reply via email to