Have you ever programmed in Smalltalk or Squeak? Neither are "text file" based in the sense that C and Java are. Instead, the language runtime is
the IDE, and the IDE is the language runtime. It's actually really bloody cool when you play around with it.
As for comparing actual semantic differences vs. syntactic differences, well, I imagine it's really damn difficult, considering the syntactical construction of an expression determines its semantics. In other words, if you change the syntax, you've likely changed the semantics, at least at a low level.
I know what you're trying to say, though. I'm reminded of an exercise given to me in my intro to CS class. We have to convert a for loop to a while loop to do-while loop and back again. Syntactically, they're all different, but semantically, at least for that exercise, they all did the same thing. You'd like a language or an IDE or whatever that can tell you that those three loops are all doing the same thing, regardless of how I write them, and frankly, I think such a language/IDE/magic wand would be freakin' fantastic. (I mean, consider for a moment how often you've rewritten something and are certain it does the exact same thing as the previous incarnation and are shocked when you realize it doesn't?) I'm just not certain if you can achieve that with any ease at all. You'd essentially have to have code that understood any other code, which sounds remarkably similar to the halting problem.
There may be specific cases where this is doable, though... I can see a language like Haskell being able to provide this sort of analysis for loops or a few simple function calls or whatnot. The reason I pick Haskell is because it's, in general, a language free of side effects, which aspect of programming could increase the complexity of any compile-time semantic analysis by orders of magnitude. Runtime analysis is a different story, of course... but, again, that treads awfully close to no-general-purpose-solution worlds here.