├── .gitignore ├── Audio └── SP014.mp3 ├── Chapter 1 ├── Assets, Plugins and Colour Schemes.w ├── Basics.w ├── Configuration.w ├── Patterns.w ├── Program Control.w └── The Swarm.w ├── Chapter 2 ├── Enumerated Constants.w ├── Line Categories.w ├── Paragraph Macros.w ├── Paragraph Numbering.w ├── Tags.w ├── The Parser.w └── The Reader.w ├── Chapter 3 ├── The Analyser.w ├── The Collater.w ├── The Tangler.w ├── The Weaver of Text.w └── The Weaver.w ├── Chapter 4 ├── ACME Support.w ├── C-Like Languages.w ├── InC Support.w ├── Language Methods.w └── Types and Functions.w ├── Chapter 5 ├── Debugging Format.w ├── Format Methods.w ├── HTML Formats.w ├── Plain Text Format.w ├── TeX Format.w ├── TeX Utilities.w └── Weave Tree.w ├── Chapter 6 ├── Colonies.w ├── Ctags Support.w ├── Git Support.w ├── Makefiles.w └── Readme Writeme.w ├── Contents.w ├── Dialects ├── AssemblageExample.ildf ├── EquationsExample.ildf ├── LineageExample.ildf ├── PainterOutput.ildf ├── RunningExample.ildf ├── StdioExample.ildf ├── ThirdExample.ildf └── VowelsExample.ildf ├── Downloads └── alice.crt ├── Examples ├── eastertide │ ├── Contents.w │ ├── Sections │ │ └── Reporting the Date.w │ └── cal.txt ├── goldbach │ ├── Contents.w │ ├── Figures │ │ └── Letter.jpg │ ├── Sections │ │ ├── Summing Primes.w │ │ └── The Sieve of Eratosthenes.w │ └── goldbach.mk ├── hellow.inweb └── twinprimes.inweb ├── Figures ├── brighton.jpg ├── colony.txt ├── help.txt ├── languages.txt ├── mars.jpg ├── nav.txt ├── pula.jpg ├── rah.jpg ├── scan.txt ├── tree.txt └── venice.jpg ├── LICENSE ├── Languages ├── ACME.ildf ├── Blurb.ildf ├── BoxArt.ildf ├── C++.ildf ├── C.ildf ├── ConsoleText.ildf ├── Delia.ildf ├── Extracts.ildf ├── ILDF.ildf ├── InC.ildf ├── Indoc.ildf ├── Inform 6.ildf ├── Inform 7.ildf ├── Inter Pipeline.ildf ├── Inter.ildf ├── Inweb.ildf ├── None.ildf ├── PainterOutput.ildf ├── Perl.ildf ├── Plain Text.ildf ├── Preform.ildf └── REPL.ildf ├── Manual ├── Advanced Weaving with Patterns.w ├── How to Write a Web.w ├── Introduction to Inweb.w ├── Making Weaves into Websites.w ├── Reference Card.w ├── Supporting Programming Languages.w ├── The InC Dialect.w └── Webs, Tangling and Weaving.w ├── Materials ├── default.giscript ├── default.mkscript ├── licenses.json └── platforms │ ├── inweb-on-linux.mk │ ├── inweb-on-macos.mk │ ├── inweb-on-macos32.mk │ ├── inweb-on-macosarm.mk │ ├── inweb-on-macosuniv.mk │ ├── inweb-on-unix.mk │ ├── inweb-on-windows.mk │ ├── linux.mk │ ├── linux.mkscript │ ├── macos.mk │ ├── macos.mkscript │ ├── macos32.mk │ ├── macos32.mkscript │ ├── macosarm.mk │ ├── macosarm.mkscript │ ├── macosuniv.mk │ ├── macosuniv.mkscript │ ├── unix.mk │ ├── unix.mkscript │ ├── windows.mk │ └── windows.mkscript ├── Patterns ├── Ebook │ ├── Base │ │ ├── Base.html │ │ └── Navigation.css │ ├── inweb.css │ ├── pattern.txt │ ├── template-body.html │ └── template-index.html ├── GitHubPages │ ├── GitHub │ │ └── github.png │ ├── pattern.txt │ ├── template-body.html │ └── template-index.html ├── HTML │ ├── Base │ │ ├── Base.css │ │ ├── Base.html │ │ ├── Contents.css │ │ ├── Fonts.css │ │ ├── Navigation.css │ │ └── Progress.css │ ├── Bigfoot │ │ ├── Bigfoot.css │ │ ├── Bigfoot.html │ │ └── Bigfoot.js │ ├── Breadcrumbs │ │ ├── Breadcrumbs.css │ │ └── crumbs.gif │ ├── Carousel │ │ ├── Carousel.css │ │ └── Carousel.js │ ├── Colouring │ │ ├── Colours.css │ │ ├── ConsoleText-Colours.css │ │ ├── Extracts-Colours.css │ │ └── Preform-Colours.css │ ├── Downloads │ │ ├── Downloads.css │ │ └── download.png │ ├── Embedding │ │ ├── Download.html │ │ ├── SoundCloud.html │ │ ├── Vimeo.html │ │ └── YouTube.html │ ├── MathJax3 │ │ └── MathJax3.html │ ├── Popups │ │ ├── Popups.css │ │ └── Popups.html │ ├── pattern.txt │ ├── template-body.html │ └── template-index.html ├── PDFTeX │ └── pattern.txt ├── Plain │ └── pattern.txt ├── TeX │ ├── Base │ │ └── inweb-macros.tex │ ├── pattern.txt │ └── template-body.tex └── TestingInweb │ └── pattern.txt ├── Preliminaries └── How This Program Works.w ├── README.md ├── Tangled ├── inweb-dash ├── inweb.c └── magic-settings.txt ├── Tests ├── Test Cases │ ├── _Scan_Ideal │ │ ├── conditional.txt │ │ ├── empty.txt │ │ ├── hellow.txt │ │ ├── perl.txt │ │ ├── plain.txt │ │ └── twinprimes.txt │ ├── _Tangled_Ideal │ │ ├── conditional.txt │ │ ├── empty.txt │ │ ├── hellow.txt │ │ ├── perl.txt │ │ ├── plain.txt │ │ ├── plainX.txt │ │ └── twinprimes.txt │ ├── conditional.inweb │ ├── empty.inweb │ ├── hellow.inweb │ ├── perl.inweb │ ├── plain.inweb │ └── twinprimes.inweb ├── Test Painter │ ├── AssemblageExample.txt │ ├── EquationsExample.txt │ ├── LineageExample.txt │ ├── PainterOutput.txt │ ├── RunningExample.txt │ ├── StdioExample.txt │ ├── ThirdExample.txt │ ├── VowelsExample.txt │ └── _Results_Ideal │ │ ├── AssemblageExample.txt │ │ ├── EquationsExample.txt │ │ ├── LineageExample.txt │ │ ├── PainterOutput.txt │ │ ├── RunningExample.txt │ │ ├── StdioExample.txt │ │ ├── ThirdExample.txt │ │ └── VowelsExample.txt ├── Test Weave Tree │ ├── _Results_Ideal │ │ ├── sp.txt │ │ └── tsoe.txt │ ├── sp.txt │ ├── tsoe.txt │ └── variations │ │ ├── Contents.w │ │ └── Sections │ │ ├── Summing Primes.w │ │ └── The Sieve of Eratosthenes.w └── inweb.intest ├── build.txt ├── colony.txt ├── docs-src ├── Octagram.png ├── index.inweb └── nav.html ├── docs ├── docs-assets │ ├── Base.css │ ├── Bigfoot.css │ ├── Bigfoot.js │ ├── Breadcrumbs.css │ ├── Carousel.css │ ├── Carousel.js │ ├── Colours.css │ ├── ConsoleText-Colours.css │ ├── Contents.css │ ├── Downloads.css │ ├── Extracts-Colours.css │ ├── Fonts.css │ ├── Navigation.css │ ├── Octagram.png │ ├── Popups.css │ ├── Progress.css │ ├── crumbs.gif │ ├── download.png │ └── github.png ├── eastertide │ ├── S-rtd.html │ └── index.html ├── foundation-module │ ├── 1-fm.html │ ├── 1-pp.html │ ├── 1-wp.html │ ├── 2-dct.html │ ├── 2-dl.html │ ├── 2-fc.html │ ├── 2-lcl.html │ ├── 2-llas.html │ ├── 2-mmr.html │ ├── 2-mth.html │ ├── 2-str.html │ ├── 2-trs.html │ ├── 2-wal.html │ ├── 3-cf.html │ ├── 3-cla.html │ ├── 3-drc.html │ ├── 3-em.html │ ├── 3-fln.html │ ├── 3-pth.html │ ├── 3-shl.html │ ├── 3-tm.html │ ├── 4-chr.html │ ├── 4-cst.html │ ├── 4-jsn.html │ ├── 4-pm.html │ ├── 4-prp.html │ ├── 4-sm.html │ ├── 4-taa.html │ ├── 4-tf.html │ ├── 4-ts.html │ ├── 4-ws.html │ ├── 5-ee.html │ ├── 5-he.html │ ├── 5-htm.html │ ├── 5-im.html │ ├── 5-mpi.html │ ├── 5-mpi2.html │ ├── 5-mr.html │ ├── 5-mrk.html │ ├── 5-mv.html │ ├── 6-bf.html │ ├── 6-id.html │ ├── 6-sd.html │ ├── 7-ld.html │ ├── 7-sl.html │ ├── 7-vn.html │ ├── 7-vnr.html │ ├── 8-bdfw.html │ ├── 8-bf.html │ ├── 8-st.html │ ├── 8-wm.html │ ├── 8-ws.html │ ├── 9-pl.html │ ├── 9-rw.html │ ├── 9-tp.html │ ├── P-abgtf.html │ └── index.html ├── foundation-test │ ├── S-pc.html │ ├── S-ut.html │ └── index.html ├── goldbach │ ├── Letter.jpg │ ├── S-sp.html │ ├── S-tsoe.html │ ├── goldbach-test.txt │ ├── goldbach.pdf │ ├── goldbach.tex │ ├── goldbach.txt │ └── index.html ├── index.html ├── inweb │ ├── 1-apacs.html │ ├── 1-bsc.html │ ├── 1-cnf.html │ ├── 1-pc.html │ ├── 1-ptt.html │ ├── 1-ts.html │ ├── 2-ec.html │ ├── 2-lc.html │ ├── 2-pm.html │ ├── 2-pn.html │ ├── 2-tgs.html │ ├── 2-tp.html │ ├── 2-tr.html │ ├── 3-ta.html │ ├── 3-tc.html │ ├── 3-tt.html │ ├── 3-tw.html │ ├── 3-twot.html │ ├── 4-as.html │ ├── 4-cl.html │ ├── 4-is.html │ ├── 4-lm.html │ ├── 4-taf.html │ ├── 5-df.html │ ├── 5-fm.html │ ├── 5-hf.html │ ├── 5-ptf.html │ ├── 5-tf.html │ ├── 5-tu.html │ ├── 5-wt.html │ ├── 6-cln.html │ ├── 6-cs.html │ ├── 6-gs.html │ ├── 6-mkf.html │ ├── 6-rw.html │ ├── M-awwp.html │ ├── M-htwaw.html │ ├── M-iti.html │ ├── M-mwiw.html │ ├── M-rc.html │ ├── M-spl.html │ ├── M-tid.html │ ├── M-wtaw.html │ ├── P-htpw.html │ ├── SP014.mp3 │ ├── alice.crt │ ├── brighton.jpg │ ├── index.html │ ├── mars.jpg │ ├── pula.jpg │ ├── rah.jpg │ └── venice.jpg └── twinprimes │ └── twinprimes.html ├── foundation-module ├── Chapter 1 │ ├── Foundation Module.w │ ├── POSIX Platforms.w │ └── Windows Platform.w ├── Chapter 2 │ ├── Debugging Log.w │ ├── Dictionaries.w │ ├── Foundation Classes.w │ ├── Linked Lists and Stacks.w │ ├── Locales.w │ ├── Memory.w │ ├── Methods.w │ ├── Streams.w │ ├── Trees.w │ └── Writers and Loggers.w ├── Chapter 3 │ ├── Case-Insensitive Filenames.w │ ├── Command Line Arguments.w │ ├── Directories.w │ ├── Error Messages.w │ ├── Filenames.w │ ├── Pathnames.w │ ├── Shell.w │ └── Time.w ├── Chapter 4 │ ├── C Strings.w │ ├── Characters.w │ ├── JSON.w │ ├── Pattern Matching.w │ ├── Preprocessor.w │ ├── String Manipulation.w │ ├── Tab Stops.w │ ├── Text Files.w │ ├── Tries and Avinues.w │ └── Wide Strings.w ├── Chapter 5 │ ├── Epub Ebooks.w │ ├── HTML Entities.w │ ├── HTML.w │ ├── Inform-Flavoured Markdown.w │ ├── Markdown Phase I.w │ ├── Markdown Phase II.w │ ├── Markdown Rendering.w │ ├── Markdown Variations.w │ └── Markdown.w ├── Chapter 6 │ ├── Binary Files.w │ ├── Image Dimensions.w │ └── Sound Durations.w ├── Chapter 7 │ ├── Licence Data.w │ ├── SPDX Licences.w │ ├── Version Number Ranges.w │ └── Version Numbers.w ├── Chapter 8 │ ├── Bibliographic Data for Webs.w │ ├── Build Files.w │ ├── Simple Tangler.w │ ├── Web Modules.w │ └── Web Structure.w ├── Chapter 9 │ ├── Programming Languages.w │ ├── Reserved Words.w │ └── The Painter.w ├── Contents.w └── Preliminaries │ └── A Brief Guide to Foundation.w ├── foundation-test ├── .gitignore ├── Contents.w ├── Sections │ ├── Program Control.w │ └── Unit Tests.w ├── Tests │ ├── Markdown Cases │ │ ├── _Results_Actual │ │ │ └── .gitkeep │ │ ├── gh-md-disallowed-raw-html--I.txt │ │ ├── gh-md-disallowed-raw-html.txt │ │ ├── gh-md-extended-autolinks--I.txt │ │ ├── gh-md-extended-autolinks.txt │ │ ├── gh-md-strikethrough--I.txt │ │ ├── gh-md-strikethrough.txt │ │ ├── gh-md-tables--I.txt │ │ ├── gh-md-tables.txt │ │ ├── gh-md-task-list-items--I.txt │ │ ├── gh-md-task-list-items.txt │ │ ├── inf-md-gatedparagraphs--I.txt │ │ ├── inf-md-gatedparagraphs.txt │ │ ├── inf-md-headingmarkers--I.txt │ │ ├── inf-md-headingmarkers.txt │ │ ├── inf-md-indexmarkers--I.txt │ │ ├── inf-md-indexmarkers.txt │ │ ├── md-atxheadings--I.txt │ │ ├── md-atxheadings.txt │ │ ├── md-autolinks--I.txt │ │ ├── md-autolinks.txt │ │ ├── md-backslashescapes--I.txt │ │ ├── md-backslashescapes.txt │ │ ├── md-blanklines--I.txt │ │ ├── md-blanklines.txt │ │ ├── md-blockquotes--I.txt │ │ ├── md-blockquotes.txt │ │ ├── md-codespans--I.txt │ │ ├── md-codespans.txt │ │ ├── md-emphasis--I.txt │ │ ├── md-emphasis.txt │ │ ├── md-entity--I.txt │ │ ├── md-entity.txt │ │ ├── md-fencedcodeblocks--I.txt │ │ ├── md-fencedcodeblocks.txt │ │ ├── md-hardlinebreaks--I.txt │ │ ├── md-hardlinebreaks.txt │ │ ├── md-htmlblocks--I.txt │ │ ├── md-htmlblocks.txt │ │ ├── md-images--I.txt │ │ ├── md-images.txt │ │ ├── md-indentedcodeblocks--I.txt │ │ ├── md-indentedcodeblocks.txt │ │ ├── md-inlines--I.txt │ │ ├── md-inlines.txt │ │ ├── md-linkreferencedefinitions--I.txt │ │ ├── md-linkreferencedefinitions.txt │ │ ├── md-links--I.txt │ │ ├── md-links.txt │ │ ├── md-listitems--I.txt │ │ ├── md-listitems.txt │ │ ├── md-lists--I.txt │ │ ├── md-lists.txt │ │ ├── md-paragraphs--I.txt │ │ ├── md-paragraphs.txt │ │ ├── md-precedence--I.txt │ │ ├── md-precedence.txt │ │ ├── md-rawhtml--I.txt │ │ ├── md-rawhtml.txt │ │ ├── md-setextheadings--I.txt │ │ ├── md-setextheadings.txt │ │ ├── md-softlinebreaks--I.txt │ │ ├── md-softlinebreaks.txt │ │ ├── md-tabs--I.txt │ │ ├── md-tabs.txt │ │ ├── md-textualcontent--I.txt │ │ ├── md-textualcontent.txt │ │ ├── md-thematicbreaks--I.txt │ │ ├── md-thematicbreaks.txt │ │ ├── md-variations--I.txt │ │ ├── md-variations.txt │ │ └── temp.txt │ ├── Test Cases │ │ ├── _Results_Actual │ │ │ └── .gitkeep │ │ ├── dictionaries--I.txt │ │ ├── dictionaries.txt │ │ ├── json--I.txt │ │ ├── json.txt │ │ ├── lists--I.txt │ │ ├── lists.txt │ │ ├── regexp--I.txt │ │ ├── regexp.txt │ │ ├── replacement--I.txt │ │ ├── replacement.txt │ │ ├── semver--I.txt │ │ ├── semver.txt │ │ ├── stacks--I.txt │ │ ├── stacks.txt │ │ ├── strings--I.txt │ │ ├── strings.txt │ │ ├── trees--I.txt │ │ └── trees.txt │ └── foundation-test.intest └── versions.txt ├── licence-build ├── .gitignore ├── Contents.w └── Sections │ └── Build.w ├── notes ├── release │ ├── 7-1-0.md │ └── 7-2-0.md ├── version_history.md └── versioning.md ├── scripts ├── first.sh ├── inweb.giscript ├── inweb.mkscript └── inweb.rmscript └── versions.txt /.gitignore: -------------------------------------------------------------------------------- 1 | # This gitignore was automatically written by inweb -gitignore 2 | # and is not intended for human editing 3 | 4 | .DS_Store 5 | inweb.mk 6 | platform-settings.mk 7 | Manual.html 8 | debug-log.txt 9 | tags 10 | Woven/ 11 | Tangled/inweb 12 | Tangled/inweb_* 13 | Tangled/*.o 14 | Tangled/*.exe 15 | Tests/intest-history.txt 16 | Tests/Transient/ 17 | Tests/hashes.intest 18 | Tests/_Results_Actual/ 19 | foundation-test/foundation-test.mk 20 | foundation-test/Tests/Test Cases/_Results_Actual/ 21 | foundation-test/Tests/Markdown Cases/_Results_Actual/ 22 | foundation-module/Woven/ 23 | licence-build/licence-build.mk 24 | Examples/*.o 25 | Examples/*.pdf 26 | Examples/*.html 27 | Examples/goldbach/Tangled 28 | Examples/goldbach/Woven 29 | Tests/Test Cases/_Scan_Actual/ 30 | Tests/Test Cases/_Tangled_Actual/ 31 | Tests/Test Cases/_Tangled_Console/ 32 | Tests/Test Painter/_Results_Actual/ 33 | Tests/Test Weave Tree/_Results_Actual/ 34 | Tests/Test Weave Tree/_Results_Console/ 35 | 36 | -------------------------------------------------------------------------------- /Audio/SP014.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/Audio/SP014.mp3 -------------------------------------------------------------------------------- /Chapter 2/Paragraph Macros.w: -------------------------------------------------------------------------------- 1 | [Macros::] Paragraph Macros. 2 | 3 | To manage the set of named paragraph macros in a section. 4 | 5 | @ We store these like so: 6 | 7 | = 8 | typedef struct para_macro { 9 | struct text_stream *macro_name; /* usually long, like "Create a paragraph macro here" */ 10 | struct paragraph *defining_paragraph; /* as printed in small type after the name in any usage */ 11 | struct source_line *defn_start; /* it ends at the end of its defining paragraph */ 12 | struct linked_list *macro_usages; /* of |macro_usage|: only computed for weaves */ 13 | CLASS_DEFINITION 14 | } para_macro; 15 | 16 | @ Each section has its own linked list of paragraph macros, since the scope for 17 | the usage of these is always a single section. 18 | 19 | = 20 | para_macro *Macros::create(section *S, paragraph *P, source_line *L, text_stream *name) { 21 | para_macro *pmac = CREATE(para_macro); 22 | pmac->macro_name = Str::duplicate(name); 23 | pmac->defining_paragraph = P; 24 | P->defines_macro = pmac; 25 | pmac->defn_start = L->next_line; 26 | pmac->macro_usages = NEW_LINKED_LIST(macro_usage); 27 | ADD_TO_LINKED_LIST(pmac, para_macro, S->macros); 28 | return pmac; 29 | } 30 | 31 | @h Paragraph macro search. 32 | The scope for looking up paragraph macro names is a single section, not the 33 | entire web. So you can't expand a macro from another section, but then again, 34 | you can use the same macro name twice in different sections; and lookup is 35 | much faster. 36 | 37 | = 38 | para_macro *Macros::find_by_name(text_stream *name, section *scope) { 39 | para_macro *pmac; 40 | LOOP_OVER_LINKED_LIST(pmac, para_macro, scope->macros) 41 | if (Str::eq(name, pmac->macro_name)) 42 | return pmac; 43 | return NULL; 44 | } 45 | -------------------------------------------------------------------------------- /Chapter 6/Git Support.w: -------------------------------------------------------------------------------- 1 | [Git::] Git Support. 2 | 3 | Constructing a suitable gitignore file for a simple inweb project. 4 | 5 | @ This is an extremely simple use of //foundation: Preprocessor//. 6 | 7 | = 8 | void Git::write_gitignore(web *W, filename *prototype, filename *F) { 9 | linked_list *L = NEW_LINKED_LIST(preprocessor_macro); 10 | Preprocessor::new_macro(L, I"basics", NULL, Git::basics_expander, NULL); 11 | text_stream *header = Str::new(); 12 | WRITE_TO(header, "# This gitignore was automatically written by inweb -gitignore\n"); 13 | WRITE_TO(header, "# and is not intended for human editing\n\n"); 14 | WRITE_TO(STDOUT, "(Read script from %f)\n", prototype); 15 | Preprocessor::preprocess(prototype, F, header, L, NULL_GENERAL_POINTER, '#', ISO_ENC); 16 | } 17 | 18 | @ Our one non-standard macro simply includes a file of standing material which 19 | is the same as the default .giscript file anyway: 20 | 21 | = 22 | void Git::basics_expander(preprocessor_macro *mm, preprocessor_state *PPS, 23 | text_stream **parameter_values, preprocessor_loop *loop, text_file_position *tfp) { 24 | filename *prototype = Filenames::in(path_to_inweb_materials, I"default.giscript"); 25 | TextFiles::read(prototype, FALSE, "can't open basic .gitignore file", 26 | TRUE, Preprocessor::scan_line, NULL, PPS); 27 | WRITE_TO(STDOUT, "(Read basics.giscript from inweb/"); 28 | Pathnames::to_text_relative(STDOUT, path_to_inweb, path_to_inweb_materials); 29 | WRITE_TO(STDOUT, ")\n"); 30 | } 31 | -------------------------------------------------------------------------------- /Contents.w: -------------------------------------------------------------------------------- 1 | Title: inweb 2 | Author: Graham Nelson 3 | Purpose: A modern system for literate programming. 4 | Language: InC 5 | Web Syntax Version: 2 6 | Licence: This is a free, open-source program published under the Artistic License 2.0. 7 | Version Name: Escape to Danger 8 | Version Number: 7.2.1 9 | 10 | Import: foundation 11 | 12 | Manual 13 | Introduction to Inweb 14 | Webs, Tangling and Weaving 15 | How to Write a Web 16 | Making Weaves into Websites 17 | Advanced Weaving with Patterns 18 | Supporting Programming Languages 19 | The InC Dialect 20 | Reference Card 21 | 22 | Preliminaries 23 | How This Program Works 24 | 25 | Chapter 1: Top Level 26 | "Dealing with the user, and deciding what is to be done." 27 | Basics 28 | Program Control 29 | Configuration 30 | The Swarm 31 | Patterns 32 | Assets, Plugins and Colour Schemes 33 | 34 | Chapter 2: Parsing a Web 35 | "Reading in the entire text of the web, parsing its structure and looking for 36 | identifier names within it." 37 | The Reader 38 | Line Categories 39 | The Parser 40 | Paragraph Macros 41 | Tags 42 | Enumerated Constants 43 | Paragraph Numbering 44 | 45 | Chapter 3: Outputs 46 | "Either weaving part or all of the web into a typeset form for human eyes 47 | (or a swarm of many such parts), or tangling the web into an executable program, 48 | or analysing the web to provide diagnostics on it." 49 | The Analyser 50 | The Collater 51 | The Weaver 52 | The Weaver of Text 53 | The Tangler 54 | 55 | Chapter 4: Languages 56 | "Providing support for syntax-colouring and for better organisation of code 57 | in different programming languages." 58 | Types and Functions 59 | Language Methods 60 | ACME Support 61 | C-Like Languages 62 | InC Support 63 | 64 | Chapter 5: Formats 65 | "Weaving to a variety of different human-readable formats." 66 | Weave Tree 67 | Format Methods 68 | Plain Text Format 69 | TeX Format 70 | HTML Formats 71 | Debugging Format 72 | TeX Utilities 73 | 74 | Chapter 6: Extras 75 | "Additional features for turning webs into open-source projects." 76 | Makefiles 77 | Git Support 78 | Ctags Support 79 | Readme Writeme 80 | Colonies 81 | 82 | -------------------------------------------------------------------------------- /Dialects/AssemblageExample.ildf: -------------------------------------------------------------------------------- 1 | Name: "AssemblageExample" 2 | colouring { 3 | matches of /\.[A-Za-z_][A-Za-z_0-9]*/ { 4 | => !function 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Dialects/EquationsExample.ildf: -------------------------------------------------------------------------------- 1 | Name: "EquationsExample" 2 | colouring { 3 | => !plain 4 | brackets in /.*?([A-Z])\s*=\s*(\d+).*/ { 5 | => !function 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Dialects/LineageExample.ildf: -------------------------------------------------------------------------------- 1 | Name: "LineageExample" 2 | colouring { 3 | => !plain 4 | instances of "son" { 5 | => !function 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Dialects/PainterOutput.ildf: -------------------------------------------------------------------------------- 1 | Name: "PainterOutput" 2 | colouring { 3 | number 1 of 2 => !plain 4 | number 2 of 2 => { 5 | characters { 6 | "!" => !comment 7 | "c" => !character 8 | "d" => !definition 9 | "e" => !element 10 | "f" => !function 11 | "i" => !identifier 12 | "n" => !constant 13 | "p" => !plain 14 | "r" => !reserved 15 | "s" => !string 16 | "x" => !extract 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Dialects/RunningExample.ildf: -------------------------------------------------------------------------------- 1 | Name: "RunningExample" 2 | colouring { 3 | => !plain 4 | characters in "0123456789" { 5 | => !function 6 | } 7 | runs of !plain { 8 | "-" => !function 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Dialects/StdioExample.ildf: -------------------------------------------------------------------------------- 1 | Name: "StdioExample" 2 | colouring { 3 | runs of !identifier { 4 | printf => !function 5 | sscanf => !function 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Dialects/ThirdExample.ildf: -------------------------------------------------------------------------------- 1 | Name: "ThirdExample" 2 | colouring { 3 | => !plain 4 | matches of /\S+/ { 5 | number 3 => !function 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Dialects/VowelsExample.ildf: -------------------------------------------------------------------------------- 1 | Name: "VowelsExample" 2 | colouring { 3 | => !plain 4 | characters in "AEIOUaeiou" { 5 | => !function 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Examples/eastertide/Contents.w: -------------------------------------------------------------------------------- 1 | Title: Eastertide 2 | Author: Graham Nelson 3 | Purpose: An example of using Foundation to write a simple command-line tool: in this case, for calculating the dates of Easter. 4 | Language: InC 5 | 6 | Import: foundation 7 | 8 | Sections 9 | Reporting the Date 10 | -------------------------------------------------------------------------------- /Examples/eastertide/cal.txt: -------------------------------------------------------------------------------- 1 | 1770 2 | 1791b 3 | 1827 4 | -------------------------------------------------------------------------------- /Examples/goldbach/Contents.w: -------------------------------------------------------------------------------- 1 | Title: The Goldbach Conjecture 2 | Author: Graham Nelson 3 | Purpose: This example of using inweb is a simple program to test Goldbach's Conjecture, a classic problem in number theory. 4 | Language: C 5 | Licence: This is a free, open-source program published under the Artistic License 2.0. 6 | 7 | Sections 8 | Summing Primes 9 | The Sieve of Eratosthenes 10 | -------------------------------------------------------------------------------- /Examples/goldbach/Figures/Letter.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/Examples/goldbach/Figures/Letter.jpg -------------------------------------------------------------------------------- /Examples/goldbach/Sections/The Sieve of Eratosthenes.w: -------------------------------------------------------------------------------- 1 | The Sieve of Eratosthenes. 2 | 3 | A fairly fast way to determine if small numbers are prime, given storage. 4 | 5 | @h Storage. 6 | This technique, still essentially the best sieve for finding prime 7 | numbers, is attributed to Eratosthenes of Cyrene and dates from the 200s BC. 8 | Since composite numbers are exactly those numbers which are multiples of 9 | something, the idea is to remove everything which is a multiple: whatever 10 | is left, must be prime. 11 | 12 | This is very fast (and can be done more quickly than the implementation 13 | below), but (a) uses storage to hold the sieve, and (b) has to start right 14 | back at 2 - so it can't efficiently test just, say, the eight-digit numbers 15 | for primality. 16 | 17 | = 18 | int still_in_sieve[RANGE + 1]; 19 | int sieve_performed = FALSE; 20 | 21 | @h Primality. 22 | We provide this as a function which determines whether a number is prime: 23 | 24 | @d TRUE 1 25 | @d FALSE 0 26 | 27 | = 28 | int isprime(int n) { 29 | if (n <= 1) return FALSE; 30 | if (n > RANGE) { printf("Out of range!\n"); return FALSE; } 31 | if (!sieve_performed) @; 32 | return still_in_sieve[n]; 33 | } 34 | 35 | @ We save a little time by noting that if a number up to |RANGE| is composite 36 | then one of its factors must be smaller than the square root of |RANGE|. Thus, 37 | in a sieve of size 10000, one only needs to remove multiples of 2 up to 100, 38 | for example. 39 | 40 | @ = 41 | @; 42 | for (int n=2; n*n <= RANGE; n++) 43 | if (still_in_sieve[n]) 44 | @; 45 | sieve_performed = TRUE; 46 | 47 | @ = 48 | still_in_sieve[1] = FALSE; 49 | for (int n=2; n <= RANGE; n++) still_in_sieve[n] = TRUE; 50 | 51 | @ = 52 | for (int m= n+n; m <= RANGE; m += n) still_in_sieve[m] = FALSE; 53 | -------------------------------------------------------------------------------- /Examples/goldbach/goldbach.mk: -------------------------------------------------------------------------------- 1 | # This makefile was automatically written by inweb -makefile 2 | # and is not intended for human editing 3 | 4 | INTEST = intest/Tangled/intest 5 | INWEB = inweb/Tangled/inweb 6 | 7 | CC = clang -std=c99 -c $(MANYWARNINGS) $(CCOPTS) -g 8 | INDULGENTCC = clang -std=c99 -c $(FEWERWARNINGS) $(CCOPTS) -g 9 | 10 | CCOPTS = -mmacosx-version-min=10.4 -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk 11 | 12 | MANYWARNINGS = -Weverything -Wno-pointer-arith -Wno-unused-macros -Wno-shadow -Wno-cast-align -Wno-variadic-macros -Wno-missing-noreturn -Wno-missing-prototypes -Wno-unused-parameter -Wno-padded -Wno-missing-variable-declarations -Wno-unreachable-code-break -Wno-class-varargs -Wno-format-nonliteral -Wno-cast-qual -Wno-double-promotion -Wno-comma -Wno-strict-prototypes -ferror-limit=1000 13 | 14 | FEWERWARNINGS = -Wno-implicit-int -Wno-dangling-else -Wno-pointer-sign -Wno-format-extra-args -Wno-tautological-compare -Wno-deprecated-declarations -Wno-logical-op-parentheses -Wno-format 15 | 16 | LINK = clang $(CCOPTS) -g 17 | LINKEROPTS = 18 | 19 | ARTOOL = libtool -o 20 | 21 | INFORM6OS = OSX 22 | 23 | MYNAME = goldbach 24 | ME = inweb/Examples/goldbach 25 | 26 | $(ME)/Tangled/$(MYNAME): $(ME)/Contents.w $(ME)/Chapter*/*.w $(ME)/Sections/*.w 27 | $(call make-me) 28 | 29 | .PHONY: force 30 | force: 31 | $(call make-me) 32 | 33 | define make-me 34 | $(INWEB) $(ME) -import-from modules -tangle 35 | $(CC) -o $(ME)/Tangled/$(MYNAME).o $(ME)/Tangled/$(MYNAME).c 36 | $(LINK) -o $(ME)/Tangled/$(MYNAME) $(ME)/Tangled/$(MYNAME).o $(LINKEROPTS) 37 | endef 38 | 39 | .PHONY: test 40 | test: 41 | $(INTEST) -from $(ME) all 42 | 43 | .PHONY: clean 44 | clean: 45 | $(call clean-up) 46 | 47 | .PHONY: purge 48 | purge: 49 | $(call clean-up) 50 | rm -f $(ME)/Tangled/$(MYNAME) 51 | 52 | define clean-up 53 | rm -f $(ME)/Tangled/*.o 54 | rm -f $(ME)/Tangled/*.c 55 | rm -f $(ME)/Tangled/*.h 56 | endef 57 | 58 | -------------------------------------------------------------------------------- /Examples/hellow.inweb: -------------------------------------------------------------------------------- 1 | Title: hellow 2 | Author: Graham Nelson 3 | Purpose: A minimal example of a C program written for inweb. 4 | Language: C 5 | 6 | @ = 7 | #include 8 | 9 | int main(int argc, char *argv[]) { 10 | printf("Hello world!\n"); 11 | } 12 | -------------------------------------------------------------------------------- /Examples/twinprimes.inweb: -------------------------------------------------------------------------------- 1 | Title: The Twin Primes Conjecture 2 | Author: Graham Nelson 3 | Purpose: This example of using inweb is a whole web in a single short file, to look for twin primes, a classic problem in number theory. 4 | Language: C 5 | 6 | @h The conjecture. 7 | It is widely believed that there are an infinite number of twin primes, that 8 | is, prime numbers occurring in pairs different by 2. Twins are known to exist 9 | at least as far out as $10^{388,342}$ (as of 2016), and there are infinitely 10 | many pairs of primes closer together than about 250 (Zhang, 2013; Tao, Maynard, 11 | and many others, 2014). 12 | 13 | This program finds a few small pairs of twins, by the simplest method possible, 14 | and should print output like so: 15 | = (text) 16 | 3 and 5 17 | 5 and 7 18 | 11 and 13 19 | ... 20 | = 21 | 22 | @d RANGE 100 /* the upper limit to the numbers we will consider */ 23 | 24 | = 25 | #include 26 | 27 | int main(int argc, char *argv[]) { 28 | for (int i=1; i; 30 | } 31 | 32 | @ = 33 | if ((isprime(i)) && (isprime(i+2))) 34 | printf("%d and %d\n", i, i+2); 35 | 36 | @h Primality. 37 | This simple and slow test tries to divide by every whole number at least 38 | 2 and up to the square root: if none divide exactly, the number is prime. 39 | A common error with this algorithm is to check where $m^2 < n$, rather 40 | than $m^2 \leq n$, thus wrongly considering 4, 9, 25, 49, ... as prime: 41 | Cambridge folklore has it that this bug occurred on the first computation 42 | of the EDSAC computer on 6 May 1949. 43 | 44 | @d TRUE 1 45 | @d FALSE 0 46 | 47 | = 48 | int isprime(int n) { 49 | if (n <= 1) return FALSE; 50 | for (int m = 2; m*m <= n; m++) 51 | if (n % m == 0) 52 | return FALSE; 53 | return TRUE; 54 | } 55 | -------------------------------------------------------------------------------- /Figures/brighton.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/Figures/brighton.jpg -------------------------------------------------------------------------------- /Figures/colony.txt: -------------------------------------------------------------------------------- 1 | home: inweb/docs 2 | assets: inweb/docs/docs-assets 3 | 4 | navigation: inweb/docs-src/nav.html 5 | pattern: GitHubPages 6 | 7 | breadcrumbs: none 8 | web: "overview" at "inweb/docs-src/index.inweb" in "inweb/docs" 9 | 10 | breadcrumbs: "Home: //overview//" 11 | web: "inweb" at "inweb" in "inweb/docs/inweb" 12 | module: "foundation" at "inweb/foundation-module" in "inweb/docs/foundation-module" 13 | web: "foundation-test" at "inweb/foundation-test" in "inweb/docs/foundation-test" 14 | web: "goldbach" at "inweb/Examples/goldbach" in "inweb/docs/goldbach" 15 | web: "twinprimes" at "inweb/Examples/twinprimes.inweb" in "inweb/docs/twinprimes" 16 | web: "eastertide" at "inweb/Examples/eastertide" in "inweb/docs/eastertide" 17 | 18 | web: "intest" at "intest" in "intest/docs" 19 | web: "inform" at "inform/docs-src/index.inweb" in "inform/docs" 20 | -------------------------------------------------------------------------------- /Figures/languages.txt: -------------------------------------------------------------------------------- 1 | I can see the following programming language definitions: 2 | 3 | ACME: The ACME assembly language for 6502 and related CPUs 4 | Blurb: The Blorb packaging specification language 5 | BoxArt: For styling ASCII-art diagrams with boxes and lines 6 | C: The C programming language 7 | C++: The C++ programming language 8 | ConsoleText: For styling command line text in documentation 9 | Delia: For defining test recipes in Intest 10 | Extracts: For code extracts to be written to a configuration file 11 | ILDF: The Inweb Language Definition File format 12 | InC: The Inform-tools extension to the C programming language 13 | Indoc: The markup syntax for the Indoc documentation tool 14 | Inform 6: The C-like interactive fiction language Inform 6 15 | Inform 7: The natural-language based language Inform 7 16 | Inter: The textual form of intermediate Inform code 17 | Inter Pipeline: For pipelines of Inform code-generation stages 18 | Inweb: The markup language for the Inweb literate programming system 19 | None: For programs in languages not yet supported by Inweb 20 | PainterOutput: 21 | Perl: The scripting language Perl 5 22 | Plain Text: For text files which are not programs 23 | Preform: The internal Inform syntax analysis grammar language 24 | REPL: REPL output in the form expression, colon, value 25 | -------------------------------------------------------------------------------- /Figures/mars.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/Figures/mars.jpg -------------------------------------------------------------------------------- /Figures/nav.txt: -------------------------------------------------------------------------------- 1 |

