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

  • SEARCH
  • Home
  • 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 4320902
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T08:41:04+00:00 2026-05-21T08:41:04+00:00

When I generate a lexer with antlr from a grammer file I notice it

  • 0

When I generate a lexer with antlr from a grammer file I notice it generates a series of strings in hex format.

These strings are utilised by the DFA to predict what tokens my be next.

What do these strings mean and how are they generated.

the strings I am referreing to appear in the generated lexer like this (aand are passed to the DFA in the constructor):

static final String DFA1_eotS = ....

static final String DFA1_eofS = ....

static final String DFA1_minS = ....

static final String DFA1_maxS = ....

static final String DFA1_acceptS = ....

static final String DFA1_specialS = ....                                                

static final String[] DFA1_transitionS = ....

Edit:

I will begin answering by own question to get us started

acceptS[i] = an array containing an identifier for possible tokens (I don’t know why it contains many -1 values)

  • 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-05-21T08:41:05+00:00Added an answer on May 21, 2026 at 8:41 am

    DFA_minS, DFA_maxS I think refers to range of chars it can fall between as it moves through the state table

    DFA_transitionS. I think is the state table

    DFA_specialsS I think is something to do with adding the semanticet predicates to the rules and

    DFA_acceptS seems to be the set of case values in a switch specifying which token is being accepted by the DFA

    Note: I still would like to know if these are correct and how they are generated

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

Sidebar

Related Questions

I have lexer/parser (Generated from an ANTLR grammar file) which (for performance reasons) I
I generate Java sources from a wsdl file. These sources are not under version
I'm writing a custom flex file to generate a lexer for use with JSyntaxpane.
I generate some code using CXF from a WSDL-file. When compiling the code with
I'm currently looking for a lexer/parser that generates Scala code from a BNF grammar
I'm migrating a C#-based programming language compiler from a manual lexer/parser to Antlr. Antlr
I generate my web service from WSDL file. But I need t o define
I want to generate an antlr lexer at runtime -- that is, generate the
I generate .java files from a PrintWriter class. These generated files contain many nested
I was trying hard to make ANTLR 3.2 generate parser/lexer in C++. It was

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.