Guest User

Untitled

a guest
Jun 19th, 2018
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.36 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3.  
  4. Authors: Georgios Migdos
  5. Copyright (C) 2009 Georgios Migdos <cyberpython@gmail.com>
  6.  
  7. -->
  8. <language id="glossa" _name="Glossa" version="2.0" _section="Sources">
  9. <metadata>
  10. <property name="mimetypes">text/x-glossa</property>
  11. <property name="globs">*.glossa;*.gls</property>
  12. <property name="line-comment-start">!</property>
  13. </metadata>
  14.  
  15. <styles>
  16. <style id="comment" _name="Comment" map-to="def:comment"/>
  17. <style id="string" _name="String" map-to="def:string"/>
  18. <style id="floating-point" _name="Floating point number" map-to="def:floating-point"/>
  19. <style id="decimal" _name="Decimal number" map-to="def:decimal"/>
  20. <style id="keyword" _name="Keyword" map-to="def:keyword"/>
  21. <style id="type" _name="Data Type" map-to="def:type"/>
  22. <style id="boolean" _name="Boolean value" map-to="def:boolean"/>
  23. <!-- <style id="symbol" _name="Symbol" map-to="def:symbol"/> -->
  24. <style id="operator" _name="Operator" map-to="def:operator"/>
  25. <!-- <style id="identifier" _name="identifier" map-to="def:identifier"/> -->
  26. </styles>
  27.  
  28. <default-regex-options case-sensitive="false"/>
  29.  
  30. <definitions>
  31.  
  32. <context id="glossa">
  33. <include>
  34.  
  35. <!-- Comments -->
  36. <context id="comment" style-ref="comment" end-at-line-end="true">
  37. <start>!</start>
  38. </context>
  39.  
  40. <context id="string" style-ref="string" end-at-line-end="true">
  41. <start>L?'</start>
  42. <end>'</end>
  43. </context>
  44.  
  45. <context id="float" style-ref="floating-point">
  46. <match extended="true">
  47. (?<![0-9a-zA-Zα-ωΑ-ΩάέήίύόώΆΈΉΊΎΌΏϊϋΪΫΐΰςΣ_\.])
  48. ((\.[0-9]+ | [0-9]+\.[0-9]*) ([Ee][+-]?[0-9]*)? |
  49. ([0-9]+[Ee][+-]?[0-9]*))
  50. [fFlL]?
  51. (?![0-9a-zA-Zα-ωΑ-ΩάέήίύόώΆΈΉΊΎΌΏϊϋΪΫΐΰςΣ_\.])
  52. </match>
  53. </context>
  54.  
  55. <context id="decimal" style-ref="decimal">
  56. <match extended="true">
  57. (?<![0-9a-zA-Zα-ωΑ-ΩάέήίύόώΆΈΉΊΎΌΏϊϋΪΫΐΰςΣ_\.])
  58. [0-9]+[uUlL]*
  59. (?![0-9a-zA-Zα-ωΑ-ΩάέήίύόώΆΈΉΊΎΌΏϊϋΪΫΐΰςΣ_\.])
  60. </match>
  61. </context>
  62.  
  63. <!-- Keywords -->
  64. <context id="keywords" style-ref="keyword">
  65. <match extended="true">
  66. (?<![0-9a-zA-Zα-ωΑ-ΩάέήίύόώΆΈΉΊΎΌΏϊϋΪΫΐΰςΣ_])
  67. ([Ήή] |
  68. [Κκ][Αα][Ιι] |
  69. [ΟοΌό][Χχ][Ιι] |
  70. [Ππ][Ρρ][ΟοΌό][Γγ][Ρρ][Αα][Μμ][Μμ][Αα] |
  71. [Σσ][Ττ][Αα][Θθ][Εε][Ρρ][ΕεΈέ][ΣΣς] |
  72. [Μμ][Εε][Ττ][Αα][Ββ][Λλ][Ηη][Ττ][ΕεΈέ][ΣΣς] |
  73. [Αα][Ρρ][Χχ][ΗηΉή] |
  74. [Γγ][Ρρ][ΑαΆά][Ψψ][Εε] |
  75. [Δδ][Ιι][ΑαΆά][Ββ][Αα][Σσ][Εε] |
  76. [Αα][Νν] |
  77. [Ττ][ΟοΌό][Ττ][Εε] |
  78. [Αα][Λλ][Λλ][Ιι][ΩωΏώ][ΣΣς] |
  79. [Αα][Λλ][Λλ][Ιι][ΩωΏώ][ΣΣς]_[Αα][Νν] |
  80. [Ττ][ΕεΈέ][Λλ][Οο][ΣΣς]_[Αα][Νν] |
  81. [Εε][Ππ][ΙιΊί][Λλ][Εε][Ξξ][Εε] |
  82. [Ππ][Εε][Ρρ][ΙιΊί][Ππ][Ττ][Ωω][Σσ][Ηη] |
  83. [Ττ][ΕεΈέ][Λλ][Οο][ΣΣς]_[Εε][Ππ][Ιι][Λλ][Οο][Γγ][ΩωΏώ][Νν] |
  84. [Γγ][Ιι][Αα] |
  85. [Αα][Ππ][ΟοΌό] |
  86. [Μμ][ΕεΈέ][Χχ][Ρρ][Ιι] |
  87. [Μμ][Εε].[Ββ][ΗηΉή][Μμ][Αα] |
  88. [Ττ][ΕεΈέ][Λλ][Οο][ΣΣς]_[Εε][Ππ][Αα][Νν][ΑαΆά][Λλ][Ηη][Ψψ][Ηη][ΣΣς] |
  89. [ΟοΌό][Σσ][Οο] |
  90. [Εε][Ππ][Αα][Νν][ΑαΆά][Λλ][Αα][Ββ][Εε] |
  91. [Αα][Ρρ][Χχ][ΗηΉή]_[Εε][Ππ][Αα][Νν][ΑαΆά][Λλ][Ηη][Ψψ][Ηη][ΣΣς] |
  92. [Μμ][ΕεΈέ][Χχ][Ρρ][Ιι][ΣΣς]_[ΟοΌό][Ττ][Οο][Υυ] |
  93. [Κκ][ΑαΆά][Λλ][Εε][Σσ][Εε] |
  94. [Ττ][ΕεΈέ][Λλ][Οο][ΣΣς]_[Ππ][Ρρ][Οο][Γγ][Ρρ][ΑαΆά][Μμ][Μμ][Αα][Ττ][Οο][ΣΣς] |
  95. [Δδ][Ιι][Αα][Δδ][Ιι][Κκ][Αα][Σσ][ΙιΊί][Αα] |
  96. [Ττ][ΕεΈέ][Λλ][Οο][ΣΣς]_[Δδ][Ιι][Αα][Δδ][Ιι][Κκ][Αα][Σσ][ΙιΊί][Αα][ΣΣς] |
  97. [Σσ][Υυ][Νν][ΑαΆά][Ρρ][Ττ][Ηη][Σσ][Ηη] |
  98. [Ττ][ΕεΈέ][Λλ][Οο][ΣΣς]_[Σσ][Υυ][Νν][ΑαΆά][Ρρ][Ττ][Ηη][Σσ][Ηη][ΣΣς])
  99. (?![0-9a-zA-Zα-ωΑ-ΩάέήίύόώΆΈΉΊΎΌΏϊϋΪΫΐΰςΣ_])
  100. </match>
  101. </context>
  102.  
  103. <context id="types" style-ref="type">
  104. <match extended="true">
  105. (?<![0-9a-zA-Zα-ωΑ-ΩάέήίύόώΆΈΉΊΎΌΏϊϋΪΫΐΰςΣ_])
  106. ([Αα][Κκ][ΕεΈέ][Ρρ][Αα][Ιι][Εε][ΣΣς] |
  107. [Ππ][Ρρ][Αα][Γγ][Μμ][Αα][Ττ][Ιι][Κκ][ΕεΈέ][ΣΣς] |
  108. [Χχ][Αα][Ρρ][Αα][Κκ][Ττ][ΗηΉή][Ρρ][Εε][ΣΣς] |
  109. [Λλ][Οο][Γγ][Ιι][Κκ][ΕεΈέ][ΣΣς] |
  110. [Αα][Κκ][ΕεΈέ][Ρρ][Αα][Ιι][Αα] |
  111. [Ππ][Ρρ][Αα][Γγ][Μμ][Αα][Ττ][Ιι][Κκ][ΗηΉή] |
  112. [Χχ][Αα][Ρρ][Αα][Κκ][Ττ][ΗηΉή][Ρρ][Αα][ΣΣς] |
  113. [Λλ][Οο][Γγ][Ιι][Κκ][ΗηΉή])
  114. (?![0-9a-zA-Zα-ωΑ-ΩάέήίύόώΆΈΉΊΎΌΏϊϋΪΫΐΰςΣ_])
  115. </match>
  116. </context>
  117.  
  118. <context id="boolean" style-ref="boolean">
  119. <match extended="true">
  120. (?<![0-9a-zA-Zα-ωΑ-ΩάέήίύόώΆΈΉΊΎΌΏϊϋΪΫΐΰςΣ_])
  121. ([Αα][Λλ][Ηη][Θθ][ΗηΉή][ΣΣς] |
  122. [Ψψ][Εε][Υυ][Δδ][ΗηΉή][ΣΣς])
  123. (?![0-9a-zA-Zα-ωΑ-ΩάέήίύόώΆΈΉΊΎΌΏϊϋΪΫΐΰςΣ_])
  124. </match>
  125. </context>
  126.  
  127. <context id="operator" style-ref="operator">
  128. <match extended="true">
  129. (?<![0-9a-zA-Zα-ωΑ-ΩάέήίύόώΆΈΉΊΎΌΏϊϋΪΫΐΰςΣ_])
  130. ([Dd][Ii][Vv] |
  131. [Mm][Oo][Dd] |
  132. <- )
  133. (?![0-9a-zA-Zα-ωΑ-ΩάέήίύόώΆΈΉΊΎΌΏϊϋΪΫΐΰςΣ_]) |
  134. (\+ |
  135. \- |
  136. \* |
  137. \/ )
  138. </match>
  139. </context>
  140.  
  141. <context id="identifier" style-ref="identifier">
  142. <match extended="true">
  143. (?<![0-9a-zA-Zα-ωΑ-ΩάέήίύόώΆΈΉΊΎΌΏϊϋΪΫΐΰςΣ_])
  144. ([a-zA-Zα-ωΑ-ΩάέήίύόώΆΈΉΊΎΌΏϊϋΪΫΐΰςΣ]
  145. ([0-9a-zA-Zα-ωΑ-ΩάέήίύόώΆΈΉΊΎΌΏϊϋΪΫΐΰςΣ_])*
  146. )
  147. (?![0-9a-zA-Zα-ωΑ-ΩάέήίύόώΆΈΉΊΎΌΏϊϋΪΫΐΰςΣ_])
  148. </match>
  149. </context>
  150.  
  151. </include>
  152. </context>
  153. </definitions>
  154. </language>
Add Comment
Please, Sign In to add comment