Search found 1340 matches

by jofers
May 05, 2014 0:57
Forum: Projects
Topic: A lexical analyzer generator for FreeBASIC
Replies: 50
Views: 10766

Re: A lexical analyzer generator for FreeBASIC

I'll look into the second error ASAP, but the first should be '[[:word:]]'. 0.9 was incorrectly applying the POSIX standard:
http://en.wikipedia.org/wiki/Regular_ex ... d_extended
by jofers
Apr 22, 2014 4:21
Forum: Projects
Topic: A lexical analyzer generator for FreeBASIC
Replies: 50
Views: 10766

Re: A lexical analyzer generator for FreeBASIC

1.0 release! Features: ⋅ Support for variable substitution ⋅ Support for skip, capture, and reserve commands ⋅ Support for alternate class, namespace, and file names ⋅ Support for emitter language plugins ⋅ Addition of a C++ emitter plug-in Bug fixes...
by jofers
Apr 22, 2014 4:14
Forum: Projects
Topic: A lexical analyzer generator for FreeBASIC
Replies: 50
Views: 10766

Re: A lexical analyzer generator for FreeBASIC

You're right, the FBC backend isn't that fast. But the biggest bottleneck isn't how it's building the Unicode string, it's when it's encoding the string into UTF-8 for printing. It was taking each code-point, calling Chr() to convert it into a single-character string, and appending that string to th...
by jofers
Apr 13, 2014 19:17
Forum: Projects
Topic: A lexical analyzer generator for FreeBASIC
Replies: 50
Views: 10766

Re: A lexical analyzer generator for FreeBASIC

Hierarchical Rulesets So, for hierarchical rulesets I was contemplating something like: PPInclude: "#include" Enter Section IncludeString: '\<[^>\r\n]*\>|"[^"\r\n]"' End Section Which would return if it doesn't match anything in the initial state or if a rule is followed by...
by jofers
Apr 05, 2014 13:19
Forum: Projects
Topic: A lexical analyzer generator for FreeBASIC
Replies: 50
Views: 10766

Re: A lexical analyzer generator for FreeBASIC

Wow, thank you for testing the C pre-processor (I had just thrown it together with an example). I will be diffing your lexer with the existing lexer to see what you did and apply as many of the fixes as possible. Token limits I can't believe I had a 1024-character limit on Unicode.Text. I'm going to...
by jofers
Apr 04, 2014 4:20
Forum: Projects
Topic: A lexical analyzer generator for FreeBASIC
Replies: 50
Views: 10766

Re: A lexical analyzer generator for FreeBASIC

Yikes, I had vertical tabs but not carriage returns in the whitespace rule! That's an embarrassing omission, thanks for catching it. I left pre-processor directives as entire rules because I think it should be scanned by a different lexical analyzer. It might be worth adding one. For instance, #incl...
by jofers
Mar 19, 2014 7:12
Forum: Projects
Topic: A lexical analyzer generator for FreeBASIC
Replies: 50
Views: 10766

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 jofers
Mar 05, 2014 12:51
Forum: Projects
Topic: A lexical analyzer generator for FreeBASIC
Replies: 50
Views: 10766

Re: A lexical analyzer generator for FreeBASIC

New release: https://github.com/parkertomatoes/poodle-lex/releases/tag/0.9 ⋅ Found and fixed a lot of bugs in both regular expression parsing and the DFA minimizer (thanks AGS). ⋅ Added multi-line and concatenated strings (again, thanks AGS) ⋅ Added a much faster DFA mi...
by jofers
Feb 05, 2014 4:29
Forum: Community Discussion
Topic: More strict Cast/Cptr behaviour?
Replies: 44
Views: 5412

Re: More strict Cast/Cptr behaviour?

In addition to Visual Basic's CType, we could also adopt the "As" operator from C# as a new syntax for casting.

In C# it acts more like dynamic_cast than static_cast, but it could serve just as well as a static_cast operator in fbc and has the benefit of looking more BASIC-y.
by jofers
Jan 31, 2014 17:11
Forum: Community Discussion
Topic: More strict Cast/Cptr behaviour?
Replies: 44
Views: 5412

Re: More strict Cast/Cptr behaviour?

I both agree with the "fbc needs safer casting" and "breaking existing code is generally bad".

Maybe it's okay to borrow Visual Basic's "CType" function for this purpose?
by jofers
Jan 17, 2014 13:02
Forum: Projects
Topic: A lexical analyzer generator for FreeBASIC
Replies: 50
Views: 10766

Re: A lexical analyzer generator for FreeBASIC

Cool, thanks for stress-testing it. I really need to set up some unit tests for this thing and target something like your example for the next release.
by jofers
Jan 13, 2014 5:11
Forum: Projects
Topic: A lexical analyzer generator for FreeBASIC
Replies: 50
Views: 10766

Re: A lexical analyzer generator for FreeBASIC

Thanks for finding the typos, should be updated now.

Converting declarations without having to use Swig sounds handy. I'll have to check Scintilla out. I'm using Notepad++ on Windows and Geany on Linux at the moment.
by jofers
Jan 11, 2014 7:40
Forum: Projects
Topic: A lexical analyzer generator for FreeBASIC
Replies: 50
Views: 10766

Re: A lexical analyzer generator for FreeBASIC

Cool. But it gets complicated as you scale up! For the sake of demonstration, let's do the same task with Poodle-Lex. First, we define our rules file, "Test.rules": # Comments MultilineComment: "/'.*'/" SingleLineComment: "'[^\n]*" # Keywords KwAndAlso: i"AndAlso&q...
by jofers
Jan 10, 2014 14:36
Forum: Projects
Topic: A lexical analyzer generator for FreeBASIC
Replies: 50
Views: 10766

Re: A lexical analyzer generator for FreeBASIC

Thank you for looking so deeply at it, AGS. What does the version number mean? 0.5 alpha just means that I'm the only one that's looked at it so far, and I'd be embarrassed if I threw out "1.0" and it didn't even work. Why Python? For two reasons. First, scripting languages are a natural f...
by jofers
Jan 07, 2014 0:01
Forum: Community Discussion
Topic: relsoft...
Replies: 28
Views: 6188

Re: relsoft...

Wow, I feel bad for not keeping up to date, but I'm glad to hear you're safe and well.

Your daughter has grown up! I had, for reasons of idiocy, assumed that she stayed the same age as that baby picture you had in your signature a decade ago.

Go to advanced search