Other Programming Languages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
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:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old December 16th, 2005, 04:52 PM
amfr's Avatar
amfr amfr is offline
Tux to the rescue!
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Location: localhost
Posts: 328 amfr User rank is First Lieutenant (10000 - 20000 Reputation Level)amfr User rank is First Lieutenant (10000 - 20000 Reputation Level)amfr User rank is First Lieutenant (10000 - 20000 Reputation Level)amfr User rank is First Lieutenant (10000 - 20000 Reputation Level)amfr User rank is First Lieutenant (10000 - 20000 Reputation Level)amfr User rank is First Lieutenant (10000 - 20000 Reputation Level)amfr User rank is First Lieutenant (10000 - 20000 Reputation Level)amfr User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 4 Days 20 h 12 m 47 sec
Reputation Power: 141
Send a message via AIM to amfr
Writing own programming language

Can anyone give me any tips on writing my own programming language?
I have lokked at YACC, but I dont really get it
__________________
Without question, the greatest invention in the history of mankind is beer. Oh, I grant you that the wheel was also a fine invention, but the wheel does not go nearly as well with pizza. (Dave Barry's Bad Habits, Dave Barry)

Last edited by amfr : December 16th, 2005 at 04:54 PM.

Reply With Quote
  #2  
Old December 16th, 2005, 05:02 PM
BeetleJuice BeetleJuice is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2005
Posts: 309 BeetleJuice User rank is Sergeant Major (2000 - 5000 Reputation Level)BeetleJuice User rank is Sergeant Major (2000 - 5000 Reputation Level)BeetleJuice User rank is Sergeant Major (2000 - 5000 Reputation Level)BeetleJuice User rank is Sergeant Major (2000 - 5000 Reputation Level)BeetleJuice User rank is Sergeant Major (2000 - 5000 Reputation Level)BeetleJuice User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 18 h 26 m 52 sec
Reputation Power: 36
Damn, ambitious!

I admit to having done a very simple scripting language, but it wasn't very functional. To be honest, I don't know what to point you to. People who conceive their own programming languages usually have umpty years of experience.

Reply With Quote
  #3  
Old December 16th, 2005, 05:04 PM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is offline
Banned ;)
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Nov 2001
Location: Glendale, Los Angeles County, California, USA
Posts: 7,432 Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 4 Weeks 1 Day 22 h 29 m 51 sec
Reputation Power: 784
I have one that I wrote in around 550 lines of C++ code with comments. Let me know if you want the source. YACC takes the drudgery of writing two parts of an interpreter or compiler, which is the lexer and the parser. I'll write a bigger post about writing a compiler shortly.
__________________
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne

Puzzle of the Month solved by sizeablegrin, etienne141 and L7Sqr, superior C/C++ programmers of the month

Reply With Quote
  #4  
Old December 16th, 2005, 08:26 PM
medialint's Avatar
medialint medialint is offline
spirit duplicator
Click here for more information.
 
Join Date: Apr 2004
Location: \\Firecrate\
Posts: 12,295 medialint User rank is General 23rd Grade (Above 100000 Reputation Level)medialint User rank is General 23rd Grade (Above 100000 Reputation Level)medialint User rank is General 23rd Grade (Above 100000 Reputation Level)medialint User rank is General 23rd Grade (Above 100000 Reputation Level)medialint User rank is General 23rd Grade (Above 100000 Reputation Level)medialint User rank is General 23rd Grade (Above 100000 Reputation Level)medialint User rank is General 23rd Grade (Above 100000 Reputation Level)medialint User rank is General 23rd Grade (Above 100000 Reputation Level)medialint User rank is General 23rd Grade (Above 100000 Reputation Level)medialint User rank is General 23rd Grade (Above 100000 Reputation Level)medialint User rank is General 23rd Grade (Above 100000 Reputation Level)medialint User rank is General 23rd Grade (Above 100000 Reputation Level)medialint User rank is General 23rd Grade (Above 100000 Reputation Level)medialint User rank is General 23rd Grade (Above 100000 Reputation Level)medialint User rank is General 23rd Grade (Above 100000 Reputation Level)medialint User rank is General 23rd Grade (Above 100000 Reputation Level)  Folding Points: 232541 Folding Title: Super Ultimate Folder - Level 1Folding Points: 232541 Folding Title: Super Ultimate Folder - Level 1Folding Points: 232541 Folding Title: Super Ultimate Folder - Level 1Folding Points: 232541 Folding Title: Super Ultimate Folder - Level 1Folding Points: 232541 Folding Title: Super Ultimate Folder - Level 1Folding Points: 232541 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 4 Months 3 Weeks 4 h 2 m 31 sec
Reputation Power: 2547
If I was to make a language I'd make it very specific. For example, I'm of the mind to write an object oriented music score generating language, it's something I've thought about for a while. A way of making objects out of some of Schillinger's concepts in his volumous System of Musical Composition which can programmatically be manipulated, likely generating MIDI output which can then be fed into whatever sequencer from there.

I can't imagine a single person making a full blown multi-purpose language in this modern day ...
__________________
medialint.com

"Energy has the opportunity to change the climate if it's done right." - Sen. John Ensign, R-Nev. (quoted out of context)

Reply With Quote
  #5  
