Sign in to follow this  
Deyja

Preprocessor 0.3

Recommended Posts

Deyja    920
Available at http://www.omnisu.com NEW IN 0.3 Preprocessor::define(string) - Use this function to specify system macros. These macros are defined in every file preprocessed. The string parameter should be identicle to a define directive, but without the #define keyword. Example: Preprocessor::define("PREPROCESSOR_VERSION_STRING \"0.3\""); Character Literals - The preprocessor now correctly translates basic character literals of the form 'a' into their ASCII code. It supports all single-character literals, and the escaped literals \n, \r, and \t. Bug Fix: Null macro parsing - Previously the preprocessor incorrectly tried to read the first element in an empty list when parsing null macros such as "#define IDENTIFIER", but did not use it, causing errors in debug mode with some STL versions.

Share this post


Link to post
Share on other sites
Deyja    920
I though I'd give anyone using my preprocessor a heads up.

0.4 will add a system for resolving angelscript error line numbers to the original un-preprocessed files and line numbers, per Rain Dog's request.

0.5 will add the #pragma directive, and a simple mechanism for binding your own custom pragma's, so Rain Dog doesn't have to hack into my code everytime I release a new version.

Niether of these changes will require changes to client code; only recompilation.

0.6 will break backwards compatibility completly, requiring client code to be rewritten. The interface will change from a monostate to something like angelscript; You'll call a function that returns a pointer to a preprocessor instance and work through that. It will also replace the lexer with one based on regex's which I've been working on for awhile, pretty much fixing all the little quirks with how it parses things.

Share this post


Link to post
Share on other sites
WitchLord    4678
I'll have to link to your site instead of uploading the latest version to mine with each update. Though I'll try to keep the version on my site up to date with your latest release as well.

By the way, your site still shows the version number as 0.2b.

I've been thinking about some way to let a preprocessor insert some special tags in the source code to keep the error messages positions correct. But I'm not sure if it is really that useful. Let me know what you think?

Share this post


Link to post
Share on other sites
Deyja    920
I'm currently working on having the preprocessor build a table that is used to take a line number from the final preprocessed script and give you back the original file and line number. It's working already, but incomplete. When I first wrote the preprocessor, it just passed each file immediatly to AngelScript, as a unigue script section. This worked great for error messages; but I didn't want to bind it that closely to a single language. Special things for manipulating the reported file and line number would bind it to AngelScript just as closely as before, which is exactly what I wanted to avoid. I've given the beta with a working line number table to rain dog. Shouldn't take him long to integrate it. I won't be releasing it for awhile because the code currently qualifies as 'hideous'.

As for the website; I havn't updated it. Thanks for reminding me.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this