Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!munnari.oz.au!murtoa.cs.mu.oz.au!ditmela!yarra!bohra!ejp From: ejp@bohra.cpg.oz (Esmond Pitt) Newsgroups: comp.lang.misc Subject: Re: Is there a Yacc file for PLI? Keywords: yacc pli Message-ID: <120@bohra.cpg.oz> Date: 20 Nov 89 02:11:59 GMT References: <14610@well.UUCP> Reply-To: ejp@bohra.cpg.oz (Esmond Pitt) Distribution: comp Organization: Computer Power Group, Melb, Australia Lines: 19 In article <14610@well.UUCP> sri@well.UUCP (Software Research Inc) writes: > > > We here at Software Research, Inc. are planning on working >on a product that will require us to parse PLI code. Does anyone >have, or know where to get, a yacc-able version of the grammar for >PLI? You will find this a highly non-trivial task. There is no yacc-able grammar for PL/1 because there are no reserved words; i.e. keywords are only keywords in context & are otherwise identifiers. YACC does not easily handle this case. (Consider IF IF THEN THEN ...) The last PL/1 compiler I looked at had about 8 syntax analysis passes, all hand-written. -- Esmond Pitt, Computer Power Group ejp@bohra.cpg.oz