Other Programming Languages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreOther Programming Languages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 30th, 2009, 07:53 PM
freetrader0000 freetrader0000 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 2 freetrader0000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 51 m 29 sec
Reputation Power: 0
Question Other Language - My own programming language

I have a question. I think I can make my own programming language in C#, though how can I compile that language, into something like html, javascript, or any other language? Can that be done with Microsoft Visual C#? If it cannot, then what can I use for that. I also have experience with C/C++.

Thanks in advance!

Reply With Quote
  #2  
Old July 30th, 2009, 08:09 PM
MrFujin's Avatar
MrFujin MrFujin is offline
Lord of the Dance
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Oct 2003
Posts: 3,129 MrFujin User rank is General 11st Grade (Above 100000 Reputation Level)MrFujin User rank is General 11st Grade (Above 100000 Reputation Level)MrFujin User rank is General 11st Grade (Above 100000 Reputation Level)MrFujin User rank is General 11st Grade (Above 100000 Reputation Level)MrFujin User rank is General 11st Grade (Above 100000 Reputation Level)MrFujin User rank is General 11st Grade (Above 100000 Reputation Level)MrFujin User rank is General 11st Grade (Above 100000 Reputation Level)MrFujin User rank is General 11st Grade (Above 100000 Reputation Level)MrFujin User rank is General 11st Grade (Above 100000 Reputation Level)MrFujin User rank is General 11st Grade (Above 100000 Reputation Level)MrFujin User rank is General 11st Grade (Above 100000 Reputation Level)MrFujin User rank is General 11st Grade (Above 100000 Reputation Level)MrFujin User rank is General 11st Grade (Above 100000 Reputation Level)MrFujin User rank is General 11st Grade (Above 100000 Reputation Level)MrFujin User rank is General 11st Grade (Above 100000 Reputation Level)MrFujin User rank is General 11st Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 2 Weeks 22 h 57 m 20 sec
Reputation Power: 1736
Can i ask why you want to create your own programming language, instead of using one that already exists?

Reply With Quote
  #3  
Old July 30th, 2009, 08:21 PM
freetrader0000 freetrader0000 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 2 freetrader0000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 51 m 29 sec
Reputation Power: 0
Quote:
Originally Posted by MrFujin
Can i ask why you want to create your own programming language, instead of using one that already exists?


Well, basically I would really like to learn how to make one, I really have a lot of time in my hands. Plus I think that it might be quite useful for specific aplications that may not need certain things.

Reply With Quote
  #4  
Old July 30th, 2009, 08:41 PM
MrFujin's Avatar
MrFujin MrFujin is offline
Lord of the Dance
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Oct 2003
Posts: 3,129 MrFujin User rank is General 11st Grade (Above 100000 Reputation Level)MrFujin User rank is General 11st Grade (Above 100000 Reputation Level)MrFujin User rank is General 11st Grade (Above 100000 Reputation Level)MrFujin User rank is General 11st Grade (Above 100000 Reputation Level)MrFujin User rank is General 11st Grade (Above 100000 Reputation Level)MrFujin User rank is General 11st Grade (Above 100000 Reputation Level)MrFujin User rank is General 11st Grade (Above 100000 Reputation Level)MrFujin User rank is General 11st Grade (Above 100000 Reputation Level)MrFujin User rank is General 11st Grade (Above 100000 Reputation Level)MrFujin User rank is General 11st Grade (Above 100000 Reputation Level)MrFujin User rank is General 11st Grade (Above 100000 Reputation Level)MrFujin User rank is General 11st Grade (Above 100000 Reputation Level)MrFujin User rank is General 11st Grade (Above 100000 Reputation Level)MrFujin User rank is General 11st Grade (Above 100000 Reputation Level)MrFujin User rank is General 11st Grade (Above 100000 Reputation Level)MrFujin User rank is General 11st Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 2 Weeks 22 h 57 m 20 sec
Reputation Power: 1736
there already exists one thread called Create my own programming language.

Maybe you could start reading the information that have been posted there.

Reply With Quote
  #5  
Old July 31st, 2009, 03:36 AM
Lux Perpetua Lux Perpetua is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2004
Location: San Francisco Bay
Posts: 1,936 Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level)Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level)Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level)Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level)Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level)Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level)Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level)Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level)Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level)Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level)Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level)Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level)Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level)Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level)Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level)Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 2 h 12 m 42 sec
Reputation Power: 1312
Quote:
Originally Posted by freetrader0000
I have a question. I think I can make my own programming language in C#, though how can I compile that language, into something like html, javascript, or any other language? Can that be done with Microsoft Visual C#? If it cannot, then what can I use for that. I also have experience with C/C++.

Thanks in advance!
I have no idea what you're asking. You want to compile your programming language into HTML? What does that even mean?

Reply With Quote
  #6  
Old August 24th, 2009, 06:11 PM
nathanpc's Avatar
nathanpc nathanpc is offline
PixHost.tk Developer
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Location: Brazil
Posts: 58 nathanpc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 25 m 29 sec
Reputation Power: 0
Send a message via ICQ to nathanpc Send a message via AIM to nathanpc Send a message via MSN to nathanpc Send a message via Yahoo to nathanpc Send a message via Google Talk to nathanpc Send a message via Skype to nathanpc Send a message via XFire to nathanpc
Facebook Orkut
I was trying to do this thing as a time, then i go to develop an OS written in Assembly, it's good.

