[antlr-interest] Tree grammar error

Piper, Martin Martin.Piper at qg.com
Wed Aug 25 06:36:20 PDT 2010


Starting at line 1509 in that file, you have Lexer token definitions/rules.
They are not allowed in Tree grammars and parser grammars. Only in Lexer grammars or mixed grammars.
All the tokens must be imported into the tree grammar through the tokenVocab= option.


-----Original Message-----
From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-bounces at antlr.org] On Behalf Of Prados Valiente Enrique
Sent: Wednesday, August 25, 2010 6:42 AM
To: Sarnath K - ERS, HCLTech; antlr-interest at antlr.org
Subject: Re: [antlr-interest] Tree grammar error

I copy file tokens but get the same error like this:

[13:27:03] error(102): PLSQL3.g:1509:1: lexer rule QUOTED_STRING not allowed in parser
[13:27:03] error(102): PLSQL3.g:1512:1: lexer rule ID not allowed in parser
[13:27:03] error(102): PLSQL3.g:1516:1: lexer rule SEMI not allowed in parser
[13:27:03] error(102): PLSQL3.g:1519:1: lexer rule COLON not allowed in parser
[13:27:03] error(102): PLSQL3.g:1522:1: lexer rule DOUBLEDOT not allowed in parser
[13:27:03] error(102): PLSQL3.g:1525:1: lexer rule DOT not allowed in parser
[13:27:03] error(102): PLSQL3.g:1529:1: lexer rule POINT not allowed in parser
[13:27:03] error(102): PLSQL3.g:1532:1: lexer rule COMMA not allowed in parser
[13:27:03] error(102): PLSQL3.g:1535:1: lexer rule EXPONENT not allowed in parser
[13:27:03] error(102): PLSQL3.g:1538:1: lexer rule ASTERISK not allowed in parser
[13:27:03] error(102): PLSQL3.g:1541:1: lexer rule AT_SIGN not allowed in parser
[13:27:03] error(102): PLSQL3.g:1544:1: lexer rule RPAREN not allowed in parser
[13:27:03] error(102): PLSQL3.g:1547:1: lexer rule LPAREN not allowed in parser
[13:27:03] error(102): PLSQL3.g:1550:1: lexer rule RBRACK not allowed in parser
[13:27:03] error(102): PLSQL3.g:1553:1: lexer rule LBRACK not allowed in parser
[13:27:03] error(102): PLSQL3.g:1556:1: lexer rule PLUS not allowed in parser
[13:27:03] error(102): PLSQL3.g:1559:1: lexer rule MINUS not allowed in parser
[13:27:03] error(102): PLSQL3.g:1562:1: lexer rule DIVIDE not allowed in parser
[13:27:03] error(102): PLSQL3.g:1565:1: lexer rule EQ not allowed in parser
[13:27:03] error(102): PLSQL3.g:1568:1: lexer rule PERCENTAGE not allowed in parser
[13:27:03] error(102): PLSQL3.g:1571:1: lexer rule LLABEL not allowed in parser
[13:27:03] error(102): PLSQL3.g:1574:1: lexer rule RLABEL not allowed in parser
[13:27:03] error(102): PLSQL3.g:1577:1: lexer rule ASSIGN not allowed in parser
[13:27:03] error(102): PLSQL3.g:1580:1: lexer rule ARROW not allowed in parser
[13:27:03] error(102): PLSQL3.g:1583:1: lexer rule VERTBAR not allowed in parser
[13:27:03] error(102): PLSQL3.g:1586:1: lexer rule DOUBLEVERTBAR not allowed in parser
[13:27:03] error(102): PLSQL3.g:1589:1: lexer rule NOT_EQ not allowed in parser
[13:27:03] error(102): PLSQL3.g:1592:1: lexer rule LTH not allowed in parser
[13:27:03] error(102): PLSQL3.g:1595:1: lexer rule LEQ not allowed in parser
[13:27:03] error(102): PLSQL3.g:1598:1: lexer rule GTH not allowed in parser
[13:27:03] error(102): PLSQL3.g:1601:1: lexer rule GEQ not allowed in parser
[13:27:03] error(102): PLSQL3.g:1604:1: lexer rule NUMBER not allowed in parser
[13:27:03] error(102): PLSQL3.g:1613:1: lexer rule N not allowed in parser
[13:27:03] error(102): PLSQL3.g:1616:1: lexer rule QUOTE not allowed in parser
[13:27:03] error(102): PLSQL3.g:1620:1: lexer rule DOUBLEQUOTED_STRING not allowed in parser
[13:27:03] error(102): PLSQL3.g:1623:1: lexer rule WS not allowed in parser
[13:27:03] error(102): PLSQL3.g:1625:1: lexer rule SL_COMMENT not allowed in parser
[13:27:03] error(102): PLSQL3.g:1628:1: lexer rule ML_COMMENT not allowed in parser
[13:27:03] error(102): PLSQL3.g:1631:1: lexer rule TYPE_ATTR not allowed in parser
[13:27:03] error(102): PLSQL3.g:1634:1: lexer rule ROWTYPE_ATTR not allowed in parser
[13:27:03] error(102): PLSQL3.g:1637:1: lexer rule NOTFOUND_ATTR not allowed in parser
[13:27:03] error(102): PLSQL3.g:1640:1: lexer rule FOUND_ATTR not allowed in parser
[13:27:03] error(102): PLSQL3.g:1643:1: lexer rule ISOPEN_ATTR not allowed in parser
[13:27:03] error(102): PLSQL3.g:1646:1: lexer rule ROWCOUNT_ATTR not allowed in parser
[13:27:03] error(102): PLSQL3.g:1649:1: lexer rule BULK_ROWCOUNT_ATTR not allowed in parser
[13:27:03] error(102): PLSQL3.g:1652:1: lexer rule CHARSET_ATTR not allowed in parser


-----Mensaje original-----
De: Sarnath K - ERS, HCLTech [mailto:k_sarnath at hcl.com] 
Enviado el: miércoles, 25 de agosto de 2010 13:39
Para: Prados Valiente Enrique; antlr-interest at antlr.org
Asunto: RE: Tree grammar error

"cannot find tokens file E:\TreeGrammar\output\block.tokens"

-- I think that's the principal error msg. If you fix it, you should be all right.


DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. 
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have 
received this email in error please delete it and notify the sender immediately. Before opening any mail and 
attachments please check them for viruses and defect.

-----------------------------------------------------------------------------------------------------------------------

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address


More information about the antlr-interest mailing list