\HHT \^m readmeh\\B#aaddee 
\Tw800p10RDc3ac\Vac\Fs3va\_
      
\bType or paste your own \^m - text and convert it to html:b\\_\_    
\OpnCompile"adefault.php"\Xnsource_text"c80r10\\_\_
\Iusubmit"vConvert"\_

V\ R\\RDw800c3vt#ccddeeFs2va  

Not every web page uses all set of HTML tags, and some tags are often repeated in an entire web site. \_
Moreover, tags use redundant notations themselves.\_\_\_

\fs3vaB \^m - short markup languagef\\fs2va\_\_

\-\- - is a set of shortcuts for often used tags and parts of text. \_
\-\- - does not replace html but may need working knowledge of html.\_
\-\- - can be changed, adjusted, or reset using \^s .\_\_

For example, tag \<table\> is shortened with \.T or \.t \_
Tag \<table width=200 align=top border=4\> is shortened with '\.Tw200atb4 ' \_\_
       
Of course, this \arreadme.txt" readme.txt \  is written in sml.\_
Text of any example can also tested using "Convert" text box above.\_
If reader will find that \ar#examples" Examples \  below are not enough to learn
\^m, the following syntax part can be read.\_\_\_\_







\fs3vaB Syntaxf\\fs2v\_\_



Introduced terms are marked with bold.\_
\b == b\ is used to denote two identical terms.\_
\bPseeb\ == Please see.\_



\b Tagable. b\ Tag is tagable if in addition to its name, it can have
some text inside its \<,\>-brackets. \_\_

Tag \<format color=ffaabb\> is tagable because it includes parameter "color".\_
Tag \<b\> is not tagable if no additional text will be inserted in it.\_
Tag \<table hello, this is a text> is tagable because it includes the text
"hello, this is a text".\_\_

\b Element.b\ (HTML) element can be font, table, anchor. Each element has
\b opening b\ tag and may have \b closing b\ tag. If element has closing tag,
it will be called \bextendableb\ .\_\_

Element "horizontal line" \<hr\> is not extendable.\_
Element "body" is extendable because it has closing tag \</body\>.\_
When extendable element x is open but not yet closed, we will say that
text is in \bstateb\  x or is in \b scope b\  x.\_
Psee shortcut \bcontextb\  also.\_\_

"Open an element" == "open scope" == "open state". \_
"State X" - means that element X is currently open element.\_\_




\bUsing shortcutsb\\_\_

1. Shortcut syntax is \_
   "\b\.x[text] b\ " for tagable elements, and \_
   "\b\.xb\ " for non-tagable \_
   where x is a single character.\_
   Character "\." called \bescaperb\ ==\bescape characterb\ .\_
   Character "x" which follows escape character called here \bcontrolb\ .\_
   Control is case insensetive.\_
   After pasing source text, shortcut will be replaced with some text which is
   called \breplaceeb\ == \bshortcutteeb\ .\_
   Controls are mapped to replacees in \^s .\_\_

   For example, there is a line in \^s : \_
   f\-\-     #common   \-\-  	font\_
   This means that control "f" corresponds to element "font".\_
   "#common" means that this mapping is valid in scope of any (or common) html element.\_
   If combination "\.f " is met in source text, this combination is converted
   to \<font\>.\_\_\_

   \btextb\  in tagable shortcut can include
   shortcuts of parameters of this tag. This shortcuts 
   called \bparcutsb\ .\_
   Parcuts are case sensetive.\_\_
 
   Trailing space in tagable shortcut is vital - it denotes the end of shortcut.\_
   Any "spacer", however, can close tagable shortcut also. \b"Spacer"b\  means \_
   space, tab, carriage return, or line feed.\_\_

2. \bLong-shortcutb\  syntax was added later and is:\_
\.^name \_
where "name" can have any length without spacers inside.\_
Shortcuttee of long shortcut can be one/multiline string.\_\_
  

3. Escaper can be placed in result text using combination of itself and
   period: "\..".\_\_

4. Mapping between shortcuts and shortcuttee can be reset in \^s \_\_

5. Escaper "\." can be used also to close a shortcut.\_
   If "\." has to be inside tag, its escape combination "\.." can be used.\_\_
   However, "\." inside text-strings belonging to parcuts in double quotation marks
   must not be escaped.\_\_

   Shortcut can be used to insert abreviations which are considered as
   non-extendable elements without brackets \< and \>.\_
   For example, \.- shortcuts \&nbsp;\_\_

