[antlr-interest] Vhdl and Verilog grammars problem

Mamado mamado+groups at gmail.com
Tue Nov 25 10:33:42 PST 2008


Thanks a lot for the quick reply.

This is one of the main reasons more people are using ANTLR, the great
community :-)

I think I agree with you that I need to play around a bit more, I have gone
through the tutorial and the some of the samples, but nothing as complex as
Vhdl or Verilog.


I have checked
http://www.antlr.org/wiki/display/ANTLR3/Migrating+from+ANTLR+2+to+ANTLR+3and
could see issues that needs migration in the grammar file to make a
file
work in 3. but do we have a more elaborate guide in migrating v2 grammars to
V3?

I think that there should be a warning in the pages that this grammar was
written for V2 and might not work with v3 and so forth.

What do you think?

Thanks again for the help.

Best Regards,
Mohamed.

On Tue, Nov 25, 2008 at 3:33 PM, heinrich du Toit
<heinrich at silasvalley.com>wrote:

> I think those grammers are for ANTLR version 2 ..
> You probably downloaded version 3 the current new one.
> Therefore it's incompatible I think.
>
> I suggest you first play with antlr and build something of your own. even
> if it's pretty useless.
> before you jump into a complete grammer.
> Because you need to understand quite alot to be able to modify grammers to
> be usefull for any purpose.
>
>
>
> Mamado wrote:
>
>> Hello All,
>>
>> I was trying to create a common tree parser for Vhdl and Verilog, and I
>> was glad to find both grammars available on ANTLR.
>>
>> I installed ANTLRWorks and opened the Vhdl and Verilog grammars to try to
>> generate code, but I got errors in both of them.
>>
>> [15:23:09] error(208): vhdl.g:1633:1: The following token definitions can
>> never be matched because prior tokens match the same input:
>> BASE,BASE_SPECIFIER,LETTER,HEXDIGIT,INTEGER,DIGIT
>>
>> I am new to ANTLR, though I know a bit about BNF and Parser/Lexer, I tried
>> to look at the grammar file but didn't understand why this error happens.
>>
>> I assumed that the grammar files posted on the site should work out of the
>> box, so I think I am doing something wrong, or there is some settings I
>> need.
>>
>> Can someone please help me.
>>
>> Thanks a lot,
>> Mamado.
>> ------------------------------------------------------------------------
>>
>>
>> List: http://www.antlr.org/mailman/listinfo/antlr-interest
>> Unsubscribe:
>> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>>
>>
>>
>>
>> __________ Information from ESET Smart Security, version of virus
>> signature database 3638 (20081125) __________
>>
>> The message was checked by ESET Smart Security.
>>
>> http://www.eset.com
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20081125/707ea5bb/attachment.html 


More information about the antlr-interest mailing list