[[Link "overview"]] 2 | 3 |

4 | [[Item "inweb"]] 5 | [[Menu "Foundation Module"]] 6 | [[Item "foundation"]] 7 | [[Item "foundation-test"]] 8 | [[Menu "Example Webs"]] 9 | [[Item "goldbach"]] 10 | [[Item "twinprimes"]] 11 | [[Item "eastertide"]] 12 | [[Menu "Repository"]] 13 | [[Item " github" -> https://github.com/ganelson/inweb]] 14 | [[Menu "Related Projects"]] 15 | [[Item "inform"]] 16 | [[Item "intest"]] 17 | -------------------------------------------------------------------------------- /Figures/pula.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/Figures/pula.jpg -------------------------------------------------------------------------------- /Figures/rah.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/Figures/rah.jpg -------------------------------------------------------------------------------- /Figures/venice.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/Figures/venice.jpg -------------------------------------------------------------------------------- /Languages/ACME.ildf: -------------------------------------------------------------------------------- 1 | Name: "ACME" 2 | Details: "The ACME assembly language for 6502 and related CPUs" 3 | Extension: ".a" 4 | Line Comment: ";" 5 | String Literal: "\"" 6 | String Literal Escape: "\\" 7 | Character Literal: "'" 8 | Character Literal Escape: "\\" 9 | Binary Literal Prefix: "%" 10 | Hexadecimal Literal Prefix: "$" 11 | Negative Literal Prefix: "-" 12 | 13 | Function Declaration Notation: / *\.([A-Za-z_][A-Za-z0-9_]*).*/ 14 | 15 | colouring { 16 | runs of unquoted { 17 | runs of !identifier { 18 | => !reserved 19 | keyword of !function => !function 20 | # prefix "." => !identifier on both 21 | prefix "!" => !element on both 22 | } 23 | characters { 24 | + => !identifier 25 | - => !identifier 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Languages/Blurb.ildf: -------------------------------------------------------------------------------- 1 | Name: "Blurb" 2 | Details: "The Blorb packaging specification language" 3 | Extension: ".blurb" 4 | 5 | String Literal: "\"" 6 | String Literal Escape: "\\" 7 | 8 | colouring { 9 | => !plain 10 | } 11 | -------------------------------------------------------------------------------- /Languages/BoxArt.ildf: -------------------------------------------------------------------------------- 1 | Name: "BoxArt" 2 | Details: "For styling ASCII-art diagrams with boxes and lines" 3 | Extension: ".txt" 4 | 5 | colouring { 6 | characters { 7 | "-" => !plain 8 | "|" => !plain 9 | "+" => !plain 10 | "/" => !plain 11 | "\\" => !plain 12 | } 13 | runs of !identifier { 14 | => !element 15 | suffix "-module" => !reserved on both 16 | matching /[A-Z][A-Z0-9_]+/ => !function 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Languages/C++.ildf: -------------------------------------------------------------------------------- 1 | Name: "C++" 2 | Details: "The C++ programming language" 3 | Extension: ".cpp" 4 | Multiline Comment Open: "/*" 5 | Multiline Comment Close: "*/" 6 | Line Comment: "//" 7 | String Literal: "\"" 8 | String Literal Escape: "\\" 9 | Character Literal: "'" 10 | Character Literal Escape: "\\" 11 | C-Like: true 12 | 13 | # C++ does in fact support octal literals, marking them as starting with an 14 | # unnecessary initial zero. This is practically obsolete now, and in any case 15 | # makes no difference to syntax-colouring. 16 | 17 | Hexadecimal Literal Prefix: "0x" 18 | Binary Literal Prefix: "0b" 19 | Negative Literal Prefix: "-" 20 | 21 | Before Named Paragraph Expansion: "\n{\n" 22 | After Named Paragraph Expansion: "}\n" 23 | Start Ifdef: "#ifdef %S\n" 24 | End Ifdef: "#endif /* %S */\n" 25 | Start Ifndef: "#ifndef %S\n" 26 | End Ifndef: "#endif /* %S */\n" 27 | Line Marker: "#line %d \"%f\"\n" 28 | 29 | Start Definition: "#define %S\s" 30 | Prolong Definition: "\\\n\s\s\s\s" 31 | End Definition: "\n" 32 | 33 | keyword auto 34 | keyword break 35 | keyword case 36 | keyword char 37 | keyword const 38 | keyword continue 39 | keyword default 40 | keyword do 41 | keyword double 42 | keyword else 43 | keyword enum 44 | keyword extern 45 | keyword float 46 | keyword for 47 | keyword goto 48 | keyword if 49 | keyword int 50 | keyword long 51 | keyword register 52 | keyword return 53 | keyword short 54 | keyword signed 55 | keyword sizeof 56 | keyword static 57 | keyword struct 58 | keyword switch 59 | keyword typedef 60 | keyword union 61 | keyword unsigned 62 | keyword void 63 | keyword volatile 64 | keyword while 65 | 66 | colouring { 67 | runs of unquoted { 68 | runs of !identifier { 69 | keyword of !reserved => !reserved 70 | keyword of !function => !function 71 | keyword of !constant => !constant 72 | keyword of !element => { 73 | optionally spaced prefix . => !element 74 | optionally spaced prefix -> => !element 75 | } 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /Languages/C.ildf: -------------------------------------------------------------------------------- 1 | Name: "C" 2 | Details: "The C programming language" 3 | Extension: ".c" 4 | Multiline Comment Open: "/*" 5 | Multiline Comment Close: "*/" 6 | Line Comment: "//" 7 | String Literal: "\"" 8 | String Literal Escape: "\\" 9 | Character Literal: "'" 10 | Character Literal Escape: "\\" 11 | C-Like: true 12 | 13 | # C does in fact support octal literals, marking them as starting with an 14 | # unnecessary initial zero. This is practically obsolete now, and in any case 15 | # makes no difference to syntax-colouring. Binary literals were in theory 16 | # rejected by the C standards body as useless, but are so useful that gcc 17 | # and clang support them anyway. 18 | 19 | Hexadecimal Literal Prefix: "0x" 20 | Binary Literal Prefix: "0b" 21 | Negative Literal Prefix: "-" 22 | 23 | Before Named Paragraph Expansion: "\n{\n" 24 | After Named Paragraph Expansion: "}\n" 25 | Start Ifdef: "#ifdef %S\n" 26 | End Ifdef: "#endif /* %S */\n" 27 | Start Ifndef: "#ifndef %S\n" 28 | End Ifndef: "#endif /* %S */\n" 29 | Line Marker: "#line %d \"%f\"\n" 30 | 31 | Start Definition: "#define %S\s" 32 | Prolong Definition: "\\\n\s\s\s\s" 33 | End Definition: "\n" 34 | 35 | keyword auto 36 | keyword break 37 | keyword case 38 | keyword char 39 | keyword const 40 | keyword continue 41 | keyword default 42 | keyword do 43 | keyword double 44 | keyword else 45 | keyword enum 46 | keyword extern 47 | keyword float 48 | keyword for 49 | keyword goto 50 | keyword if 51 | keyword int 52 | keyword long 53 | keyword register 54 | keyword return 55 | keyword short 56 | keyword signed 57 | keyword sizeof 58 | keyword static 59 | keyword struct 60 | keyword switch 61 | keyword typedef 62 | keyword union 63 | keyword unsigned 64 | keyword void 65 | keyword volatile 66 | keyword while 67 | 68 | colouring { 69 | runs of unquoted { 70 | runs of !identifier { 71 | keyword of !reserved => !reserved 72 | keyword of !function => !function 73 | keyword of !constant => !constant 74 | keyword of !element => { 75 | optionally spaced prefix . => !element 76 | optionally spaced prefix -> => !element 77 | } 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /Languages/ConsoleText.ildf: -------------------------------------------------------------------------------- 1 | Name: "ConsoleText" 2 | Details: "For styling command line text in documentation" 3 | Extension: ".txt" 4 | 5 | colouring { 6 | => !plain 7 | brackets in /\s*(\$) (.*)/ { 8 | number 1 => !element 9 | number 2 => { 10 | => !plain 11 | matches of / -[A-Za-z0-9-]+/ { 12 | => !identifier 13 | } 14 | matches of /\S+/ { 15 | number 1 => !function 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Languages/Delia.ildf: -------------------------------------------------------------------------------- 1 | Name: "Delia" 2 | Details: "For defining test recipes in Intest" 3 | Extension: ".intest" 4 | 5 | colouring { 6 | => !plain 7 | brackets in /(.*?):.*/ { 8 | => !reserved 9 | } 10 | brackets in /(-\S+).*/ { 11 | => !identifier 12 | } 13 | matches of /\$[A-Z]+[A-Z0-9]*/ { 14 | => !function 15 | } 16 | matches of /\s*else\s*/ { 17 | => !reserved 18 | } 19 | matches of /\s*endif\s*/ { 20 | => !reserved 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Languages/Extracts.ildf: -------------------------------------------------------------------------------- 1 | Name: "Extracts" 2 | Details: "For code extracts to be written to a configuration file" 3 | Extension: ".txt" 4 | -------------------------------------------------------------------------------- /Languages/ILDF.ildf: -------------------------------------------------------------------------------- 1 | Name: "ILDF" 2 | Details: "The Inweb Language Definition File format" 3 | Extension: ".ildf" 4 | Whole Line Comment: "#" 5 | 6 | String Literal: "\"" 7 | String Literal Escape: "\\" 8 | 9 | # Regular expressions are handled here as if character literals 10 | Character Literal: "/" 11 | Character Literal Escape: "\\" 12 | 13 | keyword "both" 14 | keyword "brackets" 15 | keyword "characters" 16 | keyword "coloured" 17 | keyword "colouring" 18 | keyword "debug" 19 | keyword "false" 20 | keyword "in" 21 | keyword "instances" 22 | keyword "keyword" 23 | keyword "matches" 24 | keyword "matching" 25 | keyword "not" 26 | keyword "of" 27 | keyword "on" 28 | keyword "optionally" 29 | keyword "prefix" 30 | keyword "runs" 31 | keyword "spaced" 32 | keyword "suffix" 33 | keyword "true" 34 | keyword "unquoted" of !element 35 | 36 | colouring { 37 | runs of !identifier { 38 | prefix "!" => !element on both 39 | keyword of !element => !element 40 | keyword of !reserved => !reserved 41 | } 42 | runs of unquoted { 43 | instances of "=>" { 44 | => !reserved 45 | } 46 | instances of "{" { 47 | => !reserved 48 | } 49 | instances of "}" { 50 | => !reserved 51 | } 52 | } 53 | characters { 54 | # Anything left of these colours will be unquoted strings, so... 55 | coloured !constant => !string 56 | coloured !identifier => !string 57 | # Regular expressions, now coloured !character, are more like functions 58 | coloured !character => !function 59 | } 60 | # Detect Property: Value lines, not being fooled by a colon inside quotes 61 | brackets in /\s*([A-Z][^"]*):.*/ { 62 | # Uncolour only the bracketed part, i.e., the Property part 63 | => !plain 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /Languages/Indoc.ildf: -------------------------------------------------------------------------------- 1 | Name: "Indoc" 2 | Details: "The markup syntax for the Indoc documentation tool" 3 | Extension: ".indoc" 4 | 5 | colouring { 6 | => !plain 7 | } 8 | -------------------------------------------------------------------------------- /Languages/Inform 6.ildf: -------------------------------------------------------------------------------- 1 | Name: "Inform 6" 2 | Details: "The C-like interactive fiction language Inform 6" 3 | Extension: ".i6" 4 | Line Comment: "!" 5 | String Literal: "\"" 6 | String Literal Escape: "\\" 7 | Character Literal: "'" 8 | Character Literal Escape: "\\" 9 | Binary Literal Prefix: "$$" 10 | Hexadecimal Literal Prefix: "$" 11 | Negative Literal Prefix: "-" 12 | 13 | Start Definition: "Constant %S =\s" 14 | End Definition: ";\n" 15 | 16 | Start Ifdef: "#ifdef %S;\n" 17 | End Ifdef: "#endif; ! %S\n" 18 | Start Ifndef: "#ifndef %S;\n" 19 | End Ifndef: "#endif; ! %S\n" 20 | 21 | # Reserved words: 22 | 23 | keyword "Constant" 24 | keyword "Array" 25 | 26 | keyword "box" 27 | keyword "break" 28 | keyword "child" 29 | keyword "children" 30 | keyword "continue" 31 | keyword "default" 32 | keyword "do" 33 | keyword "elder" 34 | keyword "eldest" 35 | keyword "else" 36 | keyword "false" 37 | keyword "font" 38 | keyword "for" 39 | keyword "give" 40 | keyword "has" 41 | keyword "hasnt" 42 | keyword "if" 43 | keyword "in" 44 | keyword "indirect" 45 | keyword "inversion" 46 | keyword "jump" 47 | keyword "metaclass" 48 | keyword "move" 49 | keyword "new_line" 50 | keyword "nothing" 51 | keyword "notin" 52 | keyword "objectloop" 53 | keyword "ofclass" 54 | keyword "or" 55 | keyword "parent" 56 | keyword "print" 57 | keyword "print_ret" 58 | keyword "provides" 59 | keyword "quit" 60 | keyword "random" 61 | keyword "read" 62 | keyword "remove" 63 | keyword "restore" 64 | keyword "return" 65 | keyword "rfalse" 66 | keyword "rtrue" 67 | keyword "save" 68 | keyword "sibling" 69 | keyword "spaces" 70 | keyword "string" 71 | keyword "style" 72 | keyword "switch" 73 | keyword "to" 74 | keyword "true" 75 | keyword "until" 76 | keyword "while" 77 | keyword "younger" 78 | keyword "youngest" 79 | 80 | colouring { 81 | runs of unquoted { 82 | runs of !identifier { 83 | keyword of !reserved => !reserved 84 | keyword of !function => !function 85 | keyword of !constant => !constant 86 | keyword of !element => { 87 | optionally spaced prefix . => !element 88 | optionally spaced prefix -> => !element 89 | } 90 | } 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /Languages/Inform 7.ildf: -------------------------------------------------------------------------------- 1 | Name: "Inform 7" 2 | Details: "The natural-language based language Inform 7" 3 | Extension: ".i7x" 4 | Multiline Comment Open: "[" 5 | Multiline Comment Close: "]" 6 | String Literal: "\"" 7 | 8 | # This is here so that tangling the Standard Rules extension doesn't insert 9 | # a spurious comment betraying Inweb's involvement in the process - 10 | 11 | Suppress Disclaimer: true 12 | -------------------------------------------------------------------------------- /Languages/Inter Pipeline.ildf: -------------------------------------------------------------------------------- 1 | Name: "Inter Pipeline" 2 | Details: "For pipelines of Inform code-generation stages" 3 | Extension: ".interpipeline" 4 | Line Comment: "!" 5 | 6 | colouring { 7 | instances of "->" { 8 | => !reserved 9 | } 10 | instances of "<-" { 11 | => !reserved 12 | } 13 | runs of !identifier { 14 | => !plain 15 | prefix "*" => !identifier on both 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Languages/Inter.ildf: -------------------------------------------------------------------------------- 1 | Name: "Inter" 2 | Details: "The textual form of intermediate Inform code" 3 | Extension: ".intert" 4 | 5 | String Literal: "\"" 6 | String Literal Escape: "\\" 7 | 8 | keyword "append" 9 | keyword "cast" 10 | keyword "code" 11 | keyword "constant" 12 | keyword "defaultvalue" 13 | keyword "enum" 14 | keyword "evaluation" 15 | keyword "external" 16 | keyword "instance" 17 | keyword "int32" 18 | keyword "inv" 19 | keyword "kind" 20 | keyword "lab" 21 | keyword "link" 22 | keyword "list" 23 | keyword "local" 24 | keyword "metadata" 25 | keyword "misc" 26 | keyword "of" 27 | keyword "package" 28 | keyword "packagetype" 29 | keyword "permission" 30 | keyword "pragma" 31 | keyword "primitive" 32 | keyword "private" 33 | keyword "property" 34 | keyword "propertyvalue" 35 | keyword "public" 36 | keyword "ref" 37 | keyword "reference" 38 | keyword "response" 39 | keyword "splat" 40 | keyword "symbol" 41 | keyword "text" 42 | keyword "undef" 43 | keyword "val" 44 | keyword "variable" 45 | keyword "version" 46 | keyword "void" 47 | 48 | colouring { 49 | runs of !identifier { 50 | => !plain 51 | keyword of !reserved => !reserved 52 | matching /._.*/ => !identifier 53 | prefix "`" => !element on both 54 | prefix "!" => !function on both 55 | } 56 | instances of "-->" { 57 | => !reserved 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Languages/Inweb.ildf: -------------------------------------------------------------------------------- 1 | Name: "Inweb" 2 | Details: "The markup language for the Inweb literate programming system" 3 | Extension: ".w" 4 | 5 | colouring { 6 | => !plain 7 | # Detect Property: Value lines, not being fooled by a colon inside quotes 8 | brackets in /\s*([A-Za-z][^"]*):(.*)/ { 9 | number 1 => !element 10 | number 2 => !string 11 | } 12 | brackets in /\s*(@\S*)(.*)/ { 13 | number 1 => !function 14 | number 2 => !plain 15 | } 16 | brackets in /\s*(@\s*=)(.*)/ { 17 | number 1 => !function 18 | number 2 => !plain 19 | } 20 | matching /=.*/ => { 21 | => !function 22 | } 23 | brackets in /\s*(@<.*?@>\s*=)(.*)/ { 24 | number 1 => !function 25 | number 2 => !plain 26 | } 27 | matches of /@<.*?@>/ { 28 | => !function 29 | } 30 | brackets in /\s*(\[[A-Za-z0-9:]+\])(.*)/ { 31 | number 1 => !identifier 32 | } 33 | matches of /\[\[.*?\]\]/ { 34 | => !function 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Languages/None.ildf: -------------------------------------------------------------------------------- 1 | Name: "None" 2 | Details: "For programs in languages not yet supported by Inweb" 3 | Extension: ".txt" 4 | -------------------------------------------------------------------------------- /Languages/PainterOutput.ildf: -------------------------------------------------------------------------------- 1 | Name: "PainterOutput" 2 | colouring { 3 | number 1 of 2 => !plain 4 | number 2 of 2 => { 5 | characters { 6 | "!" => !comment 7 | "c" => !character 8 | "d" => !definition 9 | "e" => !element 10 | "f" => !function 11 | "i" => !identifier 12 | "n" => !constant 13 | "p" => !plain 14 | "r" => !reserved 15 | "s" => !string 16 | "x" => !extract 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Languages/Perl.ildf: -------------------------------------------------------------------------------- 1 | Name: "Perl" 2 | Details: "The scripting language Perl 5" 3 | Extension: ".pl" 4 | Line Comment: "#" 5 | String Literal: "\"" 6 | String Literal Escape: "\\" 7 | Character Literal: "'" 8 | Character Literal Escape: "\\" 9 | 10 | Shebang: "#!/usr/bin/perl\n\n" 11 | Before Named Paragraph Expansion: "\n{\n" 12 | After Named Paragraph Expansion: "}\n" 13 | Start Definition: "%S =" 14 | End Definition: "\n;\n" 15 | 16 | # In its usual zany way, Perl recognises the same #line syntax as C, thus in 17 | # principle overloading its comment notation #: 18 | 19 | Line Marker: "#line %d \"%f\"\n" 20 | -------------------------------------------------------------------------------- /Languages/Plain Text.ildf: -------------------------------------------------------------------------------- 1 | Name: "Plain Text" 2 | Details: "For text files which are not programs" 3 | Extension: ".txt" 4 | 5 | colouring { 6 | => !plain 7 | } 8 | -------------------------------------------------------------------------------- /Languages/Preform.ildf: -------------------------------------------------------------------------------- 1 | Name: "Preform" 2 | Details: "The internal Inform syntax analysis grammar language" 3 | Extension: ".preform" 4 | 5 | colouring { 6 | matches of /\S+/ { 7 | => !constant 8 | "::=" => !reserved 9 | "|" => !reserved 10 | "==>" => !reserved 11 | "(" => !reserved 12 | ")" => !reserved 13 | "..." => !reserved 14 | "......" => !reserved 15 | matching /<\S+>/ => !function 16 | } 17 | brackets in /.*?==>(.*)/ { 18 | => !plain 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Languages/REPL.ildf: -------------------------------------------------------------------------------- 1 | Name: "REPL" 2 | Details: "REPL output in the form expression, colon, value" 3 | Extension: ".repl" 4 | 5 | colouring { 6 | => !plain 7 | # Detect expression-value lines, not being fooled by a colon inside quotes 8 | brackets in /\s*'(.*?)':(.*)/ { 9 | number 1 => !element 10 | number 2 => !string 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Manual/Reference Card.w: -------------------------------------------------------------------------------- 1 | Reference Card. 2 | 3 | The current help information as it would be printed at the command line. 4 | 5 | @ Running Inweb with |-help| currently produces the following summary: 6 | 7 | = (undisplayed text from Figures/help.txt) 8 | 9 | @ Running Inweb with |-show-languages| currently produces the following list 10 | of programming languages for which support is provided in the standard 11 | distribution: 12 | 13 | = (undisplayed text from Figures/languages.txt) 14 | 15 | It's easy to make new language definitions, and contributions of these are 16 | welcome. 17 | -------------------------------------------------------------------------------- /Materials/default.giscript: -------------------------------------------------------------------------------- 1 | # This is the script from which inweb -gitignore will construct a .gitignore. 2 | 3 | debug-log.txt 4 | tags 5 | Woven/ 6 | Tangled/ 7 | !Tangled/*.preform 8 | Tests/intest-history.txt 9 | Tests/Transient/ 10 | Tests/hashes.intest 11 | Tests/_Results_Actual/ 12 | -------------------------------------------------------------------------------- /Materials/default.mkscript: -------------------------------------------------------------------------------- 1 | # This is "default.mkscript", a script which "inweb -makefile" uses in order to 2 | # generate makefiles for tools which do not provide a special script of their own. 3 | # In the Inform project, for example, it produces makefiles for the numerous 4 | # unit test tools. 5 | 6 | # See the inweb manual for documentation on the *.mkscript file format, i.e., 7 | # the format in which this file is written. But it is essentially just a makefile 8 | # with a number of special macro and loop features whose syntax involves braces 9 | # { ... }, so anywhere that you see braces, you're looking at something special 10 | # to *.mkscript; anything else is straightforward make syntax. 11 | 12 | # ----------------------------------------------------------------------------- 13 | 14 | {platform-settings} 15 | 16 | {identity-settings} 17 | 18 | # Making the program: 19 | 20 | $(ME)/Tangled/$(MYNAME): {dependent-files} 21 | $(call make-me) 22 | 23 | .PHONY: force 24 | force: 25 | $(call make-me) 26 | 27 | define make-me 28 | $(INWEB) $(ME) -import-from modules -tangle 29 | {compile from: $(ME)/Tangled/$(MYNAME).c to: $(ME)/Tangled/$(MYNAME).o} 30 | {link from: $(ME)/Tangled/$(MYNAME).o to: $(ME)/Tangled/$(MYNAME)$(EXEEXTENSION)} 31 | endef 32 | 33 | # Testing the program: 34 | 35 | .PHONY: test 36 | test: 37 | $(INTEST) -from $(ME) all 38 | 39 | # Weaving the web for GitHub Pages: 40 | 41 | .PHONY: pages 42 | pages: 43 | mkdir -p $(ME)/docs/$(MYNAME) 44 | $(INWEB) $(ME) -weave-docs -weave-into $(ME)/docs/$(MYNAME) 45 | 46 | # Cleaning up: 47 | 48 | .PHONY: clean 49 | clean: 50 | $(call clean-up) 51 | 52 | .PHONY: purge 53 | purge: 54 | $(call clean-up) 55 | rm -f $(ME)/Tangled/$(MYNAME) 56 | 57 | define clean-up 58 | rm -f $(ME)/Tangled/*.o 59 | rm -f $(ME)/Tangled/*.c 60 | rm -f $(ME)/Tangled/*.h 61 | endef 62 | -------------------------------------------------------------------------------- /Materials/platforms/linux.mk: -------------------------------------------------------------------------------- 1 | # This makefile was automatically written by inweb -makefile 2 | # and is not intended for human editing 3 | 4 | INWEBPLATFORM = linux 5 | 6 | INFORM6OS = LINUX 7 | 8 | EXEEXTENSION = 9 | 10 | INTEST = intest/Tangled/intest 11 | INWEB = inweb/Tangled/inweb 12 | 13 | CC = clang 14 | 15 | CCOPTS = -D_POSIX_C_SOURCE=200112L -D_DEFAULT_SOURCE -DPLATFORM_LINUX \ 16 | -fdiagnostics-color=auto $(CFLAGS) 17 | 18 | MANYWARNINGS = -Wall -Wextra -Wno-unknown-warning-option \ 19 | -Wno-declaration-after-statement -Wno-deprecated-non-prototype \ 20 | -Wno-unused-but-set-variable -Wno-unused-parameter 21 | 22 | FEWERWARNINGS = -Wno-constant-conversion -Wno-dangling-else -Wno-format \ 23 | -Wno-implicit-int -Wno-pointer-sign 24 | 25 | -------------------------------------------------------------------------------- /Materials/platforms/macos.mk: -------------------------------------------------------------------------------- 1 | # This makefile was automatically written by inweb -makefile 2 | # and is not intended for human editing 3 | 4 | INWEBPLATFORM = macos 5 | 6 | INFORM6OS = MACOS 7 | 8 | EXEEXTENSION = 9 | 10 | INTEST = intest/Tangled/intest 11 | INWEB = inweb/Tangled/inweb 12 | 13 | SDKPATH := $(shell xcrun -show-sdk-path) 14 | 15 | CCOPTS = -DPLATFORM_MACOS=1 -mmacosx-version-min=10.6 -arch x86_64 -isysroot $(SDKPATH) $(CFLAGS) 16 | 17 | MANYWARNINGS = -Weverything -Wno-unknown-warning-option -Wno-pointer-arith -Wno-unused-macros -Wno-shadow -Wno-cast-align -Wno-variadic-macros -Wno-missing-noreturn -Wno-missing-prototypes -Wno-unused-parameter -Wno-padded -Wno-missing-variable-declarations -Wno-unreachable-code-break -Wno-class-varargs -Wno-format-nonliteral -Wno-cast-qual -Wno-double-promotion -Wno-comma -Wno-strict-prototypes -Wno-extra-semi-stmt -Wno-unreachable-code-return -Wno-unused-but-set-variable -Wno-declaration-after-statement -Wno-c99-compat -ferror-limit=1000 18 | 19 | FEWERWARNINGS = -Wno-implicit-int -Wno-dangling-else -Wno-pointer-sign -Wno-format-extra-args -Wno-tautological-compare -Wno-deprecated-declarations -Wno-logical-op-parentheses -Wno-format -Wno-extra-semi-stmt -Wno-c11-extensions -Wno-unreachable-code-return 20 | 21 | -------------------------------------------------------------------------------- /Materials/platforms/macos32.mk: -------------------------------------------------------------------------------- 1 | # This makefile was automatically written by inweb -makefile 2 | # and is not intended for human editing 3 | 4 | INWEBPLATFORM = macos32 5 | 6 | INFORM6OS = MACOS 7 | 8 | EXEEXTENSION = 9 | 10 | INTEST = intest/Tangled/intest 11 | INWEB = inweb/Tangled/inweb 12 | 13 | SDKPATH := $(shell xcrun -show-sdk-path) 14 | 15 | CCOPTS = -DPLATFORM_MACOS=1 -mmacosx-version-min=10.4 -arch i386 -isysroot $(SDKPATH) $(CFLAGS) 16 | 17 | MANYWARNINGS = -Weverything -Wno-unknown-warning-option -Wno-pointer-arith -Wno-unused-macros -Wno-shadow -Wno-cast-align -Wno-variadic-macros -Wno-missing-noreturn -Wno-missing-prototypes -Wno-unused-parameter -Wno-padded -Wno-missing-variable-declarations -Wno-unreachable-code-break -Wno-class-varargs -Wno-format-nonliteral -Wno-cast-qual -Wno-double-promotion -Wno-comma -Wno-strict-prototypes -Wno-extra-semi-stmt -Wno-c99-compat -ferror-limit=1000 18 | 19 | FEWERWARNINGS = -Wno-implicit-int -Wno-dangling-else -Wno-pointer-sign -Wno-format-extra-args -Wno-tautological-compare -Wno-deprecated-declarations -Wno-logical-op-parentheses -Wno-format -Wno-extra-semi-stmt 20 | 21 | -------------------------------------------------------------------------------- /Materials/platforms/macosarm.mk: -------------------------------------------------------------------------------- 1 | # This makefile was automatically written by inweb -makefile 2 | # and is not intended for human editing 3 | 4 | INWEBPLATFORM = macosarm 5 | 6 | INFORM6OS = MACOS 7 | 8 | EXEEXTENSION = 9 | 10 | INTEST = intest/Tangled/intest 11 | INWEB = inweb/Tangled/inweb 12 | 13 | SDKPATH := $(shell xcrun -show-sdk-path) 14 | 15 | CCOPTS = -DPLATFORM_MACOS=1 -target arm64-apple-macos11 -isysroot $(SDKPATH) $(CFLAGS) 16 | 17 | MANYWARNINGS = -Weverything -Wno-unknown-warning-option -Wno-pointer-arith -Wno-unused-macros -Wno-shadow -Wno-cast-align -Wno-variadic-macros -Wno-missing-noreturn -Wno-missing-prototypes -Wno-unused-parameter -Wno-padded -Wno-missing-variable-declarations -Wno-unreachable-code-break -Wno-class-varargs -Wno-format-nonliteral -Wno-cast-qual -Wno-double-promotion -Wno-comma -Wno-strict-prototypes -Wno-extra-semi-stmt -Wno-unreachable-code-return -Wno-unused-but-set-variable -Wno-declaration-after-statement -Wno-c99-compat -ferror-limit=1000 18 | 19 | FEWERWARNINGS = -Wno-implicit-int -Wno-dangling-else -Wno-pointer-sign -Wno-format-extra-args -Wno-tautological-compare -Wno-deprecated-declarations -Wno-logical-op-parentheses -Wno-format -Wno-extra-semi-stmt -Wno-c11-extensions -Wno-unreachable-code-return -Wno-unused-but-set-variable 20 | 21 | -------------------------------------------------------------------------------- /Materials/platforms/macosuniv.mk: -------------------------------------------------------------------------------- 1 | # This makefile was automatically written by inweb -makefile 2 | # and is not intended for human editing 3 | 4 | INWEBPLATFORM = macosuniv 5 | 6 | INFORM6OS = MACOS 7 | 8 | EXEEXTENSION = 9 | 10 | INTEST = intest/Tangled/intest 11 | INWEB = inweb/Tangled/inweb 12 | 13 | SDKPATH := $(shell xcrun -show-sdk-path) 14 | 15 | CCOPTSX = -DPLATFORM_MACOS=1 -target x86_64-apple-macos10.12 -isysroot $(SDKPATH) $(CFLAGS) 16 | CCOPTSA = -DPLATFORM_MACOS=1 -target arm64-apple-macos11 -isysroot $(SDKPATH) $(CFLAGS) 17 | 18 | MANYWARNINGS = -Weverything -Wno-unknown-warning-option -Wno-pointer-arith -Wno-unused-macros -Wno-shadow -Wno-cast-align -Wno-variadic-macros -Wno-missing-noreturn -Wno-missing-prototypes -Wno-unused-parameter -Wno-padded -Wno-missing-variable-declarations -Wno-unreachable-code-break -Wno-class-varargs -Wno-format-nonliteral -Wno-cast-qual -Wno-double-promotion -Wno-comma -Wno-strict-prototypes -Wno-extra-semi-stmt -Wno-unreachable-code-return -Wno-unused-but-set-variable -Wno-declaration-after-statement -Wno-c99-compat -ferror-limit=1000 19 | 20 | FEWERWARNINGS = -Wno-implicit-int -Wno-dangling-else -Wno-pointer-sign -Wno-format-extra-args -Wno-tautological-compare -Wno-deprecated-declarations -Wno-logical-op-parentheses -Wno-format -Wno-extra-semi-stmt -Wno-c11-extensions -Wno-unreachable-code-return -Wno-unused-but-set-variable 21 | 22 | -------------------------------------------------------------------------------- /Materials/platforms/unix.mk: -------------------------------------------------------------------------------- 1 | # This makefile was automatically written by inweb -makefile 2 | # and is not intended for human editing 3 | 4 | INWEBPLATFORM = unix 5 | 6 | INFORM6OS = LINUX 7 | 8 | EXEEXTENSION = 9 | 10 | INTEST = intest/Tangled/intest 11 | INWEB = inweb/Tangled/inweb 12 | 13 | CCOPTS = -Wno-unused -DPLATFORM_UNIX -DUNIX64 -DCPU_WORDSIZE_MULTIPLIER=2 -O2 14 | 15 | MANYWARNINGS = -Weverything -Wno-unknown-warning-option -Wno-pointer-arith -Wno-unused-macros -Wno-shadow -Wno-cast-align -Wno-variadic-macros -Wno-missing-noreturn -Wno-missing-prototypes -Wno-unused-parameter -Wno-padded -Wno-missing-variable-declarations -Wno-unreachable-code-break -Wno-class-varargs -Wno-format-nonliteral -Wno-cast-qual -Wno-double-promotion -Wno-comma -Wno-strict-prototypes -Wno-extra-semi-stmt -Wno-unreachable-code-return -Wno-unused-but-set-variable -Wno-declaration-after-statement -Wno-c99-compat -ferror-limit=1000 16 | 17 | FEWERWARNINGS = -Wno-implicit-int -Wno-dangling-else -Wno-pointer-sign -Wno-format-extra-args -Wno-tautological-compare -Wno-deprecated-declarations -Wno-logical-op-parentheses -Wno-format -Wno-extra-semi-stmt -Wno-c11-extensions -Wno-unreachable-code-return 18 | 19 | -------------------------------------------------------------------------------- /Materials/platforms/windows.mk: -------------------------------------------------------------------------------- 1 | # This makefile was automatically written by inweb -makefile 2 | # and is not intended for human editing 3 | 4 | INWEBPLATFORM = windows 5 | 6 | INFORM6OS = PC_WIN32 7 | 8 | EXEEXTENSION = .exe 9 | 10 | INTEST = intest/Tangled/intest 11 | INWEB = inweb/Tangled/inweb 12 | 13 | CCOPTS = -DPLATFORM_WINDOWS=1 $(CFLAGS) 14 | 15 | MANYWARNINGS = -Weverything -Wno-unknown-warning-option -Wno-pointer-arith -Wno-unused-macros -Wno-shadow -Wno-cast-align -Wno-variadic-macros -Wno-missing-noreturn -Wno-missing-prototypes -Wno-unused-parameter -Wno-padded -Wno-missing-variable-declarations -Wno-unreachable-code-break -Wno-class-varargs -Wno-format-nonliteral -Wno-cast-qual -Wno-double-promotion -Wno-comma -Wno-strict-prototypes -Wno-extra-semi-stmt -Wno-unreachable-code-return -Wno-unused-but-set-variable -Wno-declaration-after-statement -Wno-used-but-marked-unused -Wno-unsafe-buffer-usage -Wno-misleading-indentation -Wno-implicit-fallthrough -Wno-implicit-int-float-conversion -Wno-incompatible-function-pointer-types-strict -Wno-cast-function-type-strict -Wno-c99-compat -Wno-switch-default -Wno-pre-c11-compat -ferror-limit=1000 16 | 17 | FEWERWARNINGS = -Wno-implicit-int -Wno-dangling-else -Wno-pointer-sign -Wno-format-extra-args -Wno-tautological-compare -Wno-deprecated-declarations -Wno-logical-op-parentheses -Wno-format -Wno-extra-semi-stmt -Wno-c11-extensions -Wno-unreachable-code-return 18 | 19 | -------------------------------------------------------------------------------- /Patterns/Ebook/Base/Base.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/Patterns/Ebook/Base/Base.html -------------------------------------------------------------------------------- /Patterns/Ebook/Base/Navigation.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/Patterns/Ebook/Base/Navigation.css -------------------------------------------------------------------------------- /Patterns/Ebook/pattern.txt: -------------------------------------------------------------------------------- 1 | name: Ebook based on HTML 2 | format: ePub 3 | footnotes plugin: None 4 | mathematics plugin: None 5 | assets: .js embed 6 | assets: .js prefix = 8 | assets: .css embed 9 | assets: .css prefix = 11 | assets: .css transform names 12 | -------------------------------------------------------------------------------- /Patterns/Ebook/template-body.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | [[Booklet Title]] 5 | [[Plugins]] 6 | 7 | 8 | [[Weave Content]] 9 | 10 | 11 | -------------------------------------------------------------------------------- /Patterns/Ebook/template-index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | [[Title]]: The Program 5 | 6 | 7 | 8 |
  • [[Title]]: The Program
9 |

[[Author]]

10 |

[[Purpose]]

11 |

[[Licence]]

12 |

[[Purpose]]

13 |

[[Licence]]

14 | 26 |
27 |

28 | This is a "web", a term invented by Donald Knuth in the early 1980s for a 29 | program written according to the heavily annotated literate programming dogma. 30 | For more on "inweb", visit the Inform 7 project. 31 |

32 | 33 | 34 | -------------------------------------------------------------------------------- /Patterns/GitHubPages/GitHub/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/Patterns/GitHubPages/GitHub/github.png -------------------------------------------------------------------------------- /Patterns/GitHubPages/pattern.txt: -------------------------------------------------------------------------------- 1 | name: GitHubPages based on HTML 2 | format: HTML 3 | default range: sections 4 | plugin: GitHub 5 | plugin: Breadcrumbs 6 | -------------------------------------------------------------------------------- /Patterns/GitHubPages/template-body.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | [[Booklet Title]] 5 | [[Plugins]] 6 | 7 | 8 | 11 |
12 | [[Weave Content]] 13 |
14 | 15 | 16 | -------------------------------------------------------------------------------- /Patterns/GitHubPages/template-index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | [[Title]] 4 | [[Plugins]] 5 | 6 | 7 | 10 |
11 |
    [[Breadcrumbs]]
  • [[Title]]
12 |

[[Purpose]] This is version [[Version Number]].

13 |
14 |
15 | [[If Chapters]] 16 |
    17 | [[Repeat Chapter]] 18 |
  • 19 |

    20 | [[Chapter Title]]

    21 | [[If Chapter Purpose]] 22 |

    [[Chapter Purpose]]

    23 | [[End If]] 24 |
      25 | [[Repeat Section]] 26 |
    • 27 |

      28 | [[Section Title]] - 29 | [[Section Purpose]]

      30 |
    • 31 | [[End Repeat]] 32 |
    33 |
  • 34 | [[End Repeat]] 35 |
36 | [[Else]] 37 | [[Repeat Chapter]] 38 |
    39 | [[Repeat Section]] 40 |
  • 41 |

    42 | [[Section Title]] - 43 | [[Section Purpose]]

    44 |
  • 45 | [[End Repeat]] 46 |
47 | [[End Repeat]] 48 | [[End If]] 49 | [[If Modules]] 50 |
51 |

This program also incorporates the following web(s) as module(s):

52 |
    53 | [[Repeat Module]] 54 |
  • 55 |

    56 | [[If Module Page]] 57 | [[Module Title]] 58 | [[Else]] 59 | [[Module Title]] 60 | [[End If]] 61 | - [[Module Purpose]]

    62 |
  • 63 | [[End Repeat]] 64 |
65 | [[End If]] 66 |
67 |
68 |

Powered by Inweb.

69 |
70 | 71 | 72 | -------------------------------------------------------------------------------- /Patterns/HTML/Base/Base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Patterns/HTML/Base/Contents.css: -------------------------------------------------------------------------------- 1 | /* This is a CSS file for pages woven by the literate programming tool inweb */ 2 | 3 | /* Contents.css contains styling for the table of contents included in index 4 | pages made from the template-index.html file */ 5 | 6 | div.contentspage .chapterlist li { 7 | padding-top: 8px; 8 | padding-left: 16px; 9 | padding-bottom: 0px; 10 | } 11 | div.contentspage .chapterlist .sectionlist li { 12 | padding-top: 0px; 13 | padding-left: 48px; 14 | padding-bottom: 0px; 15 | } 16 | div.contentspage p.chapterentry { 17 | padding-bottom: 0px; 18 | } 19 | div.contentspage p.moduleentry { 20 | padding-top: 0px; 21 | padding-bottom: 0px; 22 | } 23 | div.contentspage span.chaptertitle { 24 | font-weight: bold; 25 | } 26 | div.contentspage p.chapterpurpose { 27 | padding-top: 4px; 28 | padding-bottom: 2px; 29 | } 30 | 31 | div.contentspage p.sectionentry { 32 | padding-top: 4px; 33 | padding-bottom: 0px; 34 | } 35 | div.contentspage span.sectiontitle { 36 | } 37 | div.contentspage span.sectionpurpose { 38 | } 39 | -------------------------------------------------------------------------------- /Patterns/HTML/Base/Fonts.css: -------------------------------------------------------------------------------- 1 | .code-font { 2 | font-family: Monaco, monospace; 3 | } 4 | 5 | .commentary-font { 6 | font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; 7 | } 8 | -------------------------------------------------------------------------------- /Patterns/HTML/Base/Progress.css: -------------------------------------------------------------------------------- 1 | nav[role="progress"] { 2 | position: -webkit-sticky; /* Safari */ 3 | position: sticky; 4 | bottom: 0; 5 | background: #fff; 6 | margin-top: 4px; 7 | padding-top: 4px; 8 | } 9 | 10 | nav[role="progress"] div.progresscontainer { 11 | border:1px solid #dedede; 12 | margin-top: 7px; 13 | margin-bottom: 0px; 14 | } 15 | 16 | nav[role="progress"] ul { 17 | font-weight: 400; 18 | list-style: none 19 | font-size: 11px; 20 | margin-top: 12px; 21 | margin-bottom: 12px; 22 | padding-left: 7px; 23 | } 24 | 25 | nav[role="progress"] ul li { 26 | display: inline; 27 | padding: 7px; 28 | margin: 2px; 29 | background: #E0E0FF; 30 | text-transform: uppercase; 31 | letter-spacing: 1px; 32 | } 33 | 34 | nav[role="progress"] ul li.progresschapter { 35 | background: #E0FFE0; 36 | margin-left: 7px; 37 | margin-right: 7px; 38 | } 39 | 40 | nav[role="progress"] ul li.progresscurrentchapter { 41 | background: #B0CFB0; 42 | margin-left: 7px; 43 | margin-right: 2px; 44 | } 45 | 46 | nav[role="progress"] ul li.progresscurrent { 47 | background: #B0B0CF; 48 | } 49 | 50 | nav[role="progress"] ul li.progressprev { 51 | background: #FFE0E0; 52 | margin-left: 10px; 53 | margin-right: 10px; 54 | } 55 | 56 | nav[role="progress"] ul li.progressprevoff { 57 | background: #DFB0B0; 58 | margin-left: 10px; 59 | margin-right: 10px; 60 | } 61 | 62 | nav[role="progress"] ul li.progressnext { 63 | background: #FFE0E0; 64 | margin-left: 10px; 65 | margin-right: 10px; 66 | } 67 | 68 | nav[role="progress"] ul li.progressnextoff { 69 | background: #DFB0B0; 70 | margin-left: 10px; 71 | margin-right: 10px; 72 | } 73 | 74 | nav[role="progress"] ul li.active a { 75 | font-weight: 700 76 | } 77 | 78 | nav[role="progress"] ul li a:link { 79 | color: #333; 80 | text-decoration: none; 81 | } 82 | 83 | nav[role="progress"] ul li span.selectedlink { 84 | color: #f25; 85 | } 86 | 87 | nav[role="progress"] ul li span.unlink { 88 | color: #f25; 89 | text-decoration: none; 90 | text-transform: uppercase; 91 | letter-spacing: 1px; 92 | font-size: 12px; 93 | display: inline; 94 | } 95 | 96 | nav[role="progress"] ul li a:visited { 97 | color: #333 98 | } 99 | 100 | nav[role="progress"] ul li a:active { 101 | font-weight: 700 102 | } 103 | 104 | nav[role="progress"] ul li a:hover { 105 | color: #dd2c0d 106 | } 107 | 108 | @media print { 109 | nav[role="progress"] { 110 | display: none; 111 | } 112 | } -------------------------------------------------------------------------------- /Patterns/HTML/Bigfoot/Bigfoot.html: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /Patterns/HTML/Breadcrumbs/Breadcrumbs.css: -------------------------------------------------------------------------------- 1 | div.breadcrumbs { 2 | position: -webkit-sticky; /* Safari */ 3 | top: 0; 4 | position: sticky; 5 | background: #fff; 6 | padding-bottom: 4px; 7 | } 8 | 9 | @media print { 10 | div.breadcrumbs { 11 | position: static; 12 | } 13 | } 14 | 15 | .crumbs { 16 | border:1px solid #dedede; 17 | height:3em; 18 | } 19 | 20 | .crumbs li { 21 | float:left; 22 | line-height: 2.3em; 23 | padding-left: .75em; 24 | color: #333; 25 | font-size: 1.3em; 26 | } 27 | 28 | .crumbs li a { 29 | display:block; 30 | padding:0 15px 0 0; 31 | background:url(crumbs.gif) no-repeat right center; 32 | } 33 | 34 | .crumbs li a:link, #crumbs li a:visited { 35 | text-decoration:none; 36 | color:#333; 37 | } 38 | 39 | .crumbs li a:hover, #crumbs li a:focus { 40 | color:#dd2c0d; 41 | } -------------------------------------------------------------------------------- /Patterns/HTML/Breadcrumbs/crumbs.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/Patterns/HTML/Breadcrumbs/crumbs.gif -------------------------------------------------------------------------------- /Patterns/HTML/Carousel/Carousel.js: -------------------------------------------------------------------------------- 1 | // Next/previous controls 2 | function carouselMoveSlide(id, did, n) { 3 | carouselSetSlide(id, did, carouselGetSlide(id, did) + n); 4 | } 5 | 6 | function carouselGetSlide(id, did) { 7 | var carousel = document.getElementById(id); 8 | var slides = carousel.getElementsByClassName("carousel-slide"); 9 | var i; 10 | for (i = 0; i < slides.length; i++) { 11 | if (slides[i].style.display == "block") { 12 | return i; 13 | } 14 | } 15 | return 0; 16 | } 17 | 18 | function carouselSetSlide(id, did, n) { 19 | var carousel = document.getElementById(id); 20 | var dotrow = document.getElementById(did); 21 | var i; 22 | var slides = carousel.getElementsByClassName("carousel-slide"); 23 | var dots = dotrow.getElementsByClassName("carousel-dot"); 24 | if (n >= slides.length) { n = 0 } 25 | if (n < 0) { n = slides.length - 1 } 26 | for (i = 0; i < slides.length; i++) { 27 | if (i != n) { 28 | slides[i].style.display = "none"; 29 | dots[i].className = "carousel-dot"; 30 | } else { 31 | slides[i].style.display = "block"; 32 | dots[i].className = "carousel-dot carousel-dot-active"; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Patterns/HTML/Colouring/Colours.css: -------------------------------------------------------------------------------- 1 | /* The following correspond to the Inweb colours !definition, ..., !comment: */ 2 | 3 | span.definition-syntax { color: #444444; } 4 | span.function-syntax { color: #C00000; } 5 | span.identifier-syntax { color: #4040ff; } 6 | span.element-syntax { color: #40407f; } 7 | span.reserved-syntax { color: #600000; } 8 | span.string-syntax { color: #408040; } 9 | span.character-syntax { color: #204020; } 10 | span.constant-syntax { color: #804020; } 11 | span.plain-syntax { color: #000000; } 12 | span.extract-syntax { color: #444444; } 13 | span.comment-syntax { color: #404040; font-style:italic; } 14 | 15 | /* This is used for the "define" or "enum" keyword on Inweb-defined constants: */ 16 | 17 | span.definition-keyword { color:#801010; font-weight:bold; } 18 | 19 | /* These are for the angle-bracketed paragraph names: */ 20 | 21 | span.named-paragraph, span.named-paragraph-defn { color: #000000; font-size: 90%; } 22 | span.named-paragraph-number { color: #000000; font-size: 70%; font-style:italic; } 23 | span.named-paragraph-container { 24 | background: #ececf8; border: 1px solid #888888; 25 | } 26 | a.named-paragraph-link:link, a.named-paragraph-link:visited { 27 | text-decoration: none; 28 | } 29 | a.named-paragraph-link:active, a.named-paragraph-link:hover { 30 | background: #c8c8e8; 31 | } 32 | 33 | /* This is the box into which multi-line stretches of code are put: */ 34 | 35 | pre.displayed-code { 36 | background: #f8f8f8; 37 | border: 1px solid #cccccc; 38 | } 39 | -------------------------------------------------------------------------------- /Patterns/HTML/Colouring/ConsoleText-Colours.css: -------------------------------------------------------------------------------- 1 | /* The following correspond to the Inweb colours !definition, ..., !comment: */ 2 | 3 | span.definition-syntax { color: #444444; } 4 | span.function-syntax { color: #80FF80; } 5 | span.identifier-syntax { color: #8080FF; } 6 | span.element-syntax { color: #ADFF2F; } 7 | span.reserved-syntax { color: #600000; } 8 | span.string-syntax { color: #408040; } 9 | span.character-syntax { color: #204020; } 10 | span.constant-syntax { color: #204020; } 11 | span.plain-syntax { color: #ffffff; } 12 | span.extract-syntax { color: #444444; } 13 | span.comment-syntax { color: #404040; font-style:italic; } 14 | 15 | /* This is used for the "define" or "enum" keyword on Inweb-defined constants: */ 16 | 17 | span.definition-keyword { color:#801010; font-weight:bold; } 18 | 19 | /* These are for the angle-bracketed paragraph names: */ 20 | 21 | span.named-paragraph, span.named-paragraph-defn { color: #000000; } 22 | span.named-paragraph-number { color: #000000; font-size: 80%; font-style:italic; } 23 | span.named-paragraph-container { 24 | background: #e8e8f8; border: 1px solid #888888; 25 | } 26 | 27 | /* This is the box into which multi-line stretches of code are put: */ 28 | 29 | pre.displayed-code { 30 | background: #222222; 31 | border: 1px solid #008000; 32 | } 33 | -------------------------------------------------------------------------------- /Patterns/HTML/Colouring/Extracts-Colours.css: -------------------------------------------------------------------------------- 1 | /* The following correspond to the Inweb colours !definition, ..., !comment: */ 2 | 3 | span.definition-syntax { color: #444444; } 4 | span.function-syntax { color: #C00000; } 5 | span.identifier-syntax { color: #4040ff; } 6 | span.element-syntax { color: #40407f; } 7 | span.reserved-syntax { color: #600000; } 8 | span.string-syntax { color: #408040; } 9 | span.character-syntax { color: #204020; } 10 | span.constant-syntax { color: #804020; } 11 | span.plain-syntax { color: #000000; } 12 | span.extract-syntax { color: #444444; } 13 | span.comment-syntax { color: #404040; font-style:italic; } 14 | 15 | /* This is used for the "define" or "enum" keyword on Inweb-defined constants: */ 16 | 17 | span.definition-keyword { color:#801010; font-weight:bold; } 18 | 19 | /* These are for the angle-bracketed paragraph names: */ 20 | 21 | span.named-paragraph, span.named-paragraph-defn { color: #000000; font-size: 90%; } 22 | span.named-paragraph-number { color: #000000; font-size: 70%; font-style:italic; } 23 | span.named-paragraph-container { 24 | background: #ececf8; border: 1px solid #888888; 25 | } 26 | a.named-paragraph-link:link, a.named-paragraph-link:visited { 27 | text-decoration: none; 28 | } 29 | a.named-paragraph-link:active, a.named-paragraph-link:hover { 30 | background: #c8c8e8; 31 | } 32 | 33 | /* This is the box into which multi-line stretches of code are put: */ 34 | 35 | pre.displayed-code { 36 | background: #FFFFE0; 37 | border: 1px dashed #cccccc; 38 | } 39 | -------------------------------------------------------------------------------- /Patterns/HTML/Colouring/Preform-Colours.css: -------------------------------------------------------------------------------- 1 | /* The following correspond to the Inweb colours !definition, ..., !comment: */ 2 | 3 | span.definition-syntax { color: #444444; } 4 | span.function-syntax { color: #C00000; } 5 | span.identifier-syntax { color: #4040ff; } 6 | span.element-syntax { color: #40407f; } 7 | span.reserved-syntax { color: #600000; } 8 | span.string-syntax { color: #408040; } 9 | span.character-syntax { color: #204020; } 10 | span.constant-syntax { color: #804020; } 11 | span.plain-syntax { color: #000000; } 12 | span.extract-syntax { color: #444444; } 13 | span.comment-syntax { color: #404040; font-style:italic; } 14 | 15 | /* This is used for the "define" or "enum" keyword on Inweb-defined constants: */ 16 | 17 | span.definition-keyword { color:#801010; font-weight:bold; } 18 | 19 | /* These are for the angle-bracketed paragraph names: */ 20 | 21 | span.named-paragraph, span.named-paragraph-defn { color: #000000; font-size: 90%; } 22 | span.named-paragraph-number { color: #000000; font-size: 70%; font-style:italic; } 23 | span.named-paragraph-container { 24 | background: #ececf8; border: 1px solid #888888; 25 | } 26 | a.named-paragraph-link:link, a.named-paragraph-link:visited { 27 | text-decoration: none; 28 | } 29 | a.named-paragraph-link:active, a.named-paragraph-link:hover { 30 | background: #c8c8e8; 31 | } 32 | 33 | /* This is the box into which multi-line stretches of code are put: */ 34 | 35 | pre.displayed-code { 36 | background: #e8f8e8; 37 | border: 1px solid #cccccc; 38 | } 39 | -------------------------------------------------------------------------------- /Patterns/HTML/Downloads/Downloads.css: -------------------------------------------------------------------------------- 1 | div.download-container p { 2 | text-align: center; 3 | } 4 | 5 | div.download-container button.download-button { 6 | background-color: DodgerBlue; 7 | border: none; 8 | color: white; 9 | padding: 10px 24px; 10 | cursor: pointer; 11 | font-size: 18px; 12 | } 13 | 14 | div.download-container button.download-button:hover { 15 | background-color: RoyalBlue; 16 | } 17 | -------------------------------------------------------------------------------- /Patterns/HTML/Downloads/download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/Patterns/HTML/Downloads/download.png -------------------------------------------------------------------------------- /Patterns/HTML/Embedding/Download.html: -------------------------------------------------------------------------------- 1 | 11 | -------------------------------------------------------------------------------- /Patterns/HTML/Embedding/SoundCloud.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Patterns/HTML/Embedding/Vimeo.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Patterns/HTML/Embedding/YouTube.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Patterns/HTML/MathJax3/MathJax3.html: -------------------------------------------------------------------------------- 1 | 11 | 14 | -------------------------------------------------------------------------------- /Patterns/HTML/Popups/Popups.css: -------------------------------------------------------------------------------- 1 | /* Popup container - can be anything you want */ 2 | .popup { 3 | position: relative; 4 | display: inline-block; 5 | cursor: pointer; 6 | -webkit-user-select: none; 7 | -moz-user-select: none; 8 | -ms-user-select: none; 9 | user-select: none; 10 | } 11 | 12 | @media print { 13 | .popup { 14 | display: none; 15 | } 16 | } 17 | 18 | /* The actual popup */ 19 | .popup .popuptext { 20 | visibility: hidden; 21 | width: 500px; 22 | background-color: #eaeaea; 23 | border: 1px solid #c3c3c3 24 | color: #000; 25 | text-align: center; 26 | border-radius: 6px; 27 | padding: 8px 0; 28 | position: absolute; 29 | z-index: 1; 30 | bottom: 125%; 31 | left: 50%; 32 | margin-left: -250px; 33 | font-size: 12pt; 34 | box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3); 35 | } 36 | 37 | .popuptext { 38 | font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; 39 | } 40 | 41 | /* Popup arrow */ 42 | .popup .popuptext::after { 43 | content: ""; 44 | position: absolute; 45 | top: 100%; 46 | left: 50%; 47 | margin-left: -5px; 48 | border-width: 5px; 49 | border-style: solid; 50 | border-color: #555 transparent transparent transparent; 51 | } 52 | 53 | /* Toggle this class - hide and show the popup */ 54 | .popup .show { 55 | visibility: visible; 56 | -webkit-animation: fadeIn 1s; 57 | animation: fadeIn 1s; 58 | } 59 | 60 | /* Add animation (fade in the popup) */ 61 | @-webkit-keyframes fadeIn { 62 | from {opacity: 0;} 63 | to {opacity: 1;} 64 | } 65 | 66 | @keyframes fadeIn { 67 | from {opacity: 0;} 68 | to {opacity:1 ;} 69 | } 70 | 71 | .popupCircle { 72 | display: inline-block; 73 | width: 0.25em; 74 | height: 0.25em; 75 | margin-right: 0.25em; 76 | float: left; 77 | } 78 | 79 | .popupCircle:last-child { 80 | margin-right: 0; 81 | } 82 | -------------------------------------------------------------------------------- /Patterns/HTML/Popups/Popups.html: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /Patterns/HTML/pattern.txt: -------------------------------------------------------------------------------- 1 | name: HTML 2 | format: HTML 3 | default range: sections 4 | plugin: Base 5 | mathematics plugin: MathJax3 6 | footnotes plugin: Bigfoot 7 | assets: .html collate 8 | assets: .js copy 9 | assets: .js prefix = 10 | assets: .css copy 11 | assets: .css prefix = 12 | assets: .css transform names 13 | -------------------------------------------------------------------------------- /Patterns/HTML/template-body.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | [[Booklet Title]] 5 | [[Plugins]] 6 | 7 | 8 | [[Weave Content]] 9 | 10 | 11 | -------------------------------------------------------------------------------- /Patterns/HTML/template-index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | [[Title]] [[Version Number]] 4 | [[Plugins]] 5 | 6 | 7 |
    [[Breadcrumbs]]
  • [[Title]]
8 |

[[Purpose]] This is version [[Version Number]].

9 |
10 |
11 | [[If Chapters]] 12 |
    13 | [[Repeat Chapter]] 14 |
  • 15 |

    16 | [[Chapter Title]]

    17 | [[If Chapter Purpose]] 18 |

    [[Chapter Purpose]]

    19 | [[End If]] 20 |
      21 | [[Repeat Section]] 22 |
    • 23 |

      24 | [[Section Title]] - 25 | [[Section Purpose]]

      26 |
    • 27 | [[End Repeat]] 28 |
    29 |
  • 30 | [[End Repeat]] 31 |
32 | [[Else]] 33 | [[Repeat Chapter]] 34 |
    35 | [[Repeat Section]] 36 |
  • 37 |

    38 | [[Section Title]] - 39 | [[Section Purpose]]

    40 |
  • 41 | [[End Repeat]] 42 |
43 | [[End Repeat]] 44 | [[End If]] 45 | [[If Modules]] 46 |
47 |

This program also incorporates the following web(s) as module(s):

48 |
    49 | [[Repeat Module]] 50 |
  • 51 |

    52 | [[If Module Page]] 53 | [[Module Title]] 54 | [[Else]] 55 | [[Module Title]] 56 | [[End If]] 57 | - [[Module Purpose]]

    58 |
  • 59 | [[End Repeat]] 60 |
61 | [[End If]] 62 |
63 |
64 |

Powered by Inweb.

65 | 66 | 67 | -------------------------------------------------------------------------------- /Patterns/PDFTeX/pattern.txt: -------------------------------------------------------------------------------- 1 | name: PDFTeX based on TeX 2 | initial extension: .tex 3 | command: pdftex -output-directory=WOVENPATH -interaction=scrollmode WOVEN.tex >WOVEN.console 4 | command: PROCESS WOVEN.log 5 | command: rm WOVEN.log 6 | command: rm WOVEN.console 7 | -------------------------------------------------------------------------------- /Patterns/Plain/pattern.txt: -------------------------------------------------------------------------------- 1 | name: Plain 2 | format: plain 3 | -------------------------------------------------------------------------------- /Patterns/TeX/pattern.txt: -------------------------------------------------------------------------------- 1 | name: TeX 2 | format: TeX 3 | plugin: Base 4 | assets: .tex embed 5 | -------------------------------------------------------------------------------- /Patterns/TeX/template-body.tex: -------------------------------------------------------------------------------- 1 | [[Plugins]] 2 | \phantom{A} 3 | \vskip 0.5in 4 | \noindent{{\titlefont [[Title]]}} 5 | \vskip 0.5in 6 | 7 | [[Repeat Chapter]] 8 | \noindent{{\stitlefont [[Chapter Title]]}} 9 | \vskip 0.1in 10 | \par\noindent {\it [[Chapter Purpose]]} 11 | [[Repeat Section]] 12 | \vskip 0.2in 13 | \noindent{{\sstitlefont [[Section Title]]}} 14 | \vskip 0.1in 15 | \par\noindent {\it [[Section Purpose]]} 16 | 17 | [[End Repeat]] 18 | [[End Repeat]] 19 | 20 | [[Weave Content]] -------------------------------------------------------------------------------- /Patterns/TestingInweb/pattern.txt: -------------------------------------------------------------------------------- 1 | name: TestingInweb 2 | format: TestingInweb 3 | default range: sections 4 | -------------------------------------------------------------------------------- /Tangled/inweb-dash: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/Tangled/inweb-dash -------------------------------------------------------------------------------- /Tangled/magic-settings.txt: -------------------------------------------------------------------------------- 1 | top-hat-capacity = 6 rabbits 2 | cabinet-trapdoor = closed 3 | marked-card = 6 of clubs 4 | -------------------------------------------------------------------------------- /Tests/Test Cases/_Scan_Ideal/conditional.txt: -------------------------------------------------------------------------------- 1 | Scan of source lines for '0' 2 | 0000001 SECTION_HEADING..... Main. 3 | 0000002 COMMENT_BODY........ 4 | 0000003 PURPOSE............. Implied Purpose: A minimal example of a C program written for inweb. 5 | 0000004 COMMENT_BODY........ 6 | 0000005 PARAGRAPH_START..... @ 7 | 0000006 BEGIN_CODE.......... = 8 | 0000007 C_LIBRARY_INCLUDE... #include 9 | 0000008 CODE_BODY........... 10 | 0000009 CODE_BODY........... int main(int argc, char *argv[]) { 11 | 0000010 CODE_BODY........... printf("Hello world!\n"); 12 | 0000011 CODE_BODY........... } 13 | 0000012 CODE_BODY........... 14 | 0000013 PARAGRAPH_START..... @ 15 | 0000014 COMMENT_BODY........ 16 | 0000015 BEGIN_DEFINITION.... @d PEACH 1 17 | 0000016 BEGIN_DEFINITION.... @e A_COM from 1 18 | 0000017 BEGIN_DEFINITION.... @e B_COM 19 | 0000018 BEGIN_DEFINITION.... @e C_COM 20 | 0000019 COMMENT_BODY........ 21 | 0000020 BEGIN_CODE.......... = 22 | 0000021 CODE_BODY........... #include "nonexistent.h" 23 | 0000022 CODE_BODY........... 24 | 0000023 CODE_BODY........... typedef struct bong { 25 | 0000024 CODE_BODY........... int f; 26 | 0000025 CODE_BODY........... } bong; 27 | 0000026 CODE_BODY........... 28 | 0000027 CODE_BODY........... void banana(int n) { 29 | 0000028 CODE_BODY........... } 30 | 0000029 CODE_BODY........... 31 | 0000030 PARAGRAPH_START..... @ 32 | 0000031 COMMENT_BODY........ 33 | 0000032 BEGIN_CODE.......... = 34 | 0000033 CODE_BODY........... #include "existent.h" 35 | 0000034 CODE_BODY........... 36 | 0000035 CODE_BODY........... typedef struct bong { 37 | 0000036 CODE_BODY........... unsigned int f; 38 | 0000037 CODE_BODY........... } bong; 39 | 0000038 CODE_BODY........... 40 | -------------------------------------------------------------------------------- /Tests/Test Cases/_Scan_Ideal/empty.txt: -------------------------------------------------------------------------------- 1 | Scan of source lines for '0' 2 | 0000001 SECTION_HEADING..... Main. 3 | 0000002 COMMENT_BODY........ 4 | 0000003 PURPOSE............. Implied Purpose: A minimal example of a C program written for inweb. 5 | 0000004 COMMENT_BODY........ 6 | 0000005 PARAGRAPH_START..... @ Blah. Lorum. 7 | 0000006 COMMENT_BODY........ Ipsum. But |identifier| as well. 8 | 0000007 COMMENT_BODY........ 9 | 0000008 COMMENT_BODY........ |Green.| 10 | 0000009 COMMENT_BODY........ |Blue.| 11 | 0000010 COMMENT_BODY........ 12 | 0000011 COMMENT_BODY........ is my essential palette. 13 | 0000012 COMMENT_BODY........ 14 | -------------------------------------------------------------------------------- /Tests/Test Cases/_Scan_Ideal/hellow.txt: -------------------------------------------------------------------------------- 1 | Scan of source lines for '0' 2 | 0000001 SECTION_HEADING..... Main. 3 | 0000002 COMMENT_BODY........ 4 | 0000003 PURPOSE............. Implied Purpose: A minimal example of a C program written for inweb. 5 | 0000004 COMMENT_BODY........ 6 | 0000005 PARAGRAPH_START..... @ 7 | 0000006 BEGIN_CODE.......... = 8 | 0000007 C_LIBRARY_INCLUDE... #include 9 | 0000008 CODE_BODY........... 10 | 0000009 CODE_BODY........... int main(int argc, char *argv[]) { 11 | 0000010 CODE_BODY........... printf("Hello world!\n"); 12 | 0000011 CODE_BODY........... } 13 | 0000012 CODE_BODY........... 14 | -------------------------------------------------------------------------------- /Tests/Test Cases/_Scan_Ideal/perl.txt: -------------------------------------------------------------------------------- 1 | Scan of source lines for '0' 2 | 0000001 SECTION_HEADING..... Main. 3 | 0000002 COMMENT_BODY........ 4 | 0000003 PURPOSE............. Implied Purpose: A test Perl script for inweb. 5 | 0000004 COMMENT_BODY........ 6 | 0000005 PARAGRAPH_START..... @ 7 | 0000006 BEGIN_CODE.......... = 8 | 0000007 CODE_BODY........... print recolour("Santa likes red and green socks.\n"); 9 | 0000008 CODE_BODY........... 10 | 0000009 PARAGRAPH_START..... @ 11 | 0000010 BEGIN_CODE.......... = 12 | 0000011 CODE_BODY........... sub recolour { 13 | 0000012 CODE_BODY........... my $text = $_[0]; 14 | 0000013 CODE_BODY........... @; 15 | 0000014 CODE_BODY........... return $text; 16 | 0000015 CODE_BODY........... } 17 | 0000016 CODE_BODY........... 18 | 0000017 PARAGRAPH_START..... @ 19 | 0000018 MACRO_DEFINITION.... @ = 20 | 0000019 CODE_BODY........... $text =~ s/red/blue/; 21 | 0000020 CODE_BODY........... $text =~ s/green/purple/; 22 | 0000021 CODE_BODY........... 23 | -------------------------------------------------------------------------------- /Tests/Test Cases/_Scan_Ideal/plain.txt: -------------------------------------------------------------------------------- 1 | Scan of source lines for '0' 2 | 0000001 SECTION_HEADING..... Main. 3 | 0000002 COMMENT_BODY........ 4 | 0000003 PURPOSE............. Implied Purpose: Tangling and weaving some text file. 5 | 0000004 COMMENT_BODY........ 6 | 0000005 PARAGRAPH_START..... @ 7 | 0000006 BEGIN_CODE.......... = 8 | 0000007 CODE_BODY........... @ 9 | 0000008 CODE_BODY........... No one would have believed in the last years of the 10 | 0000009 CODE_BODY........... nineteenth century that this world was being watched keenly 11 | 0000010 CODE_BODY........... and closely by intelligences greater than man's and yet as 12 | 0000011 CODE_BODY........... mortal as his own; that as men busied themselves about their 13 | 0000012 CODE_BODY........... various concerns they were scrutinised and studied, perhaps 14 | 0000013 CODE_BODY........... almost as narrowly as a man with a microscope might scrutinise 15 | 0000014 CODE_BODY........... the transient creatures that swarm and multiply in a drop of water. 16 | 0000015 CODE_BODY........... 17 | 0000016 PARAGRAPH_START..... @ 18 | 0000017 MACRO_DEFINITION.... @ = 19 | 0000018 CODE_BODY........... Book One 20 | 0000019 CODE_BODY........... The Coming of the Martians 21 | 0000020 CODE_BODY........... 22 | 0000021 PARAGRAPH_START..... @ 23 | 0000022 BEGIN_CODE.......... = 24 | 0000023 CODE_BODY........... With infinite complacency men went to and fro over this globe about 25 | 0000024 CODE_BODY........... their little affairs, serene in their assurance of their empire over matter. 26 | 0000025 CODE_BODY........... 27 | -------------------------------------------------------------------------------- /Tests/Test Cases/_Tangled_Ideal/conditional.txt: -------------------------------------------------------------------------------- 1 | /* Tangled output generated by inweb: do not edit */ 2 | #include 3 | #ifdef PLATFORM_WINDOWS 4 | #define PEACH 1 5 | #endif /* PLATFORM_WINDOWS */ 6 | #ifdef PLATFORM_WINDOWS 7 | #define A_COM 1 8 | #endif /* PLATFORM_WINDOWS */ 9 | #ifdef PLATFORM_WINDOWS 10 | #define B_COM 2 11 | #endif /* PLATFORM_WINDOWS */ 12 | #ifdef PLATFORM_WINDOWS 13 | #define C_COM 3 14 | #endif /* PLATFORM_WINDOWS */ 15 | #define NO_DEFINED_COM_VALUES 3 16 | #ifdef PLATFORM_WINDOWS 17 | #line 23 "inweb/Tests/Test Cases/conditional.inweb" 18 | typedef struct bong { 19 | int f; 20 | } bong; 21 | #endif /* PLATFORM_WINDOWS */ 22 | #ifndef PLATFORM_WINDOWS 23 | #ifdef POSIX 24 | #line 35 "inweb/Tests/Test Cases/conditional.inweb" 25 | typedef struct bong { 26 | unsigned int f; 27 | } bong; 28 | #endif /* PLATFORM_WINDOWS */ 29 | #endif /* POSIX */ 30 | #line 9 "inweb/Tests/Test Cases/conditional.inweb" 31 | int main(int argc, char *argv[]) ; 32 | #ifdef PLATFORM_WINDOWS 33 | #line 27 "inweb/Tests/Test Cases/conditional.inweb" 34 | void banana(int n) ; 35 | #endif /* PLATFORM_WINDOWS */ 36 | #line 8 "inweb/Tests/Test Cases/conditional.inweb" 37 | 38 | int main(int argc, char *argv[]) { 39 | printf("Hello world!\n"); 40 | } 41 | 42 | #ifdef PLATFORM_WINDOWS 43 | #line 21 "inweb/Tests/Test Cases/conditional.inweb" 44 | #include "nonexistent.h" 45 | 46 | #line 26 "inweb/Tests/Test Cases/conditional.inweb" 47 | 48 | void banana(int n) { 49 | } 50 | 51 | #endif /* PLATFORM_WINDOWS */ 52 | #ifndef PLATFORM_WINDOWS 53 | #ifdef POSIX 54 | #line 33 "inweb/Tests/Test Cases/conditional.inweb" 55 | #include "existent.h" 56 | 57 | #line 38 "inweb/Tests/Test Cases/conditional.inweb" 58 | 59 | #endif /* PLATFORM_WINDOWS */ 60 | #endif /* POSIX */ 61 | -------------------------------------------------------------------------------- /Tests/Test Cases/_Tangled_Ideal/empty.txt: -------------------------------------------------------------------------------- 1 | /* Tangled output generated by inweb: do not edit */ 2 | -------------------------------------------------------------------------------- /Tests/Test Cases/_Tangled_Ideal/hellow.txt: -------------------------------------------------------------------------------- 1 | /* Tangled output generated by inweb: do not edit */ 2 | #include 3 | #line 9 "inweb/Tests/Test Cases/hellow.inweb" 4 | int main(int argc, char *argv[]) ; 5 | #line 8 "inweb/Tests/Test Cases/hellow.inweb" 6 | 7 | int main(int argc, char *argv[]) { 8 | printf("Hello world!\n"); 9 | } 10 | 11 | -------------------------------------------------------------------------------- /Tests/Test Cases/_Tangled_Ideal/perl.txt: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | # Tangled output generated by inweb: do not edit 4 | #line 7 "inweb/Tests/Test Cases/perl.inweb" 5 | print recolour("Santa likes red and green socks.\n"); 6 | 7 | #line 10 "inweb/Tests/Test Cases/perl.inweb" 8 | sub recolour { 9 | my $text = $_[0]; 10 | 11 | { 12 | #line 17 "inweb/Tests/Test Cases/perl.inweb" 13 | $text =~ s/red/blue/; 14 | $text =~ s/green/purple/; 15 | 16 | } 17 | #line 12 "inweb/Tests/Test Cases/perl.inweb" 18 | ; 19 | return $text; 20 | } 21 | 22 | -------------------------------------------------------------------------------- /Tests/Test Cases/_Tangled_Ideal/plain.txt: -------------------------------------------------------------------------------- 1 | Book One 2 | The Coming of the Martians 3 | 4 | 5 | No one would have believed in the last years of the 6 | nineteenth century that this world was being watched keenly 7 | and closely by intelligences greater than man's and yet as 8 | mortal as his own; that as men busied themselves about their 9 | various concerns they were scrutinised and studied, perhaps 10 | almost as narrowly as a man with a microscope might scrutinise 11 | the transient creatures that swarm and multiply in a drop of water. 12 | 13 | With infinite complacency men went to and fro over this globe about 14 | their little affairs, serene in their assurance of their empire over matter. 15 | 16 | -------------------------------------------------------------------------------- /Tests/Test Cases/_Tangled_Ideal/plainX.txt: -------------------------------------------------------------------------------- 1 | Book One 2 | The Coming of the Martians 3 | 4 | 5 | No one would have believed in the last years of the 6 | nineteenth century that this world was being watched keenly 7 | and closely by intelligences greater than man's and yet as 8 | mortal as his own; that as men busied themselves about their 9 | various concerns they were scrutinised and studied, perhaps 10 | almost as narrowly as a man with a microscope might scrutinise 11 | the transient creatures that swarm and multiply in a drop of water. 12 | 13 | With infinite complacency men went to and fro over this globe about 14 | their little affairs, serene in their assurance of their empire over matter. 15 | 16 | -------------------------------------------------------------------------------- /Tests/Test Cases/_Tangled_Ideal/twinprimes.txt: -------------------------------------------------------------------------------- 1 | /* Tangled output generated by inweb: do not edit */ 2 | #include 3 | #define RANGE 100 /* the upper limit to the numbers we will consider */ 4 | #define TRUE 1 5 | #define FALSE 0 6 | #line 27 "inweb/Tests/Test Cases/twinprimes.inweb" 7 | int main(int argc, char *argv[]) ; 8 | #line 48 "inweb/Tests/Test Cases/twinprimes.inweb" 9 | int isprime(int n) ; 10 | #line 26 "inweb/Tests/Test Cases/twinprimes.inweb" 11 | 12 | int main(int argc, char *argv[]) { 13 | for (int i=1; i 8 | 9 | int main(int argc, char *argv[]) { 10 | printf("Hello world!\n"); 11 | } 12 | 13 | @ ^"ifdef-PLATFORM_WINDOWS" 14 | 15 | @d PEACH 1 16 | @e A_COM from 1 17 | @e B_COM 18 | @e C_COM 19 | 20 | = 21 | #include "nonexistent.h" 22 | 23 | typedef struct bong { 24 | int f; 25 | } bong; 26 | 27 | void banana(int n) { 28 | } 29 | 30 | @ ^"ifndef-PLATFORM_WINDOWS" ^"ifdef-POSIX" 31 | 32 | = 33 | #include "existent.h" 34 | 35 | typedef struct bong { 36 | unsigned int f; 37 | } bong; 38 | -------------------------------------------------------------------------------- /Tests/Test Cases/empty.inweb: -------------------------------------------------------------------------------- 1 | Title: test 2 | Author: Graham Nelson 3 | Purpose: A minimal example of a C program written for inweb. 4 | Language: C 5 | 6 | @ Blah. Lorum. 7 | Ipsum. But |identifier| as well. 8 | 9 | |Green.| 10 | |Blue.| 11 | 12 | is my essential palette. 13 | -------------------------------------------------------------------------------- /Tests/Test Cases/hellow.inweb: -------------------------------------------------------------------------------- 1 | Title: hellow 2 | Author: Graham Nelson 3 | Purpose: A minimal example of a C program written for inweb. 4 | Language: C 5 | 6 | @ = 7 | #include 8 | 9 | int main(int argc, char *argv[]) { 10 | printf("Hello world!\n"); 11 | } 12 | -------------------------------------------------------------------------------- /Tests/Test Cases/perl.inweb: -------------------------------------------------------------------------------- 1 | Title: perl 2 | Author: Graham Nelson 3 | Purpose: A test Perl script for inweb. 4 | Language: Perl 5 | 6 | @ = 7 | print recolour("Santa likes red and green socks.\n"); 8 | 9 | @ = 10 | sub recolour { 11 | my $text = $_[0]; 12 | @; 13 | return $text; 14 | } 15 | 16 | @ = 17 | $text =~ s/red/blue/; 18 | $text =~ s/green/purple/; 19 | -------------------------------------------------------------------------------- /Tests/Test Cases/plain.inweb: -------------------------------------------------------------------------------- 1 | Title: plain 2 | Author: Graham Nelson 3 | Purpose: Tangling and weaving some text file. 4 | Language: Plain Text 5 | 6 | @ = 7 | @ 8 | No one would have believed in the last years of the 9 | nineteenth century that this world was being watched keenly 10 | and closely by intelligences greater than man's and yet as 11 | mortal as his own; that as men busied themselves about their 12 | various concerns they were scrutinised and studied, perhaps 13 | almost as narrowly as a man with a microscope might scrutinise 14 | the transient creatures that swarm and multiply in a drop of water. 15 | 16 | @ = 17 | Book One 18 | The Coming of the Martians 19 | 20 | @ = 21 | With infinite complacency men went to and fro over this globe about 22 | their little affairs, serene in their assurance of their empire over matter. 23 | -------------------------------------------------------------------------------- /Tests/Test Cases/twinprimes.inweb: -------------------------------------------------------------------------------- 1 | Title: The Twin Primes Conjecture 2 | Author: Graham Nelson 3 | Purpose: This example of using inweb is a whole web in a single short file, to look for twin primes, a classic problem in number theory. 4 | Language: C 5 | 6 | @h The conjecture. 7 | It is widely believed that there are an infinite number of twin primes, that 8 | is, prime numbers occurring in pairs different by 2. Twins are known to exist 9 | at least as far out as $10^{388,342}$ (as of 2016), and there are infinitely 10 | many pairs of primes closer together than about 250 (Zhang, 2013; Tao, Maynard, 11 | and many others, 2014). 12 | 13 | This program finds a few small pairs of twins, by the simplest method possible, 14 | and should print output like so: 15 | = (text) 16 | 3 and 5 17 | 5 and 7 18 | 11 and 13 19 | ... 20 | = 21 | 22 | @d RANGE 100 /* the upper limit to the numbers we will consider */ 23 | 24 | = 25 | #include 26 | 27 | int main(int argc, char *argv[]) { 28 | for (int i=1; i; 30 | } 31 | 32 | @ = 33 | if ((isprime(i)) && (isprime(i+2))) 34 | printf("%d and %d\n", i, i+2); 35 | 36 | @h Primality. 37 | This simple and slow test tries to divide by every whole number at least 38 | 2 and up to the square root: if none divide exactly, the number is prime. 39 | A common error with this algorithm is to check where $m^2 < n$, rather 40 | than $m^2 \leq n$, thus wrongly considering 4, 9, 25, 49, ... as prime: 41 | Cambridge folklore has it that this bug occurred on the first computation 42 | of the EDSAC computer on 6 May 1949. 43 | 44 | @d TRUE 1 45 | @d FALSE 0 46 | 47 | = 48 | int isprime(int n) { 49 | if (n <= 1) return FALSE; 50 | for (int m = 2; m*m <= n; m++) 51 | if (n % m == 0) 52 | return FALSE; 53 | return TRUE; 54 | } 55 | -------------------------------------------------------------------------------- /Tests/Test Painter/AssemblageExample.txt: -------------------------------------------------------------------------------- 1 | JSR .initialise 2 | LDR A, #.data 3 | RTS 4 | .initialise 5 | TAX 6 | -------------------------------------------------------------------------------- /Tests/Test Painter/EquationsExample.txt: -------------------------------------------------------------------------------- 1 | A = 2716 2 | B=3 3 | C =715 + B 4 | D < 14 5 | -------------------------------------------------------------------------------- /Tests/Test Painter/LineageExample.txt: -------------------------------------------------------------------------------- 1 | Jacob first appears in the Book of Genesis, the son of Isaac and Rebecca, the 2 | grandson of Abraham, Sarah and Bethuel, the nephew of Ishmael. 3 | -------------------------------------------------------------------------------- /Tests/Test Painter/PainterOutput.txt: -------------------------------------------------------------------------------- 1 | int x = 55; /* a magic number */ 2 | rrrpipppnnpp!!!!!!!!!!!!!!!!!!!! 3 | Imaginary::function(x, beta); 4 | fffffffffffffffffffpippiiiipp 5 | -------------------------------------------------------------------------------- /Tests/Test Painter/RunningExample.txt: -------------------------------------------------------------------------------- 1 | Napoleon Bonaparte (1769-1821) took 167 scientists to Egypt in 1798, 2 | who published their so-called Memoirs over the period 1798-1801. 3 | -------------------------------------------------------------------------------- /Tests/Test Painter/StdioExample.txt: -------------------------------------------------------------------------------- 1 | if (x == 1) printf("Hello!"); 2 | -------------------------------------------------------------------------------- /Tests/Test Painter/ThirdExample.txt: -------------------------------------------------------------------------------- 1 | With how sad steps, O Moon, thou climb'st the skies! 2 | How silently, and with how wan a face! 3 | What, may it be that even in heav'nly place 4 | That busy archer his sharp arrows tries! 5 | Sure, if that long-with love-acquainted eyes 6 | Can judge of love, thou feel'st a lover's case, 7 | I read it in thy looks; thy languish'd grace 8 | To me, that feel the like, thy state descries. 9 | Then, ev'n of fellowship, O Moon, tell me, 10 | Is constant love deem'd there but want of wit? 11 | Are beauties there as proud as here they be? 12 | Do they above love to be lov'd, and yet 13 | Those lovers scorn whom that love doth possess? 14 | Do they call virtue there ungratefulness? 15 | -------------------------------------------------------------------------------- /Tests/Test Painter/VowelsExample.txt: -------------------------------------------------------------------------------- 1 | A noir, E blanc, I rouge, U vert, O bleu : voyelles, 2 | Je dirai quelque jour vos naissances latentes : 3 | A, noir corset velu des mouches éclatantes 4 | Qui bombinent autour des puanteurs cruelles, 5 | -------------------------------------------------------------------------------- /Tests/Test Painter/_Results_Ideal/AssemblageExample.txt: -------------------------------------------------------------------------------- 1 | Test of colouring for language AssemblageExample: 2 | JSR .initialise 3 | LDR A, #.data 4 | RTS 5 | .initialise 6 | TAX 7 | 8 | ppppppppiiipfffffffffff 9 | ppppppppiiipipppfffff 10 | ppppppppiii 11 | ppppfffffffffff 12 | ppppppppiii 13 | 14 | -------------------------------------------------------------------------------- /Tests/Test Painter/_Results_Ideal/EquationsExample.txt: -------------------------------------------------------------------------------- 1 | Test of colouring for language EquationsExample: 2 | A = 2716 3 | B=3 4 | C =715 + B 5 | D < 14 6 | 7 | ppppfpppffff 8 | ppppfpf 9 | ppppfppfffpppp 10 | pppppppppp 11 | 12 | -------------------------------------------------------------------------------- /Tests/Test Painter/_Results_Ideal/LineageExample.txt: -------------------------------------------------------------------------------- 1 | Test of colouring for language LineageExample: 2 | Jacob first appears in the Book of Genesis, the son of Isaac and Rebecca, the 3 | grandson of Abraham, Sarah and Bethuel, the nephew of Ishmael. 4 | 5 | ppppppppppppppppppppppppppppppppppppppppppppppppfffpppppppppppppppppppppppppp 6 | pppppfffpppppppppppppppppppppppppppppppppppppppppppppppppppppp 7 | 8 | -------------------------------------------------------------------------------- /Tests/Test Painter/_Results_Ideal/PainterOutput.txt: -------------------------------------------------------------------------------- 1 | Test of colouring for language PainterOutput: 2 | int x = 55; /* a magic number */ 3 | rrrpipppnnpp!!!!!!!!!!!!!!!!!!!! 4 | Imaginary::function(x, beta); 5 | fffffffffffffffffffpippiiiipp 6 | 7 | pppppppppppppppppppppppppppppppppppp 8 | pppprrrpipppnnpp!!!!!!!!!!!!!!!!!!!! 9 | ppppppppppppppppppppppppppppppppp 10 | ppppfffffffffffffffffffpippiiiipp 11 | 12 | -------------------------------------------------------------------------------- /Tests/Test Painter/_Results_Ideal/RunningExample.txt: -------------------------------------------------------------------------------- 1 | Test of colouring for language RunningExample: 2 | Napoleon Bonaparte (1769-1821) took 167 scientists to Egypt in 1798, 3 | who published their so-called Memoirs over the period 1798-1801. 4 | 5 | ppppppppppppppppppppfffffffffpppppppfffppppppppppppppppppppppppffffp 6 | ppppppppppppppppppppppppppppppppppppppppppppppppppppppfffffffffp 7 | 8 | -------------------------------------------------------------------------------- /Tests/Test Painter/_Results_Ideal/StdioExample.txt: -------------------------------------------------------------------------------- 1 | Test of colouring for language StdioExample: 2 | if (x == 1) printf("Hello!"); 3 | 4 | iippippppnppffffffppiiiiipppp 5 | 6 | -------------------------------------------------------------------------------- /Tests/Test Painter/_Results_Ideal/ThirdExample.txt: -------------------------------------------------------------------------------- 1 | Test of colouring for language ThirdExample: 2 | With how sad steps, O Moon, thou climb'st the skies! 3 | How silently, and with how wan a face! 4 | What, may it be that even in heav'nly place 5 | That busy archer his sharp arrows tries! 6 | Sure, if that long-with love-acquainted eyes 7 | Can judge of love, thou feel'st a lover's case, 8 | I read it in thy looks; thy languish'd grace 9 | To me, that feel the like, thy state descries. 10 | Then, ev'n of fellowship, O Moon, tell me, 11 | Is constant love deem'd there but want of wit? 12 | Are beauties there as proud as here they be? 13 | Do they above love to be lov'd, and yet 14 | Those lovers scorn whom that love doth possess? 15 | Do they call virtue there ungratefulness? 16 | 17 | pppppppppfffpppppppppppppppppppppppppppppppppppppppp 18 | ppppppppppppppfffppppppppppppppppppppp 19 | ppppppppppffppppppppppppppppppppppppppppppp 20 | ppppppppppffffffpppppppppppppppppppppppp 21 | pppppppppffffppppppppppppppppppppppppppppppp 22 | ppppppppppffppppppppppppppppppppppppppppppppppp 23 | pppppppffppppppppppppppppppppppppppppppppppp 24 | pppppppffffppppppppppppppppppppppppppppppppppp 25 | pppppppppppffppppppppppppppppppppppppppppp 26 | ppppppppppppffffpppppppppppppppppppppppppppppp 27 | pppppppppppppfffffpppppppppppppppppppppppppp 28 | ppppppppfffffpppppppppppppppppppppppppp 29 | pppppppppppppfffffppppppppppppppppppppppppppppp 30 | ppppppppffffppppppppppppppppppppppppppppp 31 | 32 | -------------------------------------------------------------------------------- /Tests/Test Painter/_Results_Ideal/VowelsExample.txt: -------------------------------------------------------------------------------- 1 | Test of colouring for language VowelsExample: 2 | A noir, E blanc, I rouge, U vert, O bleu : voyelles, 3 | Je dirai quelque jour vos naissances latentes : 4 | A, noir corset velu des mouches éclatantes 5 | Qui bombinent autour des puanteurs cruelles, 6 | 7 | fppffpppfpppfppppfppffpfppfppfppppfpppffppppfpfppfpp 8 | pfppfpffppffppffppffpppfpppffppfppfpppfpfppfppp 9 | fpppffpppfppfpppfpfppfpppffppfpppppfpfppfp 10 | pffppfppfpfpppffpffpppfpppffppffpppppffppfpp 11 | 12 | -------------------------------------------------------------------------------- /Tests/Test Weave Tree/sp.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/Tests/Test Weave Tree/sp.txt -------------------------------------------------------------------------------- /Tests/Test Weave Tree/tsoe.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/Tests/Test Weave Tree/tsoe.txt -------------------------------------------------------------------------------- /Tests/Test Weave Tree/variations/Contents.w: -------------------------------------------------------------------------------- 1 | Title: The Goldbach Variations 2 | Author: Anonymous 3 | Purpose: This makes no sense as any kind of program, and exists only for testing the weaver. 4 | Language: C 5 | 6 | Sections 7 | Summing Primes 8 | The Sieve of Eratosthenes 9 | -------------------------------------------------------------------------------- /Tests/Test Weave Tree/variations/Sections/Summing Primes.w: -------------------------------------------------------------------------------- 1 | Summing Primes. 2 | 3 | Here we verify the conjecture for small numbers. 4 | 5 | @ So, this is a program to see if even numbers from 4 to 100 can all be written 6 | as a sum of two primes. Christian Goldbach asked Euler in 1742 if every even 7 | number greater than 2 can be written this way. This remains open, though -- 8 | 9 | (a) every even number is a sum of at most six primes (Ramaré, 1995), and 10 | (b) every odd number is a sum of at most five (Tao, 2012). 11 | 12 | Besides which, |printf(k+1)|, to say the least: see http://www.google.com 13 | or for that matter see //The Sieve of Eratosthenes//. 14 | 15 | = (figure Letter.jpg at height 10cm) 16 | 17 | Computer verification has been made up to around $10^{18}$, but by rather better 18 | methods.[1] Which is awesome.[2] And $i 45 | 46 | int main(int argc, char *argv[]) { 47 | for (int i=4; i; 49 | } 50 | 51 | @ This ought to print: 52 | = (hyperlinked text as ConsoleText) 53 | $ goldbach/Tangled/goldbach -fish 1 54 | 4 = 2+2 55 | 6 = 3+3 https://www.wikipedia.org 56 | 8 = 3+5 57 | 10 = 3+7 = 5+5 58 | 12 = 5+7 59 | 14 = 3+11 = 7+7 60 | ... 61 | = 62 | We'll print each different pair of primes adding up to i. We 63 | only check in the range $2 \leq j \leq i/2$ to avoid counting pairs 64 | twice over (thus $8 = 3+5 = 5+3$, but that's hardly two different ways). 65 | 66 | @ = 67 | printf("%d", i); 68 | for (int j=2; j<=i/2; j++) 69 | if ((isprime(j)) && (isprime(i-j))) 70 | printf(" = %d+%d", j, i-j); 71 | printf("\n"); 72 | -------------------------------------------------------------------------------- /Tests/Test Weave Tree/variations/Sections/The Sieve of Eratosthenes.w: -------------------------------------------------------------------------------- 1 | The Sieve of Eratosthenes. 2 | 3 | A fairly fast way to determine if small numbers are prime, given storage. 4 | 5 | @h Storage. 6 | This technique, still essentially the best sieve for finding prime 7 | numbers, is attributed to Eratosthenes of Cyrene and dates from the 200s BC. 8 | Since composite numbers are exactly those numbers which are multiples of 9 | something, the idea is to remove everything which is a multiple: whatever 10 | is left, must be prime. 11 | 12 | This is very fast (and can be done more quickly than the implementation 13 | below), but (a) uses storage to hold the sieve, and (b) has to start right 14 | back at 2 - so it can't efficiently test just, say, the eight-digit numbers 15 | for primality. 16 | 17 | = 18 | int still_in_sieve[RANGE + 1]; 19 | int sieve_performed = FALSE; 20 | 21 | @h Primality. 22 | We provide this as a function which determines whether a number is prime: 23 | 24 | @d TRUE 1 25 | @d FALSE 0 26 | 27 | = 28 | int isprime(int n) { 29 | if (n <= 1) return FALSE; 30 | if (n > RANGE) { printf("Out of range!\n"); return FALSE; } 31 | if (!sieve_performed) @; 32 | return still_in_sieve[n]; 33 | } 34 | 35 | @ We save a little time by noting that if a number up to |RANGE| is composite 36 | then one of its factors must be smaller than the square root of |RANGE|. Thus, 37 | in a sieve of size 10000, one only needs to remove multiples of 2 up to 100, 38 | for example. 39 | 40 | @ = 41 | @; 42 | for (int n=2; n*n <= RANGE; n++) 43 | if (still_in_sieve[n]) 44 | @; 45 | sieve_performed = TRUE; 46 | 47 | @ = 48 | still_in_sieve[1] = FALSE; 49 | for (int n=2; n <= RANGE; n++) still_in_sieve[n] = TRUE; 50 | 51 | @ = 52 | for (int m= n+n; m <= RANGE; m += n) still_in_sieve[m] = FALSE; 53 | -------------------------------------------------------------------------------- /Tests/inweb.intest: -------------------------------------------------------------------------------- 1 | -cases [Inweb] 'inweb/Tests/Test Cases' 2 | -cases [Painter] 'inweb/Tests/Test Painter' 3 | -cases [Tree] 'inweb/Tests/Test Weave Tree' 4 | 5 | -recipe [Inweb] 6 | set: $INWEB = inweb/Tangled/inweb 7 | set: $INTERNAL = Internal 8 | 9 | set: $WEB = $PATH/$CASE.inweb 10 | mkdir: $PATH/_Tangled_Actual 11 | mkdir: $PATH/_Tangled_Ideal 12 | mkdir: $PATH/_Tangled_Console 13 | set: $TA = $PATH/_Tangled_Actual/$CASE.txt 14 | set: $TI = $PATH/_Tangled_Ideal/$CASE.txt 15 | set: $TC = $PATH/_Tangled_Console/$CASE.txt 16 | step: $INWEB $WEB -no-ctags -tangle-to $TA >$TC 2>&1 17 | or: 'failed inweb' $TC 18 | show: $TA 19 | match text: $TA $TI 20 | or: 'produced the wrong tangled code' 21 | 22 | mkdir: $PATH/_Scan_Actual 23 | mkdir: $PATH/_Scan_Ideal 24 | set: $SA = $PATH/_Scan_Actual/$CASE.txt 25 | set: $SI = $PATH/_Scan_Ideal/$CASE.txt 26 | step: $INWEB $WEB -scan >$SA 2>&1 27 | or: 'failed inweb' $SA 28 | show: $SA 29 | match text: $SA $SI 30 | or: 'produced the wrong scan' 31 | 32 | pass: 'passed' 33 | 34 | -end 35 | 36 | -recipe [Painter] 37 | set: $INWEB = inweb/Tangled/inweb 38 | set: $LANGUAGES = inweb/Dialects 39 | set: $INTERNAL = Internal 40 | 41 | set: $CANVAS = $PATH/$CASE.txt 42 | mkdir: $PATH/_Results_Actual 43 | mkdir: $PATH/_Results_Ideal 44 | mkdir: $PATH/_Results_Console 45 | set: $A = $PATH/_Results_Actual/$CASE.txt 46 | set: $I = $PATH/_Results_Ideal/$CASE.txt 47 | step: $INWEB -no-ctags -locale console=utf-8 -test-language-on $CANVAS -test-language $LANGUAGES/$CASE.ildf >$A 2>&1 48 | or: 'failed inweb' $A 49 | show: $A 50 | match text: $A $I 51 | or: 'produced the wrong painting' 52 | 53 | pass: 'passed' 54 | 55 | -end 56 | 57 | -recipe [Tree] 58 | set: $INWEB = inweb/Tangled/inweb 59 | set: $LANGUAGES = inweb/Dialects 60 | set: $INTERNAL = Internal 61 | 62 | mkdir: $PATH/_Results_Actual 63 | mkdir: $PATH/_Results_Ideal 64 | mkdir: $PATH/_Results_Console 65 | set: $A = $PATH/_Results_Actual/$CASE.txt 66 | set: $I = $PATH/_Results_Ideal/$CASE.txt 67 | set: $C = $PATH/_Results_Console/$CASE.txt 68 | step: $INWEB -no-ctags $PATH/variations -weave S/$CASE -weave-as TestingInweb -weave-to $A >$C 2>&1 69 | or: 'failed inweb' $C 70 | show: $A 71 | match text: $A $I 72 | or: 'produced the wrong weave tree' 73 | 74 | pass: 'passed' 75 | 76 | -end 77 | -------------------------------------------------------------------------------- /build.txt: -------------------------------------------------------------------------------- 1 | Prerelease: beta 2 | Build Date: 24 July 2024 3 | Build Number: 1B67 4 | -------------------------------------------------------------------------------- /colony.txt: -------------------------------------------------------------------------------- 1 | home: inweb/docs 2 | assets: inweb/docs/docs-assets 3 | 4 | navigation: inweb/docs-src/nav.html 5 | pattern: GitHubPages 6 | 7 | breadcrumbs: none 8 | web: "overview" at "inweb/docs-src/index.inweb" in "inweb/docs" 9 | 10 | breadcrumbs: "Home: //overview//" 11 | web: "inweb" at "inweb" in "inweb/docs/inweb" 12 | module: "foundation" at "inweb/foundation-module" in "inweb/docs/foundation-module" 13 | web: "foundation-test" at "inweb/foundation-test" in "inweb/docs/foundation-test" 14 | web: "goldbach" at "inweb/Examples/goldbach" in "inweb/docs/goldbach" 15 | web: "twinprimes" at "inweb/Examples/twinprimes.inweb" in "inweb/docs/twinprimes" 16 | web: "eastertide" at "inweb/Examples/eastertide" in "inweb/docs/eastertide" 17 | 18 | web: "intest" at "intest" in "intest/docs" 19 | web: "inform" at "inform/docs-src/index.inweb" in "inform/docs" 20 | -------------------------------------------------------------------------------- /docs-src/Octagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/docs-src/Octagram.png -------------------------------------------------------------------------------- /docs-src/index.inweb: -------------------------------------------------------------------------------- 1 | Title: The Inweb Manual and Source Code 2 | Author: Graham Nelson 3 | 4 | @ This is the home page for documentation, human-readable source code and 5 | examples for the literate programming system Inweb. It's hosted on the Github 6 | Docs area of the Inweb repository, at: https://github.com/ganelson/inweb 7 | Download and build instructions are there, not here. 8 | 9 | To get a sense of Inweb and what it does, see //inweb: Manual//. The simple 10 | example //twinprimes// and //goldbach// may also help. 11 | 12 | But if you're here to look under the hood, or you want to fix a bug or 13 | add a feature, a good place to begin is //inweb: How This Program Works//. 14 | 15 | @ Inweb is built on top of a library of C functions called //foundation//, 16 | supplied in the same repository. See //foundation: A Brief Guide to Foundation//. 17 | There's also a small tool for unit-testing it, //foundation-test//, but this 18 | is not an interesting read. 19 | -------------------------------------------------------------------------------- /docs-src/nav.html: -------------------------------------------------------------------------------- 1 |

[[Link "overview"]] 2 | 3 |

4 | [[Item "inweb"]] 5 | [[Menu "Foundation Module"]] 6 | [[Item "foundation"]] 7 | [[Item "foundation-test"]] 8 | [[Menu "Example Webs"]] 9 | [[Item "goldbach"]] 10 | [[Item "twinprimes"]] 11 | [[Item "eastertide"]] 12 | [[Menu "Repository"]] 13 | [[Item " github" -> https://github.com/ganelson/inweb]] 14 | [[Menu "Related Projects"]] 15 | [[Item "inform"]] 16 | [[Item "intest"]] 17 | -------------------------------------------------------------------------------- /docs/docs-assets/Breadcrumbs.css: -------------------------------------------------------------------------------- 1 | div.breadcrumbs { 2 | position: -webkit-sticky; /* Safari */ 3 | top: 0; 4 | position: sticky; 5 | background: #fff; 6 | padding-bottom: 4px; 7 | } 8 | 9 | @media print { 10 | div.breadcrumbs { 11 | position: static; 12 | } 13 | } 14 | 15 | .crumbs { 16 | border:1px solid #dedede; 17 | height:3em; 18 | } 19 | 20 | .crumbs li { 21 | float:left; 22 | line-height: 2.3em; 23 | padding-left: .75em; 24 | color: #333; 25 | font-size: 1.3em; 26 | } 27 | 28 | .crumbs li a { 29 | display:block; 30 | padding:0 15px 0 0; 31 | background:url(crumbs.gif) no-repeat right center; 32 | } 33 | 34 | .crumbs li a:link, #crumbs li a:visited { 35 | text-decoration:none; 36 | color:#333; 37 | } 38 | 39 | .crumbs li a:hover, #crumbs li a:focus { 40 | color:#dd2c0d; 41 | } -------------------------------------------------------------------------------- /docs/docs-assets/Carousel.js: -------------------------------------------------------------------------------- 1 | // Next/previous controls 2 | function carouselMoveSlide(id, did, n) { 3 | carouselSetSlide(id, did, carouselGetSlide(id, did) + n); 4 | } 5 | 6 | function carouselGetSlide(id, did) { 7 | var carousel = document.getElementById(id); 8 | var slides = carousel.getElementsByClassName("carousel-slide"); 9 | var i; 10 | for (i = 0; i < slides.length; i++) { 11 | if (slides[i].style.display == "block") { 12 | return i; 13 | } 14 | } 15 | return 0; 16 | } 17 | 18 | function carouselSetSlide(id, did, n) { 19 | var carousel = document.getElementById(id); 20 | var dotrow = document.getElementById(did); 21 | var i; 22 | var slides = carousel.getElementsByClassName("carousel-slide"); 23 | var dots = dotrow.getElementsByClassName("carousel-dot"); 24 | if (n >= slides.length) { n = 0 } 25 | if (n < 0) { n = slides.length - 1 } 26 | for (i = 0; i < slides.length; i++) { 27 | if (i != n) { 28 | slides[i].style.display = "none"; 29 | dots[i].className = "carousel-dot"; 30 | } else { 31 | slides[i].style.display = "block"; 32 | dots[i].className = "carousel-dot carousel-dot-active"; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /docs/docs-assets/Colours.css: -------------------------------------------------------------------------------- 1 | /* The following correspond to the Inweb colours !definition, ..., !comment: */ 2 | 3 | span.definition-syntax { color: #444444; } 4 | span.function-syntax { color: #C00000; } 5 | span.identifier-syntax { color: #4040ff; } 6 | span.element-syntax { color: #40407f; } 7 | span.reserved-syntax { color: #600000; } 8 | span.string-syntax { color: #408040; } 9 | span.character-syntax { color: #204020; } 10 | span.constant-syntax { color: #804020; } 11 | span.plain-syntax { color: #000000; } 12 | span.extract-syntax { color: #444444; } 13 | span.comment-syntax { color: #404040; font-style:italic; } 14 | 15 | /* This is used for the "define" or "enum" keyword on Inweb-defined constants: */ 16 | 17 | span.definition-keyword { color:#801010; font-weight:bold; } 18 | 19 | /* These are for the angle-bracketed paragraph names: */ 20 | 21 | span.named-paragraph, span.named-paragraph-defn { color: #000000; font-size: 90%; } 22 | span.named-paragraph-number { color: #000000; font-size: 70%; font-style:italic; } 23 | span.named-paragraph-container { 24 | background: #ececf8; border: 1px solid #888888; 25 | } 26 | a.named-paragraph-link:link, a.named-paragraph-link:visited { 27 | text-decoration: none; 28 | } 29 | a.named-paragraph-link:active, a.named-paragraph-link:hover { 30 | background: #c8c8e8; 31 | } 32 | 33 | /* This is the box into which multi-line stretches of code are put: */ 34 | 35 | pre.displayed-code { 36 | background: #f8f8f8; 37 | border: 1px solid #cccccc; 38 | } 39 | -------------------------------------------------------------------------------- /docs/docs-assets/ConsoleText-Colours.css: -------------------------------------------------------------------------------- 1 | /* The following correspond to the Inweb colours !definition, ..., !comment: */ 2 | 3 | span.ConsoleText-definition-syntax { color: #444444; } 4 | span.ConsoleText-function-syntax { color: #80FF80; } 5 | span.ConsoleText-identifier-syntax { color: #8080FF; } 6 | span.ConsoleText-element-syntax { color: #ADFF2F; } 7 | span.ConsoleText-reserved-syntax { color: #600000; } 8 | span.ConsoleText-string-syntax { color: #408040; } 9 | span.ConsoleText-character-syntax { color: #204020; } 10 | span.ConsoleText-constant-syntax { color: #204020; } 11 | span.ConsoleText-plain-syntax { color: #ffffff; } 12 | span.ConsoleText-extract-syntax { color: #444444; } 13 | span.ConsoleText-comment-syntax { color: #404040; font-style:italic; } 14 | 15 | /* This is used for the "define" or "enum" keyword on Inweb-defined constants: */ 16 | 17 | span.ConsoleText-definition-keyword { color:#801010; font-weight:bold; } 18 | 19 | /* These are for the angle-bracketed paragraph names: */ 20 | 21 | span.ConsoleText-named-paragraph, span.ConsoleText-named-paragraph-defn { color: #000000; } 22 | span.ConsoleText-named-paragraph-number { color: #000000; font-size: 80%; font-style:italic; } 23 | span.ConsoleText-named-paragraph-container { 24 | background: #e8e8f8; border: 1px solid #888888; 25 | } 26 | 27 | /* This is the box into which multi-line stretches of code are put: */ 28 | 29 | pre.ConsoleText-displayed-code { 30 | background: #222222; 31 | border: 1px solid #008000; 32 | } 33 | 34 | -------------------------------------------------------------------------------- /docs/docs-assets/Contents.css: -------------------------------------------------------------------------------- 1 | /* This is a CSS file for pages woven by the literate programming tool inweb */ 2 | 3 | /* Contents.css contains styling for the table of contents included in index 4 | pages made from the template-index.html file */ 5 | 6 | div.contentspage .chapterlist li { 7 | padding-top: 8px; 8 | padding-left: 16px; 9 | padding-bottom: 0px; 10 | } 11 | div.contentspage .chapterlist .sectionlist li { 12 | padding-top: 0px; 13 | padding-left: 48px; 14 | padding-bottom: 0px; 15 | } 16 | div.contentspage p.chapterentry { 17 | padding-bottom: 0px; 18 | } 19 | div.contentspage p.moduleentry { 20 | padding-top: 0px; 21 | padding-bottom: 0px; 22 | } 23 | div.contentspage span.chaptertitle { 24 | font-weight: bold; 25 | } 26 | div.contentspage p.chapterpurpose { 27 | padding-top: 4px; 28 | padding-bottom: 2px; 29 | } 30 | 31 | div.contentspage p.sectionentry { 32 | padding-top: 4px; 33 | padding-bottom: 0px; 34 | } 35 | div.contentspage span.sectiontitle { 36 | } 37 | div.contentspage span.sectionpurpose { 38 | } 39 | -------------------------------------------------------------------------------- /docs/docs-assets/Downloads.css: -------------------------------------------------------------------------------- 1 | div.download-container p { 2 | text-align: center; 3 | } 4 | 5 | div.download-container button.download-button { 6 | background-color: DodgerBlue; 7 | border: none; 8 | color: white; 9 | padding: 10px 24px; 10 | cursor: pointer; 11 | font-size: 18px; 12 | } 13 | 14 | div.download-container button.download-button:hover { 15 | background-color: RoyalBlue; 16 | } 17 | -------------------------------------------------------------------------------- /docs/docs-assets/Extracts-Colours.css: -------------------------------------------------------------------------------- 1 | /* The following correspond to the Inweb colours !definition, ..., !comment: */ 2 | 3 | span.Extracts-definition-syntax { color: #444444; } 4 | span.Extracts-function-syntax { color: #C00000; } 5 | span.Extracts-identifier-syntax { color: #4040ff; } 6 | span.Extracts-element-syntax { color: #40407f; } 7 | span.Extracts-reserved-syntax { color: #600000; } 8 | span.Extracts-string-syntax { color: #408040; } 9 | span.Extracts-character-syntax { color: #204020; } 10 | span.Extracts-constant-syntax { color: #804020; } 11 | span.Extracts-plain-syntax { color: #000000; } 12 | span.Extracts-extract-syntax { color: #444444; } 13 | span.Extracts-comment-syntax { color: #404040; font-style:italic; } 14 | 15 | /* This is used for the "define" or "enum" keyword on Inweb-defined constants: */ 16 | 17 | span.Extracts-definition-keyword { color:#801010; font-weight:bold; } 18 | 19 | /* These are for the angle-bracketed paragraph names: */ 20 | 21 | span.Extracts-named-paragraph, span.Extracts-named-paragraph-defn { color: #000000; font-size: 90%; } 22 | span.Extracts-named-paragraph-number { color: #000000; font-size: 70%; font-style:italic; } 23 | span.Extracts-named-paragraph-container { 24 | background: #ececf8; border: 1px solid #888888; 25 | } 26 | a.named-paragraph-link:link, a.named-paragraph-link:visited { 27 | text-decoration: none; 28 | } 29 | a.named-paragraph-link:active, a.named-paragraph-link:hover { 30 | background: #c8c8e8; 31 | } 32 | 33 | /* This is the box into which multi-line stretches of code are put: */ 34 | 35 | pre.Extracts-displayed-code { 36 | background: #FFFFE0; 37 | border: 1px dashed #cccccc; 38 | } 39 | 40 | -------------------------------------------------------------------------------- /docs/docs-assets/Fonts.css: -------------------------------------------------------------------------------- 1 | .code-font { 2 | font-family: Monaco, monospace; 3 | } 4 | 5 | .commentary-font { 6 | font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; 7 | } 8 | -------------------------------------------------------------------------------- /docs/docs-assets/Octagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/docs/docs-assets/Octagram.png -------------------------------------------------------------------------------- /docs/docs-assets/Popups.css: -------------------------------------------------------------------------------- 1 | /* Popup container - can be anything you want */ 2 | .popup { 3 | position: relative; 4 | display: inline-block; 5 | cursor: pointer; 6 | -webkit-user-select: none; 7 | -moz-user-select: none; 8 | -ms-user-select: none; 9 | user-select: none; 10 | } 11 | 12 | @media print { 13 | .popup { 14 | display: none; 15 | } 16 | } 17 | 18 | /* The actual popup */ 19 | .popup .popuptext { 20 | visibility: hidden; 21 | width: 500px; 22 | background-color: #eaeaea; 23 | border: 1px solid #c3c3c3 24 | color: #000; 25 | text-align: center; 26 | border-radius: 6px; 27 | padding: 8px 0; 28 | position: absolute; 29 | z-index: 1; 30 | bottom: 125%; 31 | left: 50%; 32 | margin-left: -250px; 33 | font-size: 12pt; 34 | box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3); 35 | } 36 | 37 | .popuptext { 38 | font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; 39 | } 40 | 41 | /* Popup arrow */ 42 | .popup .popuptext::after { 43 | content: ""; 44 | position: absolute; 45 | top: 100%; 46 | left: 50%; 47 | margin-left: -5px; 48 | border-width: 5px; 49 | border-style: solid; 50 | border-color: #555 transparent transparent transparent; 51 | } 52 | 53 | /* Toggle this class - hide and show the popup */ 54 | .popup .show { 55 | visibility: visible; 56 | -webkit-animation: fadeIn 1s; 57 | animation: fadeIn 1s; 58 | } 59 | 60 | /* Add animation (fade in the popup) */ 61 | @-webkit-keyframes fadeIn { 62 | from {opacity: 0;} 63 | to {opacity: 1;} 64 | } 65 | 66 | @keyframes fadeIn { 67 | from {opacity: 0;} 68 | to {opacity:1 ;} 69 | } 70 | 71 | .popupCircle { 72 | display: inline-block; 73 | width: 0.25em; 74 | height: 0.25em; 75 | margin-right: 0.25em; 76 | float: left; 77 | } 78 | 79 | .popupCircle:last-child { 80 | margin-right: 0; 81 | } 82 | -------------------------------------------------------------------------------- /docs/docs-assets/Progress.css: -------------------------------------------------------------------------------- 1 | nav[role="progress"] { 2 | position: -webkit-sticky; /* Safari */ 3 | position: sticky; 4 | bottom: 0; 5 | background: #fff; 6 | margin-top: 4px; 7 | padding-top: 4px; 8 | } 9 | 10 | nav[role="progress"] div.progresscontainer { 11 | border:1px solid #dedede; 12 | margin-top: 7px; 13 | margin-bottom: 0px; 14 | } 15 | 16 | nav[role="progress"] ul { 17 | font-weight: 400; 18 | list-style: none 19 | font-size: 11px; 20 | margin-top: 12px; 21 | margin-bottom: 12px; 22 | padding-left: 7px; 23 | } 24 | 25 | nav[role="progress"] ul li { 26 | display: inline; 27 | padding: 7px; 28 | margin: 2px; 29 | background: #E0E0FF; 30 | text-transform: uppercase; 31 | letter-spacing: 1px; 32 | } 33 | 34 | nav[role="progress"] ul li.progresschapter { 35 | background: #E0FFE0; 36 | margin-left: 7px; 37 | margin-right: 7px; 38 | } 39 | 40 | nav[role="progress"] ul li.progresscurrentchapter { 41 | background: #B0CFB0; 42 | margin-left: 7px; 43 | margin-right: 2px; 44 | } 45 | 46 | nav[role="progress"] ul li.progresscurrent { 47 | background: #B0B0CF; 48 | } 49 | 50 | nav[role="progress"] ul li.progressprev { 51 | background: #FFE0E0; 52 | margin-left: 10px; 53 | margin-right: 10px; 54 | } 55 | 56 | nav[role="progress"] ul li.progressprevoff { 57 | background: #DFB0B0; 58 | margin-left: 10px; 59 | margin-right: 10px; 60 | } 61 | 62 | nav[role="progress"] ul li.progressnext { 63 | background: #FFE0E0; 64 | margin-left: 10px; 65 | margin-right: 10px; 66 | } 67 | 68 | nav[role="progress"] ul li.progressnextoff { 69 | background: #DFB0B0; 70 | margin-left: 10px; 71 | margin-right: 10px; 72 | } 73 | 74 | nav[role="progress"] ul li.active a { 75 | font-weight: 700 76 | } 77 | 78 | nav[role="progress"] ul li a:link { 79 | color: #333; 80 | text-decoration: none; 81 | } 82 | 83 | nav[role="progress"] ul li span.selectedlink { 84 | color: #f25; 85 | } 86 | 87 | nav[role="progress"] ul li span.unlink { 88 | color: #f25; 89 | text-decoration: none; 90 | text-transform: uppercase; 91 | letter-spacing: 1px; 92 | font-size: 12px; 93 | display: inline; 94 | } 95 | 96 | nav[role="progress"] ul li a:visited { 97 | color: #333 98 | } 99 | 100 | nav[role="progress"] ul li a:active { 101 | font-weight: 700 102 | } 103 | 104 | nav[role="progress"] ul li a:hover { 105 | color: #dd2c0d 106 | } 107 | 108 | @media print { 109 | nav[role="progress"] { 110 | display: none; 111 | } 112 | } -------------------------------------------------------------------------------- /docs/docs-assets/crumbs.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/docs/docs-assets/crumbs.gif -------------------------------------------------------------------------------- /docs/docs-assets/download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/docs/docs-assets/download.png -------------------------------------------------------------------------------- /docs/docs-assets/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/docs/docs-assets/github.png -------------------------------------------------------------------------------- /docs/goldbach/Letter.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/docs/goldbach/Letter.jpg -------------------------------------------------------------------------------- /docs/goldbach/goldbach.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/docs/goldbach/goldbach.pdf -------------------------------------------------------------------------------- /docs/inweb/SP014.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/docs/inweb/SP014.mp3 -------------------------------------------------------------------------------- /docs/inweb/brighton.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/docs/inweb/brighton.jpg -------------------------------------------------------------------------------- /docs/inweb/mars.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/docs/inweb/mars.jpg -------------------------------------------------------------------------------- /docs/inweb/pula.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/docs/inweb/pula.jpg -------------------------------------------------------------------------------- /docs/inweb/rah.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/docs/inweb/rah.jpg -------------------------------------------------------------------------------- /docs/inweb/venice.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/docs/inweb/venice.jpg -------------------------------------------------------------------------------- /foundation-module/Chapter 4/Wide Strings.w: -------------------------------------------------------------------------------- 1 | [Wide::] Wide Strings. 2 | 3 | A minimal library for handling wide C strings. 4 | 5 | @ By "wide string", we mean an array of |inchar32_t|. A pointer to this type 6 | is what is returned by a U-literal in ANSI C, such as |U"look, I'm wide"|. 7 | A wide string is essentially a C string but with characters stored in full 8 | words instead of bytes. The character values should be Unicode code points. 9 | 10 | = 11 | int Wide::len(const inchar32_t *p) { 12 | int l = 0; 13 | while (p[l] != 0) l++; 14 | return l; 15 | } 16 | 17 | @ On the rare occasions when we need to sort alphabetically we'll also call: 18 | 19 | = 20 | int Wide::cmp(inchar32_t *A, inchar32_t *B) { 21 | int i = 0; 22 | while (1) 23 | { 24 | inchar32_t a = A[i]; 25 | inchar32_t b = B[i]; 26 | if (a == b) 27 | { 28 | if (a == 0) return 0; 29 | } 30 | else 31 | { 32 | return (a > b) ? 1 : -1; 33 | } 34 | i++; 35 | } 36 | return 0; 37 | } 38 | 39 | @ = 40 | int Wide::atoi(inchar32_t *p) { 41 | int val = 0, sign = 1; 42 | while (Characters::is_whitespace(*p)) p++; 43 | if (*p == '-') 44 | { 45 | sign = -1; 46 | p++; 47 | } 48 | while (Characters::isdigit(*p)) 49 | { 50 | val = (val * 10) + (int) (*p - '0'); 51 | p++; 52 | } 53 | return val * sign; 54 | } 55 | 56 | @ = 57 | void Wide::copy(inchar32_t *to, inchar32_t *from) { 58 | int i = 0; 59 | while (1) 60 | { 61 | to[i] = from[i]; 62 | if (to[i] == 0) return; 63 | i++; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /foundation-module/Chapter 7/Licence Data.w: -------------------------------------------------------------------------------- 1 | [LicenceData::] Licence Data. 2 | 3 | Storing names and standard SPDX identifiers for common open source licences. 4 | 5 | @ This is little more than a dictionary of IDs to records about the standard 6 | set of open source licences maintained by SPDX. 7 | 8 | = 9 | typedef struct open_source_licence { 10 | struct text_stream *SPDX_id; 11 | struct text_stream *name; 12 | int deprecated; 13 | CLASS_DEFINITION 14 | } open_source_licence; 15 | 16 | dictionary *SPDX_licence_identifiers = NULL; 17 | 18 | void LicenceData::new_licence(text_stream *id, text_stream *name, int deprecated) { 19 | open_source_licence *L = CREATE(open_source_licence); 20 | L->SPDX_id = Str::duplicate(id); 21 | L->name = Str::duplicate(name); 22 | L->deprecated = deprecated; 23 | if (SPDX_licence_identifiers == NULL) 24 | SPDX_licence_identifiers = Dictionaries::new(256, FALSE); 25 | Dictionaries::create(SPDX_licence_identifiers, L->SPDX_id); 26 | Dictionaries::write_value(SPDX_licence_identifiers, L->SPDX_id, L); 27 | } 28 | 29 | open_source_licence *LicenceData::from_SPDX_id(text_stream *id) { 30 | if (SPDX_licence_identifiers == NULL) return NULL; 31 | if (Dictionaries::find(SPDX_licence_identifiers, id) == NULL) return NULL; 32 | return Dictionaries::read_value(SPDX_licence_identifiers, id); 33 | } 34 | -------------------------------------------------------------------------------- /foundation-module/Contents.w: -------------------------------------------------------------------------------- 1 | Title: foundation 2 | Author: Graham Nelson 3 | Purpose: A library of utility functions for command-line tools. 4 | Language: InC 5 | Licence: Artistic License 2.0 6 | 7 | Preliminaries 8 | A Brief Guide to Foundation 9 | 10 | Chapter 1: Setting Up 11 | "Absolute basics." 12 | Foundation Module 13 | POSIX Platforms ^"ifdef-PLATFORM_POSIX" 14 | Windows Platform ^"ifdef-PLATFORM_WINDOWS" 15 | 16 | Chapter 2: Memory, Streams and Collections 17 | "Creating objects in memory, and forming lists, hashes, and text streams." 18 | Debugging Log 19 | Memory 20 | Foundation Classes 21 | Locales 22 | Streams 23 | Writers and Loggers 24 | Methods 25 | Linked Lists and Stacks 26 | Dictionaries 27 | Trees 28 | 29 | Chapter 3: The Operating System 30 | "Dealing with the host operating system." 31 | Error Messages 32 | Command Line Arguments 33 | Pathnames 34 | Filenames 35 | Case-Insensitive Filenames 36 | Shell 37 | Directories 38 | Time 39 | 40 | Chapter 4: Text Handling 41 | "Reading, writing and parsing text." 42 | Characters 43 | C Strings 44 | Wide Strings 45 | String Manipulation 46 | Tab Stops 47 | Text Files 48 | Preprocessor 49 | Tries and Avinues 50 | Pattern Matching 51 | JSON 52 | 53 | Chapter 5: Generating Websites 54 | "For making individual web pages, or gathering them into mini-sites or ebooks." 55 | HTML 56 | HTML Entities 57 | Markdown 58 | Markdown Phase I 59 | Markdown Phase II 60 | Markdown Rendering 61 | Markdown Variations 62 | Inform-Flavoured Markdown 63 | Epub Ebooks 64 | 65 | Chapter 6: Media 66 | "Examining image and sound files." 67 | Binary Files 68 | Image Dimensions 69 | Sound Durations 70 | 71 | Chapter 7: Semantic Versioning 72 | "For reading, storing and comparing standard semantic version numbers." 73 | Version Numbers 74 | Version Number Ranges 75 | Licence Data 76 | SPDX Licences 77 | 78 | Chapter 8: Literate Programming 79 | Web Structure 80 | Bibliographic Data for Webs 81 | Web Modules 82 | Build Files 83 | Simple Tangler 84 | 85 | Chapter 9: Syntax Colouring 86 | Programming Languages 87 | Reserved Words 88 | The Painter 89 | -------------------------------------------------------------------------------- /foundation-test/.gitignore: -------------------------------------------------------------------------------- 1 | # This gitignore was automatically written by inweb -gitignore 2 | # and is not intended for human editing 3 | 4 | debug-log.txt 5 | Woven/ 6 | Tangled/ 7 | !Tangled/*.preform 8 | Tests/intest-history.txt 9 | Tests/Transient/ 10 | Tests/hashes.intest 11 | Tests/_Results_Actual/ 12 | 13 | -------------------------------------------------------------------------------- /foundation-test/Contents.w: -------------------------------------------------------------------------------- 1 | Title: foundation-test 2 | Author: Graham Nelson 3 | Purpose: Unit tests for the foundation module. 4 | Language: InC 5 | Licence: Artistic License 2.0 6 | 7 | Import: foundation 8 | 9 | Sections 10 | Program Control 11 | Unit Tests 12 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/_Results_Actual/.gitkeep: -------------------------------------------------------------------------------- 1 | # Ensure this folder is created -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/gh-md-disallowed-raw-html--I.txt: -------------------------------------------------------------------------------- 1 | ! GitHub 279 2 | <style> <em> 3 | 4 | <blockquote> 5 | <xmp> is disallowed. <XMP> is also disallowed. 6 | </blockquote> 7 | ! Solution 8 | <p><strong> <title> <style> <em></p> 9 | <blockquote> 10 | <xmp> is disallowed. <XMP> is also disallowed. 11 | </blockquote> 12 | ! End 13 | 14 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/gh-md-disallowed-raw-html.txt: -------------------------------------------------------------------------------- 1 | ! GitHub 279 2 | <strong> <title> <style> <em> 3 | 4 | <blockquote> 5 | <xmp> is disallowed. <XMP> is also disallowed. 6 | </blockquote> 7 | ! End 8 | 9 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/gh-md-extended-autolinks.txt: -------------------------------------------------------------------------------- 1 | ! GitHub 622 2 | www.commonmark.org 3 | ! End 4 | 5 | ! GitHub 623 6 | Visit www.commonmark.org/help for more information. 7 | ! End 8 | 9 | ! GitHub 624 10 | Visit www.commonmark.org. 11 | 12 | Visit www.commonmark.org/a.b. 13 | ! End 14 | 15 | ! GitHub 625 16 | www.google.com/search?q=Markup+(business) 17 | 18 | www.google.com/search?q=Markup+(business))) 19 | 20 | (www.google.com/search?q=Markup+(business)) 21 | 22 | (www.google.com/search?q=Markup+(business) 23 | ! End 24 | 25 | ! GitHub 626 26 | www.google.com/search?q=(business))+ok 27 | ! End 28 | 29 | ! GitHub 627 30 | www.google.com/search?q=commonmark&hl=en 31 | 32 | www.google.com/search?q=commonmark&hl; 33 | ! End 34 | 35 | ! GitHub 628 36 | www.commonmark.org/he<lp 37 | ! End 38 | 39 | ! GitHub 629 40 | http://commonmark.org 41 | 42 | (Visit https://encrypted.google.com/search?q=Markup+(business)) 43 | ! End 44 | 45 | ! GitHub 630 46 | foo@bar.baz 47 | ! End 48 | 49 | ! GitHub 631 50 | hello@mail+xyz.example isn't valid, but hello+xyz@mail.example is. 51 | ! End 52 | 53 | ! GitHub 632 54 | a.b-c_d@a.b 55 | 56 | a.b-c_d@a.b. 57 | 58 | a.b-c_d@a.b- 59 | 60 | a.b-c_d@a.b_ 61 | ! End 62 | 63 | ! GitHub 633 64 | mailto:foo@bar.baz 65 | 66 | mailto:a.b-c_d@a.b 67 | 68 | mailto:a.b-c_d@a.b. 69 | 70 | mailto:a.b-c_d@a.b/ 71 | 72 | mailto:a.b-c_d@a.b- 73 | 74 | mailto:a.b-c_d@a.b_ 75 | 76 | xmpp:foo@bar.baz 77 | 78 | xmpp:foo@bar.baz. 79 | ! End 80 | 81 | ! GitHub 634 82 | xmpp:foo@bar.baz/txt 83 | 84 | xmpp:foo@bar.baz/txt@bin 85 | 86 | xmpp:foo@bar.baz/txt@bin.com 87 | ! End 88 | 89 | ! GitHub 635 90 | xmpp:foo@bar.baz/txt/bin 91 | ! End 92 | 93 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/gh-md-strikethrough--I.txt: -------------------------------------------------------------------------------- 1 | ! GitHub 491 2 | ~~Hi~~ Hello, ~there~ world! 3 | ! Solution 4 | <p><del>Hi</del> Hello, <del>there</del> world!</p> 5 | ! End 6 | 7 | ! GitHub 492 8 | This ~~has a 9 | 10 | new paragraph~~. 11 | ! Solution 12 | <p>This ~~has a</p> 13 | <p>new paragraph~~.</p> 14 | ! End 15 | 16 | ! GitHub 493 17 | This will ~~~not~~~ strike. 18 | ! Solution 19 | <p>This will ~~~not~~~ strike.</p> 20 | ! End 21 | 22 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/gh-md-strikethrough.txt: -------------------------------------------------------------------------------- 1 | ! GitHub 491 2 | ~~Hi~~ Hello, ~there~ world! 3 | ! End 4 | 5 | ! GitHub 492 6 | This ~~has a 7 | 8 | new paragraph~~. 9 | ! End 10 | 11 | ! GitHub 493 12 | This will ~~~not~~~ strike. 13 | ! End 14 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/gh-md-tables--I.txt: -------------------------------------------------------------------------------- 1 | ! GitHub 198 2 | | foo | bar | 3 | | --- | --- | 4 | | baz | bim | 5 | ! Solution 6 | <table> 7 | <thead> 8 | <tr> 9 | <th>foo</th> 10 | <th>bar</th> 11 | </tr> 12 | </thead> 13 | <tbody> 14 | <tr> 15 | <td>baz</td> 16 | <td>bim</td> 17 | </tr> 18 | </tbody> 19 | </table> 20 | ! End 21 | 22 | ! GitHub 199 23 | | abc | defghi | 24 | :-: | -----------: 25 | bar | baz 26 | ! Solution 27 | <table> 28 | <thead> 29 | <tr> 30 | <th align="center">abc</th> 31 | <th align="right">defghi</th> 32 | </tr> 33 | </thead> 34 | <tbody> 35 | <tr> 36 | <td align="center">bar</td> 37 | <td align="right">baz</td> 38 | </tr> 39 | </tbody> 40 | </table> 41 | ! End 42 | 43 | ! GitHub 200 44 | | f\|oo | 45 | | ------ | 46 | | b `\|` az | 47 | | b **\|** im | 48 | ! Solution 49 | <table> 50 | <thead> 51 | <tr> 52 | <th>f|oo</th> 53 | </tr> 54 | </thead> 55 | <tbody> 56 | <tr> 57 | <td>b <code>|</code> az</td> 58 | </tr> 59 | <tr> 60 | <td>b <strong>|</strong> im</td> 61 | </tr> 62 | </tbody> 63 | </table> 64 | ! End 65 | 66 | ! GitHub 201 67 | | abc | def | 68 | | --- | --- | 69 | | bar | baz | 70 | > bar 71 | ! Solution 72 | <table> 73 | <thead> 74 | <tr> 75 | <th>abc</th> 76 | <th>def</th> 77 | </tr> 78 | </thead> 79 | <tbody> 80 | <tr> 81 | <td>bar</td> 82 | <td>baz</td> 83 | </tr> 84 | </tbody> 85 | </table> 86 | <blockquote> 87 | <p>bar</p> 88 | </blockquote> 89 | ! End 90 | 91 | ! GitHub 202 92 | | abc | def | 93 | | --- | --- | 94 | | bar | baz | 95 | bar 96 | 97 | bar 98 | ! Solution 99 | <table> 100 | <thead> 101 | <tr> 102 | <th>abc</th> 103 | <th>def</th> 104 | </tr> 105 | </thead> 106 | <tbody> 107 | <tr> 108 | <td>bar</td> 109 | <td>baz</td> 110 | </tr> 111 | <tr> 112 | <td>bar</td> 113 | <td></td> 114 | </tr> 115 | </tbody> 116 | </table> 117 | <p>bar</p> 118 | ! End 119 | 120 | ! GitHub 203 121 | | abc | def | 122 | | --- | 123 | | bar | 124 | ! Solution 125 | <p>| abc | def | 126 | | --- | 127 | | bar |</p> 128 | ! End 129 | 130 | ! GitHub 204 131 | | abc | def | 132 | | --- | --- | 133 | | bar | 134 | | bar | baz | boo | 135 | ! Solution 136 | <table> 137 | <thead> 138 | <tr> 139 | <th>abc</th> 140 | <th>def</th> 141 | </tr> 142 | </thead> 143 | <tbody> 144 | <tr> 145 | <td>bar</td> 146 | <td></td> 147 | </tr> 148 | <tr> 149 | <td>bar</td> 150 | <td>baz</td> 151 | </tr> 152 | </tbody> 153 | </table> 154 | ! End 155 | 156 | ! GitHub 205 157 | | abc | def | 158 | | --- | --- | 159 | ! Solution 160 | <table> 161 | <thead> 162 | <tr> 163 | <th>abc</th> 164 | <th>def</th> 165 | </tr> 166 | </thead> 167 | </table> 168 | ! End 169 | 170 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/gh-md-tables.txt: -------------------------------------------------------------------------------- 1 | ! GitHub 198 2 | | foo | bar | 3 | | --- | --- | 4 | | baz | bim | 5 | ! End 6 | 7 | ! GitHub 199 8 | | abc | defghi | 9 | :-: | -----------: 10 | bar | baz 11 | ! End 12 | 13 | ! GitHub 200 14 | | f\|oo | 15 | | ------ | 16 | | b `\|` az | 17 | | b **\|** im | 18 | ! End 19 | 20 | ! GitHub 201 21 | | abc | def | 22 | | --- | --- | 23 | | bar | baz | 24 | > bar 25 | ! End 26 | 27 | ! GitHub 202 28 | | abc | def | 29 | | --- | --- | 30 | | bar | baz | 31 | bar 32 | 33 | bar 34 | ! End 35 | 36 | ! GitHub 203 37 | | abc | def | 38 | | --- | 39 | | bar | 40 | ! End 41 | 42 | ! GitHub 204 43 | | abc | def | 44 | | --- | --- | 45 | | bar | 46 | | bar | baz | boo | 47 | ! End 48 | 49 | ! GitHub 205 50 | | abc | def | 51 | | --- | --- | 52 | ! End 53 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/gh-md-task-list-items--I.txt: -------------------------------------------------------------------------------- 1 | ! GitHub 279 2 | - [ ] foo 3 | - [x] bar 4 | ! Solution 5 | <ul> 6 | <li><input disabled="" type="checkbox"> foo</li> 7 | <li><input checked="" disabled="" type="checkbox"> bar</li> 8 | </ul> 9 | ! End 10 | 11 | ! GitHub 280 12 | - [x] foo 13 | - [ ] bar 14 | - [x] baz 15 | - [ ] bim 16 | ! Solution 17 | <ul> 18 | <li><input checked="" disabled="" type="checkbox"> foo 19 | <ul> 20 | <li><input disabled="" type="checkbox"> bar</li> 21 | <li><input checked="" disabled="" type="checkbox"> baz</li> 22 | </ul> 23 | </li> 24 | <li><input disabled="" type="checkbox"> bim</li> 25 | </ul> 26 | ! End 27 | 28 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/gh-md-task-list-items.txt: -------------------------------------------------------------------------------- 1 | ! GitHub 279 2 | - [ ] foo 3 | - [x] bar 4 | ! End 5 | 6 | ! GitHub 280 7 | - [x] foo 8 | - [ ] bar 9 | - [x] baz 10 | - [ ] bim 11 | ! End 12 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/inf-md-gatedparagraphs--I.txt: -------------------------------------------------------------------------------- 1 | ! Inform 1 2 | {xyzzy:}Only if XYZZY. 3 | 4 | {^xyzzy:}Only if not XYZZY. 5 | 6 | {^xyzzy,plugh:}Only if not XYZZY but PLUGH. 7 | 8 | {^xyzzy,^plugh:}Only if neither XYZZY nor PLUGH. 9 | 10 | {^xyzzy:}{^plugh:}Only if neither XYZZY nor PLUGH. 11 | ! Solution 12 | <p>Only if not XYZZY.</p> 13 | <p>Only if neither XYZZY nor PLUGH.</p> 14 | <p>Only if neither XYZZY nor PLUGH.</p> 15 | ! End 16 | 17 | ! Inform-PLUGH 2 18 | {xyzzy:}Only if XYZZY. 19 | 20 | {^xyzzy:}Only if not XYZZY. 21 | 22 | {^xyzzy,plugh:}Only if not XYZZY but PLUGH. 23 | 24 | {^xyzzy,^plugh:}Only if neither XYZZY nor PLUGH. 25 | 26 | {^xyzzy:}{^plugh:}Only if neither XYZZY nor PLUGH. 27 | ! Solution 28 | <p>Only if not XYZZY.</p> 29 | <p>Only if not XYZZY but PLUGH.</p> 30 | ! End 31 | 32 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/inf-md-gatedparagraphs.txt: -------------------------------------------------------------------------------- 1 | ! Inform 1 2 | {xyzzy:}Only if XYZZY. 3 | 4 | {^xyzzy:}Only if not XYZZY. 5 | 6 | {^xyzzy,plugh:}Only if not XYZZY but PLUGH. 7 | 8 | {^xyzzy,^plugh:}Only if neither XYZZY nor PLUGH. 9 | 10 | {^xyzzy:}{^plugh:}Only if neither XYZZY nor PLUGH. 11 | ! End 12 | 13 | ! Inform-PLUGH 2 14 | {xyzzy:}Only if XYZZY. 15 | 16 | {^xyzzy:}Only if not XYZZY. 17 | 18 | {^xyzzy,plugh:}Only if not XYZZY but PLUGH. 19 | 20 | {^xyzzy,^plugh:}Only if neither XYZZY nor PLUGH. 21 | 22 | {^xyzzy:}{^plugh:}Only if neither XYZZY nor PLUGH. 23 | ! End 24 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/inf-md-indexmarkers--I.txt: -------------------------------------------------------------------------------- 1 | ! Inform 1 2 | This is ^{indexed}, and all. And ^{so is `\}` this}. But not \^{this}.^^{Dramatically!} 3 | Index marks can ^{run}^{together}. 4 | 5 | So says ^{Emily Short}. 6 | 7 | An index mark can occur [inside ^{a link}^^{even invisibly}!^{...}](somewhere.html). 8 | ! Solution 9 | <p>This is indexed, and all. And so is `}` this. But not ^{this}. 10 | Index marks can runtogether.</p> 11 | <p>So says Emily Short.</p> 12 | <p>An index mark can occur <a href="somewhere.html">inside a link!...</a>.</p> 13 | ! End 14 | 15 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/inf-md-indexmarkers.txt: -------------------------------------------------------------------------------- 1 | ! Inform 1 2 | This is ^{indexed}, and all. And ^{so is `\}` this}. But not \^{this}.^^{Dramatically!} 3 | Index marks can ^{run}^{together}. 4 | 5 | So says ^{Emily Short}. 6 | 7 | An index mark can occur [inside ^{a link}^^{even invisibly}!^{...}](somewhere.html). 8 | ! End 9 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-atxheadings--I.txt: -------------------------------------------------------------------------------- 1 | ! Example 62 2 | # foo 3 | ## foo 4 | ### foo 5 | #### foo 6 | ##### foo 7 | ###### foo 8 | ! Solution 9 | <h1>foo</h1> 10 | <h2>foo</h2> 11 | <h3>foo</h3> 12 | <h4>foo</h4> 13 | <h5>foo</h5> 14 | <h6>foo</h6> 15 | ! End 16 | 17 | ! Example 63 18 | ####### foo 19 | ! Solution 20 | <p>####### foo</p> 21 | ! End 22 | 23 | ! Example 64 24 | #5 bolt 25 | 26 | #hashtag 27 | ! Solution 28 | <p>#5 bolt</p> 29 | <p>#hashtag</p> 30 | ! End 31 | 32 | ! Example 65 33 | \## foo 34 | ! Solution 35 | <p>## foo</p> 36 | ! End 37 | 38 | ! Example 66 39 | # foo *bar* \*baz\* 40 | ! Solution 41 | <h1>foo <em>bar</em> *baz*</h1> 42 | ! End 43 | 44 | ! Example 67 45 | # foo 46 | ! Solution 47 | <h1>foo</h1> 48 | ! End 49 | 50 | ! Example 68 51 | ### foo 52 | ## foo 53 | # foo 54 | ! Solution 55 | <h3>foo</h3> 56 | <h2>foo</h2> 57 | <h1>foo</h1> 58 | ! End 59 | 60 | ! Example 69 61 | # foo 62 | ! Solution 63 | <pre><code># foo 64 | </code></pre> 65 | ! End 66 | 67 | ! Example 70 68 | foo 69 | # bar 70 | ! Solution 71 | <p>foo 72 | # bar</p> 73 | ! End 74 | 75 | ! Example 71 76 | ## foo ## 77 | ### bar ### 78 | ! Solution 79 | <h2>foo</h2> 80 | <h3>bar</h3> 81 | ! End 82 | 83 | ! Example 72 84 | # foo ################################## 85 | ##### foo ## 86 | ! Solution 87 | <h1>foo</h1> 88 | <h5>foo</h5> 89 | ! End 90 | 91 | ! Example 73 92 | ### foo ### 93 | ! Solution 94 | <h3>foo</h3> 95 | ! End 96 | 97 | ! Example 74 98 | ### foo ### b 99 | ! Solution 100 | <h3>foo ### b</h3> 101 | ! End 102 | 103 | ! Example 75 104 | # foo# 105 | ! Solution 106 | <h1>foo#</h1> 107 | ! End 108 | 109 | ! Example 76 110 | ### foo \### 111 | ## foo #\## 112 | # foo \# 113 | ! Solution 114 | <h3>foo ###</h3> 115 | <h2>foo ###</h2> 116 | <h1>foo #</h1> 117 | ! End 118 | 119 | ! Example 77 120 | **** 121 | ## foo 122 | **** 123 | ! Solution 124 | <hr /> 125 | <h2>foo</h2> 126 | <hr /> 127 | ! End 128 | 129 | ! Example 78 130 | Foo bar 131 | # baz 132 | Bar foo 133 | ! Solution 134 | <p>Foo bar</p> 135 | <h1>baz</h1> 136 | <p>Bar foo</p> 137 | ! End 138 | 139 | ! Example 79 140 | ## 141 | # 142 | ### ### 143 | ! Solution 144 | <h2></h2> 145 | <h1></h1> 146 | <h3></h3> 147 | ! End 148 | 149 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-atxheadings.txt: -------------------------------------------------------------------------------- 1 | ! Example 62 2 | # foo 3 | ## foo 4 | ### foo 5 | #### foo 6 | ##### foo 7 | ###### foo 8 | ! End 9 | 10 | ! Example 63 11 | ####### foo 12 | ! End 13 | 14 | ! Example 64 15 | #5 bolt 16 | 17 | #hashtag 18 | ! End 19 | 20 | ! Example 65 21 | \## foo 22 | ! End 23 | 24 | ! Example 66 25 | # foo *bar* \*baz\* 26 | ! End 27 | 28 | ! Example 67 29 | # foo 30 | ! End 31 | 32 | ! Example 68 33 | ### foo 34 | ## foo 35 | # foo 36 | ! End 37 | 38 | ! Example 69 39 | # foo 40 | ! End 41 | 42 | ! Example 70 43 | foo 44 | # bar 45 | ! End 46 | 47 | ! Example 71 48 | ## foo ## 49 | ### bar ### 50 | ! End 51 | 52 | ! Example 72 53 | # foo ################################## 54 | ##### foo ## 55 | ! End 56 | 57 | ! Example 73 58 | ### foo ### 59 | ! End 60 | 61 | ! Example 74 62 | ### foo ### b 63 | ! End 64 | 65 | ! Example 75 66 | # foo# 67 | ! End 68 | 69 | ! Example 76 70 | ### foo \### 71 | ## foo #\## 72 | # foo \# 73 | ! End 74 | 75 | ! Example 77 76 | **** 77 | ## foo 78 | **** 79 | ! End 80 | 81 | ! Example 78 82 | Foo bar 83 | # baz 84 | Bar foo 85 | ! End 86 | 87 | ! Example 79 88 | ## 89 | # 90 | ### ### 91 | ! End 92 | 93 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-autolinks--I.txt: -------------------------------------------------------------------------------- 1 | ! Example 593 2 | <http://foo.bar.baz> 3 | ! Solution 4 | <p><a href="http://foo.bar.baz">http://foo.bar.baz</a></p> 5 | ! End 6 | 7 | ! Example 594 8 | <http://foo.bar.baz/test?q=hello&id=22&boolean> 9 | ! Solution 10 | <p><a href="http://foo.bar.baz/test?q=hello&id=22&boolean">http://foo.bar.baz/test?q=hello&id=22&boolean</a></p> 11 | ! End 12 | 13 | ! Example 595 14 | <irc://foo.bar:2233/baz> 15 | ! Solution 16 | <p><a href="irc://foo.bar:2233/baz">irc://foo.bar:2233/baz</a></p> 17 | ! End 18 | 19 | ! Example 596 20 | <MAILTO:FOO@BAR.BAZ> 21 | ! Solution 22 | <p><a href="MAILTO:FOO@BAR.BAZ">MAILTO:FOO@BAR.BAZ</a></p> 23 | ! End 24 | 25 | ! Example 597 26 | <a+b+c:d> 27 | ! Solution 28 | <p><a href="a+b+c:d">a+b+c:d</a></p> 29 | ! End 30 | 31 | ! Example 598 32 | <made-up-scheme://foo,bar> 33 | ! Solution 34 | <p><a href="made-up-scheme://foo,bar">made-up-scheme://foo,bar</a></p> 35 | ! End 36 | 37 | ! Example 599 38 | <http://../> 39 | ! Solution 40 | <p><a href="http://../">http://../</a></p> 41 | ! End 42 | 43 | ! Example 600 44 | <localhost:5001/foo> 45 | ! Solution 46 | <p><a href="localhost:5001/foo">localhost:5001/foo</a></p> 47 | ! End 48 | 49 | ! Example 601 50 | <http://foo.bar/baz bim> 51 | ! Solution 52 | <p><http://foo.bar/baz bim></p> 53 | ! End 54 | 55 | ! Example 602 56 | <http://example.com/\[\> 57 | ! Solution 58 | <p><a href="http://example.com/%5C%5B%5C">http://example.com/\[\</a></p> 59 | ! End 60 | 61 | ! Example 603 62 | <foo@bar.example.com> 63 | ! Solution 64 | <p><a href="mailto:foo@bar.example.com">foo@bar.example.com</a></p> 65 | ! End 66 | 67 | ! Example 604 68 | <foo+special@Bar.baz-bar0.com> 69 | ! Solution 70 | <p><a href="mailto:foo+special@Bar.baz-bar0.com">foo+special@Bar.baz-bar0.com</a></p> 71 | ! End 72 | 73 | ! Example 605 74 | <foo\+@bar.example.com> 75 | ! Solution 76 | <p><foo+@bar.example.com></p> 77 | ! End 78 | 79 | ! Example 606 80 | <> 81 | ! Solution 82 | <p><></p> 83 | ! End 84 | 85 | ! Example 607 86 | < http://foo.bar > 87 | ! Solution 88 | <p>< http://foo.bar ></p> 89 | ! End 90 | 91 | ! Example 608 92 | <m:abc> 93 | ! Solution 94 | <p><m:abc></p> 95 | ! End 96 | 97 | ! Example 609 98 | <foo.bar.baz> 99 | ! Solution 100 | <p><foo.bar.baz></p> 101 | ! End 102 | 103 | ! Example 610 104 | http://example.com 105 | ! Solution 106 | <p>http://example.com</p> 107 | ! End 108 | 109 | ! Example 611 110 | foo@bar.example.com 111 | ! Solution 112 | <p>foo@bar.example.com</p> 113 | ! End 114 | 115 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-autolinks.txt: -------------------------------------------------------------------------------- 1 | ! Example 593 2 | <http://foo.bar.baz> 3 | ! End 4 | 5 | ! Example 594 6 | <http://foo.bar.baz/test?q=hello&id=22&boolean> 7 | ! End 8 | 9 | ! Example 595 10 | <irc://foo.bar:2233/baz> 11 | ! End 12 | 13 | ! Example 596 14 | <MAILTO:FOO@BAR.BAZ> 15 | ! End 16 | 17 | ! Example 597 18 | <a+b+c:d> 19 | ! End 20 | 21 | ! Example 598 22 | <made-up-scheme://foo,bar> 23 | ! End 24 | 25 | ! Example 599 26 | <http://../> 27 | ! End 28 | 29 | ! Example 600 30 | <localhost:5001/foo> 31 | ! End 32 | 33 | ! Example 601 34 | <http://foo.bar/baz bim> 35 | ! End 36 | 37 | ! Example 602 38 | <http://example.com/\[\> 39 | ! End 40 | 41 | ! Example 603 42 | <foo@bar.example.com> 43 | ! End 44 | 45 | ! Example 604 46 | <foo+special@Bar.baz-bar0.com> 47 | ! End 48 | 49 | ! Example 605 50 | <foo\+@bar.example.com> 51 | ! End 52 | 53 | ! Example 606 54 | <> 55 | ! End 56 | 57 | ! Example 607 58 | < http://foo.bar > 59 | ! End 60 | 61 | ! Example 608 62 | <m:abc> 63 | ! End 64 | 65 | ! Example 609 66 | <foo.bar.baz> 67 | ! End 68 | 69 | ! Example 610 70 | http://example.com 71 | ! End 72 | 73 | ! Example 611 74 | foo@bar.example.com 75 | ! End 76 | 77 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-backslashescapes--I.txt: -------------------------------------------------------------------------------- 1 | ! Example 12 2 | \!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}\~ 3 | ! Solution 4 | <p>!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~</p> 5 | ! End 6 | 7 | ! Example 13 8 | \ \A\a\ \3\φ\« 9 | ! Solution 10 | <p>\ \A\a\ \3\φ\«</p> 11 | ! End 12 | 13 | ! Example 14 14 | \*not emphasized* 15 | \<br/> not a tag 16 | \[not a link](/foo) 17 | \`not code` 18 | 1\. not a list 19 | \* not a list 20 | \# not a heading 21 | \[foo]: /url "not a reference" 22 | \ö not a character entity 23 | ! Solution 24 | <p>*not emphasized* 25 | <br/> not a tag 26 | [not a link](/foo) 27 | `not code` 28 | 1. not a list 29 | * not a list 30 | # not a heading 31 | [foo]: /url "not a reference" 32 | &ouml; not a character entity</p> 33 | ! End 34 | 35 | ! Example 15 36 | \\*emphasis* 37 | ! Solution 38 | <p>\<em>emphasis</em></p> 39 | ! End 40 | 41 | ! Example 16 42 | foo\ 43 | bar 44 | ! Solution 45 | <p>foo<br /> 46 | bar</p> 47 | ! End 48 | 49 | ! Example 17 50 | `` \[\` `` 51 | ! Solution 52 | <p><code>\[\`</code></p> 53 | ! End 54 | 55 | ! Example 18 56 | \[\] 57 | ! Solution 58 | <pre><code>\[\] 59 | </code></pre> 60 | ! End 61 | 62 | ! Example 19 63 | ~~~ 64 | \[\] 65 | ~~~ 66 | ! Solution 67 | <pre><code>\[\] 68 | </code></pre> 69 | ! End 70 | 71 | ! Example 20 72 | <http://example.com?find=\*> 73 | ! Solution 74 | <p><a href="http://example.com?find=%5C*">http://example.com?find=\*</a></p> 75 | ! End 76 | 77 | ! Example 21 78 | <a href="/bar\/)"> 79 | ! Solution 80 | <a href="/bar\/)"> 81 | ! End 82 | 83 | ! Example 22 84 | [foo](/bar\* "ti\*tle") 85 | ! Solution 86 | <p><a href="/bar*" title="ti*tle">foo</a></p> 87 | ! End 88 | 89 | ! Example 23 90 | [foo] 91 | 92 | [foo]: /bar\* "ti\*tle" 93 | ! Solution 94 | <p><a href="/bar*" title="ti*tle">foo</a></p> 95 | ! End 96 | 97 | ! Example 24 98 | ``` foo\+bar 99 | foo 100 | ``` 101 | ! Solution 102 | <pre><code class="language-foo+bar">foo 103 | </code></pre> 104 | ! End 105 | 106 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-backslashescapes.txt: -------------------------------------------------------------------------------- 1 | ! Example 12 2 | \!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}\~ 3 | ! End 4 | 5 | ! Example 13 6 | \ \A\a\ \3\φ\« 7 | ! End 8 | 9 | ! Example 14 10 | \*not emphasized* 11 | \<br/> not a tag 12 | \[not a link](/foo) 13 | \`not code` 14 | 1\. not a list 15 | \* not a list 16 | \# not a heading 17 | \[foo]: /url "not a reference" 18 | \ö not a character entity 19 | ! End 20 | 21 | ! Example 15 22 | \\*emphasis* 23 | ! End 24 | 25 | ! Example 16 26 | foo\ 27 | bar 28 | ! End 29 | 30 | ! Example 17 31 | `` \[\` `` 32 | ! End 33 | 34 | ! Example 18 35 | \[\] 36 | ! End 37 | 38 | ! Example 19 39 | ~~~ 40 | \[\] 41 | ~~~ 42 | ! End 43 | 44 | ! Example 20 45 | <http://example.com?find=\*> 46 | ! End 47 | 48 | ! Example 21 49 | <a href="/bar\/)"> 50 | ! End 51 | 52 | ! Example 22 53 | [foo](/bar\* "ti\*tle") 54 | ! End 55 | 56 | ! Example 23 57 | [foo] 58 | 59 | [foo]: /bar\* "ti\*tle" 60 | ! End 61 | 62 | ! Example 24 63 | ``` foo\+bar 64 | foo 65 | ``` 66 | ! End 67 | 68 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-blanklines--I.txt: -------------------------------------------------------------------------------- 1 | ! Example 227 2 | 3 | 4 | aaa 5 | 6 | 7 | # aaa 8 | 9 | 10 | ! Solution 11 | <p>aaa</p> 12 | <h1>aaa</h1> 13 | ! End 14 | 15 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-blanklines.txt: -------------------------------------------------------------------------------- 1 | ! Example 227 2 | 3 | 4 | aaa 5 | 6 | 7 | # aaa 8 | 9 | 10 | ! End 11 | 12 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-blockquotes.txt: -------------------------------------------------------------------------------- 1 | ! Example 228 2 | > # Foo 3 | > bar 4 | > baz 5 | ! End 6 | 7 | ! Example 229 8 | ># Foo 9 | >bar 10 | > baz 11 | ! End 12 | 13 | ! Example 230 14 | > # Foo 15 | > bar 16 | > baz 17 | ! End 18 | 19 | ! Example 231 20 | > # Foo 21 | > bar 22 | > baz 23 | ! End 24 | 25 | ! Example 232 26 | > # Foo 27 | > bar 28 | baz 29 | ! End 30 | 31 | ! Example 233 32 | > bar 33 | baz 34 | > foo 35 | ! End 36 | 37 | ! Example 234 38 | > foo 39 | --- 40 | ! End 41 | 42 | ! Example 235 43 | > - foo 44 | - bar 45 | ! End 46 | 47 | ! Example 236 48 | > foo 49 | bar 50 | ! End 51 | 52 | ! Example 237 53 | > ``` 54 | foo 55 | ``` 56 | ! End 57 | 58 | ! Example 238 59 | > foo 60 | - bar 61 | ! End 62 | 63 | ! Example 239 64 | > 65 | ! End 66 | 67 | ! Example 240 68 | > 69 | > 70 | > 71 | ! End 72 | 73 | ! Example 241 74 | > 75 | > foo 76 | > 77 | ! End 78 | 79 | ! Example 242 80 | > foo 81 | 82 | > bar 83 | ! End 84 | 85 | ! Example 243 86 | > foo 87 | > bar 88 | ! End 89 | 90 | ! Example 244 91 | > foo 92 | > 93 | > bar 94 | ! End 95 | 96 | ! Example 245 97 | foo 98 | > bar 99 | ! End 100 | 101 | ! Example 246 102 | > aaa 103 | *** 104 | > bbb 105 | ! End 106 | 107 | ! Example 247 108 | > bar 109 | baz 110 | ! End 111 | 112 | ! Example 248 113 | > bar 114 | 115 | baz 116 | ! End 117 | 118 | ! Example 249 119 | > bar 120 | > 121 | baz 122 | ! End 123 | 124 | ! Example 250 125 | > > > foo 126 | bar 127 | ! End 128 | 129 | ! Example 251 130 | >>> foo 131 | > bar 132 | >>baz 133 | ! End 134 | 135 | ! Example 252 136 | > code 137 | 138 | > not code 139 | ! End 140 | 141 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-codespans--I.txt: -------------------------------------------------------------------------------- 1 | ! Example 328 2 | `foo` 3 | ! Solution 4 | <p><code>foo</code></p> 5 | ! End 6 | 7 | ! Example 329 8 | `` foo ` bar `` 9 | ! Solution 10 | <p><code>foo ` bar</code></p> 11 | ! End 12 | 13 | ! Example 330 14 | ` `` ` 15 | ! Solution 16 | <p><code>``</code></p> 17 | ! End 18 | 19 | ! Example 331 20 | ` `` ` 21 | ! Solution 22 | <p><code> `` </code></p> 23 | ! End 24 | 25 | ! Example 332 26 | ` a` 27 | ! Solution 28 | <p><code> a</code></p> 29 | ! End 30 | 31 | ! Example 333 32 | ` b ` 33 | ! Solution 34 | <p><code> b </code></p> 35 | ! End 36 | 37 | ! Example 334 38 | ` ` 39 | ` ` 40 | ! Solution 41 | <p><code> </code> 42 | <code> </code></p> 43 | ! End 44 | 45 | ! Example 335 46 | `` 47 | foo 48 | bar 49 | baz 50 | `` 51 | ! Solution 52 | <p><code>foo bar baz</code></p> 53 | ! End 54 | 55 | ! Example 336 56 | `` 57 | foo 58 | `` 59 | ! Solution 60 | <p><code>foo </code></p> 61 | ! End 62 | 63 | ! Example 337 64 | `foo bar 65 | baz` 66 | ! Solution 67 | <p><code>foo bar baz</code></p> 68 | ! End 69 | 70 | ! Example 338 71 | `foo\`bar` 72 | ! Solution 73 | <p><code>foo\</code>bar`</p> 74 | ! End 75 | 76 | ! Example 339 77 | ``foo`bar`` 78 | ! Solution 79 | <p><code>foo`bar</code></p> 80 | ! End 81 | 82 | ! Example 340 83 | ` foo `` bar ` 84 | ! Solution 85 | <p><code>foo `` bar</code></p> 86 | ! End 87 | 88 | ! Example 341 89 | *foo`*` 90 | ! Solution 91 | <p>*foo<code>*</code></p> 92 | ! End 93 | 94 | ! Example 342 95 | [not a `link](/foo`) 96 | ! Solution 97 | <p>[not a <code>link](/foo</code>)</p> 98 | ! End 99 | 100 | ! Example 343 101 | `<a href="`">` 102 | ! Solution 103 | <p><code><a href="</code>">`</p> 104 | ! End 105 | 106 | ! Example 344 107 | <a href="`">` 108 | ! Solution 109 | <p><a href="`">`</p> 110 | ! End 111 | 112 | ! Example 345 113 | `<http://foo.bar.`baz>` 114 | ! Solution 115 | <p><code><http://foo.bar.</code>baz>`</p> 116 | ! End 117 | 118 | ! Example 346 119 | <http://foo.bar.`baz>` 120 | ! Solution 121 | <p><a href="http://foo.bar.%60baz">http://foo.bar.`baz</a>`</p> 122 | ! End 123 | 124 | ! Example 347 125 | ```foo`` 126 | ! Solution 127 | <p>```foo``</p> 128 | ! End 129 | 130 | ! Example 348 131 | `foo 132 | ! Solution 133 | <p>`foo</p> 134 | ! End 135 | 136 | ! Example 349 137 | `foo``bar`` 138 | ! Solution 139 | <p>`foo<code>bar</code></p> 140 | ! End 141 | 142 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-codespans.txt: -------------------------------------------------------------------------------- 1 | ! Example 328 2 | `foo` 3 | ! End 4 | 5 | ! Example 329 6 | `` foo ` bar `` 7 | ! End 8 | 9 | ! Example 330 10 | ` `` ` 11 | ! End 12 | 13 | ! Example 331 14 | ` `` ` 15 | ! End 16 | 17 | ! Example 332 18 | ` a` 19 | ! End 20 | 21 | ! Example 333 22 | ` b ` 23 | ! End 24 | 25 | ! Example 334 26 | ` ` 27 | ` ` 28 | ! End 29 | 30 | ! Example 335 31 | `` 32 | foo 33 | bar 34 | baz 35 | `` 36 | ! End 37 | 38 | ! Example 336 39 | `` 40 | foo 41 | `` 42 | ! End 43 | 44 | ! Example 337 45 | `foo bar 46 | baz` 47 | ! End 48 | 49 | ! Example 338 50 | `foo\`bar` 51 | ! End 52 | 53 | ! Example 339 54 | ``foo`bar`` 55 | ! End 56 | 57 | ! Example 340 58 | ` foo `` bar ` 59 | ! End 60 | 61 | ! Example 341 62 | *foo`*` 63 | ! End 64 | 65 | ! Example 342 66 | [not a `link](/foo`) 67 | ! End 68 | 69 | ! Example 343 70 | `<a href="`">` 71 | ! End 72 | 73 | ! Example 344 74 | <a href="`">` 75 | ! End 76 | 77 | ! Example 345 78 | `<http://foo.bar.`baz>` 79 | ! End 80 | 81 | ! Example 346 82 | <http://foo.bar.`baz>` 83 | ! End 84 | 85 | ! Example 347 86 | ```foo`` 87 | ! End 88 | 89 | ! Example 348 90 | `foo 91 | ! End 92 | 93 | ! Example 349 94 | `foo``bar`` 95 | ! End 96 | 97 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-entity--I.txt: -------------------------------------------------------------------------------- 1 | ! Example 25 2 |   & © Æ Ď 3 | ¾ ℋ ⅆ 4 | ∲ ≧̸ 5 | ! Solution 6 | <p>  & © Æ Ď 7 | ¾ ℋ ⅆ 8 | ∲ ≧̸</p> 9 | ! End 10 | 11 | ! Example 26 12 | # Ӓ Ϡ � 13 | ! Solution 14 | <p># Ӓ Ϡ �</p> 15 | ! End 16 | 17 | ! Example 27 18 | " ആ ಫ 19 | ! Solution 20 | <p>" ആ ಫ</p> 21 | ! End 22 | 23 | ! Example 28 24 |   &x; &#; &#x; 25 | � 26 | &#abcdef0; 27 | &ThisIsNotDefined; &hi?; 28 | ! Solution 29 | <p>&nbsp &x; &#; &#x; 30 | &#87654321; 31 | &#abcdef0; 32 | &ThisIsNotDefined; &hi?;</p> 33 | ! End 34 | 35 | ! Example 29 36 | © 37 | ! Solution 38 | <p>&copy</p> 39 | ! End 40 | 41 | ! Example 30 42 | &MadeUpEntity; 43 | ! Solution 44 | <p>&MadeUpEntity;</p> 45 | ! End 46 | 47 | ! Example 31 48 | <a href="öö.html"> 49 | ! Solution 50 | <a href="öö.html"> 51 | ! End 52 | 53 | ! Example 32 54 | [foo](/föö "föö") 55 | ! Solution 56 | <p><a href="/f%C3%B6%C3%B6" title="föö">foo</a></p> 57 | ! End 58 | 59 | ! Example 33 60 | [foo] 61 | 62 | [foo]: /föö "föö" 63 | ! Solution 64 | <p><a href="/f%C3%B6%C3%B6" title="föö">foo</a></p> 65 | ! End 66 | 67 | ! Example 34 68 | ``` föö 69 | foo 70 | ``` 71 | ! Solution 72 | <pre><code class="language-föö">foo 73 | </code></pre> 74 | ! End 75 | 76 | ! Example 35 77 | `föö` 78 | ! Solution 79 | <p><code>f&ouml;&ouml;</code></p> 80 | ! End 81 | 82 | ! Example 36 83 | föfö 84 | ! Solution 85 | <pre><code>f&ouml;f&ouml; 86 | </code></pre> 87 | ! End 88 | 89 | ! Example 37 90 | *foo* 91 | *foo* 92 | ! Solution 93 | <p>*foo* 94 | <em>foo</em></p> 95 | ! End 96 | 97 | ! Example 38 98 | * foo 99 | 100 | * foo 101 | ! Solution 102 | <p>* foo</p> 103 | <ul> 104 | <li>foo</li> 105 | </ul> 106 | ! End 107 | 108 | ! Example 39 109 | foo bar 110 | ! Solution 111 | <p>foo 112 | 113 | bar</p> 114 | ! End 115 | 116 | ! Example 40 117 | foo 118 | ! Solution 119 | <p> foo</p> 120 | ! End 121 | 122 | ! Example 41 123 | [a](url "tit") 124 | ! Solution 125 | <p>[a](url "tit")</p> 126 | ! End 127 | 128 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-entity.txt: -------------------------------------------------------------------------------- 1 | ! Example 25 2 |   & © Æ Ď 3 | ¾ ℋ ⅆ 4 | ∲ ≧̸ 5 | ! End 6 | 7 | ! Example 26 8 | # Ӓ Ϡ � 9 | ! End 10 | 11 | ! Example 27 12 | " ആ ಫ 13 | ! End 14 | 15 | ! Example 28 16 |   &x; &#; &#x; 17 | � 18 | &#abcdef0; 19 | &ThisIsNotDefined; &hi?; 20 | ! End 21 | 22 | ! Example 29 23 | © 24 | ! End 25 | 26 | ! Example 30 27 | &MadeUpEntity; 28 | ! End 29 | 30 | ! Example 31 31 | <a href="öö.html"> 32 | ! End 33 | 34 | ! Example 32 35 | [foo](/föö "föö") 36 | ! End 37 | 38 | ! Example 33 39 | [foo] 40 | 41 | [foo]: /föö "föö" 42 | ! End 43 | 44 | ! Example 34 45 | ``` föö 46 | foo 47 | ``` 48 | ! End 49 | 50 | ! Example 35 51 | `föö` 52 | ! End 53 | 54 | ! Example 36 55 | föfö 56 | ! End 57 | 58 | ! Example 37 59 | *foo* 60 | *foo* 61 | ! End 62 | 63 | ! Example 38 64 | * foo 65 | 66 | * foo 67 | ! End 68 | 69 | ! Example 39 70 | foo bar 71 | ! End 72 | 73 | ! Example 40 74 | foo 75 | ! End 76 | 77 | ! Example 41 78 | [a](url "tit") 79 | ! End 80 | 81 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-fencedcodeblocks.txt: -------------------------------------------------------------------------------- 1 | ! Example 119 2 | ``` 3 | < 4 | > 5 | ``` 6 | ! End 7 | 8 | ! Example 120 9 | ~~~ 10 | < 11 | > 12 | ~~~ 13 | ! End 14 | 15 | ! Example 121 16 | `` 17 | foo 18 | `` 19 | ! End 20 | 21 | ! Example 122 22 | ``` 23 | aaa 24 | ~~~ 25 | ``` 26 | ! End 27 | 28 | ! Example 123 29 | ~~~ 30 | aaa 31 | ``` 32 | ~~~ 33 | ! End 34 | 35 | ! Example 124 36 | ```` 37 | aaa 38 | ``` 39 | `````` 40 | ! End 41 | 42 | ! Example 125 43 | ~~~~ 44 | aaa 45 | ~~~ 46 | ~~~~ 47 | ! End 48 | 49 | ! Example 126 50 | ``` 51 | ! End 52 | 53 | ! Example 127 54 | ````` 55 | 56 | ``` 57 | aaa 58 | ! End 59 | 60 | ! Example 128 61 | > ``` 62 | > aaa 63 | 64 | bbb 65 | ! End 66 | 67 | ! Example 129 68 | ``` 69 | 70 | 71 | ``` 72 | ! End 73 | 74 | ! Example 130 75 | ``` 76 | ``` 77 | ! End 78 | 79 | ! Example 131 80 | ``` 81 | aaa 82 | aaa 83 | ``` 84 | ! End 85 | 86 | ! Example 132 87 | ``` 88 | aaa 89 | aaa 90 | aaa 91 | ``` 92 | ! End 93 | 94 | ! Example 133 95 | ``` 96 | aaa 97 | aaa 98 | aaa 99 | ``` 100 | ! End 101 | 102 | ! Example 134 103 | ``` 104 | aaa 105 | ``` 106 | ! End 107 | 108 | ! Example 135 109 | ``` 110 | aaa 111 | ``` 112 | ! End 113 | 114 | ! Example 136 115 | ``` 116 | aaa 117 | ``` 118 | ! End 119 | 120 | ! Example 137 121 | ``` 122 | aaa 123 | ``` 124 | ! End 125 | 126 | ! Example 138 127 | ``` ``` 128 | aaa 129 | ! End 130 | 131 | ! Example 139 132 | ~~~~~~ 133 | aaa 134 | ~~~ ~~ 135 | ! End 136 | 137 | ! Example 140 138 | foo 139 | ``` 140 | bar 141 | ``` 142 | baz 143 | ! End 144 | 145 | ! Example 141 146 | foo 147 | --- 148 | ~~~ 149 | bar 150 | ~~~ 151 | # baz 152 | ! End 153 | 154 | ! Example 142 155 | ```ruby 156 | def foo(x) 157 | return 3 158 | end 159 | ``` 160 | ! End 161 | 162 | ! Example 143 163 | ~~~~ ruby startline=3 $%@#$ 164 | def foo(x) 165 | return 3 166 | end 167 | ~~~~~~~ 168 | ! End 169 | 170 | ! Example 144 171 | ````; 172 | ```` 173 | ! End 174 | 175 | ! Example 145 176 | ``` aa ``` 177 | foo 178 | ! End 179 | 180 | ! Example 146 181 | ~~~ aa ``` ~~~ 182 | foo 183 | ~~~ 184 | ! End 185 | 186 | ! Example 147 187 | ``` 188 | ``` aaa 189 | ``` 190 | ! End 191 | 192 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-hardlinebreaks--I.txt: -------------------------------------------------------------------------------- 1 | ! Example 633 2 | foo 3 | baz 4 | ! Solution 5 | <p>foo<br /> 6 | baz</p> 7 | ! End 8 | 9 | ! Example 634 10 | foo\ 11 | baz 12 | ! Solution 13 | <p>foo<br /> 14 | baz</p> 15 | ! End 16 | 17 | ! Example 635 18 | foo 19 | baz 20 | ! Solution 21 | <p>foo<br /> 22 | baz</p> 23 | ! End 24 | 25 | ! Example 636 26 | foo 27 | bar 28 | ! Solution 29 | <p>foo<br /> 30 | bar</p> 31 | ! End 32 | 33 | ! Example 637 34 | foo\ 35 | bar 36 | ! Solution 37 | <p>foo<br /> 38 | bar</p> 39 | ! End 40 | 41 | ! Example 638 42 | *foo 43 | bar* 44 | ! Solution 45 | <p><em>foo<br /> 46 | bar</em></p> 47 | ! End 48 | 49 | ! Example 639 50 | *foo\ 51 | bar* 52 | ! Solution 53 | <p><em>foo<br /> 54 | bar</em></p> 55 | ! End 56 | 57 | ! Example 640 58 | `code 59 | span` 60 | ! Solution 61 | <p><code>code span</code></p> 62 | ! End 63 | 64 | ! Example 641 65 | `code\ 66 | span` 67 | ! Solution 68 | <p><code>code\ span</code></p> 69 | ! End 70 | 71 | ! Example 642 72 | <a href="foo 73 | bar"> 74 | ! Solution 75 | <p><a href="foo 76 | bar"></p> 77 | ! End 78 | 79 | ! Example 643 80 | <a href="foo\ 81 | bar"> 82 | ! Solution 83 | <p><a href="foo\ 84 | bar"></p> 85 | ! End 86 | 87 | ! Example 644 88 | foo\ 89 | ! Solution 90 | <p>foo\</p> 91 | ! End 92 | 93 | ! Example 645 94 | foo 95 | ! Solution 96 | <p>foo</p> 97 | ! End 98 | 99 | ! Example 646 100 | ### foo\ 101 | ! Solution 102 | <h3>foo\</h3> 103 | ! End 104 | 105 | ! Example 647 106 | ### foo 107 | ! Solution 108 | <h3>foo</h3> 109 | ! End 110 | 111 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-hardlinebreaks.txt: -------------------------------------------------------------------------------- 1 | ! Example 633 2 | foo 3 | baz 4 | ! End 5 | 6 | ! Example 634 7 | foo\ 8 | baz 9 | ! End 10 | 11 | ! Example 635 12 | foo 13 | baz 14 | ! End 15 | 16 | ! Example 636 17 | foo 18 | bar 19 | ! End 20 | 21 | ! Example 637 22 | foo\ 23 | bar 24 | ! End 25 | 26 | ! Example 638 27 | *foo 28 | bar* 29 | ! End 30 | 31 | ! Example 639 32 | *foo\ 33 | bar* 34 | ! End 35 | 36 | ! Example 640 37 | `code 38 | span` 39 | ! End 40 | 41 | ! Example 641 42 | `code\ 43 | span` 44 | ! End 45 | 46 | ! Example 642 47 | <a href="foo 48 | bar"> 49 | ! End 50 | 51 | ! Example 643 52 | <a href="foo\ 53 | bar"> 54 | ! End 55 | 56 | ! Example 644 57 | foo\ 58 | ! End 59 | 60 | ! Example 645 61 | foo 62 | ! End 63 | 64 | ! Example 646 65 | ### foo\ 66 | ! End 67 | 68 | ! Example 647 69 | ### foo 70 | ! End 71 | 72 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-images.txt: -------------------------------------------------------------------------------- 1 | ! Example 571 2 | ![foo](/url "title") 3 | ! End 4 | 5 | ! Example 572 6 | ![foo *bar*] 7 | 8 | [foo *bar*]: train.jpg "train & tracks" 9 | ! End 10 | 11 | ! Example 573 12 | ![foo ![bar](/url)](/url2) 13 | ! End 14 | 15 | ! Example 574 16 | ![foo [bar](/url)](/url2) 17 | ! End 18 | 19 | ! Example 575 20 | ![foo *bar*][] 21 | 22 | [foo *bar*]: train.jpg "train & tracks" 23 | ! End 24 | 25 | ! Example 576 26 | ![foo *bar*][foobar] 27 | 28 | [FOOBAR]: train.jpg "train & tracks" 29 | ! End 30 | 31 | ! Example 577 32 | ![foo](train.jpg) 33 | ! End 34 | 35 | ! Example 578 36 | My ![foo bar](/path/to/train.jpg "title" ) 37 | ! End 38 | 39 | ! Example 579 40 | ![foo](<url>) 41 | ! End 42 | 43 | ! Example 580 44 | ![](/url) 45 | ! End 46 | 47 | ! Example 581 48 | ![foo][bar] 49 | 50 | [bar]: /url 51 | ! End 52 | 53 | ! Example 582 54 | ![foo][bar] 55 | 56 | [BAR]: /url 57 | ! End 58 | 59 | ! Example 583 60 | ![foo][] 61 | 62 | [foo]: /url "title" 63 | ! End 64 | 65 | ! Example 584 66 | ![*foo* bar][] 67 | 68 | [*foo* bar]: /url "title" 69 | ! End 70 | 71 | ! Example 585 72 | ![Foo][] 73 | 74 | [foo]: /url "title" 75 | ! End 76 | 77 | ! Example 586 78 | ![foo] 79 | [] 80 | 81 | [foo]: /url "title" 82 | ! End 83 | 84 | ! Example 587 85 | ![foo] 86 | 87 | [foo]: /url "title" 88 | ! End 89 | 90 | ! Example 588 91 | ![*foo* bar] 92 | 93 | [*foo* bar]: /url "title" 94 | ! End 95 | 96 | ! Example 589 97 | ![[foo]] 98 | 99 | [[foo]]: /url "title" 100 | ! End 101 | 102 | ! Example 590 103 | ![Foo] 104 | 105 | [foo]: /url "title" 106 | ! End 107 | 108 | ! Example 591 109 | !\[foo] 110 | 111 | [foo]: /url "title" 112 | ! End 113 | 114 | ! Example 592 115 | \![foo] 116 | 117 | [foo]: /url "title" 118 | ! End 119 | 120 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-indentedcodeblocks--I.txt: -------------------------------------------------------------------------------- 1 | ! Example 107 2 | a simple 3 | indented code block 4 | ! Solution 5 | <pre><code>a simple 6 | indented code block 7 | </code></pre> 8 | ! End 9 | 10 | ! Example 108 11 | - foo 12 | 13 | bar 14 | ! Solution 15 | <ul> 16 | <li> 17 | <p>foo</p> 18 | <p>bar</p> 19 | </li> 20 | </ul> 21 | ! End 22 | 23 | ! Example 109 24 | 1. foo 25 | 26 | - bar 27 | ! Solution 28 | <ol> 29 | <li> 30 | <p>foo</p> 31 | <ul> 32 | <li>bar</li> 33 | </ul> 34 | </li> 35 | </ol> 36 | ! End 37 | 38 | ! Example 110 39 | <a/> 40 | *hi* 41 | 42 | - one 43 | ! Solution 44 | <pre><code><a/> 45 | *hi* 46 | 47 | - one 48 | </code></pre> 49 | ! End 50 | 51 | ! Example 111 52 | chunk1 53 | 54 | chunk2 55 | 56 | 57 | 58 | chunk3 59 | ! Solution 60 | <pre><code>chunk1 61 | 62 | chunk2 63 | 64 | 65 | 66 | chunk3 67 | </code></pre> 68 | ! End 69 | 70 | ! Example 112 71 | chunk1 72 | 73 | chunk2 74 | ! Solution 75 | <pre><code>chunk1 76 | 77 | chunk2 78 | </code></pre> 79 | ! End 80 | 81 | ! Example 113 82 | Foo 83 | bar 84 | 85 | ! Solution 86 | <p>Foo 87 | bar</p> 88 | ! End 89 | 90 | ! Example 114 91 | foo 92 | bar 93 | ! Solution 94 | <pre><code>foo 95 | </code></pre> 96 | <p>bar</p> 97 | ! End 98 | 99 | ! Example 115 100 | # Heading 101 | foo 102 | Heading 103 | ------ 104 | foo 105 | ---- 106 | ! Solution 107 | <h1>Heading</h1> 108 | <pre><code>foo 109 | </code></pre> 110 | <h2>Heading</h2> 111 | <pre><code>foo 112 | </code></pre> 113 | <hr /> 114 | ! End 115 | 116 | ! Example 116 117 | foo 118 | bar 119 | ! Solution 120 | <pre><code> foo 121 | bar 122 | </code></pre> 123 | ! End 124 | 125 | ! Example 117 126 | 127 | 128 | foo 129 | 130 | 131 | ! Solution 132 | <pre><code>foo 133 | </code></pre> 134 | ! End 135 | 136 | ! Example 118 137 | foo 138 | ! Solution 139 | <pre><code>foo 140 | </code></pre> 141 | ! End 142 | 143 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-indentedcodeblocks.txt: -------------------------------------------------------------------------------- 1 | ! Example 107 2 | a simple 3 | indented code block 4 | ! End 5 | 6 | ! Example 108 7 | - foo 8 | 9 | bar 10 | ! End 11 | 12 | ! Example 109 13 | 1. foo 14 | 15 | - bar 16 | ! End 17 | 18 | ! Example 110 19 | <a/> 20 | *hi* 21 | 22 | - one 23 | ! End 24 | 25 | ! Example 111 26 | chunk1 27 | 28 | chunk2 29 | 30 | 31 | 32 | chunk3 33 | ! End 34 | 35 | ! Example 112 36 | chunk1 37 | 38 | chunk2 39 | ! End 40 | 41 | ! Example 113 42 | Foo 43 | bar 44 | 45 | ! End 46 | 47 | ! Example 114 48 | foo 49 | bar 50 | ! End 51 | 52 | ! Example 115 53 | # Heading 54 | foo 55 | Heading 56 | ------ 57 | foo 58 | ---- 59 | ! End 60 | 61 | ! Example 116 62 | foo 63 | bar 64 | ! End 65 | 66 | ! Example 117 67 | 68 | 69 | foo 70 | 71 | 72 | ! End 73 | 74 | ! Example 118 75 | foo 76 | ! End 77 | 78 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-inlines--I.txt: -------------------------------------------------------------------------------- 1 | ! Example 327 2 | `hi`lo` 3 | ! Solution 4 | <p><code>hi</code>lo`</p> 5 | ! End 6 | 7 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-inlines.txt: -------------------------------------------------------------------------------- 1 | ! Example 327 2 | `hi`lo` 3 | ! End 4 | 5 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-linkreferencedefinitions.txt: -------------------------------------------------------------------------------- 1 | ! Example 192 2 | [foo]: /url "title" 3 | 4 | [foo] 5 | ! End 6 | 7 | ! Example 193 8 | [foo]: 9 | /url 10 | 'the title' 11 | 12 | [foo] 13 | ! End 14 | 15 | ! Example 194 16 | [Foo*bar\]]:my_(url) 'title (with parens)' 17 | 18 | [Foo*bar\]] 19 | ! End 20 | 21 | ! Example 195 22 | [Foo bar]: 23 | <my url> 24 | 'title' 25 | 26 | [Foo bar] 27 | ! End 28 | 29 | ! Example 196 30 | [foo]: /url ' 31 | title 32 | line1 33 | line2 34 | ' 35 | 36 | [foo] 37 | ! End 38 | 39 | ! Example 197 40 | [foo]: /url 'title 41 | 42 | with blank line' 43 | 44 | [foo] 45 | ! End 46 | 47 | ! Example 198 48 | [foo]: 49 | /url 50 | 51 | [foo] 52 | ! End 53 | 54 | ! Example 199 55 | [foo]: 56 | 57 | [foo] 58 | ! End 59 | 60 | ! Example 200 61 | [foo]: <> 62 | 63 | [foo] 64 | ! End 65 | 66 | ! Example 201 67 | [foo]: <bar>(baz) 68 | 69 | [foo] 70 | ! End 71 | 72 | ! Example 202 73 | [foo]: /url\bar\*baz "foo\"bar\baz" 74 | 75 | [foo] 76 | ! End 77 | 78 | ! Example 203 79 | [foo] 80 | 81 | [foo]: url 82 | ! End 83 | 84 | ! Example 204 85 | [foo] 86 | 87 | [foo]: first 88 | [foo]: second 89 | ! End 90 | 91 | ! Example 205 92 | [FOO]: /url 93 | 94 | [Foo] 95 | ! End 96 | 97 | ! Example 206 98 | [ΑΓΩ]: /φου 99 | 100 | [αγω] 101 | ! End 102 | 103 | ! Example 207 104 | [foo]: /url 105 | ! End 106 | 107 | ! Example 208 108 | [ 109 | foo 110 | ]: /url 111 | bar 112 | ! End 113 | 114 | ! Example 209 115 | [foo]: /url "title" ok 116 | ! End 117 | 118 | ! Example 210 119 | [foo]: /url 120 | "title" ok 121 | ! End 122 | 123 | ! Example 211 124 | [foo]: /url "title" 125 | 126 | [foo] 127 | ! End 128 | 129 | ! Example 212 130 | ``` 131 | [foo]: /url 132 | ``` 133 | 134 | [foo] 135 | ! End 136 | 137 | ! Example 213 138 | Foo 139 | [bar]: /baz 140 | 141 | [bar] 142 | ! End 143 | 144 | ! Example 214 145 | # [Foo] 146 | [foo]: /url 147 | > bar 148 | ! End 149 | 150 | ! Example 215 151 | [foo]: /url 152 | bar 153 | === 154 | [foo] 155 | ! End 156 | 157 | ! Example 216 158 | [foo]: /url 159 | === 160 | [foo] 161 | ! End 162 | 163 | ! Example 217 164 | [foo]: /foo-url "foo" 165 | [bar]: /bar-url 166 | "bar" 167 | [baz]: /baz-url 168 | 169 | [foo], 170 | [bar], 171 | [baz] 172 | ! End 173 | 174 | ! Example 218 175 | [foo] 176 | 177 | > [foo]: /url 178 | ! End 179 | 180 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-lists.txt: -------------------------------------------------------------------------------- 1 | ! Example 301 2 | - foo 3 | - bar 4 | + baz 5 | ! End 6 | 7 | ! Example 302 8 | 1. foo 9 | 2. bar 10 | 3) baz 11 | ! End 12 | 13 | ! Example 303 14 | Foo 15 | - bar 16 | - baz 17 | ! End 18 | 19 | ! Example 304 20 | The number of windows in my house is 21 | 14. The number of doors is 6. 22 | ! End 23 | 24 | ! Example 305 25 | The number of windows in my house is 26 | 1. The number of doors is 6. 27 | ! End 28 | 29 | ! Example 306 30 | - foo 31 | 32 | - bar 33 | 34 | 35 | - baz 36 | ! End 37 | 38 | ! Example 307 39 | - foo 40 | - bar 41 | - baz 42 | 43 | 44 | bim 45 | ! End 46 | 47 | ! Example 308 48 | - foo 49 | - bar 50 | 51 | <!-- --> 52 | 53 | - baz 54 | - bim 55 | ! End 56 | 57 | ! Example 309 58 | - foo 59 | 60 | notcode 61 | 62 | - foo 63 | 64 | <!-- --> 65 | 66 | code 67 | ! End 68 | 69 | ! Example 310 70 | - a 71 | - b 72 | - c 73 | - d 74 | - e 75 | - f 76 | - g 77 | ! End 78 | 79 | ! Example 311 80 | 1. a 81 | 82 | 2. b 83 | 84 | 3. c 85 | ! End 86 | 87 | ! Example 312 88 | - a 89 | - b 90 | - c 91 | - d 92 | - e 93 | ! End 94 | 95 | ! Example 313 96 | 1. a 97 | 98 | 2. b 99 | 100 | 3. c 101 | ! End 102 | 103 | ! Example 314 104 | - a 105 | - b 106 | 107 | - c 108 | ! End 109 | 110 | ! Example 315 111 | * a 112 | * 113 | 114 | * c 115 | ! End 116 | 117 | ! Example 316 118 | - a 119 | - b 120 | 121 | c 122 | - d 123 | ! End 124 | 125 | ! Example 317 126 | - a 127 | - b 128 | 129 | [ref]: /url 130 | - d 131 | ! End 132 | 133 | ! Example 318 134 | - a 135 | - ``` 136 | b 137 | 138 | 139 | ``` 140 | - c 141 | ! End 142 | 143 | ! Example 319 144 | - a 145 | - b 146 | 147 | c 148 | - d 149 | ! End 150 | 151 | ! Example 320 152 | * a 153 | > b 154 | > 155 | * c 156 | ! End 157 | 158 | ! Example 321 159 | - a 160 | > b 161 | ``` 162 | c 163 | ``` 164 | - d 165 | ! End 166 | 167 | ! Example 322 168 | - a 169 | ! End 170 | 171 | ! Example 323 172 | - a 173 | - b 174 | ! End 175 | 176 | ! Example 324 177 | 1. ``` 178 | foo 179 | ``` 180 | 181 | bar 182 | ! End 183 | 184 | ! Example 325 185 | * foo 186 | * bar 187 | 188 | baz 189 | ! End 190 | 191 | ! Example 326 192 | - a 193 | - b 194 | - c 195 | 196 | - d 197 | - e 198 | - f 199 | ! End 200 | 201 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-paragraphs--I.txt: -------------------------------------------------------------------------------- 1 | ! Example 219 2 | aaa 3 | 4 | bbb 5 | ! Solution 6 | <p>aaa</p> 7 | <p>bbb</p> 8 | ! End 9 | 10 | ! Example 220 11 | aaa 12 | bbb 13 | 14 | ccc 15 | ddd 16 | ! Solution 17 | <p>aaa 18 | bbb</p> 19 | <p>ccc 20 | ddd</p> 21 | ! End 22 | 23 | ! Example 221 24 | aaa 25 | 26 | 27 | bbb 28 | ! Solution 29 | <p>aaa</p> 30 | <p>bbb</p> 31 | ! End 32 | 33 | ! Example 222 34 | aaa 35 | bbb 36 | ! Solution 37 | <p>aaa 38 | bbb</p> 39 | ! End 40 | 41 | ! Example 223 42 | aaa 43 | bbb 44 | ccc 45 | ! Solution 46 | <p>aaa 47 | bbb 48 | ccc</p> 49 | ! End 50 | 51 | ! Example 224 52 | aaa 53 | bbb 54 | ! Solution 55 | <p>aaa 56 | bbb</p> 57 | ! End 58 | 59 | ! Example 225 60 | aaa 61 | bbb 62 | ! Solution 63 | <pre><code>aaa 64 | </code></pre> 65 | <p>bbb</p> 66 | ! End 67 | 68 | ! Example 226 69 | aaa 70 | bbb 71 | ! Solution 72 | <p>aaa<br /> 73 | bbb</p> 74 | ! End 75 | 76 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-paragraphs.txt: -------------------------------------------------------------------------------- 1 | ! Example 219 2 | aaa 3 | 4 | bbb 5 | ! End 6 | 7 | ! Example 220 8 | aaa 9 | bbb 10 | 11 | ccc 12 | ddd 13 | ! End 14 | 15 | ! Example 221 16 | aaa 17 | 18 | 19 | bbb 20 | ! End 21 | 22 | ! Example 222 23 | aaa 24 | bbb 25 | ! End 26 | 27 | ! Example 223 28 | aaa 29 | bbb 30 | ccc 31 | ! End 32 | 33 | ! Example 224 34 | aaa 35 | bbb 36 | ! End 37 | 38 | ! Example 225 39 | aaa 40 | bbb 41 | ! End 42 | 43 | ! Example 226 44 | aaa 45 | bbb 46 | ! End 47 | 48 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-precedence--I.txt: -------------------------------------------------------------------------------- 1 | ! Example 42 2 | - `one 3 | - two` 4 | ! Solution 5 | <ul> 6 | <li>`one</li> 7 | <li>two`</li> 8 | </ul> 9 | ! End 10 | 11 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-precedence.txt: -------------------------------------------------------------------------------- 1 | ! Example 42 2 | - `one 3 | - two` 4 | ! End 5 | 6 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-rawhtml.txt: -------------------------------------------------------------------------------- 1 | ! Example 612 2 | <a><bab><c2c> 3 | ! End 4 | 5 | ! Example 613 6 | <a/><b2/> 7 | ! End 8 | 9 | ! Example 614 10 | <a /><b2 11 | data="foo" > 12 | ! End 13 | 14 | ! Example 615 15 | <a foo="bar" bam = 'baz <em>"</em>' 16 | _boolean zoop:33=zoop:33 /> 17 | ! End 18 | 19 | ! Example 616 20 | Foo <responsive-image src="foo.jpg" /> 21 | ! End 22 | 23 | ! Example 617 24 | <33> <__> 25 | ! End 26 | 27 | ! Example 618 28 | <a h*#ref="hi"> 29 | ! End 30 | 31 | ! Example 619 32 | <a href="hi'> <a href=hi'> 33 | ! End 34 | 35 | ! Example 620 36 | < a>< 37 | foo><bar/ > 38 | <foo bar=baz 39 | bim!bop /> 40 | ! End 41 | 42 | ! Example 621 43 | <a href='bar'title=title> 44 | ! End 45 | 46 | ! Example 622 47 | </a></foo > 48 | ! End 49 | 50 | ! Example 623 51 | </a href="foo"> 52 | ! End 53 | 54 | ! Example 624 55 | foo <!-- this is a 56 | comment - with hyphen --> 57 | ! End 58 | 59 | ! Example 625 60 | foo <!-- not a comment -- two hyphens --> 61 | ! End 62 | 63 | ! Example 626 64 | foo <!--> foo --> 65 | 66 | foo <!-- foo---> 67 | ! End 68 | 69 | ! Example 627 70 | foo <?php echo $a; ?> 71 | ! End 72 | 73 | ! Example 628 74 | foo <!ELEMENT br EMPTY> 75 | ! End 76 | 77 | ! Example 629 78 | foo <![CDATA[>&<]]> 79 | ! End 80 | 81 | ! Example 630 82 | foo <a href="ö"> 83 | ! End 84 | 85 | ! Example 631 86 | foo <a href="\*"> 87 | ! End 88 | 89 | ! Example 632 90 | <a href="\""> 91 | ! End 92 | 93 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-setextheadings.txt: -------------------------------------------------------------------------------- 1 | ! Example 80 2 | Foo *bar* 3 | ========= 4 | 5 | Foo *bar* 6 | --------- 7 | ! End 8 | 9 | ! Example 81 10 | Foo *bar 11 | baz* 12 | ==== 13 | ! End 14 | 15 | ! Example 82 16 | Foo *bar 17 | baz* 18 | ==== 19 | ! End 20 | 21 | ! Example 83 22 | Foo 23 | ------------------------- 24 | 25 | Foo 26 | = 27 | ! End 28 | 29 | ! Example 84 30 | Foo 31 | --- 32 | 33 | Foo 34 | ----- 35 | 36 | Foo 37 | === 38 | ! End 39 | 40 | ! Example 85 41 | Foo 42 | --- 43 | 44 | Foo 45 | --- 46 | ! End 47 | 48 | ! Example 86 49 | Foo 50 | ---- 51 | ! End 52 | 53 | ! Example 87 54 | Foo 55 | --- 56 | ! End 57 | 58 | ! Example 88 59 | Foo 60 | = = 61 | 62 | Foo 63 | --- - 64 | ! End 65 | 66 | ! Example 89 67 | Foo 68 | ----- 69 | ! End 70 | 71 | ! Example 90 72 | Foo\ 73 | ---- 74 | ! End 75 | 76 | ! Example 91 77 | `Foo 78 | ---- 79 | ` 80 | 81 | <a title="a lot 82 | --- 83 | of dashes"/> 84 | ! End 85 | 86 | ! Example 92 87 | > Foo 88 | --- 89 | ! End 90 | 91 | ! Example 93 92 | > foo 93 | bar 94 | === 95 | ! End 96 | 97 | ! Example 94 98 | - Foo 99 | --- 100 | ! End 101 | 102 | ! Example 95 103 | Foo 104 | Bar 105 | --- 106 | ! End 107 | 108 | ! Example 96 109 | --- 110 | Foo 111 | --- 112 | Bar 113 | --- 114 | Baz 115 | ! End 116 | 117 | ! Example 97 118 | 119 | ==== 120 | ! End 121 | 122 | ! Example 98 123 | --- 124 | --- 125 | ! End 126 | 127 | ! Example 99 128 | - foo 129 | ----- 130 | ! End 131 | 132 | ! Example 100 133 | foo 134 | --- 135 | ! End 136 | 137 | ! Example 101 138 | > foo 139 | ----- 140 | ! End 141 | 142 | ! Example 102 143 | \> foo 144 | ------ 145 | ! End 146 | 147 | ! Example 103 148 | Foo 149 | 150 | bar 151 | --- 152 | baz 153 | ! End 154 | 155 | ! Example 104 156 | Foo 157 | bar 158 | 159 | --- 160 | 161 | baz 162 | ! End 163 | 164 | ! Example 105 165 | Foo 166 | bar 167 | * * * 168 | baz 169 | ! End 170 | 171 | ! Example 106 172 | Foo 173 | bar 174 | \--- 175 | baz 176 | ! End 177 | 178 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-softlinebreaks--I.txt: -------------------------------------------------------------------------------- 1 | ! Example 648 2 | foo 3 | baz 4 | ! Solution 5 | <p>foo 6 | baz</p> 7 | ! End 8 | 9 | ! Example 649 10 | foo 11 | baz 12 | ! Solution 13 | <p>foo 14 | baz</p> 15 | ! End 16 | 17 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-softlinebreaks.txt: -------------------------------------------------------------------------------- 1 | ! Example 648 2 | foo 3 | baz 4 | ! End 5 | 6 | ! Example 649 7 | foo 8 | baz 9 | ! End 10 | 11 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-tabs--I.txt: -------------------------------------------------------------------------------- 1 | ! Example 1 2 | foo baz bim 3 | ! Solution 4 | <pre><code>foo baz bim 5 | </code></pre> 6 | ! End 7 | 8 | ! Example 2 9 | foo baz bim 10 | ! Solution 11 | <pre><code>foo baz bim 12 | </code></pre> 13 | ! End 14 | 15 | ! Example 3 16 | a a 17 | ὐ a 18 | ! Solution 19 | <pre><code>a a 20 | ὐ a 21 | </code></pre> 22 | ! End 23 | 24 | ! Example 4 25 | - foo 26 | 27 | bar 28 | ! Solution 29 | <ul> 30 | <li> 31 | <p>foo</p> 32 | <p>bar</p> 33 | </li> 34 | </ul> 35 | ! End 36 | 37 | ! Example 5 38 | - foo 39 | 40 | bar 41 | ! Solution 42 | <ul> 43 | <li> 44 | <p>foo</p> 45 | <pre><code> bar 46 | </code></pre> 47 | </li> 48 | </ul> 49 | ! End 50 | 51 | ! Example 6 52 | > foo 53 | ! Solution 54 | <blockquote> 55 | <pre><code> foo 56 | </code></pre> 57 | </blockquote> 58 | ! End 59 | 60 | ! Example 7 61 | - foo 62 | ! Solution 63 | <ul> 64 | <li> 65 | <pre><code> foo 66 | </code></pre> 67 | </li> 68 | </ul> 69 | ! End 70 | 71 | ! Example 8 72 | foo 73 | bar 74 | ! Solution 75 | <pre><code>foo 76 | bar 77 | </code></pre> 78 | ! End 79 | 80 | ! Example 9 81 | - foo 82 | - bar 83 | - baz 84 | ! Solution 85 | <ul> 86 | <li>foo 87 | <ul> 88 | <li>bar 89 | <ul> 90 | <li>baz</li> 91 | </ul> 92 | </li> 93 | </ul> 94 | </li> 95 | </ul> 96 | ! End 97 | 98 | ! Example 10 99 | # Foo 100 | ! Solution 101 | <h1>Foo</h1> 102 | ! End 103 | 104 | ! Example 11 105 | * * * 106 | ! Solution 107 | <hr /> 108 | ! End 109 | 110 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-tabs.txt: -------------------------------------------------------------------------------- 1 | ! Example 1 2 | foo baz bim 3 | ! End 4 | 5 | ! Example 2 6 | foo baz bim 7 | ! End 8 | 9 | ! Example 3 10 | a a 11 | ὐ a 12 | ! End 13 | 14 | ! Example 4 15 | - foo 16 | 17 | bar 18 | ! End 19 | 20 | ! Example 5 21 | - foo 22 | 23 | bar 24 | ! End 25 | 26 | ! Example 6 27 | > foo 28 | ! End 29 | 30 | ! Example 7 31 | - foo 32 | ! End 33 | 34 | ! Example 8 35 | foo 36 | bar 37 | ! End 38 | 39 | ! Example 9 40 | - foo 41 | - bar 42 | - baz 43 | ! End 44 | 45 | ! Example 10 46 | # Foo 47 | ! End 48 | 49 | ! Example 11 50 | * * * 51 | ! End 52 | 53 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-textualcontent--I.txt: -------------------------------------------------------------------------------- 1 | ! Example 650 2 | hello $.;'there 3 | ! Solution 4 | <p>hello $.;'there</p> 5 | ! End 6 | 7 | ! Example 651 8 | Foo χρῆν 9 | ! Solution 10 | <p>Foo χρῆν</p> 11 | ! End 12 | 13 | ! Example 652 14 | Multiple spaces 15 | ! Solution 16 | <p>Multiple spaces</p> 17 | ! End 18 | 19 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-textualcontent.txt: -------------------------------------------------------------------------------- 1 | ! Example 650 2 | hello $.;'there 3 | ! End 4 | 5 | ! Example 651 6 | Foo χρῆν 7 | ! End 8 | 9 | ! Example 652 10 | Multiple spaces 11 | ! End 12 | 13 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-thematicbreaks--I.txt: -------------------------------------------------------------------------------- 1 | ! Example 43 2 | *** 3 | --- 4 | ___ 5 | ! Solution 6 | <hr /> 7 | <hr /> 8 | <hr /> 9 | ! End 10 | 11 | ! Example 44 12 | +++ 13 | ! Solution 14 | <p>+++</p> 15 | ! End 16 | 17 | ! Example 45 18 | === 19 | ! Solution 20 | <p>===</p> 21 | ! End 22 | 23 | ! Example 46 24 | -- 25 | ** 26 | __ 27 | ! Solution 28 | <p>-- 29 | ** 30 | __</p> 31 | ! End 32 | 33 | ! Example 47 34 | *** 35 | *** 36 | *** 37 | ! Solution 38 | <hr /> 39 | <hr /> 40 | <hr /> 41 | ! End 42 | 43 | ! Example 48 44 | *** 45 | ! Solution 46 | <pre><code>*** 47 | </code></pre> 48 | ! End 49 | 50 | ! Example 49 51 | Foo 52 | *** 53 | ! Solution 54 | <p>Foo 55 | ***</p> 56 | ! End 57 | 58 | ! Example 50 59 | _____________________________________ 60 | ! Solution 61 | <hr /> 62 | ! End 63 | 64 | ! Example 51 65 | - - - 66 | ! Solution 67 | <hr /> 68 | ! End 69 | 70 | ! Example 52 71 | ** * ** * ** * ** 72 | ! Solution 73 | <hr /> 74 | ! End 75 | 76 | ! Example 53 77 | - - - - 78 | ! Solution 79 | <hr /> 80 | ! End 81 | 82 | ! Example 54 83 | - - - - 84 | ! Solution 85 | <hr /> 86 | ! End 87 | 88 | ! Example 55 89 | _ _ _ _ a 90 | 91 | a------ 92 | 93 | ---a--- 94 | ! Solution 95 | <p>_ _ _ _ a</p> 96 | <p>a------</p> 97 | <p>---a---</p> 98 | ! End 99 | 100 | ! Example 56 101 | *-* 102 | ! Solution 103 | <p><em>-</em></p> 104 | ! End 105 | 106 | ! Example 57 107 | - foo 108 | *** 109 | - bar 110 | ! Solution 111 | <ul> 112 | <li>foo</li> 113 | </ul> 114 | <hr /> 115 | <ul> 116 | <li>bar</li> 117 | </ul> 118 | ! End 119 | 120 | ! Example 58 121 | Foo 122 | *** 123 | bar 124 | ! Solution 125 | <p>Foo</p> 126 | <hr /> 127 | <p>bar</p> 128 | ! End 129 | 130 | ! Example 59 131 | Foo 132 | --- 133 | bar 134 | ! Solution 135 | <h2>Foo</h2> 136 | <p>bar</p> 137 | ! End 138 | 139 | ! Example 60 140 | * Foo 141 | * * * 142 | * Bar 143 | ! Solution 144 | <ul> 145 | <li>Foo</li> 146 | </ul> 147 | <hr /> 148 | <ul> 149 | <li>Bar</li> 150 | </ul> 151 | ! End 152 | 153 | ! Example 61 154 | - Foo 155 | - * * * 156 | ! Solution 157 | <ul> 158 | <li>Foo</li> 159 | <li> 160 | <hr /> 161 | </li> 162 | </ul> 163 | ! End 164 | 165 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-thematicbreaks.txt: -------------------------------------------------------------------------------- 1 | ! Example 43 2 | *** 3 | --- 4 | ___ 5 | ! End 6 | 7 | ! Example 44 8 | +++ 9 | ! End 10 | 11 | ! Example 45 12 | === 13 | ! End 14 | 15 | ! Example 46 16 | -- 17 | ** 18 | __ 19 | ! End 20 | 21 | ! Example 47 22 | *** 23 | *** 24 | *** 25 | ! End 26 | 27 | ! Example 48 28 | *** 29 | ! End 30 | 31 | ! Example 49 32 | Foo 33 | *** 34 | ! End 35 | 36 | ! Example 50 37 | _____________________________________ 38 | ! End 39 | 40 | ! Example 51 41 | - - - 42 | ! End 43 | 44 | ! Example 52 45 | ** * ** * ** * ** 46 | ! End 47 | 48 | ! Example 53 49 | - - - - 50 | ! End 51 | 52 | ! Example 54 53 | - - - - 54 | ! End 55 | 56 | ! Example 55 57 | _ _ _ _ a 58 | 59 | a------ 60 | 61 | ---a--- 62 | ! End 63 | 64 | ! Example 56 65 | *-* 66 | ! End 67 | 68 | ! Example 57 69 | - foo 70 | *** 71 | - bar 72 | ! End 73 | 74 | ! Example 58 75 | Foo 76 | *** 77 | bar 78 | ! End 79 | 80 | ! Example 59 81 | Foo 82 | --- 83 | bar 84 | ! End 85 | 86 | ! Example 60 87 | * Foo 88 | * * * 89 | * Bar 90 | ! End 91 | 92 | ! Example 61 93 | - Foo 94 | - * * * 95 | ! End 96 | 97 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-variations--I.txt: -------------------------------------------------------------------------------- 1 | ! Variation 1 2 | In this variant, entities like C and ℋ should be ignored. 3 | Similarly, inline HTML <img src="whatever"> should be thrown out, though 4 | autolinks like <https://this.com> or <whomever@wherever.com> ought to keep working. 5 | 6 | > This is some 7 | > sort of quotation. 8 | 9 | So now: 10 | 11 | {*}"Bananas" 12 | 13 | This is all good stuff. 14 | 15 | But then again: 16 | 17 | {**}And it resumes here. 18 | 19 | # Not a heading, either 20 | ! Solution 21 | <p>In this variant, entities like &#67; and &HilbertSpace; should be ignored. 22 | Similarly, inline HTML <img src="whatever"> should be thrown out, though 23 | autolinks like <a href="https://this.com">https://this.com</a> or <a href="mailto:whomever@wherever.com">whomever@wherever.com</a>.</p> 24 | <div border="1"> 25 | <blockquote> 26 | <p>This is some 27 | sort of quotation.</p> 28 | </blockquote> 29 | </div> 30 | <p>So now:</p> 31 | <a class="pastelink" href="javascript:pasteCode('"Bananas" 32 | 33 | This is all good stuff. 34 | And it resumes here. 35 | ')"><img border=0 src=paste.png></a><pre><code>"Bananas" 36 | 37 | This is all good stuff. 38 | </code></pre> 39 | <p>But then again:</p> 40 | <a class="pastelink" href="javascript:pasteCode('And it resumes here. 41 | ')"><img border=0 src=paste.png></a><pre><code>And it resumes here. 42 | </code></pre> 43 | <p># Not a heading, either</p> 44 | ! End 45 | 46 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/md-variations.txt: -------------------------------------------------------------------------------- 1 | ! Variation 1 2 | In this variant, entities like C and ℋ should be ignored. 3 | Similarly, inline HTML <img src="whatever"> should be thrown out, though 4 | autolinks like <https://this.com> or <whomever@wherever.com> ought to keep working. 5 | 6 | > This is some 7 | > sort of quotation. 8 | 9 | So now: 10 | 11 | {*}"Bananas" 12 | 13 | This is all good stuff. 14 | 15 | But then again: 16 | 17 | {**}And it resumes here. 18 | 19 | # Not a heading, either 20 | ! End 21 | -------------------------------------------------------------------------------- /foundation-test/Tests/Markdown Cases/temp.txt: -------------------------------------------------------------------------------- 1 | ! Inform 1* 2 | `"[Prolegomena](here.html)"` 3 | ! End 4 | -------------------------------------------------------------------------------- /foundation-test/Tests/Test Cases/_Results_Actual/.gitkeep: -------------------------------------------------------------------------------- 1 | # Ensure this folder is created -------------------------------------------------------------------------------- /foundation-test/Tests/Test Cases/dictionaries--I.txt: -------------------------------------------------------------------------------- 1 | Dictionary: 2 | Slot 00: vacant 3 | Slot 01: vacant 4 | Creating new entry <Han> 5 | Creating new entry <Luke> 6 | Creating new entry <Leia> 7 | Creating new entry <Ben> 8 | Creating new entry <Lando> 9 | Creating new entry <Jabba> 10 | Creating new entry <Boba> 11 | Creating new entry <Admiral> 12 | Creating new entry <Captain> 13 | Dictionary: 14 | Slot 00: Lando='Calrissian' 15 | Slot 01: Han='Solo' 16 | Slot 02: vacant 17 | Slot 03: vacant 18 | Slot 04: Boba='Fett' Captain='Piet' 19 | Slot 05: Leia='Organa' 20 | Slot 06: Jabba='Hutt' Admiral='Akbar' 21 | Slot 07: Luke='Skywalker' Ben='Kenobi' 22 | Dictionary: 23 | Slot 00: vacant 24 | Slot 01: vacant 25 | Slot 02: vacant 26 | Slot 03: vacant 27 | Slot 04: vacant vacant 28 | Slot 05: vacant 29 | Slot 06: vacant vacant 30 | Slot 07: vacant vacant 31 | -------------------------------------------------------------------------------- /foundation-test/Tests/Test Cases/dictionaries.txt: -------------------------------------------------------------------------------- 1 | 'Han' 'Solo' 2 | 'Luke' 'Skywalker' 3 | 'Leia' 'Organa' 4 | 'Ben' 'Kenobi' 5 | 'Lando' 'Calrissian' 6 | 'Jabba' 'Hutt' 7 | 'Boba' 'Fett' 8 | 'Admiral' 'Akbar' 9 | 'Captain' 'Piet' 10 | -------------------------------------------------------------------------------- /foundation-test/Tests/Test Cases/json.txt: -------------------------------------------------------------------------------- 1 | 234 2 | ---- 3 | -45 4 | ---- 5 | true 6 | ---- 7 | false 8 | ---- 9 | null 10 | ---- 11 | "Plain text." 12 | ---- 13 | "Encoded text,\nwith\ttabs and all, including \u0040\u004A\u004b." 14 | ---- 15 | "Text with 16 | carriage return and tabs in it." 17 | ---- 18 | [] 19 | ---- 20 | [ ] 21 | ---- 22 | [ 23, 1, 456 ] 23 | ---- 24 | [ "fish", 22, true, [ 3, 6, 9 ], null ] 25 | ---- 26 | { 27 | } 28 | ---- 29 | { "name": "Jemima", "lives": 9 } 30 | ---- 31 | { 32 | "firstName": "John", 33 | "lastName": "Smith", 34 | "isAlive": true, 35 | "age": 27, 36 | "address": { 37 | "streetAddress": "21 2nd Street", 38 | "city": "New York", 39 | "state": "NY", 40 | "postalCode": "10021-3100" 41 | }, 42 | "phoneNumbers": [ 43 | { 44 | "type": "home", 45 | "number": "212 555-1234" 46 | }, 47 | { 48 | "type": "office", 49 | "number": "646 555-4567" 50 | } 51 | ], 52 | "children": [], 53 | "spouse": null 54 | } 55 | ---- 56 | 3.141592653 57 | ---- 58 | -45.2E+34 59 | ---- 60 | <int> = number 61 | ---- 62 | <optionalint> = ( number | null ) 63 | ---- 64 | <enum> = ( "alpha" | "beta" | 3 | 5 | false | true | null ) 65 | ---- 66 | <enum> against "beta" 67 | ---- 68 | <enum> against "gamma" 69 | ---- 70 | <enum> against 5 71 | ---- 72 | <enum> against null 73 | ---- 74 | <record> = { "coordinates": [ double, double, string ], ?"jurisdiction": string, "journal": [ { "date": number, "entry": string }* ] } 75 | ---- 76 | <int> against 217 77 | ---- 78 | <int> against "six" 79 | ---- 80 | <pair> = [ double, string ] 81 | ---- 82 | <pair> against [ 0.15, "sky" ] 83 | ---- 84 | <pair> against [ "clouds", "sky" ] 85 | ---- 86 | <record> against { "coordinates": [ 3.14, 2.17, "gamma" ] } 87 | ---- 88 | <record> against { 89 | "coordinates": [ 3.14, 2.17, "gamma" ], 90 | "journal": [ { "date": 1210, "entry": "Another cloudy day." } ] 91 | } 92 | ---- 93 | <record> against { 94 | "coordinates": [ 3.14, 2.17, "gamma" ], 95 | "journal": [ { "date": 1210 } ] 96 | } 97 | ---- 98 | -------------------------------------------------------------------------------- /foundation-test/Tests/Test Cases/lists--I.txt: -------------------------------------------------------------------------------- 1 | List (which should be empty) contains: 2 | List contains: 3 | S1 4 | S2 5 | S3 6 | S4 7 | S5 8 | S6 9 | S7 10 | S8 11 | S9 12 | S10 13 | S11 14 | S12 15 | S13 16 | S14 17 | S15 18 | S16 19 | And has length 16 20 | First is: S1 21 | Last is: S16 22 | -------------------------------------------------------------------------------- /foundation-test/Tests/Test Cases/lists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/foundation-test/Tests/Test Cases/lists.txt -------------------------------------------------------------------------------- /foundation-test/Tests/Test Cases/regexp--I.txt: -------------------------------------------------------------------------------- 1 | Text <I> pattern <I>: Match 2 | Text <X> pattern <%i>: Match 3 | Text <XX> pattern <X+>: Match 4 | Text <XX yy ZZZZ> pattern <X+ (y+) Z+>: Match 0=<yy> 5 | -------------------------------------------------------------------------------- /foundation-test/Tests/Test Cases/regexp.txt: -------------------------------------------------------------------------------- 1 | 'I' 'I' 2 | 'X' '%i' 3 | 'XX' 'X+' 4 | 'XX yy ZZZZ' 'X+ (y+) Z+' 5 | -------------------------------------------------------------------------------- /foundation-test/Tests/Test Cases/replacement--I.txt: -------------------------------------------------------------------------------- 1 | Text <Eggs and butter and sugar> pattern <and> replacement <or>: Eggs or butter or sugar (2 replacements) 2 | Text <Eggs and butter and sugar> pattern <%c> replacement <#>: ######################### (25 replacements) 3 | Text <Eggs and butter and sugar> pattern <%C+> replacement <word>: word word word word word (5 replacements) 4 | Text <Eggs and butter and sugar> pattern <(%C+)> replacement <word=%0>: word=Eggs word=and word=butter word=and word=sugar (5 replacements) 5 | Text <2012-11-30> pattern <(%d+)-(%d+)-(%d+)> replacement <%2/%1/%0>: 30/11/2012 (1 replacement) 6 | -------------------------------------------------------------------------------- /foundation-test/Tests/Test Cases/replacement.txt: -------------------------------------------------------------------------------- 1 | 'Eggs and butter and sugar' 'and' 'or' 2 | 'Eggs and butter and sugar' '%c' '#' 3 | 'Eggs and butter and sugar' '%C+' 'word' 4 | 'Eggs and butter and sugar' '(%C+)' 'word=%0' 5 | '2012-11-30' '(%d+)-(%d+)-(%d+)' '%2/%1/%0' 6 | -------------------------------------------------------------------------------- /foundation-test/Tests/Test Cases/semver--I.txt: -------------------------------------------------------------------------------- 1 | '1' --> 1 2 | '1.2' --> 1.2 3 | '1.2.3' --> 1.2.3 4 | '71.0.45672' --> 71.0.45672 5 | '1.2.3.4' --> null 6 | '9/861022' --> 9.0.861022 7 | '9/86102' --> null 8 | '9/8610223' --> null 9 | '9/861022.2' --> null 10 | '9/861022/2' --> null 11 | '1.2.3-alpha.0.x45.1789' --> 1.2.3-alpha.0.x45.1789 12 | '1+lobster' --> 1+lobster 13 | '1.2+lobster' --> 1.2+lobster 14 | '1.2.3+lobster' --> 1.2.3+lobster 15 | '1.2.3-beta.2+shellfish' --> 1.2.3-beta.2+shellfish 16 | 17 | 3 < 5 18 | 3 = 3 19 | 3 = 3.0 20 | 3 = 3.0.0 21 | 3.1.41 > 3.1.5 22 | 3.1.41 < 3.2.5 23 | 3.1.41 = 3.1.41+arm64 24 | 3.1.41 > 3.1.41-pre.0.1 25 | 3.1.41-alpha.72 > 3.1.41-alpha.8 26 | 3.1.41-alpha.72a < 3.1.41-alpha.8a 27 | 3.1.41-alpha.72 < 3.1.41-beta.72 28 | 3.1.41-alpha.72 < 3.1.41-alpha.72.zeta 29 | 1.2.3+lobster.54 = 1.2.3+lobster.100 30 | 31 | Compatibility range of 6.4.2-kappa.17 = [6.4.2-kappa.17,7-A) 32 | At-least range of 6.4.2-kappa.17 = [6.4.2-kappa.17,infty) 33 | At-most range of 6.4.2-kappa.17 = (-infty,6.4.2-kappa.17] 34 | 35 | [6.4.2-kappa.17,7-A) intersect [3.5.5,4-A) = empty -- changed 36 | [6.4.2-kappa.17,7-A) intersect [6.9.1,7-A) = [6.9.1,7-A) -- changed 37 | [6.9.1,7-A) intersect [6.4.2-kappa.17,7-A) = [6.9.1,7-A) 38 | [6.4.2,infty) intersect [3.5.5,infty) = [6.4.2,infty) 39 | [6.4.2,infty) intersect (-infty,3.5.5] = empty -- changed 40 | (-infty,6.4.2] intersect [3.5.5,infty) = [3.5.5,6.4.2] -- changed 41 | (-infty,6.4.2] intersect (-infty,3.5.5] = (-infty,3.5.5] -- changed 42 | -------------------------------------------------------------------------------- /foundation-test/Tests/Test Cases/semver.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/foundation-test/Tests/Test Cases/semver.txt -------------------------------------------------------------------------------- /foundation-test/Tests/Test Cases/stacks--I.txt: -------------------------------------------------------------------------------- 1 | Top of stack is: 2 | Stack is empty 3 | Top of stack is: Mercury 4 | Top of stack is: Venus 5 | Top of stack is: Mercury 6 | Top of stack is: Earth 7 | Top of stack is: Mercury 8 | Top of stack is: 9 | Stack is empty 10 | -------------------------------------------------------------------------------- /foundation-test/Tests/Test Cases/stacks.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/foundation-test/Tests/Test Cases/stacks.txt -------------------------------------------------------------------------------- /foundation-test/Tests/Test Cases/strings--I.txt: -------------------------------------------------------------------------------- 1 | Setup: Jack and Jill 2 | Plus: had a great fall 3 | Concatenation: Jack and Jill had a great fall 4 | Setup statically: < banana bread is fun > 5 | Trimmed: <banana bread is fun> 6 | Copied: <Jack and Jill had a great fall> 7 | Length: 30 8 | Modified: <JacQ and Jill had a great fall> 9 | fish eq Fish? 0 10 | fish ci-eq Fish? 1 11 | fish ne Fish? 1 12 | fish ci-ne Fish? 0 13 | -------------------------------------------------------------------------------- /foundation-test/Tests/Test Cases/strings.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/foundation-test/Tests/Test Cases/strings.txt -------------------------------------------------------------------------------- /foundation-test/Tests/Test Cases/trees--I.txt: -------------------------------------------------------------------------------- 1 | royal family 2 | Done 3 | (Root is M) 4 | royal family 5 | Male: Charles I of England 6 | Done 7 | (Prince's child is M) 8 | (verified) 9 | royal family 10 | Male: Charles I of England 11 | Male: Charles II of England 12 | Done 13 | (Prince's child is F) 14 | (Prince's child is M) 15 | (verified) 16 | (Prince's child is F) 17 | (Prince's child is M) 18 | (Prince's child is M) 19 | (verified) 20 | royal family 21 | Male: Charles I of England 22 | Female: Mary, Princess Royal 23 | Male: Charles II of England 24 | Male: James II of England 25 | Done 26 | -------------------------------------------------------------------------------- /foundation-test/Tests/Test Cases/trees.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inweb/5ed062f75afaa638db04986cfb757c1c570fa5f9/foundation-test/Tests/Test Cases/trees.txt -------------------------------------------------------------------------------- /foundation-test/Tests/foundation-test.intest: -------------------------------------------------------------------------------- 1 | -cases 'inweb/foundation-test/Tests/Test Cases' 2 | -cases [Markdown] 'inweb/foundation-test/Tests/Markdown Cases' 3 | -singular temp 4 | 5 | -recipe 6 | 7 | set: $A = $PATH/_Results_Actual/$CASE.txt 8 | set: $I = $PATH/$CASE--I.txt 9 | 10 | step: inweb/foundation-test/Tangled/foundation-test -test-$CASE $PATH/$CASE.txt >$A 2>&1 11 | or: 'produced errors in foundation-test' $A 12 | 13 | show: $A 14 | 15 | exists: $I 16 | or: 'passed without errors but no blessed output existed' 17 | 18 | match text: $A $I 19 | or: 'produced incorrect output' 20 | 21 | -end 22 | 23 | -recipe [Markdown] 24 | 25 | set: $A = $PATH/_Results_Actual/$CASE.txt 26 | set: $I = $PATH/$CASE--I.txt 27 | 28 | step: inweb/foundation-test/Tangled/foundation-test -locale console=utf-8 -test-markdown $PATH/$CASE.txt >$A 2>&1 29 | or: 'produced errors in foundation-test' $A 30 | 31 | show: $A 32 | 33 | exists: $I 34 | or: 'passed without errors but no blessed output existed' 35 | 36 | match text: $A $I 37 | or: 'produced incorrect output' 38 | 39 | -end 40 | -------------------------------------------------------------------------------- /foundation-test/versions.txt: -------------------------------------------------------------------------------- 1 | Abacus 1 *9Z99 31 December 9999 2 | -------------------------------------------------------------------------------- /licence-build/.gitignore: -------------------------------------------------------------------------------- 1 | # This gitignore was automatically written by inweb -gitignore 2 | # and is not intended for human editing 3 | 4 | debug-log.txt 5 | Woven/ 6 | Tangled/ 7 | !Tangled/*.preform 8 | Tests/intest-history.txt 9 | Tests/Transient/ 10 | Tests/hashes.intest 11 | Tests/_Results_Actual/ 12 | 13 | -------------------------------------------------------------------------------- /licence-build/Contents.w: -------------------------------------------------------------------------------- 1 | Title: licence-build 2 | Author: Graham Nelson 3 | Purpose: A small utility to process the JSON licence data from SPDX. 4 | Language: InC 5 | Licence: Artistic License 2.0 6 | 7 | Import: foundation 8 | 9 | Sections 10 | Build 11 | -------------------------------------------------------------------------------- /notes/release/7-1-0.md: -------------------------------------------------------------------------------- 1 | # Release notes for Inweb v7.1.0 2 | 3 | This release was made in April 2022, but was only a prerelease and was marked 4 | `-beta` in its semantic version number. The first proper release for major 5 | version 7 is [v7.2.0](7-2-0.md). 6 | 7 | <hr> 8 | 9 | Return to the [table of Inweb release notes here](../version_history.md). 10 | -------------------------------------------------------------------------------- /notes/release/7-2-0.md: -------------------------------------------------------------------------------- 1 | # Release notes for Inweb v7.2.0 2 | 3 | This release was made in August 2022, and was the first proper release for major 4 | version 7. This release is the baseline for Inweb release notes from here on. 5 | 6 | The prerelease version [v7.1.0](7-1-0.md), a stopgap during the period when 7 | Inform's open-sourcing was getting going, is substantially the same program. 8 | However, 7.2.0 corrects a few bugs, and the `foundation` library added a number 9 | of useful functions, notably to do with JSON file parsing and validation. 10 | 11 | <hr> 12 | 13 | Return to the [table of Inweb release notes here](../version_history.md). 14 | -------------------------------------------------------------------------------- /notes/version_history.md: -------------------------------------------------------------------------------- 1 | # Version history 2 | 3 | See [versioning](versioning.md) for details of Inweb's version numbering. 4 | 5 | Links in the following table are to the archive of release notes, which 6 | covers only the post-2022 open-source era of Inweb. (Earlier versions of Inweb 7 | were sufficiently different to be not worth covering here.) 8 | 9 | Version | Build | Date | Highlights 10 | --------------------------- | ----- | -------------- | ---------- 11 | [7.1.0](release/7-1-0.md) | 1A96 | April 2022 | Prereleased beta 12 | [7.2.0](release/7-2-0.md) | 1B15 | August 2022 | First proper release 13 | -------------------------------------------------------------------------------- /notes/versioning.md: -------------------------------------------------------------------------------- 1 | # Branching and versioning policy 2 | 3 | ## Version numbers for Inweb 4 | 5 | Inweb is developed in public. Command-line users comfortable with git can always get the very latest state. But that potentially means endless different versions of Inweb out there in the wild. To clarify this situation, all versions are numbered, and we will distinguish between "release" versions, which are ready for public use, and "unstable" versions, which are not. 6 | 7 | "Release" versions have simple version numbers in the shape `X.Y.Z`: for example, `7.1.0`. 8 | 9 | "Unstable" versions are commits of the software between releases. These have much longer version numbers, containing an `-alpha` or `-beta` warning. For example, `7.1.0-beta+1B14`. (The `+1B14` is a daily build number, also only 10 | present on version numbers of unstable versions.) 11 | 12 | Note that `inweb -version` prints out the full version number of the core 13 | source it was compiled from. This one is clearly unstable: 14 | 15 | $ inweb/Tangled/inweb -version 16 | inweb version 7.1.0-beta+1B14 'Escape to Danger' (9 August 2022) 17 | 18 | (Since around 2011, major versions of Inweb have been given code-names according to the 19 | episodes of the 1964 Doctor Who serial [The Web Planet](https://en.wikipedia.org/wiki/The_Web_Planet). 20 | Major version 8 will be "Crater of Needles".) 21 | 22 | Release notes for releases since 2022 can be found [here](version_history.md). 23 | 24 | ## Branching 25 | 26 | In the core Inweb repository, active development is on the `master` branch, at least for now. That will always be a version which is unstable. All releases will be made from short branches off of `master`. For example, there will soon be a branch called `r7.1`. This will contain as few commits as possible, ideally just one, which would be the actual release version of 7.1.0. But if there are then point updates with bug fixes, say 7.1.1, 7.1.2, and so on, those would be further commits to the `r7.1` branch. Later, another short branch from `master` would be `r7.2`. 27 | 28 | Releases will be tagged with their version numbers, so the commit representing 7.1.0 will be tagged `v7.1.0`. These will be presented under Releases in the usual Github way, from the column on the right-hand side of the home page. We expect to provide the app installers as associated binary files on those releases, though that won't be the only place they are available. 29 | -------------------------------------------------------------------------------- /scripts/first.sh: -------------------------------------------------------------------------------- 1 | echo "(A script to make a first build of Inweb)" 2 | 3 | PLATFORM="$1" 4 | 5 | if [ "$PLATFORM" = "" ]; then 6 | echo "This script needs a parameter for the platform you are working on: macos, macos32, macosarm, macosuniv, linux, windows, unix" 7 | exit 1 8 | fi 9 | 10 | echo "(You have chosen the platform '$PLATFORM')" 11 | 12 | echo "(Step 1 of 3: copying the platform settings)" 13 | if ! ( cp -f inweb/Materials/platforms/$PLATFORM.mk inweb/platform-settings.mk; ) then 14 | echo "(Okay, so that failed. Is this a platform supported by Inweb?)" 15 | exit 1 16 | fi 17 | 18 | echo "(Step 2 of 3: copying the right flavour of inweb.mk)" 19 | if ! ( cp -f inweb/Materials/platforms/inweb-on-$PLATFORM.mk inweb/inweb.mk; ) then 20 | echo "(Okay, so that failed. Is this a platform supported by Inweb?)" 21 | exit 1 22 | fi 23 | 24 | echo "(Step 3 of 3: building inweb from its ready-tangled form)" 25 | if ! ( make -f inweb/inweb.mk initial; ) then 26 | echo "(Okay, so that failed. Maybe your environment doesn't have the compilers anticipated?)" 27 | exit 1 28 | fi 29 | 30 | echo "(Done!)" 31 | -------------------------------------------------------------------------------- /scripts/inweb.giscript: -------------------------------------------------------------------------------- 1 | # This is "inweb.giscript", a script used to generate the ".gitignore" file 2 | # in the inweb repository. Do not edit ".gitignore" directly. Instead, 3 | # edit this script, and then rebuild ".gitignore" with the command: 4 | 5 | # inweb/Tangled/inweb -prototype inweb/scripts/inweb.giscript -gitignore inweb/.gitignore 6 | 7 | .DS_Store 8 | inweb.mk 9 | platform-settings.mk 10 | Manual.html 11 | debug-log.txt 12 | tags 13 | Woven/ 14 | Tangled/inweb 15 | Tangled/inweb_* 16 | Tangled/*.o 17 | Tangled/*.exe 18 | Tests/intest-history.txt 19 | Tests/Transient/ 20 | Tests/hashes.intest 21 | Tests/_Results_Actual/ 22 | foundation-test/foundation-test.mk 23 | foundation-test/Tests/Test Cases/_Results_Actual/ 24 | foundation-test/Tests/Markdown Cases/_Results_Actual/ 25 | foundation-module/Woven/ 26 | licence-build/licence-build.mk 27 | Examples/*.o 28 | Examples/*.pdf 29 | Examples/*.html 30 | Examples/goldbach/Tangled 31 | Examples/goldbach/Woven 32 | Tests/Test Cases/_Scan_Actual/ 33 | Tests/Test Cases/_Tangled_Actual/ 34 | Tests/Test Cases/_Tangled_Console/ 35 | Tests/Test Painter/_Results_Actual/ 36 | Tests/Test Weave Tree/_Results_Actual/ 37 | Tests/Test Weave Tree/_Results_Console/ 38 | -------------------------------------------------------------------------------- /versions.txt: -------------------------------------------------------------------------------- 1 | 1 3K27 April 2006 First Perl version 2 | 4 5Z71 April 2009 3 | The Web Planet 5 6H66 April 2011 Ported to C 4 | The Zarbi 6 6L02 May 2014 5 | --------------------------------------------------------------------------------