Re: ANNOUNCE: Tiny, a parser generator for context sensitive grammars

"Mike Dimmick" <mike@dimmick.demon.co.uk>
8 Aug 2001 01:08:17 -0400

          From comp.compilers

Related articles
ANNOUNCE: Tiny, a parser generator for context sensitive grammars maurice@gittens.nl (Maurice Gittens) (2001-07-23)
Re: ANNOUNCE: Tiny, a parser generator for context sensitive gram eodell@c1220335-a.potlnd1.or.home.com (2001-07-27)
Re: ANNOUNCE: Tiny, a parser generator for context sensitive gr maurice@gittens.nl (Maurice Gittens) (2001-08-02)
Re: ANNOUNCE: Tiny, a parser generator for context sensitive grammars danwang+news@cs.princeton.edu (Daniel C. Wang) (2001-08-06)
Re: ANNOUNCE: Tiny, a parser generator for context sensitive gramma mike@dimmick.demon.co.uk (Mike Dimmick) (2001-08-08)
| List of all articles for this month |

From: "Mike Dimmick" <mike@dimmick.demon.co.uk>
Newsgroups: comp.compilers
Date: 8 Aug 2001 01:08:17 -0400
Organization: Compilers Central
References: 01-07-128 01-07-149 01-08-011 01-08-028
Keywords: parse
Posted-Date: 08 Aug 2001 01:08:16 EDT

"Daniel C. Wang" <danwang+news@cs.princeton.edu> wrote in message
news:01-08-028@comp.compilers...
> "Maurice Gittens" <maurice@gittens.nl> writes:
> {stuff deleted}
> > This is an interesting question. LALR(1) grammars have proven to
> > allow the generation of parsers for many languages used in practice.


> For Pascal and Java? I think the answer is yes here.


Pascal, yes, because Pascal's grammar is LL(1), although note that its
lexical grammar requires two tokens of lookahead to detect '..' correctly.


Java's is not due to the ambiguity of


(thing)+12


in expressions. This could be 'thing' as an object redundantly
parenthesised, add 12, or could be a cast of '+12' to 'thing' if 'thing' is
a type.


Personally I feel that the round-brackets cast isn't sensible in any
programming language - it really isn't obvious to the reader what's going on
without referring to the entirety of the remainder of the program. It's
therefore quite worrying to notice that MS adopted it for C#.


--
Mike Dimmick


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.