diff options
author | Araq <rumpf_a@web.de> | 2012-04-16 00:37:41 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-04-16 00:37:41 +0200 |
commit | 752cddb91a2df5e1cc6211aad337169acac9d7a7 (patch) | |
tree | 05750796bdf98374e2d1948ed3c72f527a81974f | |
parent | da9ff288d9ddb2f92bc8a82f859fc4f420102882 (diff) | |
download | Nim-752cddb91a2df5e1cc6211aad337169acac9d7a7.tar.gz |
documentation improvements
-rw-r--r-- | doc/nimgrep.txt | 50 | ||||
-rwxr-xr-x | doc/niminst.txt | 3 | ||||
-rwxr-xr-x | doc/nimrodc.txt | 42 | ||||
-rwxr-xr-x | doc/tools.txt | 5 | ||||
-rwxr-xr-x | todo.txt | 5 | ||||
-rwxr-xr-x | web/nimrod.ini | 2 |
6 files changed, 102 insertions, 5 deletions
diff --git a/doc/nimgrep.txt b/doc/nimgrep.txt new file mode 100644 index 000000000..c231bf31b --- /dev/null +++ b/doc/nimgrep.txt @@ -0,0 +1,50 @@ +================================= + nimgrep User's manual +================================= + +:Author: Andreas Rumpf +:Version: 0.9 + + +Nimgrep is a command line tool for search&replace tasks. It can search for +regex or peg patterns and can search whole directories at once. User +confirmation for every single replace operation can be requested. + +Nimgrep has particularly good support for Nimrod's +eccentric *style insensitivity*. Apart from that it is a generic text +manipulation tool. + + +Installation +============ + +Compile nimgrep with the command:: + + nimrod c -d:release tools/nimgrep.nim + +And copy the executable somewhere in your ``$PATH``. + + +Command line switches +===================== + +Usage: + nimgrep [options] [pattern] [replacement] (file/directory)* +Options: + --find, -f find the pattern (default) + --replace, -r replace the pattern + --peg pattern is a peg + --re pattern is a regular expression (default); extended + syntax for the regular expression is always turned on + --recursive process directories recursively + --confirm confirm each occurence/replacement; there is a chance + to abort any time without touching the file + --stdin read pattern from stdin (to avoid the shell's confusing + quoting rules) + --word, -w the match should have word boundaries (buggy for pegs!) + --ignoreCase, -i be case insensitive + --ignoreStyle, -y be style insensitive + --ext:EX1|EX2|... only search the files with the given extension(s) + --verbose be verbose: list every processed file + --help, -h shows this help + --version, -v shows the version diff --git a/doc/niminst.txt b/doc/niminst.txt index 088bf20cf..ebed396e4 100755 --- a/doc/niminst.txt +++ b/doc/niminst.txt @@ -11,7 +11,8 @@ Introduction ============ niminst is a tool to generate an installer for a Nimrod program. Currently -it can create an installer for Windows via `Inno Setup <>`_ as well as +it can create an installer for Windows +via `Inno Setup <http://www.jrsoftware.org/isinfo.php>`_ as well as installation/deinstallation scripts for UNIX. Later versions will support Linux' package management systems. diff --git a/doc/nimrodc.txt b/doc/nimrodc.txt index 962fe1a2d..bc5d4bedb 100755 --- a/doc/nimrodc.txt +++ b/doc/nimrodc.txt @@ -122,6 +122,28 @@ To link against ``nimrtl.dll`` use the command:: **Note**: Currently the creation of ``nimrtl.dll`` with thread support has never been tested and is unlikely to work! + + +Additional compilation switches +=============================== + +The standard library supports a growing number of ``useX`` conditional defines +affecting how some features are implemented. This section tries to give a +complete list. + +================== ========================================================= +Define Effect +================== ========================================================= +``release`` Turns off runtime checks and turns on the optimizer. +``useWinAnsi`` Modules like ``os`` and ``osproc`` use the Ansi versions + of the Windows API. The default build uses the Unicode + version.s +``useFork`` Makes ``osproc`` use ``fork`` instead of ``posix_spawn``. +``useNimRtl`` Compile and link against ``nimrtl.dll``. +``useMalloc`` Makes Nimrod use C's `malloc`:idx: instead of Nimrod's + own memory manager. This only works with ``gc:none``. +================== ========================================================= + Additional Features @@ -365,6 +387,22 @@ line is an incomplete statement to be continued these rules are used: 2. The line starts with a space (indentation). 3. The line is within a triple quoted string literal. However, the detection does not work if the line contains more than one ``"""``. + + +Nimrod for embedded systems +=========================== + +The standard library can be avoided to a point where C code generation +for a 16bit micro controllers is feasible. Use the `standalone`:idx: target +(``--os:standalone``) for a bare bones standard library that lacks any +OS features. + +To make the compiler output code for a 16bit target use the ``--cpu:avr`` +target. + +So to generate code for an `AVR`:idx: processor use this command:: + + nimrod c --cpu:avr --os:standalone --gc:none -d:useMalloc --genScript x.nim Debugging with Nimrod @@ -451,3 +489,7 @@ efficient: else: quit(errorStr(p, "expected: console or gui")) of "license": c.license = UnixToNativePath(k.value) else: quit(errorStr(p, "unknown variable: " & k.key)) + + + +Target specific diff --git a/doc/tools.txt b/doc/tools.txt index da59de80a..bd79745f6 100755 --- a/doc/tools.txt +++ b/doc/tools.txt @@ -10,3 +10,8 @@ The standard distribution ships with the following tools: - | `C2nim <c2nim.html>`_ | C to Nimrod source converter. Translates C header files to Nimrod. +- | `nimgrep <nimgrep.html>`_ + | Nimrod search and replace utility. + +- | `endb <endb.html>`_ + | Nimrod's slow platform independent embedded debugger. diff --git a/todo.txt b/todo.txt index 3d9bf06bf..2ba5a2ff0 100755 --- a/todo.txt +++ b/todo.txt @@ -1,9 +1,6 @@ version 0.9.0 ============= -- document AVR/embedded systems better; document all the ``useX`` conditional - symbols for the stdlib -- implement ``--script:sh|bat`` command line option - make GC realtime capable: GC_step(ms: int) - make templates hygienic by default - ``=`` should be overloadable; requires specialization for ``=`` @@ -133,6 +130,8 @@ Low priority --> solve by implicit conversion from varargs to openarray - implement closures that support nesting > 1 - optimize method dispatchers +- implement ``--script:sh|bat`` command line option; think about script + generation Further optimization ideas diff --git a/web/nimrod.ini b/web/nimrod.ini index ff8269cad..68ba72936 100755 --- a/web/nimrod.ini +++ b/web/nimrod.ini @@ -22,7 +22,7 @@ file: ticker [Documentation] doc: "endb;intern;apis;lib;manual;tut1;tut2;nimrodc;overview;filters" -doc: "tools;c2nim;niminst" +doc: "tools;c2nim;niminst;nimgrep" pdf: "manual;lib;tut1;tut2;nimrodc;c2nim;niminst" srcdoc: "core/macros;pure/marshal;core/typeinfo" srcdoc: "impure/graphics;impure/re;pure/sockets" |