diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 60 |
1 files changed, 56 insertions, 4 deletions
@@ -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 |