Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Creating your own programming language

Name: Anonymous 2008-10-24 14:44

Has anyone here every created their own programming language? What was the syntax like, and what did you use to implement the language? Using Haskell to implement your language is cheating BTW, so don't even post here if your language is made from Haskell.

Name: Anonymous 2008-10-27 18:28

Dyslexian Sex Lord.

Name: Anonymous 2008-10-27 20:32

Dick Sucking Lesbian.  If you can find one, that is.

Name: Anonymous 2008-10-27 21:28

>>39
Domain Specific Language.
(Fuck off, you DON'T HELP HIM faggots.)

Also, if you just want to play around with designing a language and don't want it to look exactly like every other goddamn Lisp clone, take a look at Parrot. It's pretty easy to dump out PIR code. As for parsing, try Haskell (or Python with pyparsing, if haskell isn't your thing).

That should be more than enough to get you started; if you've any experience with lower level code (that is, if you've written a few things in assembler, or at the very least, lots and lots of stuff in C) you should be able to hammer away at some code and get a not-very-well-designed, but entirely functioning language, in less than 500 lines of code.

The best part about doing it this way is it won't be just another stupid Lisp or Forth clone.

Name: Anonymous 2008-10-28 15:31

>>43
DON'T HELP HIM

Name: Anonymous 2008-10-28 16:47

>>35
http://seed7.sourceforge.net/
# User defined statements and operators.
# Predefined constructs like arrays or for-loops are declared in the language itself.

Name: Anonymous 2008-10-28 16:59

have an IDE that can be wielded like the raw power of a god
Making the language easy to parse will make it easier for an IDE to manipulate the code.

There are many choices for types of parsers (a.k.a. syntactical analyzer):
Bottom-up (a.k.a. "shift-reduce parsing")
Left-to-Right ("LR")
Left-to-Right(0)  ("LR(0)")
Left-to-Right(1)  ("LR(1)")
Left-to-Right(k)  ("LR(k)")
Simple Left-to-Right ("SLR")
Look-Ahead Left-to-Right ("LALR")
Generalized Left-to-Right ("GLR")
?? (CLR)

Top-down
Left-to-Left ("LL")
Packrat

The most well known are flex/bison and Antlr, which I believe these are all LR parsers. There is also the Boost "Spirit" library, which I would use to throw together some easy parsing.

Some grammars:
Backus–Naur form (a.k.a. "BNF", "Backus–Naur formalism", "Backus normal form", "Panini–Backus Form")
Parsing expression grammar ("PEG")
Chomsky normal form ("CNF")

Context free grammars:
Cocke-Younger-Kasami ("CYK")
Earley
Generalized Left-to-Right ("GLR")

Name: Anonymous 2008-10-28 17:19

>>46
C was written to be "easy to parse".  Fuck that.  Make it context-free.

Name: Anonymous 2008-10-28 18:07

>>47
If your computer language can be parsed by a PDA, it's not going to be very powerful.

Name: Anonymous 2008-10-28 18:22

>>48
1/10

Name: Anonymous 2008-10-28 18:46

>>46

If that were true then C# would provide a better IDE than VB.Net in Visual Studio. It does not.

It can't even tell if I am referring to a member or a method until compile time and then give me an error if I forgot the fucking parenthesis. VB.Net doesn't require those useless fucking parethesis but it does catch other syntax errors right away.

And that is not to say that Visual Studio sucks. It still provides the best IDE for an C style syntax language.

Name: Anonymous 2008-10-28 18:56

ANTLR is actually LL(*), despite the name.

Name: Anonymous 2008-10-28 21:21

>>50
It still provides the best IDE for an C style syntax language.
Not really, Eclipse is better

Name: Anonymous 2008-10-29 16:40

This thread is threadstopped. You can't reply anymore.

Name: Anonymous 2008-10-29 16:40

This thread is threadstopped. You can't reply anymore.

Name: Anonymous 2008-10-29 17:00

This thread is threadstopped. You can't reply anymore.

Name: Anonymous 2011-02-03 7:22


Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List