aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md60
1 files changed, 56 insertions, 4 deletions
diff --git a/README.md b/README.md
index b7933c2..492c49a 100644
--- a/README.md
+++ b/README.md
@@ -44,10 +44,62 @@ FSharp markdown.
Global Types
-Person1 - Lexer
+- Person1 - Lexer `(lex : string -> Token list)`, PreProcessor `(preProcess : string -> string)`
+- Person2 - Formatting / print HTML: Header, Paragraph, Lists, Table ->
+Simple parser `(printHtml : ParsedObj list -> string)`, `(printToFile : string -> ())`
+- Person3 - Tables: Spreadsheet, DSL `(updateTable : Table -> Table)`
+- Person4 - Citations (extensible), Table of contents -> Simple Parser
-Person2 - Formatting / print HTML: Header, Paragraph, Lists, Table -> Simple parser
+## Overview
-Person3 - Tables: Spreadsheet, DSL
+### Pre Processor
-Person4 - Citations (extensible), Table of contents -> Simple Parser \ No newline at end of file
+Goes through the source of the markdown file and processes #define like directives.
+
+```fsharp
+type Macro = { Name : string; Body : string }
+
+val preProcess = string -> string
+
+val readMacros = string -> Macro list
+
+val replaceMacro = string -> Macro list -> string
+```
+
+### Lexer
+
+Lexes the source into tokens.
+
+```fsharp
+type Token = Word of string | TripleTick | Pipe ...
+
+val lex = string -> Token list
+```
+
+### Parser
+
+Parses the Token list
+
+```fsharp
+type InlineObj = Word | FormattedWord
+type Line = InlineObj list
+type PInside = Line
+type ParsedObj = Paragraph of PInside list | CodeBlock | MDList...
+
+type Table = Line list list
+
+val parse = Token list -> ParseObj list
+
+// outputs table with updated cells, which is determined by the DSL.
+val updateTable = Table -> Table
+```
+
+### AST
+
+Outputs html
+
+```fsharp
+val printHtml = ParsedObj list -> string
+
+val printToFile = string -> ()
+``` \ No newline at end of file