I have an idea, what do you think?
Posted: Thu Jun 19, 2003 2:50 am
Like most other programmers using PureBasic, I have
a need for some more advanced formatting,
macro/directives and such.
I have been thinking about developing a source code
pre-processor for the compiler.
Some of the functions I have been thinking of are:
; 2003/06/12
; Program Outline:
;
; Objective:
; Provide the ability to format source code based upon directives
; at various points in the process, in-order to provide flexability
; in generating a file that is passed to a compilier.
;
; Target Functionality:
; - Flags
; - - Which Compiler Personality to use
; - - Format Source code
; - - Delete Comments
; - - Delete 'Define' related directives
; - - Call compiler
; - - Track Statistics
; - Compiler Personality
; - - Up to 3 Characters for Directive Pre-Marker
; - - Up to 3 Characters for Directive Post-Marker (Optional)
; - - File extension of source code file
; - - File extension of source code backup file
; - - 'Start Comment Line' directive
; - - 'Start Comment Block' directive
; - - 'End Comment Block' directive
; - - 'Line Continuation' directive
; - - 'Start Scan for Procedures' directive
; - - 'End Scan for Procedures' directive
; - - 'Post Declare of Scanned Procedures @ Here' directive
; - - 'Start Macro Define' directive
; - - 'End Macro Define' directive
; - - 'Include Path' directive
; - - 'Include File' directive
; - - 'Xinclude File' directive
; - - 'If Pre_Proc' directive
; - - 'Else Pre_Proc' directive
; - - 'EndIf Pre_Proc' directive
; - - 'Select Pre_Proc' directive
; - - 'Case Pre_Proc' directive
; - - 'CaseElse Pre_Proc' directive
; - - 'EndSelect Pre_Proc' directive
;
; - Format Souce Code
; - - Number Of Spaces for TAB
; - - Number of Spaces for Select/Case
;
;For all the following format options =
;.............(All Ucase or Lcase or Cap 1st letter)
; - - Format Constants
; - - Format Variables
; - - Format Procedures Names
; - - Format Complier Keywords
;
; Order of Defaults/Preferences Overrides -
; Starting with: Global 'INI' file (Loc. w/this program)
; Which is overridden by: Project 'INI' file (Loc. w/Source code)
; Which is overridden by: Command-Line Directives (Program Parameters)
; Which is overridden by: In file Directives (Loc. in Source code)
;
I don't know how long it would take me, but I am willing to try.
Would this of value to anybody else?
Feel free to comment/add/question.
HarryO
a need for some more advanced formatting,
macro/directives and such.
I have been thinking about developing a source code
pre-processor for the compiler.
Some of the functions I have been thinking of are:
; 2003/06/12
; Program Outline:
;
; Objective:
; Provide the ability to format source code based upon directives
; at various points in the process, in-order to provide flexability
; in generating a file that is passed to a compilier.
;
; Target Functionality:
; - Flags
; - - Which Compiler Personality to use
; - - Format Source code
; - - Delete Comments
; - - Delete 'Define' related directives
; - - Call compiler
; - - Track Statistics
; - Compiler Personality
; - - Up to 3 Characters for Directive Pre-Marker
; - - Up to 3 Characters for Directive Post-Marker (Optional)
; - - File extension of source code file
; - - File extension of source code backup file
; - - 'Start Comment Line' directive
; - - 'Start Comment Block' directive
; - - 'End Comment Block' directive
; - - 'Line Continuation' directive
; - - 'Start Scan for Procedures' directive
; - - 'End Scan for Procedures' directive
; - - 'Post Declare of Scanned Procedures @ Here' directive
; - - 'Start Macro Define' directive
; - - 'End Macro Define' directive
; - - 'Include Path' directive
; - - 'Include File' directive
; - - 'Xinclude File' directive
; - - 'If Pre_Proc' directive
; - - 'Else Pre_Proc' directive
; - - 'EndIf Pre_Proc' directive
; - - 'Select Pre_Proc' directive
; - - 'Case Pre_Proc' directive
; - - 'CaseElse Pre_Proc' directive
; - - 'EndSelect Pre_Proc' directive
;
; - Format Souce Code
; - - Number Of Spaces for TAB
; - - Number of Spaces for Select/Case
;
;For all the following format options =
;.............(All Ucase or Lcase or Cap 1st letter)
; - - Format Constants
; - - Format Variables
; - - Format Procedures Names
; - - Format Complier Keywords
;
; Order of Defaults/Preferences Overrides -
; Starting with: Global 'INI' file (Loc. w/this program)
; Which is overridden by: Project 'INI' file (Loc. w/Source code)
; Which is overridden by: Command-Line Directives (Program Parameters)
; Which is overridden by: In file Directives (Loc. in Source code)
;
I don't know how long it would take me, but I am willing to try.
Would this of value to anybody else?
Feel free to comment/add/question.
HarryO