Home About Syntax

Syntax (status:Draft; version:HEAD)

## doctype=t3g; version=head; manual=http://t3g.org/_syntax_head.html
## valid t3g must be started with ^^^ one empty or pseudo comment that contains pragma instructions


	.title: T3G Syntax
	.description: official syntax manual
	.created: 2017-08-20
	.updated: 2017-09-21

	.mime-type: text/t3g-document; text/t3g; text/plain; 
	.t3g-schema: default

	.access: public, worldwide
	.license: MIT License
	.sponsored_by: Suicide.Ventures 

	T3G (pronounced as [teg]) 

	Name is inspired by the T.A.G. is a DOS-based 
	bulletin board system (BBS) released from 1986 to 2000,
	that had symbolic(ASCII)-graphic for structuring and appearance.

	T3G is the simplest human-machine-readable markup language 
	for creating tree/graph structed documents,
	extended with tag-objects, hashtags and other features.

	The format is aimed to handling text documents with structure binds, 
	it remains easy, like editing text in a simple text editor.
	Also, it promises more efficiency instead of using appearance formats
	like markdown or only structure forced like xml,json and
	more handy than TeX or similar.



		.Any record in the T3G-document is named the nodeline (a semantic/logical block)

		.Each nodeline begins with a bullet (dot symbol "."),
		 and continues on the next lines (until a new bullet of the next nodeline).
		 You can freely use dots ... among of the textbody of a nodeline, 
		 because only first dot in a new line signed as bullet.
			.Sub-nodelines must be indented with one <tab> (not spaces) relatively previous nodeline.
			 	However, styling of nodeline itself is admits 
			 	any indents with tabs or spaces within nodeline textbody.

				This is also admits skipping any ^^^ numbers of a lines.
				All you need to keep nodeline borders is the bullets.

		. It's very simple to watch:
			. the number of bullets 
				is always equal
			. to the number 
				of nodelines,
			. and indicates their beginnings. ## 4 bullets = 4 different nodelines 


		.tagname: nodeline is can be started with a semantic tagname that ends by colon (:),
			the tagname may contains letters, digits and other symbols, but not spaces.

			.tag1.tag2: tagname is can represents as dot-splitted object style
			.tag1,tag2: tagname is can contains inline set of tags
			.tag1+tag2: tagname is can contains complex expression for math sets or similar

			.__body: is reserved word and can't be used for tagname

		.!nodeline is may contains a modificator -- the special symbol after bullet, that means several state of nodeline,
			.!important state
			.*freezed state
			.-striked out task
			.^tag: raised/picked up task

		.in the text body of nodeline may be used several variables: 
			#hashtag - is the label for reference to most used name, brand or like other: #blockchain #btc #linux #oracle
			@@user or @@GROUP - for verbosing users or roles in several use cases
			$$var(value) - variable with value  
			~~link - link to:
				~~path.of.tag.to.nodeline - link within current document
				~~/path/to/document~~tag.to - link to relative path to other documents and their nodelines
				~~http://site.com - link to web resource or other resource begins by protocol
				~~[m]http://imgur.com/image.png - [modificator] for links, it may be [embed] for several kind of T3G-document


		\. use backslash for escaping special symbols: . $ @ # ~ 

			. _italic_
			. *bold*
			. --strikedout--
			. __underlined__

		## comment begins with two hashes and continues to the end of line.

		.All nodelines in T3G-document build namespace which started from the root of a document,
			and have access to the following structure:

			.A: foobar
				.B: foobar
					.C: foobar
						.something one
						.something two
						.something three

			by path of the form: .A.B.C.[2] ## this path refers to "something two"
			[2] is used for addressing to untagged nodelines 

			if tagged nodelines or .A.[1..10] 
			or direct accesing to a uniq tagname like: .SomeUniqTag
			But, rules of human or machine handling T3G-document isn't a part of T3G specification,
			and may be implements


		.^dev: to develop the website with #blockchain for @@john $$time(start=2017-10-12;end=2017-10-20)
			.^proj: make blueprint of website @@peter ## raised task branch
			.ui: to design interface @@maria 
			.code: coding website engine @@ewan

				.deploy: upload website on a webserver in #hosting at ~~http://hoster.com
				.demo: show to customer


.FileExtensions: t3g-environment uses two-step file extension template -- filename.class.ext

.T3G-Document: is the source of text data in t3g-syntax and that can based on T3G-schema,
	.filetemplate: filename.doc.t3g -- points to document class in t3g-format

.T3G-Schema: document as a schema of a t3g-document and that are declared:
	.filetemplate: filename.scm.t3g -- points to schema class in t3g-format

	.set of options
	.base/valid structure: working and service sections (like attachment or )
	.handlers and rules
	.schema and rules of document rendering: 
	.folder structure
		.as a case for enhancing in-schema scenario scripting, it can be used Python3 as common language
		 by special syntax like PSP (Python Server Pages) or Parser3