Reply With Quote
  #7  
Old August 25th, 2009, 01:51 PM
Schol-R-LEA's Avatar
Schol-R-LEA Schol-R-LEA is offline
Commie Mutant Traitor
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Jun 2004
Location: Norcross, GA (again)
Posts: 1,759 Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level)Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level)Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level)Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level)Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level)Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level)Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level)Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level)Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level)Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level)Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level)Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level)Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level)Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level)Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level)Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 2 Days 3 h 38 m 3 sec
Reputation Power: 1568
Compiler design is a fairly large project in and of itself; I would recommend learning about compilers with some subset of an existing language before going ahead with trying anything novel. This is a fairly standard project for an undergrad CS course on compilers (with the grad class being more of the same in more depth); there are several textbooks on the topic, with the Compilers: Principles, Techniques, and Tools being the one used by most courses. In the US at least, most public and university libraries have at least book on the subject.

There are also several online tutorials and pages on the subject floating around, of varying quality. Fortunately, there are several ways of doing this, so even an bad tutorial can be insightful.
You may also want to see the Compiler and Language Wiki, though that seems to be very much a work in progress.

To get you started:
compiling generally has three main stages, Lexical analysis (breaking the source code into a stream of tokens), parsing (processing the token stream for it's grammatical structure), and code generation (the resulting output, whether as an executable file or a source file for a different language). Most compilers use some sort of intermediate stage between the parser and the code generator (to separate the parts specific to the language from the parts specific to the target system, making it easier to re-target the compiler to a different system), and many have some sort of optimizer either between the parser and the code generator, or after the code generator, or both.

To do this right, you should learn something about context-free grammars (and Backus-Naur Form in particular) and Deterministic Finite State Automata, and have a good grasp of the target language (usually some form of assembly language, but in principle it could be any Turing Complete language - rules out markup languages such as HTML).

Adding OS design on top of that... that way madness lies. I of all people know that. Hasn't stopped me from working on and off on it for 15 years, and I doubt it will stop you, either, but I thought I'd at least warn you about the open-ended time sink such a project can become.

This thread describes part of a compiler I wrote for a course I took last year, including an attachment with the compiler source code (in Python) for you to look at, if you'd like. HTH.

EDIT: Fixed the links and markup. sigh This is what I get for rushing to post this before leaving.
Comments on this post
medialint agrees!
nathanpc agrees: Very good and very explained post!
Attached Files
File Type: txt Suntiger Algol 0.01.txt (2.9 KB, 191 views)
__________________
Rev First Speaker Schol-R-LEA;2 JAM LCF ELF KoR KCO BiWM TGIF
#define KINSEY (rand() % 7) λ Scheme is the Red Pill
Scheme in ShortUnderstanding the C/C++ Preprocessor
Taming PythonA Highly Opinionated Review of Programming Languages for the Novice, v1.1

FOR SALE: One ShapeSystem 2300 CMD, extensively modified for human use. Includes s/w for anthro, transgender, sex-appeal enhance, & Gillian Anderson and Jason D. Poit clone forms. Some wear. $4500 obo. tverres@et.ins.gov

Last edited by Schol-R-LEA : August 27th, 2009 at 11:57 AM. Reason: Fixed broken links and markup

Reply With Quote
  #8  
Old August 25th, 2009, 03:23 PM
nathanpc's Avatar
nathanpc nathanpc is offline
PixHost.tk Developer
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Location: Brazil
Posts: 58 nathanpc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 25 m 29 sec
Reputation Power: 0
Send a message via ICQ to nathanpc Send a message via AIM to nathanpc Send a message via MSN to nathanpc Send a message via Yahoo to nathanpc Send a message via Google Talk to nathanpc Send a message via Skype to nathanpc Send a message via XFire to nathanpc
Facebook Orkut
Schol-R-LEA, you can correct your tags, please!

Reply With Quote
  #9  
Old August 25th, 2009, 05:56 PM
Schol-R-LEA's Avatar
Schol-R-LEA Schol-R-LEA is offline
Commie Mutant Traitor
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Jun 2004
Location: Norcross, GA (again)
Posts: 1,759 Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level)Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level)Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level)Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level)Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level)Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level)Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level)Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level)Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level)Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level)Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level)Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level)Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level)Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level)Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level)Schol-R-LEA User rank is General 9th Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 2 Days 3 h 38 m 3 sec
Reputation Power: 1568
Sorry 'bout that, Nathanpc. I've fixed that bad markup, and added some more information and links that I hadn't had time to include the first time through.

Reply With Quote
  #10  
Old August 25th, 2009, 07:13 PM
nathanpc's Avatar
nathanpc nathanpc is offline
PixHost.tk Developer
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Location: Brazil
Posts: 58 nathanpc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 25 m 29 sec
Reputation Power: 0
Send a message via ICQ to nathanpc Send a message via AIM to nathanpc Send a message via MSN to nathanpc Send a message via Yahoo to nathanpc Send a message via Google Talk to nathanpc Send a message via Skype to nathanpc Send a message via XFire to nathanpc
Facebook Orkut
Thanks my friend!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreOther Programming Languages > Other Language - My own programming language

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap