Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8238951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T19:58:47+00:00 2026-06-07T19:58:47+00:00

I have an grammar for a template language. I created this for Antlr 3.2

  • 0

I have an grammar for a template language.

I created this for Antlr 3.2 and CSharp2 target and have it working.

Now I try to change to antlr 3.4 and CSharp3 target (have tried CSharp2 also) and I get a strange error in the Parser in a synpred function.

Several variable declarations are missing the variable name:

IToken  = default(IToken)

Some also have th wrong type

void  = default(void);

should be

AstParserRuleReturnScope<CommonTree, IToken>  = default(AstParserRuleReturnScope<CommonTree, IToken>);

Have any one seen this before and what could be causing this.

The grammar is the same that was working before.

Unfortunately I cannot share the grammar and I have not had time to create a test grammar that causes the same error.

I can of course fix the errors manually and the code works but it’s a bit tiresome to have to go through the code after generation fixing them.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T19:58:49+00:00Added an answer on June 7, 2026 at 7:58 pm

    I was able to resolve this problem by using the native .NET version of the ANTLR code generation tool (Antlr3.exe) instead of the Java version. Specifically, antlr-dotnet-tool-3.4.1.9004.7z worked for me, whereas antlr-3.4-complete-no-antlrv2.jar did not.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written grammar for a language (sample code below) //this is a procedure
I have the following grammar: grammar bxk; options { language=CSharp3; } // start rule
I have this grammar to match simple logical predicates in ANTLR. exp : or
I have an ANTLR grammar and am defining a function in my language that
I have strings like this: `(val1, val2, val3)` And I have ANTLR grammar to
I'm attemping to learn language parsing for fun... I've created a ANTLR grammar which
I have this grammar of a C# like language, and I want to make
I have this grammar in EBNF notation: expr -> expr (opt1 | opt2 |
Using Flex and Bison, I have a grammar specification for a boolean query language,
I have an ANTLR grammar file as part of a C# project file and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.