Re: Do we need parsers?

dgay@barnowl.CS.Berkeley.EDU (David Gay)
16 May 1997 23:55:19 -0400

          From comp.compilers

Related articles
Do we need parsers? john@dwaf-hri.pwv.gov.za (John Carter) (1997-05-13)
Re: Do we need parsers? thetick@scruz.net (Scott Stanchfield) (1997-05-15)
Re: Do we need parsers? dgay@barnowl.CS.Berkeley.EDU (1997-05-16)
Re: Do we need parsers? monnier+/news/comp/compilers@tequila.cs.yale.edu (Stefan Monnier) (1997-05-17)
Re: Do we need parsers? monnier+/news/comp/compilers@tequila.cs.yale.edu (Stefan Monnier) (1997-05-17)
Re: Do we need parsers? thetick@scruz.net (Scott Stanchfield) (1997-05-19)
Re: Do we need parsers? David.Monniaux@ens-lyon.fr (1997-05-22)
Re: Do we need parsers? john@dwaf-hri.pwv.gov.za (John Carter) (1997-05-22)
Re: Do we need parsers? nkramer@jprc.com (Nick Kramer) (1997-05-30)
[1 later articles]
| List of all articles for this month |
From: dgay@barnowl.CS.Berkeley.EDU (David Gay)
Newsgroups: comp.compilers
Date: 16 May 1997 23:55:19 -0400
Organization: University of California, Berkeley
References: 97-05-158
Keywords: parse, syntax, design

John Carter <john@dwaf-hri.pwv.gov.za> writes:
      If every statement was an object. ie. You had an "if-then" object, an
      "if-then-else" object and a "assign" object and and and..


      Then do we need lexical analysers and parsers? Couldn't we just create
      object editors and persistent object stores and bypass the whole
      grammar issue? An object editor wouldn't ever allow you to delete or
      add say the 'i' in "if", but only the entire "if-then" object.


There are several objections to this:
1) you have to convince users to use your special "object" editor,
when what they are used to is emacs/whatever.
2) you lose all the programmer tools that assume text-based programs,
e.g. grep, revision control systems, etc.
3) editing does not always follow the language's structural boundaries.
I might want to copy the 'then' and 'else' clauses of an 'if' - this
is hard in a structure-based environment.
4) I don't think you'll avoid lexical analysis: you still need to
verify that those numbers really are numbers, that the identifiers
start with a letter, and contain only letters or numbers, and so on.
--
David Gay - Yet Another Starving Grad Student
dgay@cs.berkeley.edu
[Still sounds like Smalltalk. -John]


--


Post a followup to this message

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