-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
96b87f5
commit 14b5cbe
Showing
2 changed files
with
19 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
(C (H " Lilt, a Simple Markup Parser") | ||
(P (Q "\"To sing in a light manner.\"")) | ||
(P (S "This is the simplest markup parser I could come up with for my own use.") | ||
(S " It's about 75 lines of dirt-simple Scheme, and could be made smaller.") | ||
(S " It works on a tiny subset of Markdown defined strictly for its utility in long-form fiction writing: a plain text file with exactly one header and paragraphs separated by blank lines.") | ||
(S " It emits s-expressions that can be easily converted into various output formats such as HTML.") | ||
(S " See the enclosed file OUTPUT for the output from parsing this file.")) | ||
(P (S "It doesn't do images, bold or italic text, tables, bulleted lists, or even hyperlinks.") | ||
(S " It really is just for old-school fiction writing with no distractions.")) | ||
(P (S "The parser makes the following assumptions: (1) that each major unit of text will have a single title or chapter heading, denoted by a line starting with `#', (2) followed by a blank line, (3) followed by paragraphs of text.") | ||
(S " Paragraphs are separated by empty lines.")) | ||
(P (S "The tags it emits are as follows: 'C' marks a chapter, 'H' a header, 'P' a whole paragraph, 'S' a sentence or sentence fragment (meaning no special formatting is needed), and 'Q' a quotation (so that you can apply formatting if you wish).") | ||
(S " In printed fiction, sometimes quotations are formatted differently, for example.")) | ||
(P (S "It's written using scsh (The Scheme Shell), but the only non-R5RS bits are in the TEST-THE-PARSER procedure at the end.")) | ||
(P (S "Final note: This code was written by Richard M.") | ||
(S " Loveland and is placed in the Public Domain.") | ||
(S " All warranties are disclaimed."))) | ||
(c (h " Lilt, a Simple Markup Parser") | ||
(p (q "\"To sing in a light manner.\"")) | ||
(p (s "This is the simplest markup parser that could possibly work (for me).") | ||
(s " It's about 75 lines of Scheme, and could be made smaller.") | ||
(s " It works on a tiny subset of Markdown: a plain text file with exactly one header and paragraphs separated by blank lines.") | ||
(s " It emits s-expressions that can be converted into output formats such as HTML.") | ||
(s " See the enclosed file OUTPUT for the output from parsing this file.")) | ||
(p (s "It doesn't do images, bold or italic text, tables, bulleted lists, or even hyperlinks.") | ||
(s " It really is very simple.")) | ||
(p (s "The parser makes the following assumptions: first, that each file will have a single title or heading, denoted by a line starting with '#'; second, that the heading will be followed by a blank line, followed by paragraphs of text.") | ||
(s " Finally, paragraphs are separated by empty lines, and sentences are split by periods.")) | ||
(p (s "The tags it emits are as follows: 'C' marks a chapter, 'H' a header, 'P' a whole paragraph, 'S' a sentence, and 'Q' a quotation (so that you can apply formatting such as italics if you wish).")) | ||
(p (s "Final note: This code was written by Richard Loveland and is placed in the Public Domain.") | ||
(s " All warranties are disclaimed."))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters