mcc: Preprocessor-based conditional compilation and macros - anybody >>really<<
OK - I've added a bunch of features to mcc; and one of them is inline functions with input variable aliasing.... which is making me wonder about the utility of a preprocessor; especially given that you can string multiple modules together to get an integrated compile (also, no forward declaration of globals & vdx variables is required in mcc). What I'm thinking right now is that inlines would take the place of macros; the symbolic constants in mcc (const foo = 123[noparse];)[/noparse] and llasm (foo: equ 123[noparse];)[/noparse] would take the place of #define; and the effect of conditional compilation could be achieved by switching out the modules used in any given compile cycle (perhaps by using multiple targets in the IDE?).
Anybody have any thoughts on the matter?
Warnings?![nono.gif](http://forums.parallax.com/images/smilies/nono.gif)
Ideas?![idea.gif](http://forums.parallax.com/images/smilies/idea.gif)
Rotten tomatos?![rolleyes.gif](http://forums.parallax.com/images/smilies/rolleyes.gif)
![smile.gif](http://forums.parallax.com/images/smilies/smile.gif)
Post Edited (hammerhead74000) : 7/29/2006 7:58:51 AM GMT
Anybody have any thoughts on the matter?
Warnings?
![nono.gif](http://forums.parallax.com/images/smilies/nono.gif)
Ideas?
![idea.gif](http://forums.parallax.com/images/smilies/idea.gif)
Rotten tomatos?
![rolleyes.gif](http://forums.parallax.com/images/smilies/rolleyes.gif)
![smile.gif](http://forums.parallax.com/images/smilies/smile.gif)
Post Edited (hammerhead74000) : 7/29/2006 7:58:51 AM GMT
Comments
The current feature list includes:
Hybrid Syntax inspired by C and Pascal
Module Init Routines
Virtual Device eXtension
Inline Functions with input-variable aliasing
Strings & Lookup tables
C-style logical operations and non-zero truth testing
Statement types:
-- Expression
-- If/else
-- While
-- Repeat ... While
-- Setbit & Clearbit
-- Assembler-code block
Smart codegen with redundant instruction suppression
Cross-platform-portable Compiler and Assembler
OS X IDE
Additional things I'm working on include a switch statement; a pause statement; strings and lookup tables; and the SX-Key plugin for the IDE.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
---
James Newton, Host of SXList.com
james at sxlist,com 1-619-652-0593 fax:1-208-279-8767
SX FAQ / Code / Tutorials / Documentation:
http://www.sxlist.com Pick faster!