• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Is Objective-C now a strict superset of C99?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is Objective-C now a strict superset of C99?


  • Subject: Re: Is Objective-C now a strict superset of C99?
  • From: Ladd Van Tol <email@hidden>
  • Date: Fri, 26 Aug 2005 11:40:24 -0700

I have written such a grammar based on a pre-existing ANSI C grammar, and Apple's documented grammar for Objective-C.

Feel free to use/modify/redistribute this grammar:

http://spiny.com/software/objc.g

It requires DParser, which you can get here:

http://dparser.sourceforge.net/

I found working with DParser a lot easier than lex/yacc, since you don't have to clumsily fumble around with ambiguities all the time. Also note that my grammar does not handle C99 extensions, or Objective-C++. C99 support would be relatively easy to add, but Objective-C++ is considerably trickier.

- Ladd

On Aug 26, 2005, at 11:29 AM, Karan, Cem (Civ, ARL/CISD) wrote:

Unfortunately, that doesn't really answer the question. You see, I want to write a lex/yacc file to parse in modern Objective-C code; that means that I REALLY need to learn what the modern grammar for Objective C is.

Thanks,
Cem Karan

-----Original Message-----
From: Karl Kraft [mailto:email@hidden]
Sent: Fri 26-Aug-05 02:21 PM
To: Karan, Cem (Civ, ARL/CISD)
Cc: email@hidden
Subject: Re: Is Objective-C now a strict superset of C99?

On Aug 26, 2005, at 5:26 AM, Karan, Cem (Civ, ARL/CISD) wrote:

The subject line pretty much says it all; is Objective-C now a
strict superset of C99?  I'd like to use some of the newer C99
keywords and know that my code is portable, but all I see is that
its built on K&R C.




In xcode their is a build setting per target for the following dialects:


C89: Accept ISO C90, but not GNU extensions. [-std=c89]

GNU89: Accept ISO C90 and GNU extensions. [-std=gnu89]

C99: Accept ISO C99, but not GNU extensions. [-std=c99]

GNU99: Accept ISO C99 and GNU extensions. [-std=gnu99]





--
K2  //  Karl Kraft  //  email@hidden  //  AIM: nfoxsupport
To purchase it is not like spending money, but rather it is an
investment in the future, in a blow against the empire



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40criticalpath.com


This email sent to email@hidden



_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >RE: Is Objective-C now a strict superset of C99? (From: "Karan, Cem (Civ, ARL/CISD)" <email@hidden>)

  • Prev by Date: RE: Is Objective-C now a strict superset of C99?
  • Next by Date: Re: Is Objective-C now a strict superset of C99?
  • Previous by thread: RE: Is Objective-C now a strict superset of C99?
  • Next by thread: Re: Is Objective-C now a strict superset of C99?
  • Index(es):
    • Date
    • Thread