Can you create a programming language in PureBasic?

Everything else that doesn't fall into one of the other PB categories.
TheCorruptor
New User
New User
Posts: 9
Joined: Fri Aug 28, 2009 12:35 am
Location: PA>USA

Thanks everyone

Post by TheCorruptor »

Thanks everyone for all your input and puns :) . I have read all about Lexx and Yacc and parser generators in the past and yes all that is above my head and I dont have the time or interest to really learn that right now. I just wasnt sure if there was a simpler way to do it just using PureBasic to do as a simple learning project. I seen some examples of simple interperters in PureBasic and was wondering why there was no examples of a simple compiler in PureBasic. But if its that involved, I guess thats why there are no simple examples. Thanks again :D
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

This thread just lost all its structure. I think we need to establish some global procedures to prevent further cases of ... of... ... *this.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: Thanks everyone

Post by Trond »

TheCorruptor wrote:Thanks everyone for all your input and puns :) . I have read all about Lexx and Yacc and parser generators in the past and yes all that is above my head and I dont have the time or interest to really learn that right now. I just wasnt sure if there was a simpler way to do it just using PureBasic to do as a simple learning project. I seen some examples of simple interperters in PureBasic and was wondering why there was no examples of a simple compiler in PureBasic. But if its that involved, I guess thats why there are no simple examples. Thanks again :D
Hi
To make a compiler: there is no need to use lex and yacc or bison. If you don't, it is simpler and easier, and you can put a big label on your compiler that says: "no animals were harmed in the making of this software".

I may or may not post a small tutorial later.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Trond wrote:This thread just lost all its structure. I think we need to establish some global procedures to prevent further cases of ... of... ... *this.
:lol:

You win Trond! :)
I may look like a mule, but I'm not a complete ass.
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Post by Rook Zimbabwe »

I bow in trond's direction! :twisted:
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

I started a tutorial that will show the absolute basics of making a simple compiler. I will post the beginning tomorrow.
RemyVincent
New User
New User
Posts: 9
Joined: Tue Oct 25, 2005 8:47 pm
Contact:

Post by RemyVincent »

Rook Zimbabwe wrote:I bow in trond's direction! :twisted:
... so, why not try to start a compiler in assembler 8086 16 bit, ... some lines, ... then start again with PUREBASIC ... what are you searching for ???

SLOW DOWN your compiler with object programming """OOP""", then with ADA OBJETCS programming, then with LISP code written with ada object programming ( so your LISP line coding would be accepted ) ?
Groups lower your IQ
TheCorruptor
New User
New User
Posts: 9
Joined: Fri Aug 28, 2009 12:35 am
Location: PA>USA

Nice and simple or should I say basic compiler,

Post by TheCorruptor »

Thanks Trond , Thats what I was looking for an example that doesnt use Lexx,Bison, or Yacc just PureBasic. A simple example to see how a compiler is built and how it works and build upon that. Cant wait for that Tut.

" Its not always what one knows, Its knowing where to find the answers".
Teng
User
User
Posts: 21
Joined: Thu Aug 27, 2009 12:13 pm

Post by Teng »

Yeah, Trond is right, I regret my earlier post it was way too discouraging, I apologize if it deterred anyone.

Hmm..making your own lexer (isnt' that suppose to be harder than just using lex and yacc), whatever, this will be interesting. Looking forward to Trond's tut. :P

Useful link :
Let's Build a Compiler, by Jack Crenshaw
X
Enthusiast
Enthusiast
Posts: 311
Joined: Tue Apr 04, 2006 6:27 am

Post by X »

Same here ... this will be the first compiler made in PB thats actually open to the public ..
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

Is it already tomorrow? :-)
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
User avatar
utopiomania
Addict
Addict
Posts: 1655
Joined: Tue May 10, 2005 10:00 pm
Location: Norway

Post by utopiomania »

Google 'Jack Crenshaw'
X
Enthusiast
Enthusiast
Posts: 311
Joined: Tue Apr 04, 2006 6:27 am

Post by X »

and .. he made it in pascal .. we're talking about trond making it in pb .... ;)
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

X wrote:and .. he made it in pascal .. we're talking about trond making it in pb .... ;)
I'll just rip off the crenshaw tutorial. :wink:
X
Enthusiast
Enthusiast
Posts: 311
Joined: Tue Apr 04, 2006 6:27 am

Post by X »

hehe, as long as its in pb ;)
Post Reply