home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-cocoon-addon-1.4.9-installer.exe / wiki.grm < prev    next >
Encoding:
Text File  |  2004-07-12  |  4.3 KB  |  231 lines

  1. /*
  2. * Copyright 2002-2004 The Apache Software Foundation
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. *     http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16.  
  17. %token line "\-\-\-\- (\-*)";
  18.  
  19. %token tabletitleitem  "\|\|";
  20. %token tablecolumnitem "\|";
  21.  
  22. %token titleitem "!!!";
  23. %token subtitleitem "!!";
  24. %token subsubtitleitem "!";
  25.  
  26. %token emitem "''";
  27.  
  28. %token codeopenitem "\{\{";
  29. %token codecloseitem "\}\}";
  30.  
  31. %token strongitem "__";
  32.  
  33. %token source "\{\{\{ (\}{0,2}[^\}])* \}\}\}";
  34.  
  35. %token anchor "\[( [^\[\|\]]* \| )? # [^\[\|\]]* \]";
  36.  
  37. %token link   "\[( [^\[\|\]]* \| )?   [^\[\|\]]* \]";
  38.  
  39. %token text  "([^\ \t\n\r\[\{\}\|\*\\\-_!#'] | _[^_\n\r] | \{[^\{\n\r] | \}[^\}\n\r] | '[^'\n\r] 
  40.                                              | \[\[ | \\[^\\\n\r] | \-{1,3}[^\-\n\r]?)
  41.               ([^    \n\r\[\{\}\|\\\-_']     | _[^_\n\r] | \{[^\{\n\r] | \}[^\}\n\r] | '[^'\n\r] 
  42.                                              | \[\[ | \\[^\\\n\r] | \-{1,3}[^\-\n\r]? | \|[^\|\ \t])*";
  43.  
  44. %right softbreak "\r(\n?) | \n";
  45.  
  46. %right break "\\\\";
  47.  
  48. %right hardbreak "(\r(\n?) | \n) (\r(\n?) | \n)+";
  49.  
  50. %token bulleteditem "\*+";
  51.  
  52. %token numbered1item "#";
  53. %token numbered2item "##";
  54. %token numbered3item "###";
  55.  
  56. %ignore "[\ \t]+";
  57.  
  58. %start document;
  59.  
  60. %%
  61.  
  62. document 
  63.   : document section 
  64.   | section
  65.   | paragraphs
  66.   ;
  67.  
  68. section 
  69.   : title paragraphs
  70.   | title hardbreak paragraphs
  71.   ;
  72.  
  73. title
  74.   : titleitem textsequence
  75.   ;
  76.  
  77. paragraphs  
  78.   : paragraphs paragraph hardbreak
  79.   | paragraphs paragraph 
  80.   | paragraph hardbreak
  81.   | paragraph
  82.   | paragraphs subsection hardbreak
  83.   | paragraphs subsection
  84.   | subsection hardbreak
  85.   | subsection
  86.   ;
  87.  
  88. subsection
  89.   : subtitle subparagraphs
  90.   | subtitle hardbreak subparagraphs
  91.   ;
  92.  
  93. subtitle
  94.   : subtitleitem textsequence
  95.   ;
  96.  
  97. subparagraphs
  98.   : subparagraphs paragraph hardbreak
  99.   | subparagraphs paragraph
  100.   | paragraph hardbreak
  101.   | paragraph
  102.   | subparagraphs subsubsection hardbreak
  103.   | subparagraphs subsubsection
  104.   | subsubsection hardbreak
  105.   | subsubsection
  106.   ;
  107.  
  108. subsubsection
  109.   : subsubtitle subsubparagraphs
  110.   | subsubtitle hardbreak subsubparagraphs
  111.   ;
  112.  
  113. subsubtitle
  114.   : subsubtitleitem textsequence
  115.   ;
  116.  
  117. subsubparagraphs
  118.   : subsubparagraphs paragraph hardbreak
  119.   | subsubparagraphs paragraph
  120.   | paragraph hardbreak
  121.   | paragraph
  122.   ;
  123.  
  124. paragraph 
  125.   : bulletedlist
  126.   | numberedlist1
  127.   | textsequence
  128.   | line 
  129.   | source %prec softbreak
  130.   | source softbreak
  131.   | table
  132.   ;
  133.  
  134. bulletedlist 
  135.   : bulletedlist bulletedlistitem 
  136.   | bulletedlistitem              
  137.   ;
  138.  
  139. bulletedlistitem 
  140.   : bulleteditem textsequence
  141.   ;
  142.  
  143. numberedlist1 
  144.   : numberedlist1 numberedlistitem1 
  145.   | numberedlistitem1               
  146.   | numberedlist1 numberedlist2     
  147.   | numberedlist2                   
  148.   ;
  149.  
  150. numberedlistitem1 
  151.   : numbered1item textsequence
  152.   ;
  153.  
  154. numberedlist2 
  155.   : numberedlist2 numberedlistitem2 
  156.   | numberedlistitem2               
  157.   | numberedlist2 numberedlist3     
  158.   | numberedlist3                   
  159.   ; 
  160.  
  161. numberedlistitem2 
  162.   : numbered2item textsequence
  163.   ;
  164.  
  165. numberedlist3 
  166.   : numberedlist3 numberedlistitem3 
  167.   | numberedlistitem3               
  168.   ; 
  169.  
  170. numberedlistitem3 
  171.   : numbered3item textsequence
  172.   ;
  173.  
  174. table
  175.   : tablehead softbreak tablerows
  176.   | tablehead softbreak tablerows softbreak
  177.   ;
  178.  
  179. tablehead
  180.   : tablehead tabletitle
  181.   | tabletitle
  182.   ; 
  183.  
  184. tabletitle
  185.   : tabletitleitem textblock
  186.   ;
  187.  
  188. tablerows
  189.   : tablerows softbreak tablecolumns
  190.   | tablecolumns
  191.   ;
  192.  
  193. tablecolumns
  194.   : tablecolumns tablecolumn
  195.   | tablecolumn
  196.   ;
  197.  
  198. tablecolumn
  199.   : tablecolumnitem textblock
  200.   ;
  201.   
  202. textsequence 
  203.   : textsequence textblock softbreak
  204.   | textsequence textblock 
  205.   | textblock softbreak  
  206.   | textblock
  207.   | textsequence textblock break
  208.   | textblock break
  209.   ; 
  210.  
  211. textblock 
  212.   : link
  213.   | anchor
  214.   | strongblock                      
  215.   | emblock            
  216.   | text                         
  217.   | codeblock
  218.   ;
  219.  
  220. emblock 
  221.   : emitem text emitem
  222.   ;
  223.  
  224. strongblock 
  225.   : strongitem text strongitem
  226.   ;
  227.  
  228. codeblock 
  229.   : codeopenitem text codecloseitem
  230.   ;
  231.