2008-09-07 19:20:31 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								USING:  help.markup  help.syntax  strings  io  ;
  
						 
					
						
							
								
									
										
										
										
											2008-07-16 00:56:25 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								IN:  farkup  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								HELP:  convert-farkup  
						 
					
						
							
								
									
										
										
										
											2008-09-07 19:20:31 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{ $values { "string"  string  } { "string'"  string  } }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{ $description "Parse a Farkup string and convert it to an HTML string."  } ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								HELP:  write-farkup  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{ $values { "string"  string  } }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{ $description "Parse a Farkup string and writes the resulting HTML to "  { $link output-stream  } "."  } ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-23 02:18:24 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								HELP:  parse-farkup  
						 
					
						
							
								
									
										
										
										
											2008-09-07 19:20:31 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{ $values { "string"  string  } { "farkup"  "a Farkup syntax tree node"  } }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{ $description "Parses Farkup and outputs a tree of "  { $link "farkup-ast"  } "."  } ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								HELP:  (write-farkup)  
						 
					
						
							
								
									
										
										
										
											2009-01-27 16:35:51 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{ $values { "farkup"  "a Farkup syntax tree node"  } { "xml"  "an XML chunk"  } }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{ $description "Converts a Farkup syntax tree node to XML."  } ;
 
							 
						 
					
						
							
								
									
										
										
										
											2008-09-07 19:20:31 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								ARTICLE: "farkup-ast"  "Farkup syntax tree nodes" 
							 
						 
					
						
							
								
									
										
										
										
											2008-09-19 16:46:02 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								"The "  { $link parse-farkup } " word outputs a tree of nodes corresponding to the Farkup syntax of the input string. This tree can be programatically traversed and mutated before being passed on to "  { $link write-farkup } "."  
						 
					
						
							
								
									
										
										
										
											2009-10-01 15:56:36 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{ $subsections
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    heading1
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    heading2
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    heading3
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    heading4
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    strong
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    emphasis
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    superscript
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    subscript
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    inline-code
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    paragraph
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    list-item
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    unordered-list
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ordered-list
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    table
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    table-row
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    link
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    image
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    code
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								} ;
 
							 
						 
					
						
							
								
									
										
										
										
											2008-09-07 19:20:31 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								ARTICLE: "farkup"  "Farkup" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								"The "  { $vocab-link "farkup"  } " vocabulary implements Farkup (Factor mARKUP), a simple markup language. Farkup was loosely based on the markup languages employed by MediaWiki and "  { $url "http://reddit.com"  } "."  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$nl
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								"The main entry points for converting Farkup to HTML:"  
						 
					
						
							
								
									
										
										
										
											2009-10-01 15:56:36 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{ $subsections
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    convert-farkup
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    write-farkup
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}
							 
						 
					
						
							
								
									
										
										
										
											2008-09-07 19:20:31 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								"The syntax tree of a piece of Farkup can also be inspected and modified:"  
						 
					
						
							
								
									
										
										
										
											2009-10-01 15:56:36 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{ $subsections
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    parse-farkup
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    (write-farkup)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    "farkup-ast" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								} ;
 
							 
						 
					
						
							
								
									
										
										
										
											2008-09-07 19:20:31 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								ABOUT: "farkup"