-
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
0696714
commit f9f8c24
Showing
2 changed files
with
129 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -7,7 +7,7 @@ plugins { | |
} | ||
|
||
group 'net.signbit.samx' | ||
version '0.3.6' | ||
version '0.3.7' | ||
|
||
sourceCompatibility = 1.8 | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,128 @@ | ||
info: | ||
|
||
title: The SAMx Language | ||
author: | ||
|
||
personname: | ||
|
||
firstname: Florin | ||
surname: Iucha | ||
|
||
copyright: | ||
|
||
year: 2020 | ||
holder: Florin Iucha | ||
|
||
revhistory: | ||
|
||
revision: | ||
|
||
revnumber: 0.1 | ||
date: 2020-04-20 | ||
authorinitials: fi | ||
revremark: First draft | ||
|
||
chapter: Introduction | ||
|
||
This document describes the SAMx language. SAMx is an extension to | ||
{SAM}(:https://mbakeranalecta.github.io/sam/index.html), which | ||
according to its website is \"an extensible markup language with | ||
syntax similar to Markdown but semantic capability similar to XML.\" | ||
|
||
Please read the introductory sections to {SAM | ||
Language}(:https://mbakeranalecta.github.io/sam/language.html) for an | ||
overview of the SAM design rationale. | ||
|
||
section: Why SAMx? | ||
|
||
The original SAM was developed using hand-written Python and | ||
certain lexing/parsing heuristics. The tool combines parsing, | ||
pretty-printing and XML export into one set of classes making it | ||
difficult to add new functionality. | ||
|
||
The needed extra functionality that spurred the development of | ||
SAMx is adding support for conditionalized rows in tables as I | ||
desired to employ a scheme similar to literate programming in | ||
documenting certain data structures in a format that is suitable | ||
for both generating readable end-user documentation and generating | ||
source code. A good analogy would be network protocols. | ||
|
||
chapter: Document Structure | ||
|
||
A SAMx document is comprised of blocks of text. Blocks of text can | ||
be\: | ||
|
||
* paragraphs | ||
|
||
* lists, either ordered or unordered | ||
|
||
* tabular data | ||
|
||
* field definitions | ||
|
||
* structured records | ||
|
||
* definition or references to fragments | ||
|
||
* references to external resources | ||
|
||
* typed (or named blocks) | ||
|
||
* verbatim code blocks | ||
|
||
chapter: SAMx Tools | ||
|
||
The following tools are part of the SAMx distribution\: | ||
|
||
* pretty_print | ||
|
||
* to_xml | ||
|
||
section: pretty_print | ||
|
||
Pretty print is a tool that parses the SAMx document and then | ||
recreates it by visiting every node. The pretty printer does not | ||
change the structure of the document, but will normalize white | ||
spaces by replacing consecutive empty lines with a single empty | ||
line, as well as wrapping the paragraphs to 72 columns. | ||
|
||
If the result of the pretty-printed document matches the input the | ||
tool will produce the \"OK\: Prettified output matched input\" | ||
diagnostic. Otherwise the tool will provide an indication of the | ||
first mismatch location. | ||
|
||
chapter: Building SAMx from source | ||
|
||
The two prerequites are Git, for downloading the source code and Java | ||
for building and executing the tools. | ||
|
||
First, you need to obtain a source distribution by either cloning the | ||
{repository}(:https://github.com/0x8000-0000/samx-java/) or | ||
downloading a | ||
{release}(:https://github.com/0x8000-0000/samx-java/releases) from | ||
GitHub. | ||
|
||
Simply run \"./gradlew clean build assembleDist\" to build, test and | ||
create a binary distribution. The binary distribution is generated in | ||
\"build/distributions/\" directory. | ||
|
||
section: Building this Document from Source | ||
|
||
This document is available in SAMx source for in the doc | ||
subdirectory of a source or a binary distribution. | ||
|
||
Run \"./bin/to_xml -i doc/samx_language.samx -b -o samx_book.xml\" | ||
to convert it. | ||
|
||
Then run \"jing -f docbook.rng samx_book.xml\" to validate it. | ||
|
||
Then run \"dblatex samx_book.xml\" to convert this book to PDF. | ||
|
||
chapter: Frequently Asked Questions | ||
|
||
TODO | ||
|
||
chapter: References | ||
|
||
TODO | ||
|