version 0.7.0

This commit is contained in:
Andreas Rumpf
2008-11-16 22:08:15 +01:00
parent 972c510861
commit 8b2a9401a1
185 changed files with 21451 additions and 24296 deletions

View File

@@ -4,21 +4,17 @@ Advanced commands::
gen_depend generate a DOT file containing the
module dependency graph
list_def list all defined conditionals and exit
rst2html converts a reStructuredText file to HTML
check checks the project for syntax and semantic
parse parses a single file (for debugging Nimrod)
scan tokenizes a single file (for debugging Nimrod)
debugtrans for debugging the transformation pass
Advanced options:
-w, --warnings:on|off warnings ON|OFF
--warning[X]:on|off specific warning X ON|OFF
--hints:on|off hints ON|OFF
--hint[X]:on|off specific hint X ON|OFF
--cc:C_COMPILER set the C/C++ compiler to use
--lib:PATH set the system library path
-c, --compile_only compile only; do not assemble or link
--no_linking compile but do not link
--gen_script generate a compile script (in the 'rod_gen'
--gen_script generate a compile script (in the 'nimcache'
subdirectory named 'compile_$project$scriptext')
--os:SYMBOL set the target operating system (cross-compilation)
--cpu:SYMBOL set the target processor (cross-compilation)
@@ -27,17 +23,13 @@ Advanced options:
-l, --passl:OPTION pass an option to the linker
--gen_mapping generate a mapping file containing
(Nimrod, mangled) identifier pairs
--merge_output generate only one C output file
--line_dir:on|off generation of #line directive ON|OFF
--checkpoints:on|off turn on|off checkpoints; for debugging Nimrod
--skip_cfg do not read the general configuration file
--skip_proj_cfg do not read the project's configuration file
--import:MODULE_FILE import the given module implicitly for each module
--maxerr:NUMBER stop compilation after NUMBER errors; broken!
--ast_cache:on|off caching of ASTs ON|OFF (default: OFF)
--c_file_cache:on|off caching of generated C files ON|OFF (default: OFF)
--index:FILE use FILE to generate a documenation index file
--putenv:key=value set an environment variable
--list_cmd list the commands used to execute external programs
-v, --verbose show what Nimrod is doing
--version show detailed version information
--verbosity:0|1|2|3 set Nimrod's verbosity level (0 is default)
-v, --version show detailed version information

View File

@@ -8,61 +8,52 @@
#
{
'SymFlag': [ # already 32 flags!
'sfTypeCheck', # wether macro parameters should be type checked
'SymFlag': [ # already 26 flags!
'sfUsed', # read access of sym (for warnings) or simply used
'sfStar', # symbol has * visibility
'sfMinus', # symbol has - visibility
'sfInInterface', # symbol is in interface section declared
'sfFromGeneric', # symbol is instantiation of a generic; this is needed
# for symbol file generation; such symbols should always
# be written into the ROD file
'sfGlobal', # symbol is at global scope
'sfForward', # symbol is forward directed
'sfImportc', # symbol is external; imported
'sfExportc', # symbol is exported (under a specified name)
'sfVolatile', # variable is volatile
'sfUsed', # read access of sym (for warnings) or simply used
'sfWrite', # write access of variable (for hints)
'sfRegister', # variable should be placed in a register
'sfPure', # object is "pure" that means it has no type-information
'sfCodeGenerated', # wether we have already code generated for the proc
'sfPrivate', # symbol should be made private after module compilation
'sfGlobal', # symbol is at global scope
'sfResult', # variable is 'result' in proc
'sfNoSideEffect', # proc has no side effects
'sfMainModule', # module is the main module
'sfSystemModule', # module is the system module
'sfNoReturn', # proc never returns (an exit proc)
'sfAddrTaken', # the variable's address is taken (ex- or implicitely)
'sfInInterface', # symbol is in interface section declared
'sfNoStatic', # symbol is used within an iterator (needed for codegen)
# so it cannot be 'static' in the C code
# this is called 'nostatic' in the pragma section
'sfCompilerProc', # proc is a compiler proc, that is a C proc that is
# needed for the code generator
'sfCppMethod', # proc is a C++ method
'sfCppMethod', # proc is a C++ method (not implemented yet)
'sfDiscriminant', # field is a discriminant in a record/object
'sfDeprecated', # symbol is deprecated
'sfInClosure', # variable is accessed by a closure
'sfIsCopy', # symbol is a copy; needed for proper name mangling
'sfStar', # symbol has * visibility
'sfMinus' # symbol has - visibility
'sfTypeCheck', # wether macro parameters should be type checked
'sfCompileTime', # proc can be evaluated at compile time
'sfThreadVar', # variable is a thread variable
'sfMerge', # proc can be merged with itself
],
'TypeFlag': [
'tfIsDistinct', # better use this flag to make it easier for accessing
# typeKind in the code generators
'tfGeneric', # type is a generic one
'tfExternal', # type is external
'tfImported', # type is imported from C
'tfInfoGenerated', # whether we have generated type information for this type
'tfSemChecked', # used to mark types that's semantic has been checked;
# used to prevend endless loops during semantic checking
'tfHasOutParams', # for a proc or iterator p:
# it indicates that p has out or in out parameters: this
# is used to speed up semantic checking a bit
'tfEnumHasWholes', # enum cannot be mapped into a range
'tfVarargs', # procedure has C styled varargs
'tfFinal' # is the object final?
'tfFinal', # is the object final?
'tfAcyclic', # type is acyclic (for GC optimization)
'tfEnumHasWholes' # enum cannot be mapped into a range
],
'TypeKind': [ # order is important!
# Don't forget to change hti.nim if you make a change here
'tyNone', 'tyBool', 'tyChar',
'tyEmptySet', 'tyArrayConstr', 'tyNil',
'tyEmpty', 'tyArrayConstr', 'tyNil',
'tyGeneric',
'tyGenericInst', # instantiated generic type
'tyGenericParam',
@@ -89,7 +80,9 @@
'nfBase2', # nfBase10 is default, so not needed
'nfBase8',
'nfBase16',
'nfAllConst' # used to mark complex expressions constant
'nfAllConst', # used to mark complex expressions constant
'nfTransf', # node has been transformed
'nfSem', # node has been checked for semantics
],
'NodeKind': [ # these are pure nodes
@@ -223,6 +216,8 @@
'nkBlockExpr', # a statement block ending in an expr; this is used
# to allowe powerful multi-line templates that open a
# temporary scope
'nkStmtListType', # a statement list ending in a type; for macros
'nkBlockType', # a statement block ending in a type; for macros
'nkVm', # indicates a virtual instruction; integer field is
# used for the concrete opcode
@@ -264,6 +259,8 @@
'skEnumField', # an identifier in an enum
'skForVar', # a for loop variable
'skModule', # module identifier
'skLabel' # a label (for block statement)
'skLabel', # a label (for block statement)
'skStub' # symbol is a stub and not yet loaded from the ROD
# file (it is loaded on demand, which may mean: never)
]
}

View File

@@ -1,12 +1,10 @@
Usage::
nimrod command [options] inputfile [arguments]
Command::
compile compile project with default code generator (C)
compile_to_c compile project with C code generator
compile_to_cpp compile project with C++ code generator
compile_to_ecmascript compile project to ECMAScript code (experimental)
doc generate the documentation for inputfile;
with --run switch opens it with $BROWSER
compile, c compile project with default code generator (C)
compile_to_c, cc compile project with C code generator
doc generate the documentation for inputfile
rst2html converts a reStructuredText file to HTML
Arguments:
arguments are passed to the program being run (if --run option is selected)
Options:
@@ -14,7 +12,8 @@ Options:
-o, --out:FILE set the output filename
-d, --define:SYMBOL define a conditional symbol
-u, --undef:SYMBOL undefine a conditional symbol
-b, --force_build force rebuilding of all modules
-f, --force_build force rebuilding of all modules
--symbol_files:on|off use symbol files to speed up compilation (buggy!)
--stack_trace:on|off code generation for stack trace ON|OFF
--line_trace:on|off code generation for line trace ON|OFF
--debugger:on|off turn Embedded Nimrod Debugger ON|OFF

View File

@@ -1,22 +0,0 @@
0.1.0
* new config system
* new build system
* source renderer
* pas2nim integrated
* support for C++
* local variables are always initialized
* Rod file reader and writer
* new --out, -o command line options
* fixed bug in nimconf.pas: we now have several
string token types
* changed nkIdentDef to nkIdentDefs
* added type(expr) in the parser and the grammer
* added template
* added command calls
* added case in records/objects
* added --skip_proj_cfg switch for nim.dpr
* added missing features to pasparse
* rewrote the source generator
* ``addr`` and ``cast`` are now keywords; grammar updated
* implemented ` notation; grammar updated
* specification replaced by a manual

View File

@@ -3,16 +3,20 @@
[
'None',
'Defined',
'New',
'NewFinalize',
'Low',
'High',
'SizeOf',
'RegisterFinalizer',
'Is',
'Succ',
'Pred',
'Inc',
'Dec',
'Ord',
'New',
'NewFinalize',
'NewSeq',
'RegisterFinalizer',
'LengthOpenArray',
'LengthStr',
'LengthArray',
@@ -20,8 +24,9 @@
'Incl',
'Excl',
'Card',
'Ord',
'Chr',
'GCref',
'GCunref',
# binary arithmetic with and without overflow checking:
'AddI',
@@ -161,7 +166,6 @@
'AppendSeqSeq',
'InRange',
'InSet',
'Is',
'Asgn',
'Repr',
'Exit',
@@ -170,15 +174,34 @@
'Assert',
'Swap',
'IsNil',
'ArrToSeq',
# magic type constructors:
# magic types:
'Array',
'OpenArray',
'Range',
'Set',
'Seq',
'Int',
'Int8',
'Int16',
'Int32',
'Int64',
'Float',
'Float32',
'Float64',
'Bool',
'Char',
'String',
'Cstring',
'Pointer',
'AnyEnum',
'EmptySet',
'IntSetBaseType',
'Nil',
# magic constants:
'IsMainModule',
'CompileDate',
'CompileTime',
'NimrodVersion',

View File

@@ -153,7 +153,8 @@
{'errSizeTooBig': "computing the type's size produced an overflow"},
{'errSetTooBig': 'set is too large'},
{'errBaseTypeMustBeOrdinal': 'base type of a set must be an ordinal'},
{'errInheritanceOnlyWithNonFinalObjects': 'inheritance only works non-final objects'},
{'errInheritanceOnlyWithNonFinalObjects':
'inheritance only works with non-final objects'},
{'errInheritanceOnlyWithEnums': 'inheritance only works with an enum'},
{'errIllegalRecursionInTypeX': "illegal recursion in type '$1'"},
{'errCannotInstantiateX': "cannot instantiate: '$1'"},
@@ -278,16 +279,17 @@
# hints:
{'hintSuccess': 'operation successful'},
{'hintSuccessX': 'operation successful ($1 lines compiled; $2 sec total)'},
{'hintLineTooLong': 'line too long'},
{'hintXDeclaredButNotUsed': "'$1' is declared but not used"},
{'hintConvToBaseNotNeeded': 'conversion to base object is not needed'},
{'hintConvFromXtoItselfNotNeeded': 'conversion from $1 to itself is pointless'},
{'hintExprAlwaysX': "expression evaluates always to '$1'"},
{'hintMo2FileInvalid': "mo2 file '$1' is invalid"},
{'hintModuleHasChanged': "module '$1' has been changed"},
{'hintCannotOpenMo2File': "mo2 file '$1' does not exist"},
{'hintQuitCalled': "quit() called"},
{'hintProcessing': "processing"},
{'hintProcessing': "processing $1"},
{'hintCodeBegin': "generated code listing:"},
{'hintCodeEnd': "end of listing"},
{'hintConf': "used config file '$1'"},
# user hint message:
{'hintUser': '$1'}

View File

@@ -1,5 +1,2 @@
This directory contains data files in a format called YAML_. These files
are required for building Nimrod.
.. _YAML: http://www.yaml.org/
This directory contains data files in Python or ordinary text format. These
files are required for building Nimrod.