Old December 21st, 2005, 04:17 AM
jafet jafet is offline
Redpill
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2005
Posts: 1,658 jafet User rank is First Lieutenant (10000 - 20000 Reputation Level)jafet User rank is First Lieutenant (10000 - 20000 Reputation Level)jafet User rank is First Lieutenant (10000 - 20000 Reputation Level)jafet User rank is First Lieutenant (10000 - 20000 Reputation Level)jafet User rank is First Lieutenant (10000 - 20000 Reputation Level)jafet User rank is First Lieutenant (10000 - 20000 Reputation Level)jafet User rank is First Lieutenant (10000 - 20000 Reputation Level)jafet User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 6 Days 9 h 52 m 31 sec
Reputation Power: 105
Send a message via MSN to jafet
What would that language be for?
Unless it's something nobody's ever done before you're better sticking to the big guns.
Don't invent the wheel twice.

Reply With Quote
  #6  
Old December 21st, 2005, 04:25 AM
christo's Avatar
christo christo is offline
Introspective
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Nov 2001
Location: London, UK
Posts: 3,296 christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 3 Days 1 h 5 m 42 sec
Reputation Power: 101
Send a message via ICQ to christo Send a message via Yahoo to christo
c'mon Scorps - tell 'em all about MOO


christo

Reply With Quote
  #7  
Old December 21st, 2005, 04:36 AM
SimonGreenhill's Avatar
SimonGreenhill SimonGreenhill is offline
(retired)
Dev Shed God 11th Plane (10000 - 10499 posts)
 
Join Date: Dec 2003
Location: The Laboratory
Posts: 10,101 SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)  Folding Points: 4925 Folding Title: Novice Folder
Time spent in forums: 3 Months 3 Weeks 5 h 49 m 4 sec
Reputation Power: 1331
Facebook
Quote:
What would that language be for?


fun? because it's there?

& go for it Scorp.

Reply With Quote
  #8  
Old December 21st, 2005, 03:45 PM
crownjewel82's Avatar
crownjewel82 crownjewel82 is online now
rebel with a cause
Dev Shed God (5000 - 5499 posts)
 
Join Date: May 2004
Location: The Batsh!t Crazy State.
Posts: 5,348 crownjewel82 User rank is General 14th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 14th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 14th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 14th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 14th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 14th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 14th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 14th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 14th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 14th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 14th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 14th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 14th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 14th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 14th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 14th Grade (Above 100000 Reputation Level)  Folding Points: 31920 Folding Title: Starter FolderFolding Points: 31920 Folding Title: Starter Folder
Time spent in forums: 2 Months 3 Weeks 4 Days 14 h 57 m 46 sec
Reputation Power: 1935
Dependent on your needs, might I suggest a markup language based on xml for your first stab at creating a programming language.
__________________
The day I get my hands on the cookbook it's all over. -nicky

Reply With Quote
  #9  
Old December 21st, 2005, 03:55 PM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is offline
Banned ;)
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Nov 2001
Location: Glendale, Los Angeles County, California, USA
Posts: 7,432 Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 4 Weeks 1 Day 22 h 29 m 51 sec
Reputation Power: 784
Quote:
Originally Posted by medialint
I can't imagine a single person making a full blown multi-purpose language in this modern day ...

Java, Python and Ruby generally spring to mind .

As for MOO, I wrote it in a fit of boredom mainly. The history is here.
I believe there are a few people using the MOO engine in their own products.

Reply With Quote
  #10  
Old December 21st, 2005, 06:11 PM
JhonnyO@gmail.c JhonnyO@gmail.c is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2005
Posts: 27 JhonnyO@gmail.c User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 46 m 26 sec
Reputation Power: 0
Quote:
There are NO bugs . Anything you see that may be buggy, is actually A FEATURE!!


Reply With Quote
  #11  
Old December 22nd, 2005, 01:42 AM
jafet jafet is offline
Redpill
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2005
Posts: 1,658 jafet User rank is First Lieutenant (10000 - 20000 Reputation Level)jafet User rank is First Lieutenant (10000 - 20000 Reputation Level)jafet User rank is First Lieutenant (10000 - 20000 Reputation Level)jafet User rank is First Lieutenant (10000 - 20000 Reputation Level)jafet User rank is First Lieutenant (10000 - 20000 Reputation Level)jafet User rank is First Lieutenant (10000 - 20000 Reputation Level)jafet User rank is First Lieutenant (10000 - 20000 Reputation Level)jafet User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 6 Days 9 h 52 m 31 sec
Reputation Power: 105
Send a message via MSN to jafet
Quote:
There are NO bugs . Anything you see that may be buggy, is actually A FEATURE!!

Hey, that's a Microsoft trademark!!! They could sue youfor that!!!

Reply With Quote
  #12  
Old December 22nd, 2005, 06:32 AM
techMonster techMonster is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 92 techMonster User rank is Lance Corporal (50 - 100 Reputation Level)techMonster User rank is Lance Corporal (50 - 100 Reputation Level)techMonster User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 15 h 49 m 40 sec
Reputation Power: 4
First decide whether you are going to develop compiler or interpreter.
A compiler converts source language into some another language. For example, C compiler converts C program into a program in machine language. Interpretor simply executes the instruction without any conversion.

For designing compiler, I would like you to learn flex and yacc. It will simplify your work. Also, if you are converting it to machine language than go through the instruction-opcode table. This is mentioned in the spec of CPU for which you are designing the compiler. Also, depending on your OS, you will have to go through the format of executable file. For example, linux executable file will have machine lanuguage code written as per POSIX format.

Regarding interpreter, I don't know much about how to implement it. But interpreters are easier to implement and also helps in making your language OS independent.

You can refer to following post:
http://forums.devshed.com/other-programming-languages-139/how-does-an-interpreter-compiler-work-312483.html

Reply With Quote
<