From b7d9e9428b21fb7e17cead0e4c206722c1617b52 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 2 Jul 2016 00:03:22 -0400 Subject: sdp.org tidy --- org/sdp.org | 126 +++++++++++++++++++++++++++++++++++------------------------- src/sdp.d | 21 ++++------ 2 files changed, 81 insertions(+), 66 deletions(-) diff --git a/org/sdp.org b/org/sdp.org index 73882c6..c2a2642 100644 --- a/org/sdp.org +++ b/org/sdp.org @@ -14,11 +14,7 @@ [[../maker.org][maker.org makefile]] [[./][org/]] -* sdp.d sisu document parser :sdp.d: -Deal with imports. -Take command line instructions and process files as instructed. - -** TODO version.txt: set version :version: +* TODO version.txt: set version (sisu document parser) :version: #+NAME: version_txt #+BEGIN_SRC d :tangle ../views/version.txt @@ -31,80 +27,111 @@ struct Version { enum ver = Version(0, 6, 1); #+END_SRC -** pre loop init +* sdp.d sisu document parser :sdp.d: +- deal with imports +- get options + - get command line instructions + - read config instructions +- process files as instructed by options + - read in file + - proess file + - output + +** pre loop init :init: *** imports :import: -[[./compile_time_info.org][compile time info]] -[[./ao_abstract_doc_source.org][ao_abstract_doc_source]] -[[./ao_ansi_colors.org][ao_ansi_colors]] -[[./ao_defaults.org][ao_defaults]] -[[./ao_output_debugs.org][ao_output_debugs]] -[[./ao_read_source_files.org][ao_read_source_files]] -[[./output_hub.org][output hub]] - **** sdp :import:sdp: -***** TODO src/sdp.d - -├── src -│   ├── sdp.d -│   └── sdp -│    ├── ao_abstract_doc_source.d -│    ├── ... -│    └── compile_time_info.d -└── views -   └── version.txt -#+NAME: sdp_imports_use +#+NAME: imports_sdp #+BEGIN_SRC d -/+ sdp sisu document parser http://sisudoc.org +/ +/+ sdp: sisu document parser, see http://sisudoc.org +/ import compile_time_info, // sdp/compile_time_info.d ao_abstract_doc_source, // sdp/ao_abstract_doc_source.d + ao_ansi_colors, // sdp/ao_ansi_colors.d ao_defaults, // sdp/ao_defaults.d ao_header_extract, // sdp/ao_header_extract.d ao_header_extract_native, // sdp/ao_header_extract_native.d ao_header_extract_sdlang, // sdp/ao_header_extract_sdlang.d + ao_output_debugs, // sdp/ao_output_debugs.d ao_read_config_files, // sdp/ao_read_config_files.d ao_read_source_files, // sdp/ao_read_source_files.d - ao_output_debugs, // sdp/ao_output_debugs.d ao_rgx, // sdp/ao_rgx.d - ao_ansi_colors, // sdp/ao_ansi_colors.d output_hub; // output_hub.d - // std.conv; #+END_SRC +***** notes +├── src +│   ├── sdp.d +│   └── sdp +│    ├── ao_abstract_doc_source.d +│    ├── ... +│    └── compile_time_info.d +└── views +   └── version.txt + +[[./compile_time_info.org][compile time info]] +[[./ao_abstract_doc_source.org][ao_abstract_doc_source]] +[[./ao_ansi_colors.org][ao_ansi_colors]] +[[./ao_header_extract.org][ao_header_extract]] +[[./ao_header_extract_native.org][ao_header_extract_native]] +[[./ao_header_extract_sdlang.org][ao_header_extract_sdlang]] +[[./ao_defaults.org][ao_defaults]] +[[./ao_output_debugs.org][ao_output_debugs]] +[[./ao_output_hub.org][ao_output_hub]] +[[./ao_read_config_files.org][ao_read_config_files]] +[[./ao_read_source_files.org][ao_read_source_files]] +[[./ao_read_source_files.org][ao_read_source_files]] +[[./ao_rgx.org][ao_rgx]] +[[./output_hub.org][output hub]] + **** sdlang :import:sdlang: -#+NAME: sdlang_imports_use +#+NAME: imports_sdlang #+BEGIN_SRC d /+ sdlang http://sdlang.org +/ import sdlang; // sdlang.d #+END_SRC +***** notes +sdlang.parser, // sdlang/parser.d +sdlang.exceptions; +// std.conv; + **** std :import:std: -#+NAME: sdp_imports +#+NAME: imports_std #+BEGIN_SRC d -/+ sdp sisu document parser +/ +/+ std +/ private import - std.getopt, - std.process, - std.stdio, std.algorithm, std.array, std.container, std.exception, - std.file, + std.getopt, std.json, - // std.path, + std.process, + std.stdio, + std.file, std.range, std.regex, - // std.stdio, std.string, std.traits, std.typecons, std.utf, - // std.variant, std.conv : to; #+END_SRC +***** notes +std.conv, +std.path, +std.stdio, +std.variant, + +**** version.txt :version: + +#+NAME: sdp_version_mixin +#+BEGIN_SRC d +mixin(import("version.txt")); +#+END_SRC + **** sdp output check selection :output: #+NAME: sdp_output_selection @@ -162,16 +189,9 @@ struct SDPoutput { } #+END_SRC -**** version.txt :version: - -#+NAME: sdp_version_mixin -#+BEGIN_SRC d -mixin(import("version.txt")); -#+END_SRC - *** mixin :mixin: -#+NAME: sdp_args +#+NAME: sdp_mixin #+BEGIN_SRC d mixin SiSUregisters; mixin SiSUheaderExtractHub; @@ -308,7 +328,7 @@ foreach(arg; args) { *** TODO config files (load & read) (so far only SDLang) :config:files: -#+NAME: sdp_config_files +#+NAME: sdp_conf_files #+BEGIN_SRC d auto conf = ConfigHub(); auto sdl_root_configuration = conf.configSDLang("conf.sdl"); @@ -458,17 +478,17 @@ break; sdp sdp.d +/ -<> -<> -<> +<> +<> +<> <> <> mixin CompileTimeInfo; mixin RgxInit; void main(string[] args) { - <> + <> <> - <> + <> foreach(fn_src; fns_src) { // foreach(fn_src; fns_src) { if (!empty(fn_src)) { diff --git a/src/sdp.d b/src/sdp.d index c8be571..4d50343 100755 --- a/src/sdp.d +++ b/src/sdp.d @@ -3,43 +3,39 @@ sdp sdp.d +/ -/+ sdp sisu document parser http://sisudoc.org +/ +/+ sdp: sisu document parser, see http://sisudoc.org +/ import compile_time_info, // sdp/compile_time_info.d ao_abstract_doc_source, // sdp/ao_abstract_doc_source.d + ao_ansi_colors, // sdp/ao_ansi_colors.d ao_defaults, // sdp/ao_defaults.d ao_header_extract, // sdp/ao_header_extract.d ao_header_extract_native, // sdp/ao_header_extract_native.d ao_header_extract_sdlang, // sdp/ao_header_extract_sdlang.d + ao_output_debugs, // sdp/ao_output_debugs.d ao_read_config_files, // sdp/ao_read_config_files.d ao_read_source_files, // sdp/ao_read_source_files.d - ao_output_debugs, // sdp/ao_output_debugs.d ao_rgx, // sdp/ao_rgx.d - ao_ansi_colors, // sdp/ao_ansi_colors.d output_hub; // output_hub.d - // std.conv; /+ sdlang http://sdlang.org +/ import sdlang; // sdlang.d -/+ sdp sisu document parser +/ +/+ std +/ private import - std.getopt, - std.process, - std.stdio, std.algorithm, std.array, std.container, std.exception, - std.file, + std.getopt, std.json, - // std.path, + std.process, + std.stdio, + std.file, std.range, std.regex, - // std.stdio, std.string, std.traits, std.typecons, std.utf, - // std.variant, std.conv : to; struct SDPoutput { auto hub(S)( @@ -96,7 +92,6 @@ mixin(import("version.txt")); mixin CompileTimeInfo; mixin RgxInit; void main(string[] args) { - mixin SiSUregisters; mixin SiSUheaderExtractHub; mixin SiSUheaderExtractSDLang; -- cgit v1.2.3