Results 1 to 7 of 7
  1. #1
    nab2329 is offline Member
    Join Date
    May 2014
    Posts
    3
    Rep Power
    0

    Post parsing binary data to ASCII with javacc

    Hi,

    I want to make a parser from binary to ASCII with JavaCC or another Compiler Construction with Java. I don't know how to start. So please i need help.

    thanks.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,556
    Rep Power
    25

    Default Re: parsing binary data to ASCII with javacc

    Is this a java programming question?

    I have never seen a reference to JavaCC on the forum.
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    nab2329 is offline Member
    Join Date
    May 2014
    Posts
    3
    Rep Power
    0

    Default Re: parsing binary data to ASCII with javacc

    yes i found some questions about javacc in this forum when i did a search, that's why I asked my question in the forum

  4. #4
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,076
    Rep Power
    6

    Default Re: parsing binary data to ASCII with javacc

    binary to ascii? You're looking to build a decompiler perhaps? That's the exact opposite of building a compiler.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  5. #5
    nab2329 is offline Member
    Join Date
    May 2014
    Posts
    3
    Rep Power
    0

    Default Re: parsing binary data to ASCII with javacc

    Yes i want to convert binary data to ASCII

  6. #6
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,556
    Rep Power
    25

    Default Re: parsing binary data to ASCII with javacc

    How does javacc help you do that?

    That problem sounds like something that can be done in a java program.
    Can you explain how binary data would be converted to ASCII?
    Everything in a computer is binary. ASCII is a way to interpret what is in a byte.
    If you don't understand my response, don't ignore it, ask a question.

  7. #7
    jim829 is online now Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    3,760
    Rep Power
    5

    Default Re: parsing binary data to ASCII with javacc

    JavaCC and ANTLR which have been mentioned in other threads are used to generate parsers which accept formal grammars which can be used to help parse and then compile a computer language. You don't use them to convert (actually, represent) binary data to a character standard (like ASCII). Binary data is in effect already ASCII (if that's what you want). ASCII is nothing more than a standard which says this group of 7 (or 8 bits with parity bit) means this. So whether you represent it in binary, octal, or hex, you can just declare it as ASCII. It may be meaningless though because you could have control characters intermingled with printable characters. If I have a binary number of say 01010010, it could mean one thing in ASCII, another in EBCDIC or just the number 82 in decimal.

    Regards,
    Jim
    Last edited by jim829; 05-24-2014 at 03:15 AM.
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

Similar Threads

  1. Replies: 10
    Last Post: 10-03-2013, 11:51 AM
  2. convert 30 char of ascii to binary
    By aelynne in forum New To Java
    Replies: 2
    Last Post: 10-29-2011, 09:15 AM
  3. ASCII to binary code
    By Vagabond.drv in forum New To Java
    Replies: 12
    Last Post: 01-13-2011, 01:52 PM
  4. parsing out some data.. from an HTML response
    By AndyMan in forum New To Java
    Replies: 1
    Last Post: 11-29-2010, 02:00 AM
  5. Binary and ASCII
    By mac in forum New To Java
    Replies: 4
    Last Post: 01-10-2010, 06:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •