Module Cobol_indent.Types

type unparsed_config = (string * int) list
type indent_record = {
  1. lnum : int;
  2. offset_orig : int;
  3. mutable offset_modif : int;
}
type edit_space_operation = {
  1. line : int;
  2. char : int;
  3. spaces : int;
}
type range = {
  1. start_line : int;
  2. end_line : int;
}
type source_format = {
  1. name : string;
  2. free : bool;
  3. skip_before : int;
  4. max_text_length : int;
}
type config = {
  1. scan_for_indent : bool;
  2. verbosity : int;
  3. source_format : source_format;
  4. arg_offset : int;
  5. inner_offset : int;
  6. data_item_offset : int option;
  7. select_in_area_a : bool;
  8. whole_file_indent : int;
}
type edit = {
  1. bol : bool;
  2. edit : indent_record;
}
type token_descr = {
  1. tok_indent : int;
  2. tok_length : int;
  3. tok_edit : edit;
}
type token =
  1. | EOF
  2. | LEXING_ERROR of string
  3. | IDENT of string
  4. | CHARS of string
  5. | INTEGER of string
  6. | NUMBER of string
  7. | COMMENT of string
  8. | DIRECTIVE of string
  9. | INFORMATION of string
  10. | DOT
  11. | LPAREN
  12. | RPAREN
  13. | EQUALEQUAL
  14. | COMMA
  15. | SEMI
  16. | COLON
  17. | EQUAL
  18. | MINUS
  19. | PLUS
  20. | GT
  21. | GTE
  22. | LT
  23. | LTE
  24. | DIV
  25. | MUL
  26. | DOLLAR
  27. | AMPER
  28. | SHARP
  29. | ACCEPT
  30. | END_ACCEPT
  31. | ADD
  32. | END_ADD
  33. | ALLOCATE
  34. | ALPHABET
  35. | AT
  36. | CALL
  37. | END_CALL
  38. | CANCEL
  39. | CD
  40. | CLASS
  41. | CLOSE
  42. | COMMIT
  43. | COMPUTE
  44. | END_COMPUTE
  45. | CONFIGURATION
  46. | CONTINUE
  47. | CONTROL
  48. | COPY
  49. | DATA
  50. | DECIMAL_POINT
  51. | DECLARATIVES
  52. | DEFAULT
  53. | DELETE
  54. | END_DELETE
  55. | DELEGATE
  56. | DISPLAY
  57. | END_DISPLAY
  58. | DIVIDE
  59. | END_DIVIDE
  60. | DIVISION
  61. | ELSE
  62. | END
  63. | END_EXEC
  64. | END_OF_PAGE
  65. | ENTRY
  66. | ENVIRONMENT
  67. | ERROR
  68. | EVALUATE
  69. | END_EVALUATE
  70. | EXCEPTION
  71. | EXEC
  72. | EXIT
  73. | EXTERNAL
  74. | FD
  75. | FILE
  76. | FILE_CONTROL
  77. | FINALLY
  78. | FREE
  79. | FUNCTION
  80. | FUNCTION_ID
  81. | GENERATE
  82. | GO
  83. | GOBACK
  84. | IDENTIFICATION
  85. | IF
  86. | END_IF
  87. | INITIALIZE
  88. | INITIATE
  89. | INPUT
  90. | INPUT_OUTPUT
  91. | INSPECT
  92. | INVALID
  93. | INVOKE
  94. | I_O
  95. | I_O_CONTROL
  96. | JSON
  97. | END_JSON
  98. | LINKAGE
  99. | MERGE
  100. | MODIFY
  101. | END_MODIFY
  102. | MOVE
  103. | MULTIPLY
  104. | END_MULTIPLY
  105. | NO
  106. | NOT
  107. | OBJECT_COMPUTER
  108. | ON
  109. | OPEN
  110. | OPTIONAL
  111. | OUTPUT
  112. | OVERFLOW
  113. | PERFORM
  114. | END_PERFORM
  115. | PERFORM_PAR
  116. | PROCEDURE
  117. | PROGRAM
  118. | PROGRAM_ID
  119. | RAISE
  120. | RD
  121. | READ
  122. | END_READ
  123. | RECEIVE
  124. | END_RECEIVE
  125. | RELEASE
  126. | REPLACE
  127. | REPLACING
  128. | REPORT
  129. | REPOSITORY
  130. | RESUME
  131. | RETURN
  132. | END_RETURN
  133. | REWRITE
  134. | END_REWRITE
  135. | ROLLBACK
  136. | RUN
  137. | SD
  138. | SEARCH
  139. | SECTION
  140. | SELECT
  141. | SEND
  142. | END_SEND
  143. | SET
  144. | SIZE
  145. | SORT
  146. | SOURCE_COMPUTER
  147. | SPECIAL_NAMES
  148. | START
  149. | END_START
  150. | STOP
  151. | STRING
  152. | END_STRING
  153. | SUBTRACT
  154. | END_SUBTRACT
  155. | SUPPRESS
  156. | TERMINATE
  157. | TEST
  158. | THEN
  159. | TIMES
  160. | TO
  161. | UNLOCK
  162. | UNSTRING
  163. | END_UNSTRING
  164. | UNTIL
  165. | USE
  166. | VALIDATE
  167. | VARYING
  168. | WHEN
  169. | WITH
  170. | WORKING_STORAGE
  171. | WRITE
  172. | END_WRITE
  173. | XML
  174. | END_XML
val keywords : (string * token) list