From 7ef580ba17b7622ec7569602e2879d465b94fad2 Mon Sep 17 00:00:00 2001 From: Jonathan Bernard Date: Tue, 12 May 2015 20:30:23 -0500 Subject: [PATCH] Bugfix in LiterateMarkdownGenerator. Documentation moved to doc.jdb-labs.com. --- README.md | 21 +++++++++++-------- build.gradle | 2 +- .../groovy/com/jdblabs/jlp/JLPMain.groovy | 2 +- .../jlp/LiterateMarkdownGenerator.groovy | 2 +- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index b91b1ba..bfff072 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # J Literate Programming +* [Source](https://git.jdb-labs.com/jdb-labs/jlp) +* [Annotated Source and Documentation](https://doc.jdb-labs.com/jlp/current/) + ## Overview *Jonathan's Literate Programming* is my take on literate programming. This project grew out of a desire for a documentation system that: @@ -57,19 +60,19 @@ This project is in its infancy and some of the larger goals are still unmet: ## Project Architecture -JLP process it's documentation. The latest documentation is available at -http://jdbernard.github.io/jlp +JLP processes it's own documentation. The latest documentation is available at +https://doc.jdb-labs.com/jlp/current/ Below are some starting points. ### Control and Flow -* [JLPMain](https://jdbernard.github.io/jlp/doc/src/com/jdblabs/jlp/JLPMain.groovy.html) +* [JLPMain](https://doc.jdb-labs.com/jlp/current/src/main/groovy/com/jdblabs/jlp/JLPMain.groovy.html) The entry point to the JLP executable. Parses the command line input and sets up the processor. -* [Processor](https://jdbernard.github.io/jlp/doc/src/com/jdblabs/jlp/Processor) +* [Processor](https://doc.jdb-labs.com/jlp/current/src/main/groovy/com/jdblabs/jlp/Processor.groovy.html) The Processor processes one batch of input files to create a set of output files. It holds the intermediate state needed by the generators and coordinates the @@ -77,14 +80,14 @@ Below are some starting points. processor only generates HTML documentation and will likely be renamed in the future to reflect this. -* [JLPBaseGenerator](https://jdbernard.github.io/jlp/doc/src/com/jdblabs/jlp/JLPBaseGenerator) +* [JLPBaseGenerator](https://doc.jdb-labs.com/jlp/current/src/main/groovy/com/jdblabs/jlp/JLPBaseGenerator.groovy.html) The Generator processes one input file. It parses the AST for the input file and emits the final documentation for the file. JLPBaseGenerator implementations are expected to be tightly coupled to Processor implementations. -* [LiterateMarkdownGenerator](https://jdbernard.github.io/jlp/doc/src/com/jdblabs/jlp/LiterateMarkdownGenerator) +* [LiterateMarkdownGenerator](https://doc.jdb-labs.com/jlp/current/src/main/groovy/com/jdblabs/jlp/LiterateMarkdownGenerator.groovy.html) This implemetation of JLPBaseGenerator generates literate-style documentation (as opposed to API-style), using @@ -93,11 +96,11 @@ Below are some starting points. ### Parsing -* [JLPParser](https://jdbernard.github.io/jlp/doc/src/com/jdblabs/jlp/JLPParser) +* [JLPParser](https://doc.jdb-labs.com/jlp/current/src/main/groovy/com/jdblabs/jlp/JLPParser.groovy.html) A very simple interface for parsing JLP input. -* [JLPPegParser](https://jdbernard.github.io/jlp/doc/src/com/jdblabs/jlp/JLPPegParser) +* [JLPPegParser](https://doc.jdb-labs.com/jlp/current/src/main/groovy/com/jdblabs/jlp/JLPPegParser.groovy.html) A [PEG parser](http://en.wikipedia.org/wiki/Parsing_expression_grammar) implemented using the [parboiled](http://www.parboiled.org) library. This @@ -107,6 +110,6 @@ Below are some starting points. ### Abstract Syntax Tree -* [SourceFile](https://jdbernard.github.io/jlp/doc/src/com/jdblabs/jlp/JLPPegParserSourceFile) +* [SourceFile](https://doc.jdb-labs.com/jlp/current/src/main/groovy/com/jdblabs/jlp/JLPPegParserSourceFile.groovy.html) The top-level AST element. This represents a source file. diff --git a/build.gradle b/build.gradle index 7c8923e..8c92e7c 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ apply plugin: "groovy" apply plugin: "maven" group = "com.jdblabs" -version = "1.8" +version = "1.9" repositories { mavenLocal() diff --git a/src/main/groovy/com/jdblabs/jlp/JLPMain.groovy b/src/main/groovy/com/jdblabs/jlp/JLPMain.groovy index 4306fd7..d816d5c 100644 --- a/src/main/groovy/com/jdblabs/jlp/JLPMain.groovy +++ b/src/main/groovy/com/jdblabs/jlp/JLPMain.groovy @@ -19,7 +19,7 @@ import org.slf4j.LoggerFactory */ public class JLPMain { - public static final String VERSION = "1.8" + public static final String VERSION = "1.9" private static Logger log = LoggerFactory.getLogger(JLPMain.class) diff --git a/src/main/groovy/com/jdblabs/jlp/LiterateMarkdownGenerator.groovy b/src/main/groovy/com/jdblabs/jlp/LiterateMarkdownGenerator.groovy index d56103b..1e216b8 100644 --- a/src/main/groovy/com/jdblabs/jlp/LiterateMarkdownGenerator.groovy +++ b/src/main/groovy/com/jdblabs/jlp/LiterateMarkdownGenerator.groovy @@ -248,7 +248,7 @@ public class LiterateMarkdownGenerator extends JLPBaseGenerator { [lineNumber, line] } /// Sort by line number. - codeLines.sort({ i1, i2 -> i1[0] - i2[0] } as Comparator) + codeLines.sort { i1, i2 -> i1[0] <=> i2[0] } codeLines = codeLines.collect { arr -> arr[1] }