SEMI-OFFTOPIC: can gcc be made into a server architecture that can talk with XCode?
SEMI-OFFTOPIC: can gcc be made into a server architecture that can talk with XCode?
- Subject: SEMI-OFFTOPIC: can gcc be made into a server architecture that can talk with XCode?
- From: "Karan, Cem (Civ, ARL/CISD)" <email@hidden>
- Date: Tue, 24 Aug 2004 18:21:49 -0400
- Thread-topic: SEMI-OFFTOPIC: can gcc be made into a server architecture that can talk with XCode?
I know that this is off-topic, but I know nothing about the inner
workings of either XCode or gcc, but I figure someone on this list may,
and this post concerns both.
I've been reading all of the complaints that people have about code
completion, and how it isn't good
enough/inaccurate/fill-in-your-rant-here, and trying to think of a
solution. My solution (if it is possible) is to leverage what gcc
already gives us to do the parsing that is necessary for code
completion. gcc MUST be able to handle strange compound/derived/etc.
objects in order to compile our programs. If possible, it may be a
solution to bolt on some code that leverages this so that code
completion would be able to give you only the options that are legal
where you are currently typing (e.g., right now, if you type in the name
of a struct, the list that code completion comes back to you with is
solely members of that struct; I want to extend that so that a struct
that has internal structs, unions, etc. are also selectable.)
I know that gcc may not be built to be able to do this; I know that some
languages allow you to use a variable before you declare its existance,
so this wouldn't work there.
I also know that this isn't the ideal solution; the ideal solution would
be to make gcc a server, with a standard communications language to it
(much like HTTP is) so that you could stream a file to it (either all at
once, or a character at a time, as you type). gcc would then stream
back messages that the IDE would render for the user. This way, Xcode
(or anything else) would not need to have its own parser to try to
figure out keywords, its own internal logic to figure out code
completion, etc; it would just need to understand the messages and
render them. I know that this must be similar to what predictive
compilation does, but I don't know enough about it to know if this is
where gcc is headed.
So the questions are:
1) Is it possible to do this with gcc without basically rewriting it
from the ground up?
2) Would Apple consider supporting/doing this kind of work so that?
3) How hard would it be to rework XCode to use this?
Once again, I know that this is offtopic, but the thought could end up
here or on a gcc related list; if everyone thinks I should go find a gcc
related list, I'll move the thread over there.
Thanks,
Cem Karan
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.