no reserved words

hugo@morantek.demon.co.uk (Hugh Gleaves)
8 Mar 1998 12:18:09 -0500

          From comp.compilers

Related articles
no reserved words hugo@morantek.demon.co.uk (1998-03-08)
Re: no reserved words cfc@world.std.com (Chris F Clark) (1998-03-12)
Re: no reserved words leichter@smarts.com (Jerry Leichter) (1998-03-13)
Re: no reserved words will@ccs.neu.edu (William D Clinger) (1998-03-15)
Re: no reserved words stephen@acm.org (Stephen P Spackman) (1998-03-18)
Re: no reserved words sandeep.dutta@usa.net (Sandeep Dutta) (1998-03-18)
| List of all articles for this month |

From: hugo@morantek.demon.co.uk (Hugh Gleaves)
Newsgroups: comp.compilers
Date: 8 Mar 1998 12:18:09 -0500
Organization: Morantek
Keywords: yacc, parse, question, comment

I Would Like To Know If Common Tools Like Lex And Yacc, Are Capable Of
Handling Languages That Have No Reserved Words.


For Example I Have Written A Large (But Incomplete) Parser By Hand
(Recursive Descent In c) That Readily Parses Stuff Like:


if if = then then
      else = call;
else
      call goto;


goto then;




The Language Definition Imposes The 'No Reserved Words' Rule.


I Am Considering Restarting From Scratch And Using Tools, My Question
Is Does This Requirement Push Such Tools Too Far ?


thanks
[It's nearly impossible using yacc. The 1972 yacc tech report basically
says "don't do that". Unless you need to parse an existing language like
PL/I without reserved words, I don't see the point. -John]
--


Post a followup to this message

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