/win32/scripts/pp/cobol.py

https://github.com/omailson/ccfinderx-linux · Python · 865 lines · 853 code · 9 blank · 3 comment · 2 complexity · 57df575a096cf90754ce2895f01d1b8a MD5 · raw file

  1. #!/usr/bin/env python
  2. # -*- encoding: utf-8 -*-
  3. # Copyright: This module has been placed in the public domain.
  4. import pp.preprocessor as pp
  5. import easytorq
  6. import sys
  7. def getname():
  8. return "cobol"
  9. def getversion():
  10. return (2, 0, 0, 0)
  11. class CobolPreprocessor(pp.Base):
  12. def __init__(self):
  13. self.pat = None
  14. self.fmt = None
  15. def getoptiondescription(self):
  16. return "no options."
  17. def tonormalizedoptionstring(self, optionStr):
  18. if optionStr not in ( None, '', 'default' ):
  19. raise pp.InvalidOptionError, "invalid option: " + optionStr
  20. return 'default'
  21. def setoptions(self, optionStr):
  22. if optionStr not in ( None, '', 'default'):
  23. raise pp.InvalidOptionError, "invalid option: " + optionStr
  24. patternStr = """TEXT scan= +(xcep(eof) any) | insert(eol) eof; // ensure a line terminates by eol
  25. TEXT scan= null <- (eol "-" +" "); // Continuation line
  26. // remove line number and comment line
  27. TEXT match=
  28. (*(" " | "&t;") "$" *(" " | "&t;") ("SET" | "set") *(" " | "&t;") ("SOURCEFORMAT" | "sourceformat") *(" " | "&t;") "&quot;" ("FREE" | "free") "&quot;" *(" " | "&t;") eol
  29. *(
  30. (comment <- ("*" | "/") *(xcep(eol) any)) eol
  31. | *(xcep(eol) any) eol
  32. )
  33. eof
  34. )
  35. | (
  36. *(
  37. (null <- ("&(0-9);" | " ")("&(0-9);" | " ")("&(0-9);" | " ")("&(0-9);" | " ")("&(0-9);" | " ")("&(0-9);" | " "))
  38. (
  39. (comment <- ("*" | "/") *(xcep(eol) any)) eol
  40. // if you need to recognize column 73 to end-of-line as comment
  41. // | raw raw raw raw raw raw raw raw raw raw raw raw raw raw raw raw raw raw raw raw
  42. // raw raw raw raw raw raw raw raw raw raw raw raw raw raw raw raw raw raw raw raw
  43. // raw raw raw raw raw raw raw raw raw raw raw raw raw raw raw raw raw raw raw raw
  44. // raw raw raw raw raw raw (comment <- *(xcep(eol) any)) eol
  45. | *(xcep(eol) any) eol
  46. )
  47. | (
  48. (comment <- ("*" | "/") *(xcep(eol) any)) eol
  49. | *(xcep(eol) any) eol
  50. )
  51. )
  52. eof
  53. );
  54. TEXT scan=
  55. (r_pic <- ("picture" | "PICTURE" | "pic" | "PIC"))
  56. *(
  57. +(null <- " " | "&t;")
  58. xcep(eof | "." | "value" | "VALUE")
  59. (
  60. preq("X") (
  61. (x100 <- "X(" *"0" "100)") | (x99 <- "X(" *"0" "99)") | (x98 <- "X(" *"0" "98)") | (x97 <- "X(" *"0" "97)") | (x96 <- "X(" *"0" "96)") | (x95 <- "X(" *"0" "95)") | (x94 <- "X(" *"0" "94)") | (x93 <- "X(" *"0" "93)") | (x92 <- "X(" *"0" "92)") | (x91 <- "X(" *"0" "91)")
  62. | (x90 <- "X(" *"0" "90)") | (x89 <- "X(" *"0" "89)") | (x88 <- "X(" *"0" "88)") | (x87 <- "X(" *"0" "87)") | (x86 <- "X(" *"0" "86)") | (x85 <- "X(" *"0" "85)") | (x84 <- "X(" *"0" "84)") | (x83 <- "X(" *"0" "83)") | (x82 <- "X(" *"0" "82)") | (x81 <- "X(" *"0" "81)")
  63. | (x80 <- "X(" *"0" "80)") | (x79 <- "X(" *"0" "79)") | (x78 <- "X(" *"0" "78)") | (x77 <- "X(" *"0" "77)") | (x76 <- "X(" *"0" "76)") | (x75 <- "X(" *"0" "75)") | (x74 <- "X(" *"0" "74)") | (x73 <- "X(" *"0" "73)") | (x72 <- "X(" *"0" "72)") | (x71 <- "X(" *"0" "71)")
  64. | (x70 <- "X(" *"0" "70)") | (x69 <- "X(" *"0" "69)") | (x68 <- "X(" *"0" "68)") | (x67 <- "X(" *"0" "67)") | (x66 <- "X(" *"0" "66)") | (x65 <- "X(" *"0" "65)") | (x64 <- "X(" *"0" "64)") | (x63 <- "X(" *"0" "63)") | (x62 <- "X(" *"0" "62)") | (x61 <- "X(" *"0" "61)")
  65. | (x60 <- "X(" *"0" "60)") | (x59 <- "X(" *"0" "59)") | (x58 <- "X(" *"0" "58)") | (x57 <- "X(" *"0" "57)") | (x56 <- "X(" *"0" "56)") | (x55 <- "X(" *"0" "55)") | (x54 <- "X(" *"0" "54)") | (x53 <- "X(" *"0" "53)") | (x52 <- "X(" *"0" "52)") | (x51 <- "X(" *"0" "51)")
  66. | (x50 <- "X(" *"0" "50)") | (x49 <- "X(" *"0" "49)") | (x48 <- "X(" *"0" "48)") | (x47 <- "X(" *"0" "47)") | (x46 <- "X(" *"0" "46)") | (x45 <- "X(" *"0" "45)") | (x44 <- "X(" *"0" "44)") | (x43 <- "X(" *"0" "43)") | (x42 <- "X(" *"0" "42)") | (x41 <- "X(" *"0" "41)")
  67. | (x40 <- "X(" *"0" "40)") | (x39 <- "X(" *"0" "39)") | (x38 <- "X(" *"0" "38)") | (x37 <- "X(" *"0" "37)") | (x36 <- "X(" *"0" "36)") | (x35 <- "X(" *"0" "35)") | (x34 <- "X(" *"0" "34)") | (x33 <- "X(" *"0" "33)") | (x32 <- "X(" *"0" "32)") | (x31 <- "X(" *"0" "31)")
  68. | (x30 <- "X(" *"0" "30)") | (x29 <- "X(" *"0" "29)") | (x28 <- "X(" *"0" "28)") | (x27 <- "X(" *"0" "27)") | (x26 <- "X(" *"0" "26)") | (x25 <- "X(" *"0" "25)") | (x24 <- "X(" *"0" "24)") | (x23 <- "X(" *"0" "23)") | (x22 <- "X(" *"0" "22)") | (x21 <- "X(" *"0" "21)")
  69. | (x20 <- "XXXXXXXXXXXXXXXXXXXX" | "X(" *"0" "20)")
  70. | (x19 <- "XXXXXXXXXXXXXXXXXXX" | "X(" *"0" "19)")
  71. | (x18 <- "XXXXXXXXXXXXXXXXXX" | "X(" *"0" "18)")
  72. | (x17 <- "XXXXXXXXXXXXXXXXX" | "X(" *"0" "17)")
  73. | (x16 <- "XXXXXXXXXXXXXXXX" | "X(" *"0" "16)")
  74. | (x15 <- "XXXXXXXXXXXXXXX" | "X(" *"0" "15)")
  75. | (x14 <- "XXXXXXXXXXXXXX" | "X(" *"0" "14)")
  76. | (x13 <- "XXXXXXXXXXXXX" | "X(" *"0" "13)")
  77. | (x12 <- "XXXXXXXXXXXX" | "X(" *"0" "12)")
  78. | (x11 <- "XXXXXXXXXXX" | "X(" *"0" "11)")
  79. | (x10 <- "XXXXXXXXXX" | "X(" *"0" "10)")
  80. | (x9 <- "XXXXXXXXX" | "X(" *"0" "9)")
  81. | (x8 <- "XXXXXXXX" | "X(" *"0" "8)")
  82. | (x7 <- "XXXXXXX" | "X(" *"0" "7)")
  83. | (x6 <- "XXXXXX" | "X(" *"0" "6)")
  84. | (x5 <- "XXXXX" | "X(" *"0" "5)")
  85. | (x4 <- "XXXX" | "X(" *"0" "4)")
  86. | (x3 <- "XXX" | "X(" *"0" "3)")
  87. | (x2 <- "XX" | "X(" *"0" "2)")
  88. | (x1 <- "X" ?("(" *"0" "1)"))
  89. )
  90. | preq("x") (
  91. (x100 <- "x(" *"0" "100)") | (x99 <- "x(" *"0" "99)") | (x98 <- "x(" *"0" "98)") | (x97 <- "x(" *"0" "97)") | (x96 <- "x(" *"0" "96)") | (x95 <- "x(" *"0" "95)") | (x94 <- "x(" *"0" "94)") | (x93 <- "x(" *"0" "93)") | (x92 <- "x(" *"0" "92)") | (x91 <- "x(" *"0" "91)")
  92. | (x90 <- "x(" *"0" "90)") | (x89 <- "x(" *"0" "89)") | (x88 <- "x(" *"0" "88)") | (x87 <- "x(" *"0" "87)") | (x86 <- "x(" *"0" "86)") | (x85 <- "x(" *"0" "85)") | (x84 <- "x(" *"0" "84)") | (x83 <- "x(" *"0" "83)") | (x82 <- "x(" *"0" "82)") | (x81 <- "x(" *"0" "81)")
  93. | (x80 <- "x(" *"0" "80)") | (x79 <- "x(" *"0" "79)") | (x78 <- "x(" *"0" "78)") | (x77 <- "x(" *"0" "77)") | (x76 <- "x(" *"0" "76)") | (x75 <- "x(" *"0" "75)") | (x74 <- "x(" *"0" "74)") | (x73 <- "x(" *"0" "73)") | (x72 <- "x(" *"0" "72)") | (x71 <- "x(" *"0" "71)")
  94. | (x70 <- "x(" *"0" "70)") | (x69 <- "x(" *"0" "69)") | (x68 <- "x(" *"0" "68)") | (x67 <- "x(" *"0" "67)") | (x66 <- "x(" *"0" "66)") | (x65 <- "x(" *"0" "65)") | (x64 <- "x(" *"0" "64)") | (x63 <- "x(" *"0" "63)") | (x62 <- "x(" *"0" "62)") | (x61 <- "x(" *"0" "61)")
  95. | (x60 <- "x(" *"0" "60)") | (x59 <- "x(" *"0" "59)") | (x58 <- "x(" *"0" "58)") | (x57 <- "x(" *"0" "57)") | (x56 <- "x(" *"0" "56)") | (x55 <- "x(" *"0" "55)") | (x54 <- "x(" *"0" "54)") | (x53 <- "x(" *"0" "53)") | (x52 <- "x(" *"0" "52)") | (x51 <- "x(" *"0" "51)")
  96. | (x50 <- "x(" *"0" "50)") | (x49 <- "x(" *"0" "49)") | (x48 <- "x(" *"0" "48)") | (x47 <- "x(" *"0" "47)") | (x46 <- "x(" *"0" "46)") | (x45 <- "x(" *"0" "45)") | (x44 <- "x(" *"0" "44)") | (x43 <- "x(" *"0" "43)") | (x42 <- "x(" *"0" "42)") | (x41 <- "x(" *"0" "41)")
  97. | (x40 <- "x(" *"0" "40)") | (x39 <- "x(" *"0" "39)") | (x38 <- "x(" *"0" "38)") | (x37 <- "x(" *"0" "37)") | (x36 <- "x(" *"0" "36)") | (x35 <- "x(" *"0" "35)") | (x34 <- "x(" *"0" "34)") | (x33 <- "x(" *"0" "33)") | (x32 <- "x(" *"0" "32)") | (x31 <- "x(" *"0" "31)")
  98. | (x30 <- "x(" *"0" "30)") | (x29 <- "x(" *"0" "29)") | (x28 <- "x(" *"0" "28)") | (x27 <- "x(" *"0" "27)") | (x26 <- "x(" *"0" "26)") | (x25 <- "x(" *"0" "25)") | (x24 <- "x(" *"0" "24)") | (x23 <- "x(" *"0" "23)") | (x22 <- "x(" *"0" "22)") | (x21 <- "x(" *"0" "21)")
  99. | (x20 <- "xxxxxxxxxxxxxxxxxxxx" | "x(" *"0" "20)")
  100. | (x19 <- "xxxxxxxxxxxxxxxxxxx" | "x(" *"0" "19)")
  101. | (x18 <- "xxxxxxxxxxxxxxxxxx" | "x(" *"0" "18)")
  102. | (x17 <- "xxxxxxxxxxxxxxxxx" | "x(" *"0" "17)")
  103. | (x16 <- "xxxxxxxxxxxxxxxx" | "x(" *"0" "16)")
  104. | (x15 <- "xxxxxxxxxxxxxxx" | "x(" *"0" "15)")
  105. | (x14 <- "xxxxxxxxxxxxxx" | "x(" *"0" "14)")
  106. | (x13 <- "xxxxxxxxxxxxx" | "x(" *"0" "13)")
  107. | (x12 <- "xxxxxxxxxxxx" | "x(" *"0" "12)")
  108. | (x11 <- "xxxxxxxxxxx" | "x(" *"0" "11)")
  109. | (x10 <- "xxxxxxxxxx" | "x(" *"0" "10)")
  110. | (x9 <- "xxxxxxxxx" | "x(" *"0" "9)")
  111. | (x8 <- "xxxxxxxx" | "x(" *"0" "8)")
  112. | (x7 <- "xxxxxxx" | "x(" *"0" "7)")
  113. | (x6 <- "xxxxxx" | "x(" *"0" "6)")
  114. | (x5 <- "xxxxx" | "x(" *"0" "5)")
  115. | (x4 <- "xxxx" | "x(" *"0" "4)")
  116. | (x3 <- "xxx" | "x(" *"0" "3)")
  117. | (x2 <- "xx" | "x(" *"0" "2)")
  118. | (x1 <- "x" ?("(" *"0" "1)"))
  119. )
  120. | +(
  121. (s <- "s" | "S")
  122. | (v <- "v" | "V")
  123. | (p <- "p" | "P")
  124. preq("Z") (
  125. (z20 <- "ZZZZZZZZZZZZZZZZZZZZ" | "ZZZZZZZZZZZZZZZZZZZ9" | "Z(" *"0" "20)" | "Z(" *"0" "19)9" ?("(" *"0" "1)"))
  126. | (z19 <- "ZZZZZZZZZZZZZZZZZZZ" | "ZZZZZZZZZZZZZZZZZZ9" | "Z(" *"0" "19)" | "Z(" *"0" "18)9" ?("(" *"0" "1)"))
  127. | (z18 <- "ZZZZZZZZZZZZZZZZZZ" | "ZZZZZZZZZZZZZZZZZ9" | "Z(" *"0" "18)" | "Z(" *"0" "17)9" ?("(" *"0" "1)"))
  128. | (z17 <- "ZZZZZZZZZZZZZZZZZ" | "ZZZZZZZZZZZZZZZZ9" | "Z(" *"0" "17)" | "Z(" *"0" "16)9" ?("(" *"0" "1)"))
  129. | (z16 <- "ZZZZZZZZZZZZZZZZ" | "ZZZZZZZZZZZZZZZ9" | "Z(" *"0" "16)" | "Z(" *"0" "15)9" ?("(" *"0" "1)"))
  130. | (z15 <- "ZZZZZZZZZZZZZZZ" | "ZZZZZZZZZZZZZZ9" | "Z(" *"0" "15)" | "Z(" *"0" "14)9" ?("(" *"0" "1)"))
  131. | (z14 <- "ZZZZZZZZZZZZZZ" | "ZZZZZZZZZZZZZ9" | "Z(" *"0" "14)" | "Z(" *"0" "13)9" ?("(" *"0" "1)"))
  132. | (z13 <- "ZZZZZZZZZZZZZ" | "ZZZZZZZZZZZZ9" | "Z(" *"0" "13)" | "Z(" *"0" "12)9" ?("(" *"0" "1)"))
  133. | (z12 <- "ZZZZZZZZZZZZ" | "ZZZZZZZZZZZ9" | "Z(" *"0" "12)" | "Z(" *"0" "11)9" ?("(" *"0" "1)"))
  134. | (z11 <- "ZZZZZZZZZZZ" | "ZZZZZZZZZZ9" | "Z(" *"0" "11)" | "Z(" *"0" "10)9" ?("(" *"0" "1)"))
  135. | (z10 <- "ZZZZZZZZZZ" | "ZZZZZZZZZ9" | "Z(" *"0" "10)" | "Z(" *"0" "9)9" ?("(" *"0" "1)"))
  136. | (z9 <- "ZZZZZZZZZ" | "ZZZZZZZZ9" | "Z(" *"0" "9)" | "Z(" *"0" "8)9" ?("(" *"0" "1)"))
  137. | (z8 <- "ZZZZZZZZ" | "ZZZZZZZ9" | "Z(" *"0" "8)" | "Z(" *"0" "7)9" ?("(" *"0" "1)"))
  138. | (z7 <- "ZZZZZZZ" | "ZZZZZZ9" | "Z(" *"0" "7)" | "Z(" *"0" "6)9" ?("(" *"0" "1)"))
  139. | (z6 <- "ZZZZZZ" | "ZZZZZ9" | "Z(" *"0" "6)" | "Z(" *"0" "5)9" ?("(" *"0" "1)"))
  140. | (z5 <- "ZZZZZ" | "ZZZZ9" | "Z(" *"0" "5)" | "Z(" *"0" "4)9" ?("(" *"0" "1)"))
  141. | (z4 <- "ZZZZ" | "ZZZ9" | "Z(" *"0" "4)" | "Z(" *"0" "3)9" ?("(" *"0" "1)"))
  142. | (z3 <- "ZZZ" | "ZZ9" | "Z(" *"0" "3)" | "Z(" *"0" "2)9" ?("(" *"0" "1)"))
  143. | (z2 <- "ZZ" | "Z9" | "Z(" *"0" "2)" | "Z(" *"0" "1)9" ?("(" *"0" "1)"))
  144. | (z1 <- "Z" ?("(" *"0" "1)"))
  145. )
  146. | preq("z") (
  147. (z20 <- "zzzzzzzzzzzzzzzzzzzz" | "zzzzzzzzzzzzzzzzzzz9" | "z(" *"0" "20)" | "z(" *"0" "19)9" ?("(" *"0" "1)"))
  148. | (z19 <- "zzzzzzzzzzzzzzzzzzz" | "zzzzzzzzzzzzzzzzzz9" | "z(" *"0" "19)" | "z(" *"0" "18)9" ?("(" *"0" "1)"))
  149. | (z18 <- "zzzzzzzzzzzzzzzzzz" | "zzzzzzzzzzzzzzzzz9" | "z(" *"0" "18)" | "z(" *"0" "17)9" ?("(" *"0" "1)"))
  150. | (z17 <- "zzzzzzzzzzzzzzzzz" | "zzzzzzzzzzzzzzzz9" | "z(" *"0" "17)" | "z(" *"0" "16)9" ?("(" *"0" "1)"))
  151. | (z16 <- "zzzzzzzzzzzzzzzz" | "zzzzzzzzzzzzzzz9" | "z(" *"0" "16)" | "z(" *"0" "15)9" ?("(" *"0" "1)"))
  152. | (z15 <- "zzzzzzzzzzzzzzz" | "zzzzzzzzzzzzzz9" | "z(" *"0" "15)" | "z(" *"0" "14)9" ?("(" *"0" "1)"))
  153. | (z14 <- "zzzzzzzzzzzzzz" | "zzzzzzzzzzzzz9" | "z(" *"0" "14)" | "z(" *"0" "13)9" ?("(" *"0" "1)"))
  154. | (z13 <- "zzzzzzzzzzzzz" | "zzzzzzzzzzzz9" | "z(" *"0" "13)" | "z(" *"0" "12)9" ?("(" *"0" "1)"))
  155. | (z12 <- "zzzzzzzzzzzz" | "zzzzzzzzzzz9" | "z(" *"0" "12)" | "z(" *"0" "11)9" ?("(" *"0" "1)"))
  156. | (z11 <- "zzzzzzzzzzz" | "zzzzzzzzzz9" | "z(" *"0" "11)" | "z(" *"0" "10)9" ?("(" *"0" "1)"))
  157. | (z10 <- "zzzzzzzzzz" | "zzzzzzzzz9" | "z(" *"0" "10)" | "z(" *"0" "9)9" ?("(" *"0" "1)"))
  158. | (z9 <- "zzzzzzzzz" | "zzzzzzzz9" | "z(" *"0" "9)" | "z(" *"0" "8)9" ?("(" *"0" "1)"))
  159. | (z8 <- "zzzzzzzz" | "zzzzzzz9" | "z(" *"0" "8)" | "z(" *"0" "7)9" ?("(" *"0" "1)"))
  160. | (z7 <- "zzzzzzz" | "zzzzzz9" | "z(" *"0" "7)" | "z(" *"0" "6)9" ?("(" *"0" "1)"))
  161. | (z6 <- "zzzzzz" | "zzzzz9" | "z(" *"0" "6)" | "z(" *"0" "5)9" ?("(" *"0" "1)"))
  162. | (z5 <- "zzzzz" | "zzzz9" | "z(" *"0" "5)" | "z(" *"0" "4)9" ?("(" *"0" "1)"))
  163. | (z4 <- "zzzz" | "zzz9" | "z(" *"0" "4)" | "z(" *"0" "3)9" ?("(" *"0" "1)"))
  164. | (z3 <- "zzz" | "zz9" | "z(" *"0" "3)" | "z(" *"0" "2)9" ?("(" *"0" "1)"))
  165. | (z2 <- "zz" | "z9" | "z(" *"0" "2)" | "z(" *"0" "1)9" ?("(" *"0" "1)"))
  166. | (z1 <- "z" ?("(" *"0" "1)"))
  167. )
  168. | preq("9") (
  169. (z20 <- "99999999999999999999" | "9(" *"0" "20)")
  170. | (z19 <- "9999999999999999999" | "9(" *"0" "19)")
  171. | (z18 <- "999999999999999999" | "9(" *"0" "18)")
  172. | (z17 <- "99999999999999999" | "9(" *"0" "17)")
  173. | (z16 <- "9999999999999999" | "9(" *"0" "16)")
  174. | (z15 <- "999999999999999" | "9(" *"0" "15)")
  175. | (z14 <- "99999999999999" | "9(" *"0" "14)")
  176. | (z13 <- "9999999999999" | "9(" *"0" "13)")
  177. | (z12 <- "999999999999" | "9(" *"0" "12)")
  178. | (z11 <- "99999999999" | "9(" *"0" "11)")
  179. | (z10 <- "9999999999" | "9(" *"0" "10)")
  180. | (z9 <- "999999999" | "9(" *"0" "9)")
  181. | (z8 <- "99999999" | "9(" *"0" "8)")
  182. | (z7 <- "9999999" | "9(" *"0" "7)")
  183. | (z6 <- "999999" | "9(" *"0" "6)")
  184. | (z5 <- "99999" | "9(" *"0" "5)")
  185. | (z4 <- "9999" | "9(" *"0" "4)")
  186. | (z3 <- "999" | "9(" *"0" "3)")
  187. | (z2 <- "99" | "9(" *"0" "2)")
  188. | (z1 <- "9" ?("(" *"0" "1)"))
  189. )
  190. )
  191. )
  192. )
  193. | (l_string <- ?("X" | "NC" | "NX" | "N") ("&quot;" *(xcep("&quot;" | eol) any) "&quot;" | "&squot;" *(xcep("&squot;" | eol) any) "&squot;")
  194. *("-" eol ("&quot;" *(xcep("&quot;" | eol) any) "&quot;" | "&squot;" *(xcep("&squot;" | eol) any) "&squot;")))
  195. | (l_float <- +"&(0-9);" "." *"&(0-9);" ?(("e" | "E") ?("-" | "+") +"&(0-9);"))
  196. | (l_float <- +"&(0-9);" ("e" | "E") ?("-" | "+") +"&(0-9);")
  197. | (l_int <- +"&(0-9);" xcep(
  198. "-" | "&(a-z);" | "&(A-Z);" | "_" | "&#x(2e80-2fdf);" | "&#x(3040-30ff);" | "&#x(3400-9faf);" | "&#x(ff66-ff9f);" | "&#x(ff21-ff3a);" | "&#x(ff41-ff5a);" | "@"
  199. ))
  200. | (l_int <- "B" "&quot;" +("0" | "1") "&quot;" | "&squot;" +("0" | "1") "&squot;")
  201. | (l_int <- "BX" "&quot;" +("&(0-9);" | "&(A-F);" | "&(a-f);") "&quot;" | "&squot;" +("&(0-9);" | "&(A-F);" | "&(a-f);") "&squot;")
  202. | preq("&(a-z);" | "&(A-Z);") (
  203. (r_zero <- "zeroes" | "ZEROES" | "zeros" | "ZEROS" | "zero" | "ZERO")
  204. | (r_zero_fill <- "zero-fill" | "ZERO-FILL")
  205. | (r_write_only <- "write-only" | "WRITE-ONLY")
  206. | (r_write <- "write" | "WRITE")
  207. | (r_working_storage <- "working-storage" | "WORKING-STORAGE")
  208. | (r_words <- "words" | "WORDS")
  209. | (r_within <- "within" | "WITHIN")
  210. | (r_with <- "with" | "WITH")
  211. | (r_when_compiled <- "when-compiled" | "WHEN-COMPILED")
  212. | (r_when <- "when" | "WHEN")
  213. | (r_wait <- "wait" | "WAIT")
  214. | (r_varying <- "varying" | "VARYING")
  215. | (r_value <- "values" | "VALUES"
  216. | "value" | "VALUE")
  217. | (r_validate <- "validate" | "VALIDATE")
  218. | (r_valid <- "valid" | "VALID")
  219. | (r_using <- "using" | "USING")
  220. | (r_use <- "use" | "USE")
  221. | (r_usage_mode <- "usage-mode" | "USAGE-MODE")
  222. | (r_usage <- "usage" | "USAGE")
  223. | (r_upon <- "upon" | "UPON")
  224. | (r_update <- "update" | "UPDATE")
  225. | (r_up <- "up" | "UP")
  226. | (r_until <- "until" | "UNTIL")
  227. | (r_unstring <- "unstring" | "UNSTRING")
  228. | (r_unlock <- "unlock" | "UNLOCK")
  229. | (r_universal <- "universal" | "UNIVERSAL")
  230. | (r_unit <- "unit" | "UNIT")
  231. | (r_unequal <- "unequal" | "UNEQUAL")
  232. | (r_underline <- "underline" | "UNDERLINE")
  233. | (r_typedef <- "typedef" | "TYPEDEF")
  234. | (r_type <- "type" | "TYPE")
  235. | (r_true <- "true" | "TRUE")
  236. | (r_transceive <- "transceive" | "TRANSCEIVE")
  237. | (r_transaction <- "transaction" | "TRANSACTION")
  238. | (r_trailing_sign <- "trailing-sign" | "TRAILING-SIGN")
  239. | (r_trailing <- "trailing" | "TRAILING")
  240. | (r_track_overflow <- "track-overflow" | "TRACK-OVERFLOW")
  241. | (r_track_limit <- "track-limit" | "TRACK-LIMIT")
  242. | (r_track_area <- "track-area" | "TRACK-AREA")
  243. | (r_track <- "tracks" | "TRACKS"
  244. | "track" | "TRACK")
  245. | (r_trace <- "trace" | "TRACE")
  246. | (r_top <- "top" | "TOP")
  247. | (r_to <- "to" | "TO")
  248. | (r_title <- "title" | "TITLE")
  249. | (r_timeout <- "timeout" | "TIMEOUT")
  250. | (r_time <- "times" | "TIMES"
  251. | "time" | "TIME")
  252. | (r_through <- "through" | "THROUGH"
  253. | "thru" | "THRU")
  254. | (r_then <- "then" | "THEN")
  255. | (r_than <- "than" | "THAN")
  256. | (r_text <- "text" | "TEXT")
  257. | (r_test <- "test" | "TEST")
  258. | (r_terminate <- "terminate" | "TERMINATE")
  259. | (r_terminal <- "terminal" | "TERMINAL")
  260. | (r_tennant <- "tennant" | "TENNANT")
  261. | (r_tenant <- "tenant" | "TENANT")
  262. | (r_tape <- "tape" | "TAPE")
  263. | (r_tallying <- "tallying" | "TALLYING")
  264. | (r_tally <- "tally" | "TALLY")
  265. | (r_table <- "table" | "TABLE")
  266. | (r_synchronized <- "synchronized" | "SYNCHRONIZED")
  267. | (r_sync <- "sync" | "SYNC")
  268. | (r_symbolic <- "symbolic" | "SYMBOLIC")
  269. | (r_suppress <- "suppress" | "SUPPRESS")
  270. | (r_super <- "super" | "SUPER")
  271. | (r_sum <- "sum" | "SUM")
  272. | (r_suffix <- "suffix" | "SUFFIX")
  273. | (r_successive <- "successive" | "SUCCESSIVE")
  274. | (r_subtract <- "subtract" | "SUBTRACT")
  275. | (r_subschema_name <- "subschema-name" | "SUBSCHEMA-NAME")
  276. | (r_subrange <- "subrange" | "SUBRANGE")
  277. | (r_sub_schema <- "sub-schema" | "SUB-SCHEMA")
  278. | (r_sub_queue_3 <- "sub-queue-3" | "SUB-QUEUE-3")
  279. | (r_sub_queue_2 <- "sub-queue-2" | "SUB-QUEUE-2")
  280. | (r_sub_queue_1 <- "sub-queue-1" | "SUB-QUEUE-1")
  281. | (r_string <- "string" | "STRING")
  282. | (r_store <- "store" | "STORE")
  283. | (r_stop <- "stop" | "STOP")
  284. | (r_status <- "status" | "STATUS")
  285. | (r_stations <- "stations" | "STATIONS")
  286. | (r_station <- "station" | "STATION")
  287. | (r_start <- "start" | "START")
  288. | (r_standard_2 <- "standard-2" | "STANDARD-2")
  289. | (r_standard_1 <- "standard-1" | "STANDARD-1")
  290. | (r_standard <- "standard" | "STANDARD")
  291. | (r_special_names <- "special-names" | "SPECIAL-NAMES")
  292. | (l_string <- "spaces" | "SPACES"
  293. | "space" | "SPACE")
  294. | (r_space_fill <- "space-fill" | "SPACE-FILL")
  295. | (r_source_computer <- "source-computer" | "SOURCE-COMPUTER")
  296. | (r_source <- "source" | "SOURCE")
  297. | (r_sort_status <- "sort-status" | "SORT-STATUS")
  298. | (r_sort_return <- "sort-return" | "SORT-RETURN")
  299. | (r_sort_mode_size <- "sort-mode-size" | "SORT-MODE-SIZE")
  300. | (r_sort_message <- "sort-message" | "SORT-MESSAGE")
  301. | (r_sort_merge <- "sort-merge" | "SORT-MERGE")
  302. | (r_sort_file_size <- "sort-file-size" | "SORT-FILE-SIZE")
  303. | (r_sort_core_size <- "sort-core-size" | "SORT-CORE-SIZE")
  304. | (r_sort_control <- "sort-control" | "SORT-CONTROL")
  305. | (r_sort <- "sort" | "SORT")
  306. | (r_skip3 <- "skip3" | "SKIP3")
  307. | (r_skip2 <- "skip2" | "SKIP2")
  308. | (r_skip1 <- "skip1" | "SKIP1")
  309. | (r_size <- "size" | "SIZE")
  310. | (r_single <- "single" | "SINGLE")
  311. | (r_simple <- "simple" | "SIMPLE")
  312. | (r_sign <- "sign" | "SIGN")
  313. | (r_shift_out <- "shift-out" | "SHIFT-OUT")
  314. | (r_shift_in <- "shift-in" | "SHIFT-IN")
  315. | (r_shared <- "shared" | "SHARED")
  316. | (r_set <- "set" | "SET")
  317. | (r_session_id <- "session-id" | "SESSION-ID")
  318. | (r_session <- "session" | "SESSION")
  319. | (r_service <- "service" | "SERVICE")
  320. | (r_sequential <- "sequential" | "SEQUENTIAL")
  321. | (r_sequence <- "sequence" | "SEQUENCE")
  322. | (r_separate <- "separate" | "SEPARATE")
  323. | (r_sentence <- "sentence" | "SENTENCE")
  324. | (r_send <- "send" | "SEND")
  325. | (r_self <- "self" | "SELF")
  326. | (r_selective <- "selective" | "SELECTIVE")
  327. | (r_selected <- "selected" | "SELECTED")
  328. | (r_select <- "select" | "SELECT")
  329. | (r_segment_limit <- "segment-limit" | "SEGMENT-LIMIT")
  330. | (r_segment <- "segment" | "SEGMENT")
  331. | (r_seek <- "seek" | "SEEK")
  332. | (r_security <- "security" | "SECURITY")
  333. | (r_secure <- "secure" | "SECURE")
  334. | (r_section <- "section" | "SECTION")
  335. | (r_search <- "search" | "SEARCH")
  336. | (r_sd <- "sd" | "SD")
  337. | (r_screen <- "screen" | "SCREEN")
  338. | (r_saved_area <- "saved-area" | "SAVED-AREA")
  339. | (r_same <- "same" | "SAME")
  340. | (r_sa <- "sa" | "SA")
  341. | (r_run <- "run" | "RUN")
  342. | (r_rounded <- "rounded" | "ROUNDED")
  343. | (r_rollback <- "rollback" | "ROLLBACK")
  344. | (r_roll_out <- "roll-out" | "ROLL-OUT")
  345. | (r_right_justify <- "right-justify" | "RIGHT-JUSTIFY")
  346. | (r_right <- "right" | "RIGHT")
  347. | (r_rh <- "rh" | "RH")
  348. | (r_rf <- "rf" | "RF")
  349. | (r_rewrite <- "rewrite" | "REWRITE")
  350. | (r_rewind <- "rewind" | "REWIND")
  351. | (r_reversed <- "reversed" | "REVERSED")
  352. | (r_reverse_video <- "reverse-video" | "REVERSE-VIDEO")
  353. | (r_returning <- "returning" | "RETURNING")
  354. | (r_return_code <- "return-code" | "RETURN-CODE")
  355. | (r_return <- "return" | "RETURN")
  356. | (r_retrieval <- "retrieval" | "RETRIEVAL")
  357. | (r_retaining <- "retaining" | "RETAINING")
  358. | (r_reset <- "reset" | "RESET")
  359. | (r_reserve <- "reserve" | "RESERVE")
  360. | (r_rerun <- "rerun" | "RERUN")
  361. | (r_required <- "required" | "REQUIRED")
  362. | (r_repository <- "repository" | "REPOSITORY")
  363. | (r_reporting <- "reporting" | "REPORTING")
  364. | (r_report <- "reports" | "REPORTS"
  365. | "report" | "REPORT")
  366. | (r_replacing <- "replacing" | "REPLACING")
  367. | (r_replace <- "replace" | "REPLACE")
  368. | (r_repeated <- "repeated" | "REPEATED")
  369. | (r_reorg_criteria <- "reorg-criteria" | "REORG-CRITERIA")
  370. | (r_renames <- "renames" | "RENAMES")
  371. | (r_removal <- "removal" | "REMOVAL")
  372. | (r_remarks <- "remarks" | "REMARKS")
  373. | (r_remainder <- "remainder" | "REMAINDER")
  374. | (r_reload <- "reload" | "RELOAD")
  375. | (r_release <- "release" | "RELEASE")
  376. | (r_relative <- "relative" | "RELATIVE")
  377. | (r_relation <- "relation" | "RELATION")
  378. | (r_reference <- "references" | "REFERENCES"
  379. | "reference" | "REFERENCE")
  380. | (r_reel <- "reel" | "REEL")
  381. | (r_redefines <- "redefines" | "REDEFINES")
  382. | (r_records <- "records" | "RECORDS")
  383. | (r_recording <- "recording" | "RECORDING")
  384. | (r_record_overflow <- "record-overflow" | "RECORD-OVERFLOW")
  385. | (r_record_name <- "record-name" | "RECORD-NAME")
  386. | (r_record <- "record" | "RECORD")
  387. | (r_reconnect <- "reconnect" | "RECONNECT")
  388. | (r_receive <- "receive" | "RECEIVE")
  389. | (r_realm <- "realm" | "REALM")
  390. | (r_ready <- "ready" | "READY")
  391. | (r_read <- "read" | "READ")
  392. | (r_rd <- "rd" | "RD")
  393. | (r_range <- "range" | "RANGE")
  394. | (r_random <- "random" | "RANDOM")
  395. | (r_raising <- "raising" | "RAISING")
  396. | (r_raise <- "raise" | "RAISE")
  397. | (r_quote <- "quotes" | "QUOTES"
  398. | "quote" | "QUOTES")
  399. | (r_queue <- "queue" | "QUEUE")
  400. | (r_purge <- "purge" | "PURGE")
  401. | (r_prototype <- "prototype" | "PROTOTYPE")
  402. | (r_protected <- "protected" | "PROTECTED")
  403. | (r_property <- "property" | "PROPERTY")
  404. | (r_prompt <- "prompt" | "PROMPT")
  405. | (r_program_status <- "program-status" | "PROGRAM-STATUS")
  406. | (r_program_id <- "program-id" | "PROGRAM-ID")
  407. | (r_program <- "program" | "PROGRAM")
  408. | (r_processing <- "processing" | "PROCESSING")
  409. | (r_proceed <- "proceed" | "PROCEED")
  410. | (r_procedure <- "procedures" | "PROCEDURES"
  411. | "procedure" | "PROCEDURE")
  412. | (r_prior <- "prior" | "PRIOR")
  413. | (r_printing <- "printing" | "PRINTING")
  414. | (r_previous <- "previous" | "PREVIOUS")
  415. | (r_present <- "present" | "PRESENT")
  416. | (r_prefix <- "prefix" | "PREFIX")
  417. | (r_positive <- "positive" | "POSITIVE")
  418. | (r_positioning <- "positioning" | "POSITIONING")
  419. | (r_position <- "position" | "POSITION")
  420. | (r_pointer <- "pointer" | "POINTER")
  421. | (r_plus <- "plus" | "PLUS")
  422. | (r_ph <- "ph" | "PH")
  423. | (r_pf <- "pf" | "PF")
  424. | (r_perform <- "perform" | "PERFORM")
  425. | (r_password <- "password" | "PASSWORD")
  426. | (r_paragraph <- "paragraph" | "PARAGRAPH")
  427. | (r_page_counter <- "page-counter" | "PAGE-COUNTER")
  428. | (r_page <- "page" | "PAGE")
  429. | (r_padding <- "padding" | "PADDING")
  430. | (r_packed_decimal <- "packed-decimal" | "PACKED-DECIMAL")
  431. | (r_owner <- "owner" | "OWNER")
  432. | (r_override <- "override" | "OVERRIDE")
  433. | (r_overline <- "overline" | "OVERLINE")
  434. | (r_overflow <- "overflow" | "OVERFLOW")
  435. | (r_output <- "output" | "OUTPUT")
  436. | (r_otherwise <- "otherwise" | "OTHERWISE")
  437. | (r_other <- "other" | "OTHER")
  438. | (r_organization <- "organization" | "ORGANIZATION")
  439. | (r_order <- "order" | "ORDER")
  440. | (r_or <- "or" | "OR")
  441. | (r_optional <- "optional" | "OPTIONAL")
  442. | (r_open <- "open" | "OPEN")
  443. | (r_only <- "only" | "ONLY")
  444. | (r_on <- "on" | "ON")
  445. | (r_omitted <- "omitted" | "OMITTED")
  446. | (r_off <- "off" | "OFF")
  447. | (r_in_of <- "of" | "OF") // "in", "of"
  448. | (r_occurs <- "occurs" | "OCCURS")
  449. | (r_object_computer <- "object-computer" | "OBJECT-COMPUTER")
  450. | (r_object <- "object" | "OBJECT")
  451. | (r_numeric_edited <- "numeric-edited" | "NUMERIC-EDITED")
  452. | (r_numeric <- "numeric" | "NUMERIC")
  453. | (r_number <- "number" | "NUMBER")
  454. | (r_null <- "nulls" | "NULLS"
  455. | "null" | "NULL")
  456. | (r_note <- "note" | "NOTE")
  457. | (r_not <- "not" | "NOT")
  458. | (r_none <- "none" | "NONE")
  459. | (r_nominal <- "nominal" | "NOMINAL")
  460. | (r_no <- "no" | "NO")
  461. | (r_next <- "next" | "NEXT")
  462. | (r_negative <- "negative" | "NEGATIVE")
  463. | (r_native <- "native" | "NATIVE")
  464. | (r_national_edited <- "national-edited" | "NATIONAL-EDITED")
  465. | (r_national <- "national" | "NATIONAL")
  466. | (r_named <- "named" | "NAMED")
  467. | (r_multiply <- "multiply" | "MULTIPLY")
  468. | (r_multiple <- "multiple" | "MULTIPLE")
  469. | (r_multiconversation_mode <- "multiconversation-mode" | "MULTICONVERSATION-MODE")
  470. | (r_multicon <- "multicon" | "MULTICON")
  471. | (r_move <- "move" | "MOVE")
  472. | (r_more_labels <- "more-labels" | "MORE-LABELS")
  473. | (r_modules <- "modules" | "MODULES")
  474. | (r_modify <- "modify" | "MODIFY")
  475. | (r_mode_3 <- "mode-3" | "MODE-3")
  476. | (r_mode_2 <- "mode-2" | "MODE-2")
  477. | (r_mode_1 <- "mode-1" | "MODE-1")
  478. | (r_mode <- "mode" | "MODE")
  479. | (r_method_id <- "method-id" | "METHOD-ID")
  480. ?(
  481. (null <- *(" " | "&t;")) (period <- ".") (null <- *(" " | "&t;"))
  482. ?(
  483. ((r_get <- "get" | "GET") | (r_set <- "set" | "SET")) (null <- +(" " | "&t;")) (r_property <- "property" | "PROPERTY") (null <- *(" " | "&t;"))
  484. )
  485. (null <- "&quot;" | "&squot;")
  486. (word <- *(+"&(0-9);" ?"-") ("&(a-z);" | "&(A-Z);" | "_" | "&#x(2e80-2fdf);" | "&#x(3040-30ff);" | "&#x(3400-9faf);" | "&#x(ff66-ff9f);" | "&#x(ff21-ff3a);" | "&#x(ff41-ff5a);" | "@")
  487. *("&(a-z);" | "&(A-Z);" | "_" | "-" | "&#x(2e80-2fdf);" | "&#x(3040-30ff);" | "&#x(3400-9faf);" | "&#x(ff66-ff9f);" | "&#x(ff21-ff3a);" | "&#x(ff41-ff5a);" | "&(0-9);" | "&#x(ff10-ff19);" | "&#x(ff0d-ff0e);"))
  488. (null <- "&quot;" | "&squot;")
  489. )
  490. | (r_method <- "method" | "METHOD")
  491. | (r_message <- "message" | "MESSAGE")
  492. | (r_merge <- "merge" | "MERGE")
  493. | (r_memory <- "memory" | "MEMORY")
  494. | (r_member <- "member" | "MEMBER")
  495. | (r_manual <- "manual" | "MANUAL")
  496. | (r_lowlight <- "lowlight" | "LOWLIGHT")
  497. | (r_low_value <- "low-values" | "LOW-VALUES"
  498. | "low-value" | "LOW-VALUE")
  499. | (r_lock <- "lock" | "LOCK")
  500. | (r_locally <- "locally" | "LOCALLY")
  501. | (r_linkage <- "linkage" | "LINKAGE")
  502. | (r_line_counter <- "line-counter" | "LINE-COUNTER")
  503. | (r_line <- "lines" | "LINES"
  504. | "line" | "LINE")
  505. | (r_linage_counter <- "linage-counter" | "LINAGE-COUNTER")
  506. | (r_linage <- "linage" | "LINAGE")
  507. | (r_limited <- "limited" | "LIMITED")
  508. | (r_limit <- "limits" | "LIMITS"
  509. | "limit" | "LIMIT")
  510. | (r_less <- "less" | "LESS")
  511. | (r_length <- "length" | "LENGTH")
  512. | (r_leftline <- "leftline" | "LEFTLINE")
  513. | (r_left_justify <- "left-justify" | "LEFT-JUSTIFY")
  514. | (r_left <- "left" | "LEFT")
  515. | (r_leading <- "leading" | "LEADING")
  516. | (r_ld <- "ld" | "LD")
  517. | (r_last <- "last" | "LAST")
  518. | (r_label <- "label" | "LABEL")
  519. | (r_key <- "key" | "KEY")
  520. | (r_keep <- "keep" | "KEEP")
  521. | (r_kanji <- "kanji" | "KANJI")
  522. | (r_justified <- "justified" | "JUSTIFIED")
  523. | (r_just <- "just" | "JUST")
  524. | (r_joining <- "joining" | "JOINING")
  525. | (r_job <- "job" | "JOB")
  526. | (r_japanese <- "japanese" | "JAPANESE")
  527. | (r_is <- "is" | "IS")
  528. | (r_invoke <- "invoke" | "INVOKE")
  529. ?(
  530. (null <- +(" " | "&t;"))
  531. (word <- *(+"&(0-9);" ?"-") ("&(a-z);" | "&(A-Z);" | "_" | "&#x(2e80-2fdf);" | "&#x(3040-30ff);" | "&#x(3400-9faf);" | "&#x(ff66-ff9f);" | "&#x(ff21-ff3a);" | "&#x(ff41-ff5a);" | "@")
  532. *("&(a-z);" | "&(A-Z);" | "_" | "-" | "&#x(2e80-2fdf);" | "&#x(3040-30ff);" | "&#x(3400-9faf);" | "&#x(ff66-ff9f);" | "&#x(ff21-ff3a);" | "&#x(ff41-ff5a);" | "&(0-9);" | "&#x(ff10-ff19);" | "&#x(ff0d-ff0e);"))
  533. (null <- *(" " | "&t;") ("&quot;" | "&squot;"))
  534. (word <- *(+"&(0-9);" ?"-") ("&(a-z);" | "&(A-Z);" | "_" | "&#x(2e80-2fdf);" | "&#x(3040-30ff);" | "&#x(3400-9faf);" | "&#x(ff66-ff9f);" | "&#x(ff21-ff3a);" | "&#x(ff41-ff5a);" | "@")
  535. *("&(a-z);" | "&(A-Z);" | "_" | "-" | "&#x(2e80-2fdf);" | "&#x(3040-30ff);" | "&#x(3400-9faf);" | "&#x(ff66-ff9f);" | "&#x(ff21-ff3a);" | "&#x(ff41-ff5a);" | "&(0-9);" | "&#x(ff10-ff19);" | "&#x(ff0d-ff0e);"))
  536. (null <- "&quot;" | "&squot;")
  537. )
  538. | (r_invariant <- "invariant" | "INVARIANT")
  539. | (r_invalid <- "invalid" | "INVALID")
  540. | (r_into <- "into" | "INTO")
  541. | (r_interface <- "interface" | "INTERFACE")
  542. | (r_interface_id <- "interface-id" | "INTERFACE-ID")
  543. | (r_installation <- "installation" | "INSTALLATION")
  544. | (r_inspect <- "inspect" | "INSPECT")
  545. | (r_input_output <- "input-output" | "INPUT-OUTPUT")
  546. | (r_input <- "input" | "INPUT")
  547. | (r_initiate <- "initiate" | "INITIATE")
  548. | (r_initialize <- "initialize" | "INITIALIZE")
  549. | (r_initial <- "initial" | "INITIAL")
  550. | (r_inherits <- "inherits" | "INHERITS")
  551. | (r_indicate <- "indicate" | "INDICATE")
  552. | (r_indexed <- "indexed" | "INDEXED")
  553. | (r_index_n <- "index-n" | "INDEX-N")
  554. | (r_index <- "index" | "INDEX")
  555. | (r_include <- "include" | "INCLUDE")
  556. | (r_in_of <- "in" | "IN") // "in", "of"
  557. | (r_if <- "if" | "IF")
  558. | (r_identification <- "identification" | "IDENTIFICATION")
  559. | (r_id <- "id" | "ID")
  560. | (r_i_o_control <- "i-o-control" | "I-O-CONTROL")
  561. | (r_i_o <- "i-o" | "I-O")
  562. | (r_highlight <- "highlight" | "HIGHLIGHT")
  563. | (r_high_value <- "high-values" | "HIGH-VALUES"
  564. | "high-value" | "HIGH-VALUE")
  565. | (r_heading <- "heading" | "HEADING")
  566. | (r_group <- "group" | "GROUP")
  567. | (r_grid <- "grid" | "GRID")
  568. | (r_greater <- "greater" | "GREATER")
  569. | (r_goback <- "goback" | "GOBACK")
  570. | (r_go <- "go" | "GO")
  571. | (r_global <- "global" | "GLOBAL")
  572. | (r_giving <- "giving" | "GIVING")
  573. | (r_get <- "get" | "GET")
  574. | (r_generate <- "generate" | "GENERATE")
  575. | (r_function <- "function" | "FUNCTION")
  576. | (r_full <- "full" | "FULL")
  577. | (r_from <- "from" | "FROM")
  578. | (r_free <- "free" | "FREE")
  579. | (r_formatted <- "formatted" | "FORMATTED")
  580. | (r_format <- "format" | "FORMAT")
  581. | (r_form <- "form" | "FORM")
  582. | (r_foreground_color <- "foreground-color" | "FOREGROUND-COLOR")
  583. | (r_for <- "for" | "FOR")
  584. | (r_footing <- "footing" | "FOOTING")
  585. | (r_fladd <- "fladd" | "FLADD")
  586. | (r_first <- "first" | "FIRST")
  587. | (r_finish <- "finish" | "FINISH")
  588. | (r_find <- "find" | "FIND")
  589. | (r_final <- "final" | "FINAL")
  590. | (r_filler <- "filler" | "FILLER")
  591. | (r_file_limit <- "file-limits" | "FILE-LIMITS"
  592. | "file-limit" | "FILE-LIMIT")
  593. | (r_file_control <- "file-control" | "FILE-CONTROL")
  594. | (r_file <- "files" | "FILES"
  595. | "file" | "FILE")
  596. | (r_fetch <- "fetch" | "FETCH")
  597. | (r_fd <- "fd" | "FD")
  598. | (r_false <- "false" | "FALSE")
  599. | (r_factory <- "factory" | "FACTORY")
  600. | (r_external <- "external" | "EXTERNAL")
  601. | (r_extend <- "extend" | "EXTEND")
  602. | (r_exor <- "exor" | "EXOR")
  603. | (r_exit <- "exit" | "EXIT")
  604. | (r_exec <- "exec" | "EXEC")
  605. | (r_exclusive <- "exclusive" | "EXCLUSIVE")
  606. | (r_exception_object <- "exception-object" | "EXCEPTION-OBJECT")
  607. | (r_exception <- "exception" | "EXCEPTION")
  608. | (r_exceeds <- "exceeds" | "EXCEEDS")
  609. | (r_examine <- "examine" | "EXAMINE")
  610. | (r_exact <- "exact" | "EXACT")
  611. | (r_every <- "every" | "EVERY")
  612. | (r_evaluate <- "evaluate" | "EVALUATE")
  613. | (r_esi <- "esi" | "ESI")
  614. | (r_error <- "error" | "ERROR")
  615. | (r_erase <- "erase" | "ERASE")
  616. | (r_equals <- "equals" | "EQUALS")
  617. | (r_equal <- "equal" | "EQUAL")
  618. | (r_eos <- "eos" | "EOS")
  619. | (r_eop <- "eop" | "EOP")
  620. | (r_eol <- "eol" | "EOL")
  621. | (r_environment <- "environment" | "ENVIRONMENT")
  622. | (r_entry <- "entry" | "ENTRY")
  623. | (r_enter <- "enter" | "ENTER")
  624. | (r_ending <- "ending" | "ENDING")
  625. | (r_endcobol <- "endcobol" | "ENDCOBOL")
  626. | (r_end_write <- "end-write" | "END-WRITE")
  627. | (r_end_unstring <- "end-unstring" | "END-UNSTRING")
  628. | (r_end_transceive <- "end-transceive" | "END-TRANSCEIVE")
  629. | (r_end_subtract <- "end-subtract" | "END-SUBTRACT")
  630. | (r_end_string <- "end-string" | "END-STRING")
  631. | (r_end_start <- "end-start" | "END-START")
  632. | (r_end_send <- "end-send" | "END-SEND")
  633. | (r_end_search <- "end-search" | "END-SEARCH")
  634. | (r_end_rewrite <- "end-rewrite" | "END-REWRITE")
  635. | (r_end_return <- "end-return" | "END-RETURN")
  636. | (r_end_receive <- "end-receive" | "END-RECEIVE")
  637. | (r_end_read <- "end-read" | "END-READ")
  638. | (r_end_perform <- "end-perform" | "END-PERFORM")
  639. | (r_end_of_page <- "end-of-page" | "END-OF-PAGE")
  640. | (r_end_multiply <- "end-multiply" | "END-MULTIPLY")
  641. | (r_end_invoke <- "end-invoke" | "END-INVOKE")
  642. | (r_end_if <- "end-if" | "END-IF")
  643. | (r_end_exec <- "end-exec" | "END-EXEC")
  644. | (r_end_evaluate <- "end-evaluate" | "END-EVALUATE")
  645. | (r_end_enable <- "end-enable" | "END-ENABLE")
  646. | (r_end_divide <- "end-divide" | "END-DIVIDE")
  647. | (r_end_display <- "end-display" | "END-DISPLAY")
  648. | (r_end_disable <- "end-disable" | "END-DISABLE")
  649. | (r_end_delete <- "end-delete" | "END-DELETE")
  650. | (r_end_compute <- "end-compute" | "END-COMPUTE")
  651. | (r_end_call <- "end-call" | "END-CALL")
  652. | (r_end_add <- "end-add" | "END-ADD")
  653. | (r_end_accept <- "end-accept" | "END-ACCEPT")
  654. | (r_end_method <- ("end" | "END") (null <- +(" " | "&t;")) ("method" | "METHOD")
  655. (null <- *(" " | "&t;") ("&quot;" | "&squot;"))
  656. (word <- *(+"&(0-9);" ?"-") ("&(a-z);" | "&(A-Z);" | "_" | "&#x(2e80-2fdf);" | "&#x(3040-30ff);" | "&#x(3400-9faf);" | "&#x(ff66-ff9f);" | "&#x(ff21-ff3a);" | "&#x(ff41-ff5a);" | "@")
  657. *("&(a-z);" | "&(A-Z);" | "_" | "-" | "&#x(2e80-2fdf);" | "&#x(3040-30ff);" | "&#x(3400-9faf);" | "&#x(ff66-ff9f);" | "&#x(ff21-ff3a);" | "&#x(ff41-ff5a);" | "&(0-9);" | "&#x(ff10-ff19);" | "&#x(ff0d-ff0e);"))
  658. (null <- "&quot;" | "&squot;"))
  659. | (r_end_class <- ("end" | "END") (null <- +(" " | "&t;")) ("class" | "CLASS")
  660. (null <- *(" " | "&t;") ("&quot;" | "&squot;"))
  661. (word <- *(+"&(0-9);" ?"-") ("&(a-z);" | "&(A-Z);" | "_" | "&#x(2e80-2fdf);" | "&#x(3040-30ff);" | "&#x(3400-9faf);" | "&#x(ff66-ff9f);" | "&#x(ff21-ff3a);" | "&#x(ff41-ff5a);" | "@")
  662. *("&(a-z);" | "&(A-Z);" | "_" | "-" | "&#x(2e80-2fdf);" | "&#x(3040-30ff);" | "&#x(3400-9faf);" | "&#x(ff66-ff9f);" | "&#x(ff21-ff3a);" | "&#x(ff41-ff5a);" | "&(0-9);" | "&#x(ff10-ff19);" | "&#x(ff0d-ff0e);"))
  663. (null <- "&quot;" | "&squot;"))
  664. | (r_end <- "end" | "END")
  665. | (r_enable <- "enable" | "ENABLE")
  666. | (r_empty <- "empty" | "EMPTY")
  667. | (r_emi <- "emi" | "EMI")
  668. | (r_else <- "else" | "ELSE")
  669. | (r_eject <- "eject" | "EJECT")
  670. | (r_egi <- "egi" | "EGI")
  671. | (r_egcs <- "egcs" | "EGCS")
  672. | (r_edit_status <- "edit-status" | "EDIT-STATUS")
  673. | (r_edit_option <- "edit-option" | "EDIT-OPTION")
  674. | (r_edit_mode <- "edit-mode" | "EDIT-MODE")
  675. | (r_edit_cursor <- "edit-cursor" | "EDIT-CURSOR")
  676. | (r_edit_color <- "edit-color" | "EDIT-COLOR")
  677. | (r_dynamic <- "dynamic" | "DYNAMIC")
  678. | (r_duplicate <- "duplicates" | "DUPLICATES"
  679. | "duplicate" | "DUPLICATE")
  680. | (r_down <- "down" | "DOWN")
  681. | (r_division <- "division" | "DIVISION")
  682. | (r_divide <- "divide" | "DIVIDE")
  683. | (r_display_n <- "display-n" | "DISPLAY-N")
  684. | (r_display_exit <- "display-exit" | "DISPLAY-EXIT")
  685. | (r_display_1 <- "display-1" | "DISPLAY-1")
  686. | (r_display <- "display" | "DISPLAY")
  687. | (r_disjoining <- "disjoining" | "DISJOINING")
  688. | (r_disconnect <- "disconnect" | "DISCONNECT")
  689. | (r_disable <- "disable" | "DISABLE")
  690. | (r_direct <- "direct" | "DIRECT")
  691. | (r_device <- "device" | "DEVICE")
  692. | (r_detail <- "detail" | "DETAIL")
  693. | (r_destination_3 <- "destination-3" | "DESTINATION-3")
  694. | (r_destination_2 <- "destination-2" | "DESTINATION-2")
  695. | (r_destination_1 <- "destination-1" | "DESTINATION-1")
  696. | (r_destination <- "destination" | "DESTINATION")
  697. | (r_descending <- "descending" | "DESCENDING")
  698. | (r_depending <- "depending" | "DEPENDING")
  699. | (r_delimiter <- "delimiter" | "DELIMITER")
  700. | (r_delimited <- "delimited" | "DELIMITED")
  701. | (r_delete <- "delete" | "DELETE")
  702. | (r_default <- "default" | "DEFAULT")
  703. | (r_declaratives <- "declaratives" | "DECLARATIVES")
  704. | (r_decimal_point <- "decimal-point" | "DECIMAL-POINT")
  705. | (r_debugging <- "debugging" | "DEBUGGING")
  706. | (r_debug_sub_3 <- "debug-sub-3" | "DEBUG-SUB-3")
  707. | (r_debug_sub_2 <- "debug-sub-2" | "DEBUG-SUB-2")
  708. | (r_debug_sub_1 <- "debug-sub-1" | "DEBUG-SUB-1")
  709. | (r_debug_name <- "debug-name" | "DEBUG-NAME")
  710. | (r_debug_line <- "debug-line" | "DEBUG-LINE")
  711. | (r_debug_item <- "debug-item" | "DEBUG-ITEM")
  712. | (r_debug_contents <- "debug-contents" | "DEBUG-CONTENTS")
  713. | (r_dead_lock <- "dead-lock" | "DEAD-LOCK")
  714. | (r_de <- "de" | "DE")
  715. | (r_db_status <- "db-status" | "DB-STATUS")
  716. | (r_db_set_name <- "db-set-name" | "DB-SET-NAME")
  717. | (r_db_record_name <- "db-record-name" | "DB-RECORD-NAME")
  718. | (r_db_exception <- "db-exception" | "DB-EXCEPTION")
  719. | (r_db_data_name <- "db-data-name" | "DB-DATA-NAME")
  720. | (r_db_access_control_key <- "db-access-control-key" | "DB-ACCESS-CONTROL-KEY")
  721. | (r_db <- "db" | "DB")
  722. | (r_day_of_week <- "day-of-week" | "DAY-OF-WEEK")
  723. | (r_day <- "day" | "DAY")
  724. | (r_date_written <- "date-written" | "DATE-WRITTEN")
  725. | (r_date_compiled <- "date-compiled" | "DATE-COMPILED")
  726. | (r_date <- "date" | "DATE")
  727. | (r_data <- "data" | "DATA")
  728. | (r_cursor <- "cursor" | "CURSOR")
  729. | (r_current <- "current" | "CURRENT")
  730. | (r_currency <- "currency" | "CURRENCY")
  731. | (r_crt_under <- "crt-under" | "CRT-UNDER")
  732. | (r_crt <- "crt" | "CRT")
  733. | (r_crp <- "crp" | "CRP")
  734. | (r_count <- "count" | "COUNT")
  735. | (r_corresponding <- "corresponding" | "CORRESPONDING")
  736. | (r_corr <- "corr" | "CORR")
  737. | (r_core_index <- "core-index" | "CORE-INDEX")
  738. | (r_copy <- "copy" | "COPY")
  739. | (r_converting <- "converting" | "CONVERTING")
  740. | (r_control_character <- "control-character" | "CONTROL-CHARACTER")
  741. | (r_control <- "controls" | "CONTROLS"
  742. | "control" | "CONTROL")
  743. | (r_continue <- "continue" | "CONTINUE")
  744. | (r_content <- "content" | "CONTENT")
  745. | (r_contains <- "contains" | "CONTAINS")
  746. | (r_contained <- "contained" | "CONTAINED")
  747. | (r_constant <- "constant" | "CONSTANT")
  748. | (r_connect <- "connect" | "CONNECT")
  749. | (r_configuration <- "configuration" | "CONFIGURATION")
  750. | (r_compute <- "compute" | "COMPUTE")
  751. | (r_computational_n <- "computational-n" | "COMPUTATIONAL-N")
  752. | (r_computational_5 <- "computational-5" | "COMPUTATIONAL-5")
  753. | (r_computational_4 <- "computational-4" | "COMPUTATIONAL-4")
  754. | (r_computational_3 <- "computational-3" | "COMPUTATIONAL-3")
  755. | (r_computational_2 <- "computational-2" | "COMPUTATIONAL-2")
  756. | (r_computational_1 <- "computational-1" | "COMPUTATIONAL-1")
  757. | (r_computational <- "computational" | "COMPUTATIONAL")
  758. | (r_complex <- "complex" | "COMPLEX")
  759. | (r_comp_n <- "comp-n" | "COMP-N")
  760. | (r_comp_5 <- "comp-5" | "COMP-5")
  761. | (r_comp_4 <- "comp-4" | "COMP-4")
  762. | (r_comp_3 <- "comp-3" | "COMP-3")
  763. | (r_comp_2 <- "comp-2" | "COMP-2")
  764. | (r_comp_1 <- "comp-1" | "COMP-1")
  765. | (r_comp <- "comp" | "COMP")
  766. | (r_communication <- "communication" | "COMMUNICATION")
  767. | (r_common <- "common" | "COMMON")
  768. | (r_commit <- "commit" | "COMMIT")
  769. | (r_command <- "command" | "COMMAND")
  770. | (r_comma <- "comma" | "COMMA")
  771. | (r_com_reg <- "com-reg" | "COM-REG")
  772. | (r_column <- "column" | "COLUMN")
  773. | (r_collating <- "collating" | "COLLATING")
  774. | (r_code_set <- "code-set" | "CODE-SET")
  775. | (r_code <- "code" | "CODE")
  776. | (r_cobol <- "cobol" | "COBOL")
  777. | (r_close <- "close" | "CLOSE")
  778. | (r_clock_units <- "clock-units" | "CLOCK-UNITS")
  779. | (r_class_id <- "class-id" | "CLASS-ID")
  780. | (r_class <- "class" | "CLASS")
  781. | (r_characters <- "characters" | "CHARACTERS")
  782. | (r_character <- "character" | "CHARACTER")
  783. | (r_changed <- "changed" | "CHANGED")
  784. | (r_ch <- "ch" | "CH")
  785. | (r_cf <- "cf" | "CF")
  786. | (r_cd <- "cd" | "CD")
  787. | (r_cbl <- "cbl" | "CBL")
  788. | (r_cancel <- "cancel" | "CANCEL")
  789. | (r_call <- "call" | "CALL")
  790. ?(
  791. (null <- *(" " | "&t;") ("&quot;" | "&squot;"))
  792. (word <- *(+"&(0-9);" ?"-") ("&(a-z);" | "&(A-Z);" | "_" | "&#x(2e80-2fdf);" | "&#x(3040-30ff);" | "&#x(3400-9faf);" | "&#x(ff66-ff9f);" | "&#x(ff21-ff3a);" | "&#x(ff41-ff5a);" | "@")
  793. *("&(a-z);" | "&(A-Z);" | "_" | "-" | "&#x(2e80-2fdf);" | "&#x(3040-30ff);" | "&#x(3400-9faf);" | "&#x(ff66-ff9f);" | "&#x(ff21-ff3a);" | "&#x(ff41-ff5a);" | "&(0-9);" | "&#x(ff10-ff19);" | "&#x(ff0d-ff0e);"))
  794. (null <- "&quot;" | "&squot;")
  795. )
  796. | (r_by <- "by" | "BY")
  797. | (r_bottom <- "bottom" | "BOTTOM")
  798. | (r_boolean <- "boolean" | "BOOLEAN")
  799. | (r_block <- "block" | "BLOCK")
  800. | (r_blink <- "blink" | "BLINK")
  801. | (r_blank <- "blank" | "BLANK")
  802. | (r_bit <- "bits" | "BITS"
  803. | "bit" | "BIT")
  804. | (r_binary <- "binary" | "BINARY")
  805. | (r_bell <- "bell" | "BELL")
  806. | (r_beginning <- "beginning" | "BEGINNING")
  807. | (r_before <- "before" | "BEFORE")
  808. | (r_based_storage <- "based-storage" | "BASED-STORAGE")
  809. | (r_based <- "based" | "BASED")
  810. | (r_background_color <- "background-color" | "BACKGROUND-COLOR")
  811. | (r_b_or <- "b-or" | "B-OR")
  812. | (r_b_not <- "b-not" | "B-NOT")
  813. | (r_b_less <- "b-less" | "B-LESS")
  814. | (r_b_exor <- "b-exor" | "B-EXOR")
  815. | (r_b_and <- "b-and" | "B-AND")
  816. | (r_automatic <- "automatic" | "AUTOMATIC")
  817. | (r_auto <- "auto" | "AUTO")
  818. | (r_author <- "author" | "AUTHOR")
  819. | (r_at <- "at" | "AT")
  820. | (r_assign <- "assign" | "ASSIGN")
  821. | (r_ascending <- "ascending" | "ASCENDING")
  822. | (r_as <- "as" | "AS")
  823. | (r_arithmetic <- "arithmetic" | "ARITHMETIC")
  824. | (r_area <- "areas" | "AREAS"
  825. | "area" | "AREA")
  826. | (r_is <- "are" | "ARE") // | (r_are <- "are" | "ARE")
  827. | (r_apply <- "apply" | "APPLY")
  828. | (r_any <- "any" | "ANY")
  829. | (r_and <- "and" | "AND")
  830. | (r_alternate <- "alternate" | "ALTERNATE")
  831. | (r_alter <- "alter" | "ALTER")
  832. | (r_also <- "also" | "ALSO")
  833. | (r_alphanumeric_edited <- "alphanumeric-edited" | "ALPHANUMERIC-EDITED")
  834. | (r_alphanumeric <- "alphanumeric" | "ALPHANUMERIC")
  835. | (r_alphabetic_upper <- "alphabetic-upper" | "ALPHABETIC-UPPER")
  836. | (r_alphabetic_lower <- "alphabetic-lower" | "ALPHABETIC-LOWER")
  837. | (r_alphabetic <- "alphabetic" | "ALPHABETIC")
  838. | (r_alphabet <- "alphabet" | "ALPHABET")
  839. | (r_all <- "all" | "ALL")
  840. | (r_after <- "after" | "AFTER")
  841. | (r_advancing <- "advancing" | "ADVANCING")
  842. | (r_address <- "address" | "ADDRESS")
  843. | (r_add <- "add" | "ADD")
  844. | (r_actual <- "actual" | "ACTUAL")
  845. | (r_access <- "access" | "ACCESS")
  846. | (r_accept <- "accept" | "ACCEPT")
  847. ) xcep("&(a-z);" | "&(A-Z);" | "-" | "&(0-9);")
  848. | (op_le <- "<=")
  849. | (op_ge <- ">=")
  850. | (op_lt <- "<")
  851. | (op_gt <- ">")
  852. | (op_eq <- "=")
  853. | (op