The idea is to make typesetting with Groff very simple and intuitive for any user - not just programmers and hackers. The markup we are working on is called Typesetting Markup Language (TML). So it would convert html-like commands and generate a Groff document from it.
Right now I am trying to do a prototype which generated Groff in the backend, but the idea is to have a general purpose markup that could also be used to generate LaTex/Contex, HTML xml etc....
In Perl I am able to do most of this with regular expressions, but I'm hitting my head against the wall when it comes to multiple formatting commands within a group <...,...,...<
Also to note....I am NOT a programmer of developer - I am a hobbyist and doing this for fun!
So there is my introduction! If any of you have any words of wisdom on where to begin I would love to hear from you.
I literally started playing with Scheme last night while i wait for my book order (come on amazon...send me my books!)
My idea was that I could read a line of text from a file at a time. My understanding is that the input would be read into an "s-_expression_" (which I understand to basically be a list). Then could "car" the first item of the list and match it against my "tags" or "formatting commands" (which would be defined as something like below)
(define chapter "[chapter]")
(define list:digit "[list:digit]")
(define list:alpha "[list:alpha]")
(define end-list "[end]")
(define close-command-group ">")
(define command-group-begin "<")
(define command-group-end "<")
(define bold "bold")
(define smallcap "smallcap")
(define dropcap "dropcap")
And then do something based on what token that is encountered.
This is my first attempt at functional programming so I realize I may not be approaching this in the best way.
Regards, and looking forward to playing with Scheme!
yves