6. According HTML-syntax extendable elements must be closed.
   If element was open by shortcut "\.X" and is current, then shortcut "x\. "
   closes it. Spacer is vital at the end of this combination.\_
   As this is seen here, \b\^m allows \bbackward written b\ escape sequences. \_\_

   Current element can be closed by combination " \. ".\_
   (As usual, any spacer can be used in last combination in place of space character.)\_\_

   AS GENERAL RULE, if escaper has no control after it, preceding-escaper
   character is taken as control. Therefore, rigth-to-escaper character has
   higher precedence. \_\_

   ANOTHER GENERAL RULE IS \_
   if character near escaper was not used in interpreting a shortcut, 
   this characer goes to output stream as usual;
   otherwise, this character does not apper in result text.\_\_


7. Not every element has to be shortcut because some elements are not met in text often.\_\_
   For example, element `\<form\>` is only one in a page which has just one form. \_
   \are\example5.txt" example5.txt  \ demonstrates that real tags are transparent for \^m.\_\_


\bAdvanced.b\\_\_

 1.     \b"Backward search"b\ feature.\_
        Example.\_
        Script "\.b \.f \.w hello b\. " will result in \_
        "\<b\>\<font\>\<pre\>hello\</pre\>\</font\>\</b\>" \_
        text because "closing shortcut" "b\. " described in above point can closes all
        elements inserted into its scope.\_\_

        In this example, in scope of "b" are inserted "pre"
        and "font" elements.\_\_

        In other words, shortcut x\.'spacer'\_
        closes ALL elements which are open since X was open and closes X itself also;\_
        If x do not correspond to any open element, then exception is reported. \_\_

        For example, \^m -programmer can put h\. which will close all elements
        including \</html\>. \_\_

	

2. \b\^m-header can be placed in schema and/or in source text.b\\_\_

The syntax is:\_\_\w
\.\.short-ml
escaper=\.
escapee=.
indent=  
\.\.end of header
w\\_\_

It this header is presented in source text, it must start from the first line.
To place in schema, psee schema example.
Purpose of header is resetting \^m-parameters.\_\_


You can modify or select your favorite escape characters as this demonstrated in 
files super1.txt and super2.txt in folder e. Unfortunately, escape char can not be
shortcut by itself in this \^m version.  So, combination `\.\.` can not be used for 
'\.' itself.\_\_\_


3. GENERALISATION: if current element is x, then shortcut \.x will CLOSE current element and
   then will open own element. This rule does not allow homogeneous elements to be in relation 
   parent-child.\_\_
   For example, \_
   \.f why\.f this? \. \_
   will do: \<font\>why\</font\>\<font\>this?\<./font\>\_\_
   To change this rule, some reprogramming has to be done.\_\_


4. How to add to a tag's shortcut an arbitrary text.\_
   Put period right after last parcut if any and type your text. \_
   
Example for font tag:    \_\_
\.HHT H\.\.B\.\.fs4.write,here,whatever,you,like psee what is inside the font tag?h\. \_\_
   will output:\_\_ 
...\<font size=4  write here whatever you like\>\_\_

Any spacer ultimately closes tag; If there is a need to put space\_
inside the tag, comma "," must be used instead.\_
To put comma, double comma ",," can be used.\_\_\_


\w
5.

 Shortcut precedence:

 Double shortcut:

   \..
   \.^
   \.other       - closes tag if open
   \.{spacer|\.}  - closes element and skips spacer if spacer is space or tab;
   \.x           - attempts to find control x;

 Triple shortcut: 
    
   x\.y     
  
     if y is not spacer and not \., then x is handled normally, and
     \.y handled in Double case.     
    
   x\.{spacer|\.}

      Inside tag: x goes to tag; \.{spacer|\.} is handled as above;
      Outside tag: x\. initiates closing sequence; 
                   spacer: space,tab skipped; others output;
                   \. passed to double shortcut.
w\

\anexamples"\
\bExamplesb\\_\_

