question to PCCTS users

bnell@siemens.com (Bill Nell)
Tue, 23 Feb 1993 14:23:37 GMT

          From comp.compilers

Related articles
question to PCCTS users bnell@siemens.com (1993-02-23)
Re: question to PCCTS users parrt@ecn.purdue.edu (1993-02-26)
| List of all articles for this month |

Newsgroups: comp.compilers
From: bnell@siemens.com (Bill Nell)
Keywords: PCCTS, question
Organization: Siemens Corporate Research, Princeton (Plainsboro), NJ
Date: Tue, 23 Feb 1993 14:23:37 GMT

I have a couple questions about PCCTS (v1.06) that hopefully some of the
PCCTS users out there can answer.


1) When compiling antlr with itself I get the following warnings.


../bin/antlr antlr.g
Antlr parser generator Version 1.06 1989-1992
antlr.g, line 345: warning: optional path and alt(s) of (..)* ambiguous upon
{ "#errclass" }
antlr.g, line 454: warning: alts 1 and 2 of {..} ambiguous upon { Action }
antlr.g, line 525: warning: alts 1 and 2 of {..} ambiguous upon { Action }
antlr.g, line 583: warning: alts 1 and 2 of {..} ambiguous upon { PassAction }
antlr.g, line 587: warning: alts 1 and 2 of {..} ambiguous upon { "\>" }
antlr.g, line 599: warning: alts 1 and 2 of {..} ambiguous upon { PassAction }
antlr.g, line 609: warning: alts 1 and 3 of (..) ambiguous upon { "\*" }
antlr.g, line 610: warning: alts 2 and 3 of (..) ambiguous upon { "\+" }
antlr.g, line 613: warning: alts 1 and 2 of {..} ambiguous upon { PassAction }
antlr.g, line 615: warning: alts 1 and 2 of {..} ambiguous upon { PassAction }


Is this normal?


2) The documentation that comes with PCCTS says that using multiple parsers or
calling a single parser multiple times does not work. But, in the BUGS100
file it says:


(11) As per the manual, PCCTS had a problem with multiple ANTLR macro
          invocations. This has been fixed (we think). In file dlgauto.h
          in the pccts/h directory make the following additions:


... bug fix stuff deleted ...


You should be able to do this:


parse(f1,f2)
FILE *f1, *f2;
{
          ANTLR(grammar(), f1);
          ANTLR(grammar(), f2);
}


Before, the second invocation of the ANTLR macro did not know that it
needed to get another character before beginning. Let us know if this
screws up anything else. Be aware that switching between input streams
will not work because characters are lost when switching to a new stream.




My questions are: Do multiple parsers/multiple parser invocations work
now? And, I am confused about the last line in the last paragraph. To me
it basically means that a PCCTS lexer/parser would not be able to handle
things like #include files, where you would have to switch the input
buffer to read from a new file. Is this what that last line really means?




Thanks in advance for any help.
Bill


--
bnell@scr.siemens.com
Siemens Corporate Research
755 College Road East
Princeton, NJ 08540
--


Post a followup to this message

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