Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Building a Compiler ?
#1
Building a Compiler cant be easy , but is that too tough to build a Compiler in C++ ?? for any language, like even a simple one . I have been following an ebook of that , and quite liking it Big Grin is that really possible in a Month if I really work hard or Iam just wasting my Time ??
Reply
#2
It's definitely possible. Learning about a coding language is never a waste of time, whatever it is or whatever you're goals are, you'll pick up things along the way that will help you in later projects. Keep up the good work.
Reply
#3
A compiler basically in sum turns langauge syntax into something recognizable by the machine (machine code). If you can understand how to make that conversion.
Reply
#4
(02-21-2012, 07:45 AM)AceInfinity Wrote: A compiler basically in sum turns langauge syntax into something recognizable by the machine (machine code). If you can understand how to make that conversion.

I have been following an ebook and so far Iam only in the introductory part , like I know basically a Compiler is a two pass , Front End and Back End , Front End basically deals first with the source code as it has two parts Scanner and Parser . Scanner takes the source code and generates tokens which are basically in pairs , like <id,x> where x is an identifier id(token type) and x is said as a word . Parser take this token and converts it into an IR [Intermediate Representation] which basically checks the Context Grammer , that is the particular code belongs to the language or not , than there is a Back End which basically converts this into an assembly code ??

Huff revision done Big Grin hope Iam going the right way ? reply would be helpful
(02-21-2012, 07:27 AM)Load Wrote: It's definitely possible. Learning about a coding language is never a waste of time, whatever it is or whatever you're goals are, you'll pick up things along the way that will help you in later projects. Keep up the good work.

Thank you so much for boosting me up Smile Ebook which Iam following says that after studying this you can make your own compiler for language which is a subset of Java , which one that is , Javascript ?
Reply
#5
Yes, but you can't forget about the order in which things get compiled with C++ either, and with that comes the linker.
Reply
#6
(02-21-2012, 08:03 AM)AceInfinity Wrote: Yes, but you can't forget about the order in which things get compiled with C++ either, and with that comes the linker.

Ebook which Iam following says that you can biuld you own Compiler of language which is a subset of Java , which one is subset of Java , Javascript ??
Reply
#7
lol no, Javascript and Java aren't even close. Javascript would be much lower than Java.
Reply
#8
(02-21-2012, 08:08 AM)AceInfinity Wrote: lol no, Javascript and Java aren't even close. Javascript would be much lower than Java.

Then which language is the subset of it ? actually I have challenged my Professor today that I'll be making a Compiler for my project and every one is saying that you are fudged , its not possible , after posting here Iam getting some kind of confidence that I can do something , it "IS" possible Smile
Reply
#9
It is, but no one said it would be easy. I know how a compiler works, I just wouldn't know how to go about making one that would be any decent.

Also, the reason why Javascript wouldn't be it, is because Javascript isn't even compiled lol.

If you're using Java, then you can only compile lower level langauges would be my assumption, but I may be wrong, it just seems logical that it's true though.
Reply
#10
(02-21-2012, 08:26 AM)AceInfinity Wrote: It is, but no one said it would be easy. I know how a compiler works, I just wouldn't know how to go about making one that would be any decent.

Also, the reason why Javascript wouldn't be it, is because Javascript isn't even compiled lol.

If you're using Java, then you can only compile lower level langauges would be my assumption, but I may be wrong, it just seems logical that it's true though.

Iam just asking you which language can be called as a subset of Java Huh
and I have to make my project in C++ . I know its not easy but Iam ready to work really hard , and I have like 45 days to make that . hope I can achive my Goal , many guys suggested me to make my own simple language and build a Compiler for that ??
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Code Block compiler: "No compiler found" Fix Inventor 7 3,882 09-04-2011, 06:12 AM
Last Post: Orgy
  Need a new compiler Richard Runz 2 1,027 08-07-2011, 11:17 AM
Last Post: [Dr.House]
  C++ Compiler Impuhlsive 2 1,414 05-09-2011, 06:24 AM
Last Post: cfillion
  c++ free compiler? Marda 17 5,134 10-29-2010, 02:46 PM
Last Post: Xzotic
  Problem when Building. Visual C++ bryden1122 18 2,720 01-18-2010, 10:37 PM
Last Post: Equinøx

Forum Jump:


Users browsing this thread: 1 Guest(s)