Loading ...
Sorry, an error occurred while loading the content.
 

Re: Just arrived...

Expand Messages
  • Sinan Karasu
    Because antlr defines EOF as 1 .... try WellDefinedToken ( 3 .. 377 )* EOF
    Message 1 of 5 , Mar 18, 1999
      Because antlr defines EOF as 1 ....

      try

      WellDefinedToken ('\3'..'\377')* EOF
    • Douglas Atique
      ANTLR didn t like it. It insists on complaining : error: Lexer rule EOF is not defined Douglas ... De: sinan.karasu@Boeing.com[SMTP:sinan.karasu@Boeing.com]
      Message 2 of 5 , Mar 18, 1999
        ANTLR didn't like it. It insists on complaining :
        error: Lexer rule EOF is not defined
        Douglas

        ----------
        De: sinan.karasu@...[SMTP:sinan.karasu@...]
        Enviada em: Quinta-feira, 18 de Mar´┐Żo de 1999 14:07
        Para: antlr-interest@onelist.com; Douglas.Atique@...
        Assunto: Re: [antlr-interest] Just arrived...

        Because antlr defines EOF as 1 ....

        try

        WellDefinedToken ('\3'..'\377')* EOF
      • Sinan Karasu
        Ooops, shoud have read WDT ( 3 .. 377 )* no EOF. it is auto gen d
        Message 3 of 5 , Mar 18, 1999
          Ooops,

          shoud have read

          WDT ('\3'..'\\377')*

          no EOF. it is auto gen'd
        • Terence Parr
          ... It is a predefined token really and special ...there is no real rule associated with it; it signifies a file system state as opposed to a real
          Message 4 of 5 , Mar 18, 1999
            Douglas Atique hath spoken:
            >From: Douglas Atique <Douglas.Atique@...>
            >
            >Hello, everybody.
            >I have just subscribed to the list, but I have been looking at ANTLR and
            >earlier PCCTS for a while. Just now I had the opportunity to develop a
            >parser with ANTLR, and the article at Dr. Dobb's did a great job in
            >motivating me.
            >As a new tool, ANTLR presented some behaviors to which I am not accustomed.
            >For example, I have read in the reference manual that I can reference the
            >EOF predefined rule in any parser. As it starts with a capital letter, I
            >conclude that it's a lexer rule. Then, why does ANTLR complain when I
            >reference this rule in the lexer?

            It is a predefined token really and "special"...there is no real rule
            associated with it; it signifies a file system state as opposed to a real
            "character", contrary to PCs etc...

            Good luck,
            Terence
          Your message has been successfully submitted and would be delivered to recipients shortly.