Thread: A Basic BNF for C

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    202

    A Basic BNF for C

    Does anyone out there have a basic grammar for C in Basic Backus-Naur form? So far, I've only been able to find it defined in the extended BNF, which is proving to be a problem because my parser doesn't handle EBNF so well. If you know of one somewhere, I would really appreciate a link to it.

    Thanks,

    starX
    www.axisoftime.com

  2. #2
    Registered User
    Join Date
    Apr 2002
    Posts
    200
    There is one here that looks fairly standard...
    http://lists.canonical.org/pipermail...er/000201.html
    What parser are you using? I think bison, yacc, and a host of others handle EBNF pretty well?
    I go to encounter for the millionth time the reality of experience and to forge in the smithy of my soul the uncreated conscience of my race.

    Windows XP consists of 32 bit extensions and a graphical shell for a 16 bit patch to an 8 bit operating system originally coded for a 4 bit microprocessor, written by a 2 bit company, that can't stand 1 bit of competition.

  3. #3
    Registered User
    Join Date
    Aug 2001
    Posts
    202
    Thanks, this looks like the easiest to convert of all the ones I've stumbled across.

    The parser is actually a homegrown one, for which I figured the best test would be if it could read a BNF of a programming language, and then spit out a program that would compile and run (although not necessarily do anything noticeable). The problem is that when I was putting it together, I didn't know about EBNF, and although I've theoretically added support, it's processing of EBNF specific notation is spotty at best.

    Thanks again,

    starX
    www.axisoftime.com

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. [ANN] New script engine (Basic sintax)
    By MKTMK in forum C++ Programming
    Replies: 1
    Last Post: 11-01-2005, 10:28 AM
  2. what are your thoughts on visual basic?
    By orion- in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 09-22-2005, 04:28 AM
  3. visual basic vs C or C++
    By FOOTOO in forum Windows Programming
    Replies: 5
    Last Post: 02-06-2005, 08:41 PM
  4. Resource ICONs
    By gbaker in forum Windows Programming
    Replies: 4
    Last Post: 12-15-2003, 07:18 AM