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 7697117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:56:11+00:00 2026-05-31T21:56:11+00:00

I got interested in parser generators. But I don’t have the theoretical background. I

  • 0

I got interested in parser generators. But I don’t have the theoretical background. I just read a few things on the internet.

Currently I’m trying to do something with ANTLR

So my questions:

I have a special format of my dataframes:

  • The first byte of a frame is a tag that describes the nature of the data
  • The second byte contains the length (number of bytes) of the data itself
  • Then follows the data itself
  • The data can contain dataframes itself, and dataframes can be listed one after the other

I hope my description is clear. My questions:

Can I create such a parser with ANTLR that reads the lengs of the frame and then knows when the frame ends?

In ANTLR can I load the different tags I use from a generated file?

Thank you!

  • 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-31T21:56:12+00:00Added an answer on May 31, 2026 at 9:56 pm

    I’m not 100% sure about this, but:

    • Parser generators like antlr require a grammar that is at least context-free
    • using length-fields in your data makes your grammar not context free (context-sensitive i think)

    It is the latter point i’m not sure about – maybe you want to research some more on that.

    You probably have to write a packet “parser” yourself (which then has to be a parser for your context-sensitive packet grammar)

    Alternatively, you could drop the length field, and use something like s-expressions, JSON or xml; these would be parseable by something generated with antlr.

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

Sidebar

Related Questions

I have just recently got interested in the Google Analytics plugin but found out
I have got interested in and looking for practical examples of SMT Z3 usage
I read http://ajaxpatterns.org/On-Demand_Javascript and got interested in lazy loading my JS. Questions: Can anyone
I just recently got interested in how search engines work, and I found out
I'm just interested to know how your sources.list look like. I got some repositories
I've been programming for some time but never got interested in knowing in theory
I implemented a Lucene search solution awhile back, and it got me interested in
Based on feedback I got from this question , I'm interested in using Lazy
got a new blog at wordpress few days ago ( http://ghads.wordpress.com ) and I
Got a bit of a mind freeze at the moment. I have the following

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.