[TxMt] Lout language definition?

Alaric Snell-Pym alaric at snell-pym.org.uk
Mon Aug 7 13:08:22 UTC 2006


Hello there

Has anyone thought about a language definition for the Lout document
formatting system?

I may write one myself, but I'm a bit nervous about it since Lout has
an awkwardly wide range of ways of indicating the beginnings and ends
of things.

For example, a document header for a report might look like:

@SysInclude { tbl }
@SysInclude { report }

@Report
   @Title { Blah blah }
   @Author { Alaric Snell-Pym (alaric at snell-systems.co.uk) }
   @Institution { Snell Systems }
   @InitialLanguage { EnglishUK }
   @DateLine { June, 2006 }
   @PageHeaders { Titles }
   @InitialSpace { tex }
   @Abstract { In this specification, we describe a blah blah blah. }
//

...with the mysterious "//" ending the metadata section.

Things like chapters, appendices, sections, subsections, and so on
are delimited like so:

@Section
   @Tag { documentcontrol }
   @Title { Document Control }
@Begin

...content...

@End @Section

While paragraphs don't have an explicit end, they are just separated
with "@PP" markers:

@PP
This is a pargraph of text, blah blah blah

@PP
This is the next paragraph! Whodathunk?

Figures, and many other such block-level objects, have no defined
ending:

...text...

@Figure
   @Caption { The prototype }
   @IncludeGraphic prototype.eps

...text...

While bulleted lists have an explicit @EndList marker, but each list
item is delimited with curly braces:

@BulletList

@ListItem {
	3x resistor at 4p each
}

@ListItem {
	1x AVR micro-controller at @Sterling""1.92 each
}

@ListItem {
	1x IrDA transceiver module at @Sterling""2.33 each
}

@ListItem {
	1x 3.6v NiMH battery at @Sterling""2.62 each
}

@ListItem {
	2x LED at 25p each
}

@ListItem {
	1x Charging connector at 57p each
}

@ListItem {
	1x socket for AVR micro-controller at 5p each
}

@ListItem {
	1x PCB at 9.75 Euros each, or about @Sterling""6.67
}

@EndList

It's all rather messy! I suspect I'd be busy for days finding new
ways to delimit scopes!

TIA,

ABS

--
Alaric Snell-Pym
Work: http://www.snell-systems.co.uk/
Play: http://www.snell-pym.org.uk/alaric/
Blog: http://www.snell-pym.org.uk/categories/alaric/





More information about the textmate mailing list