\w
Following shortcuts create text:\_
  \.p          \<p\>.          (makes an element "p")
  \.f          \<font ...       (opens a tag for html element "font").
  \.h          \<html ...       (if met at the beginning of document (in scope #start)).
  \.h          \<head ...       (opens a tag "head" if met when element "html" is open.)
  \.h          \<hr\>          (makes an element "hr" if met in other (common) states.)
So, as it is seen here, shortcuts are \bcontextb\  sensetive.
(This property can be varied in a \^s .)


Some examples how shortcut parameter in tags.

  \.OnMyForm"                 \<form name="MyForm"\>       
  \.OnMyForm"\.b               \<form name="MyForm \>\<b\>       Will close "form" tag and make "bold" element.     \_\_

  "\.X\. "                     \<textarea >\</textarea\>         Opens and closes element because of space at the end.\_\_             

  "\.Xnsource_text"c80r10\."    \<textarea name="source_text" cols=80 rows=10 \>\</textarea\>       Similar to above. \_\_

  \.Val\.                   \<div align=left\> \band close parentb\  of "div".
  \.OnMyFormp              \<form name="MyForm" method=post \>              
  \.Dc5#88aa99w100         \<td colspan=5 bgcolor=#88aa99 width=100 \>      


Case is not important for control characters outside the tags.
On the other hand, case is important for control chars inside the tag.  For example,
  \.TRD ...              \<table\>\<tr\>\<td ...       
  \.TrD ...              \<table rowspan=\>\<td ...   

w\        

To see a text produced by short-ml translator use your browser "view source" options.\_\_
\T
\RDFs2v  Source:                      F\\Dw20\-\DFs2v    Result: 							F\\Dw20\-\DFs2v   Execute result ... R\
       
	\RDFs2v  \are/example1.txt"  example1.txt        F\\Dw20\-\DFs2v   \ardefault.php?source=e/example1.txt"  after click, view source if your browser allows ... R\
	\RDFs2v  \are/examp1a.txt"   examp1a.txt         F\\Dw20\-\DFs2v   \ardefault.php?source=e/examp1a.txt"   after click, view source if your browser allows ... R\
	\RDFs2v  \are/examp1c.txt"   examp1c.txt         F\\Dw20\-\DFs2v   \ardefault.php?source=e/examp1c.txt"   after click, view source if your browser allows ... R\
	\RDFs2v  \are/example1.sa.txt"   example1.sa         F\\Dw20\-\DFs2v   \ardefault.php?source=e/example1.sa.txt"   default.php?source=e\.example1.sa.txt          F\\Dw20\-\DFs2v   \ardefault.php?source=e\example1.sa.txt".  asp  R\
	\RDFs2v  \are/example1.sp.txt"   example1.sp         F\\Dw20\-\DFs2v   \ardefault.php?source=e/example1.sp.txt"   default.php?source=e\.example1.sp.txt	       R\
	\RDFs2v  \are/example2.txt"  example2.txt        F\\Dw20\-\DFs2v   \ardefault.php?source=e/example2.txt"  default.php?source=e\.example2.txt		       R\
	\RDFs2v  \are/examp2b.txt"   example2b.txt       F\\Dw20\-\DFs2v   \ardefault.php?source=e/examp2b.txt"   default.php?source=e\.examp2b.txt		       R\
	\RDFs2v  \are/example3.txt"  example3.txt        F\\Dw20\-\DFs2v   \ardefault.php?source=e/example3.txt"  default.php?source=e\.example3.txt		       R\
	\RDFs2v  \are/example4.txt"  example4.txt        F\\Dw20\-\DFs2v   \ardefault.php?source=e/example4.txt"  default.php?source=e\.example4.txt		       R\
	\RDFs2v  \are/example5.txt"  example5.txt        F\\Dw20\-\DFs2v   \ardefault.php?source=e/example5.txt"  default.php?source=e\.example5.txt		       R\
	\RDFs2v  \are/example6.txt"  example6.txt        F\\Dw20\-\DFs2v   \ardefault.php?source=e/example6.txt"  default.php?source=e\.example6.txt		       R\
	\RDFs2v  \are/example7.txt"  example7.txt        F\\Dw20\-\DFs2v   \ardefault.php?source=e/example7.txt"  default.php?source=e\.example7.txt		       R\
	\RDFs2v  \are/super1.txt"    super1.txt          F\\Dw20\-\DFs2v   \ardefault.php?source=e/super1.txt"    default.php?source=e\.super1.txt		       R\
	\RDFs2v  \are/super2.txt"    super2.txt          F\\Dw20\-\DFs2v   \ardefault.php?source=e/super2.txt"    default.php?source=e\.super2.txt		       R\
	\RDFs2v  \are/super3.txt"    super3.txt          F\\Dw20\-\DFs2v   \ardefault.php?source=e/super3.txt"    default.php?source=e\.super3.txt		       R\

t\\_\_

      
\Fs2v

   \bMaking your own \^m language b\\_\_    

You can do this by modifying or rewriting the \^s  file.\_\_\_
         

   \bJob for future \^m-developer b\\_\_    

First of all, the name \^m may be not the best. This is why it is left as a variable in readme.\_
Write it in .dll, cgi, or daemon.\_\_\_


\^m will be first written in Microsoft ASP in 1999.\_
Unfortunately, becase ASP hosting is expensive, there was no opportunity to support this site.\_
Now, in 2002, I am converting this to PHP and hope that readers will have a fun if not use.\_\_\_


\bCopyrigth (C) 1999-2002 Pharmease, Inc.b\\_\_

Original \^m distribution package can be freely distributed without changing its content.\_
\^m engine source code, all schemas, and example-sites are free for modification and reuse.\_\_

It will be quite enough to give a credit in form of note:\_
"Original work on \^m parser\_
by Konstantin Kirillov, Pharmease, Inc.,\_
has been partially used." \_\_



h\