Hi List, 

when writing the picolisp-wiki-mode for Emacs, I began to understand why
mark-up syntax is usually symmetric, i.e. the end-tag looks like a
180° mapping of the start-tag (e.g. the JSP Scriplet <% ... %>). 

This makes parsing the file and constructing regexp much easier, because
its always clear which end-tag belongs to which start-tag. 

The PicoLisp Wiki Syntax does not follow this convention:

   ,-------------------------------------------------------------------
   | 3{Heading}                 Heading (level 3)
   |                            Levels 1 .. 6 are allowed
   | 
   | &{3}                       Insert 3 line breaks
   | &{-3}                      Insert 3 line breaks, clear float style
   | 
   | /{italic}                  Italic font
   | !{bold}                    Bold font
   | _{underline}               Underlined font  [...]
   `-------------------------------------------------------------------

Considering the possible nesting of elements (e.g. a bold word inside a link
inside a list item), it becomes very difficult to construct regexp that
reliably identify elements (necesary for fontification) because there
are so many closing braces '}' around (and there might even be closing
braces in the text itself).

What about changing the syntax to this:

   ,-------------------------------------------------------------------
   | 3{Heading}3                 Heading (level 3)
   |                            Levels 1 .. 6 are allowed
   | 
   | &{3}&                       Insert 3 line breaks
   | &{-3}&                      Insert 3 line breaks, clear float style
   | 
   | /{italic}/                  Italic font
   | !{bold}!                    Bold font
   | _{underline}_               Underlined font  [...]
   `-------------------------------------------------------------------
 
I know, its one more char to type (not when you use the
picolisp-wiki-mode for Emacs) and looks ugly, but would make things a
bit more 'standard' and easier to deal with. Its not really a big issue,
since the picolisp-wiki-mode works fine even if fontification is a bit
random. Don't know if it would be an improvement and worth the pain. 

-- 
cheers,
Thorsten


-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to