Search found 1284 matches

by AGS
May 04, 2014 22:16
Forum: Projects
Topic: A lexical analyzer generator for FreeBASIC
Replies: 50
Views: 11065

Re: A lexical analyzer generator for FreeBASIC

I finished the fb lexer and got errors. I found that predefined character classes do not work any more (regression). When I used [:word:] I got an error on the : character. Same when using any of the other [:keyword:] combinations (where keyword can be xdigit, lower, upper etc...). Minimal example w...
by AGS
May 04, 2014 6:43
Forum: Projects
Topic: A lexical analyzer generator for FreeBASIC
Replies: 50
Views: 11065

Re: A lexical analyzer generator for FreeBASIC

I mentioned earlier that I ran into an issue when using fbc -gen gcc (possible bug in the fbc).
There turned out to be a bug in the C back end. So that's one less bug in the fbc thanx to
poodle-lex (more about the bug at viewtopic.php?f=3&t=22477)
by AGS
May 01, 2014 4:23
Forum: General
Topic: Possible bug in C back end (shared va initialization)FIXED
Replies: 2
Views: 509

Possible bug in C back end (shared va initialization)FIXED

I think I found a bug in the C back end. The error message I get from the C compiler looks like this (fbc version:0.90.1, gcc version: 3.4.5, OS: windows , version: 7(64bit)) ../Stream/Utf8Stream.c:82: error: `UTF8ENCODINGOBJECT$' undeclared here (not in a function) When compiling the same code usin...
by AGS
Apr 28, 2014 21:29
Forum: Projects
Topic: A lexical analyzer generator for FreeBASIC
Replies: 50
Views: 11065

Re: A lexical analyzer generator for FreeBASIC

I measured performance of tokenization without printing. All the memory allocation and associated copying happens during tokenization. But I don't think it's a big issue. If I want to I can change some things in a generated scanner and make it run at least twice as fast. The generated scanner code i...
by AGS
Apr 19, 2014 10:43
Forum: Projects
Topic: A lexical analyzer generator for FreeBASIC
Replies: 50
Views: 11065

Re: A lexical analyzer generator for FreeBASIC

I found a possible bug in the fbc while trying out Poodle-Lex. I wanted to see whether using -gen gcc -O 2 would speed up scanning. And it didn't: it only got me a syntax error (possible bug in C back end). It has to do with a shared variable in utf8stream.bas that gets used in an assignment before ...
by AGS
Apr 13, 2014 5:27
Forum: Projects
Topic: A lexical analyzer generator for FreeBASIC
Replies: 50
Views: 11065

Re: A lexical analyzer generator for FreeBASIC

Token limits I can't believe I had a 1024-character limit on Unicode.Text. I'm going to one-up you on your fix and just allow any length. If we get a bad allocation it should just cap off the string's capacity and put it in a bad state (I wish FBC supported exceptions!). For the C emitter, it's a b...
by AGS
Apr 04, 2014 22:13
Forum: Projects
Topic: A lexical analyzer generator for FreeBASIC
Replies: 50
Views: 11065

Re: A lexical analyzer generator for FreeBASIC

Some more testing results and (at the end of the post) a C lexer that includes preprocessing directives. It's true that #include (and #pragma) need some special attention but it seems to work. You get multiple tokens per #included file (if it starts with < and ends with >) but that's ok. Included fi...
by AGS
Mar 31, 2014 4:14
Forum: Projects
Topic: A lexical analyzer generator for FreeBASIC
Replies: 50
Views: 11065

Re: A lexical analyzer generator for FreeBASIC

Installed poodle using .msi file. Worked like a charm. Then I tried the C lexer. And it reported a newline as an InvalidCharacter. Reason being that the rule for whitespace does not contain \r. And sometimes newline is \r\n (the \r is used in other rules related to newline scanning). The corrected r...
by AGS
Mar 31, 2014 1:10
Forum: Projects
Topic: A lexical analyzer generator for FreeBASIC
Replies: 50
Views: 11065

Re: A lexical analyzer generator for FreeBASIC

Thanks for the moral support. After the 1.0 release I will probably consider this project feature complete, and stick to bug-fix releases after that. Then I'll likely shift my focus to a parser generator. I have this goal of writing a compiler by the age of 30, in the most round-about way possible....
by AGS
Mar 18, 2014 6:24
Forum: Projects
Topic: A lexical analyzer generator for FreeBASIC
Replies: 50
Views: 11065

Re: A lexical analyzer generator for FreeBASIC

Great to see you are sticking with poodle development. I am guessing you have already found out that code generators are not the most popular pieces of software out there :( Anyway, enough with the discouraging words :( (sorry about that). I had a look at the C scanner and it looks impressive. Many ...
by AGS
Mar 02, 2014 12:20
Forum: Libraries
Topic: TCL 8.5 Headers translated for FreeBASIC
Replies: 4
Views: 1486

Re: TCL 8.5 Headers translated for FreeBASIC

I checked my claim that in order to use tcl/tk you have to install tcl/tk and what I found was this. Tcl_Init uses a tcl script. That script is called init.tcl. That script is not part of tcl85.dll or tk85.dll. You get the script when you install tcl/tk. A program that utilizes tcl/tk may or may not...
by AGS
Feb 25, 2014 10:08
Forum: Libraries
Topic: TCL 8.5 Headers translated for FreeBASIC
Replies: 4
Views: 1486

Re: TCL 8.5 Headers translated for FreeBASIC

Download: https://www.dropbox.com/s/pj3kg9gg3263au7/tcl8.5-freebasic.7z I also have these in my fbc github here: https://github.com/mudhairless/fbc/tree/tcl8.5-headers I have tested using the example provided under Debian wheezy, i'm going to look at the windows distribution to see what's different...
by AGS
Feb 25, 2014 6:31
Forum: Tips and Tricks
Topic: Using Python as a database (in-memory and on disk) package
Replies: 5
Views: 1753

Re: Using Python as a database (in-memory and on disk) packa

Hi AGS! Don't work your example. Program enters the procedure Py_Initialize , and ends in it. Thank you, VANYA, for basically destroying my hopes of using Python as an in - memory database :) And of course thank you for finding the bug. What I had in mind was this: an fb programmer can use python27...
by AGS
Feb 08, 2014 7:49
Forum: Community Discussion
Topic: FreeBASIC 64bit Compiler
Replies: 27
Views: 8012

Re: FreeBASIC 64bit Compiler

At the Go Tools site (GoRc and other tools) there is interesting information about asm coding under x64 : http://www.godevtool.com/GoasmHelp/64bits.htm It seems not so easy to change the asm back end to x64 but not impossible. An interesting project.... As you said, AGS, "Of course not having ...
by AGS
Feb 08, 2014 7:34
Forum: Community Discussion
Topic: FreeBASIC 64bit Compiler
Replies: 27
Views: 8012

Re: FreeBASIC 64bit Compiler

I remember a discussion, on this forum (long time ago), about using C as a target language for FreeBASIC. And the discussion led to something of a split: there were those that were not too keen on having a C back end. And there were those that were okay with the idea (I don't think anyone got really...

Go to advanced search