File Parser

New to FreeBASIC? Post your questions here.
Post Reply
aurelVZAB
Posts: 666
Joined: Jul 02, 2008 14:55
Contact:

File Parser

Post by aurelVZAB »

Hi all...
I'm not first time here but i'm not have acces to forum becose (stupid me)
I lost my pasword.I have in plan write one project in FB and i need
pareser example if exists somwhere here.
I have my own parser which parse trough richedit control but not trough
source code file.(is written in Creative basic but i think that can be easy
trnslated to FB code- "IF anyone interested i will show you here")
So any suggestion will be good...

all best
Aurel
AGS
Posts: 1284
Joined: Sep 25, 2007 0:26
Location: the Netherlands

Re: File Parser

Post by AGS »

aurelVZAB wrote:Hi all...
I'm not first time here but i'm not have acces to forum becose (stupid me)
I lost my pasword.I have in plan write one project in FB and i need
pareser example if exists somwhere here.
I have my own parser which parse trough richedit control but not trough
source code file.(is written in Creative basic but i think that can be easy
trnslated to FB code- "IF anyone interested i will show you here")
So any suggestion will be good...

all best
Aurel
If you want to have an example of how to parse source code in FreeBASIC then may I suggest the sourcecode of the FreeBASIC compiler? You can find the compiler sources here. The files starting with the word 'parser' are the routines that take care of the actual parsing (the parsercode is spread out over many source code files).
aurelVZAB
Posts: 666
Joined: Jul 02, 2008 14:55
Contact:

-

Post by aurelVZAB »

AGS...
I need parser example in Free Basic code not in C becose i dont know
make programs in C(I'm not C programmer- i hope you know what i mean)
Thanks anyway.
McLovin
Posts: 82
Joined: Oct 21, 2008 1:15
Contact:

Post by McLovin »

The FreeBasic parser code is in FreeBasic... not C.
aurelVZAB
Posts: 666
Joined: Jul 02, 2008 14:55
Contact:

-

Post by aurelVZAB »

WOW ... i dont know that....OK
I will search them in Free basic folder.
counting_pine
Site Admin
Posts: 6323
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Post by counting_pine »

To be honest, I think the FBC code will probably be quite tough going. I'd probably just try searching the net for a simple parser. There are probably several simple BASIC parsers/compilers, written in various flavours of BASIC. (Some may even be advanced enough to compile themselves.)

yetifoot has written a relatively simple BASIC->C compiler in FB, which you might find useful:
http://www.freebasic.net/forum/viewtopic.php?t=12788
aurelVZAB
Posts: 666
Joined: Jul 02, 2008 14:55
Contact:

-

Post by aurelVZAB »

Thanks on link counting_pine i will try...
cha0s
Site Admin
Posts: 5319
Joined: May 27, 2005 6:42
Location: USA
Contact:

Post by cha0s »

PS, the FreeBASIC parser is NOT written in C, it's written in FreeBASIC!
aurelVZAB
Posts: 666
Joined: Jul 02, 2008 14:55
Contact:

Post by aurelVZAB »

The FreeBasic parser code is in FreeBasic... not C.
cha0s
Site Admin
Posts: 5319
Joined: May 27, 2005 6:42
Location: USA
Contact:

Post by cha0s »

My bad, I missed that post! Not being active for a while leads to skimming... ;)
Post Reply