• 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: XCode 4 and Yacc and Lex files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XCode 4 and Yacc and Lex files


  • Subject: Re: XCode 4 and Yacc and Lex files
  • From: Thomas Wetmore <email@hidden>
  • Date: Sat, 02 Apr 2011 22:30:57 -0400

Jari,

I have had no problems with yacc (don't use lex) on Xcode 3 or 4. But I keep the yacc files in the project and let Xcode's default rules take care of them for me. I use .ym files instead of .y files so the semantic actions and other code can be written in Objective-C instead of plain C.

Your issue might be caused by the #line lines that are inserted into the generated files when you run yacc by hand. Xcode might be trying to report errors and unable to resolve the #line values back to an original yacc or lex file. I think there is an option you can use when calling yacc/bison to keep those lines from being generated.

I would bit the bullet and put your lex and yacc files in your project and let Xcode handle them for you. Xcode can even handle projects with more than one yacc file through a build setting available via the target settings panel. Good luck finding where Xcode puts the derived files with Xcode4! You will find them after awhile.

Tom Wetmore

On Apr 2, 2011, at 9:32 PM, Jari Perttunen wrote:

> Is XCode 4.0.1  trying to be too clever with Lex and Yacc files?
>
> I have a directory with source and header files and I have created an Xcode project
> explicitly importing only those files that are required to build the C++ command line
> tool binary.
>
> More precisely, I have not imported two Lex and Yacc files (with .l and .y suffixes respectively),
> but the c++ source and header files instead generated by  Flex and Bison respectively.
>
> However, during the compilation XCode fails reporting "Lexical or Preprocessor Issue"
> referring  to the two Lex and Yacc files that I have not imported.
>
> This was not a problem with XCode 3.2.6.
>
>
> Jari Perttunen
>
> ==============================
> Jari Perttunen
> 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

 _______________________________________________
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

  • Follow-Ups:
    • Re: XCode 4 and Yacc and Lex files
      • From: Jari Perttunen <email@hidden>
References: 
 >XCode 4 and Yacc and Lex files (From: Jari Perttunen <email@hidden>)

  • Prev by Date: Re: layout question
  • Next by Date: Re: layout question
  • Previous by thread: XCode 4 and Yacc and Lex files
  • Next by thread: Re: XCode 4 and Yacc and Lex files
  • Index(es):
    • Date
    • Thread