rouge 4.6.1 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +11 -4
- data/bin/rougify +3 -4
- data/lib/rouge/cli.rb +7 -10
- data/lib/rouge/demos/abap +30 -4
- data/lib/rouge/demos/dylan +8 -0
- data/lib/rouge/demos/gjs +23 -0
- data/lib/rouge/demos/gts +36 -0
- data/lib/rouge/demos/kick_assembler +14 -0
- data/lib/rouge/demos/pdf +29 -0
- data/lib/rouge/demos/thrift +15 -0
- data/lib/rouge/demos/veryl +24 -0
- data/lib/rouge/eager.rb +3 -0
- data/lib/rouge/formatters/html.rb +8 -1
- data/lib/rouge/formatters/html_debug.rb +16 -0
- data/lib/rouge/formatters/html_legacy.rb +15 -1
- data/lib/rouge/formatters/html_legacy_table.rb +57 -0
- data/lib/rouge/formatters/html_line_highlighter.rb +11 -4
- data/lib/rouge/formatters/html_line_table.rb +8 -3
- data/lib/rouge/formatters/html_linewise.rb +11 -2
- data/lib/rouge/formatters/html_pygments.rb +6 -1
- data/lib/rouge/formatters/html_table.rb +47 -21
- data/lib/rouge/formatters/terminal256.rb +3 -3
- data/lib/rouge/formatters/tex.rb +1 -1
- data/lib/rouge/guesser.rb +1 -1
- data/lib/rouge/guessers/disambiguation.rb +2 -2
- data/lib/rouge/guessers/glob_mapping.rb +2 -2
- data/lib/rouge/guessers/modeline.rb +2 -2
- data/lib/rouge/lexer.rb +40 -21
- data/lib/rouge/lexers/abap/builtins.rb +187 -0
- data/lib/rouge/lexers/abap.rb +70 -178
- data/lib/rouge/lexers/ada.rb +1 -1
- data/lib/rouge/lexers/apache/keywords.rb +3 -11
- data/lib/rouge/lexers/apache.rb +25 -24
- data/lib/rouge/lexers/apex.rb +2 -2
- data/lib/rouge/lexers/apiblueprint.rb +2 -2
- data/lib/rouge/lexers/bicep.rb +2 -2
- data/lib/rouge/lexers/biml.rb +36 -9
- data/lib/rouge/lexers/brightscript.rb +3 -4
- data/lib/rouge/lexers/c.rb +9 -5
- data/lib/rouge/lexers/cobol.rb +1 -1
- data/lib/rouge/lexers/console.rb +11 -5
- data/lib/rouge/lexers/cpp.rb +10 -12
- data/lib/rouge/lexers/crystal.rb +1 -1
- data/lib/rouge/lexers/css.rb +21 -2
- data/lib/rouge/lexers/cuda.rb +4 -4
- data/lib/rouge/lexers/cython.rb +26 -50
- data/lib/rouge/lexers/dafny.rb +1 -1
- data/lib/rouge/lexers/dart.rb +2 -0
- data/lib/rouge/lexers/datastudio.rb +1 -1
- data/lib/rouge/lexers/digdag.rb +2 -3
- data/lib/rouge/lexers/dylan.rb +109 -0
- data/lib/rouge/lexers/ecl.rb +3 -3
- data/lib/rouge/lexers/elixir.rb +14 -9
- data/lib/rouge/lexers/escape.rb +1 -1
- data/lib/rouge/lexers/factor.rb +1 -1
- data/lib/rouge/lexers/freefem.rb +2 -2
- data/lib/rouge/lexers/ghc_cmm.rb +1 -1
- data/lib/rouge/lexers/ghc_core.rb +1 -1
- data/lib/rouge/lexers/gherkin/keywords.rb +10 -6
- data/lib/rouge/lexers/gherkin.rb +28 -26
- data/lib/rouge/lexers/gjs.rb +39 -0
- data/lib/rouge/lexers/glsl/builtins.rb +17 -0
- data/lib/rouge/lexers/glsl.rb +50 -113
- data/lib/rouge/lexers/go.rb +8 -6
- data/lib/rouge/lexers/gradle.rb +2 -2
- data/lib/rouge/lexers/groovy.rb +6 -0
- data/lib/rouge/lexers/gts.rb +39 -0
- data/lib/rouge/lexers/hack.rb +4 -6
- data/lib/rouge/lexers/haxe.rb +2 -2
- data/lib/rouge/lexers/hlsl.rb +6 -6
- data/lib/rouge/lexers/hocon.rb +2 -2
- data/lib/rouge/lexers/hql.rb +15 -19
- data/lib/rouge/lexers/idris.rb +1 -1
- data/lib/rouge/lexers/igorpro/builtins.rb +1530 -0
- data/lib/rouge/lexers/igorpro.rb +49 -520
- data/lib/rouge/lexers/irb.rb +3 -3
- data/lib/rouge/lexers/isbl.rb +7 -43
- data/lib/rouge/lexers/j.rb +1 -1
- data/lib/rouge/lexers/json5.rb +2 -2
- data/lib/rouge/lexers/json_doc.rb +2 -2
- data/lib/rouge/lexers/jsp.rb +119 -119
- data/lib/rouge/lexers/jsx.rb +2 -2
- data/lib/rouge/lexers/kick_assembler.rb +100 -0
- data/lib/rouge/lexers/kotlin.rb +5 -0
- data/lib/rouge/lexers/lasso/keywords.rb +6 -6
- data/lib/rouge/lexers/lasso.rb +9 -11
- data/lib/rouge/lexers/liquid.rb +5 -6
- data/lib/rouge/lexers/llvm/keywords.rb +3 -12
- data/lib/rouge/lexers/llvm.rb +5 -16
- data/lib/rouge/lexers/lua/keywords.rb +11 -13
- data/lib/rouge/lexers/lua.rb +8 -7
- data/lib/rouge/lexers/lutin.rb +5 -4
- data/lib/rouge/lexers/m68k.rb +3 -3
- data/lib/rouge/lexers/mason.rb +110 -110
- data/lib/rouge/lexers/mathematica/keywords.rb +1 -3
- data/lib/rouge/lexers/mathematica.rb +6 -7
- data/lib/rouge/lexers/matlab/keywords.rb +2 -2
- data/lib/rouge/lexers/matlab.rb +5 -5
- data/lib/rouge/lexers/meson.rb +1 -1
- data/lib/rouge/lexers/mojo.rb +6 -2
- data/lib/rouge/lexers/moonscript.rb +19 -17
- data/lib/rouge/lexers/nesasm.rb +6 -6
- data/lib/rouge/lexers/nial.rb +7 -8
- data/lib/rouge/lexers/nim.rb +3 -3
- data/lib/rouge/lexers/nix.rb +10 -8
- data/lib/rouge/lexers/objective_c.rb +3 -3
- data/lib/rouge/lexers/objective_cpp.rb +3 -2
- data/lib/rouge/lexers/ocaml.rb +2 -2
- data/lib/rouge/lexers/openedge.rb +9 -9
- data/lib/rouge/lexers/pdf.rb +109 -0
- data/lib/rouge/lexers/php/keywords.rb +136 -188
- data/lib/rouge/lexers/php.rb +100 -11
- data/lib/rouge/lexers/plsql.rb +8 -9
- data/lib/rouge/lexers/postscript.rb +1 -1
- data/lib/rouge/lexers/powershell.rb +1 -1
- data/lib/rouge/lexers/python.rb +111 -66
- data/lib/rouge/lexers/qml.rb +2 -2
- data/lib/rouge/lexers/reasonml.rb +2 -2
- data/lib/rouge/lexers/rego.rb +53 -53
- data/lib/rouge/lexers/rescript.rb +2 -2
- data/lib/rouge/lexers/robot_framework.rb +12 -12
- data/lib/rouge/lexers/{coq.rb → rocq.rb} +15 -6
- data/lib/rouge/lexers/ruby.rb +33 -7
- data/lib/rouge/lexers/rust.rb +1 -0
- data/lib/rouge/lexers/sas.rb +164 -165
- data/lib/rouge/lexers/sass/common.rb +1 -1
- data/lib/rouge/lexers/sass.rb +2 -2
- data/lib/rouge/lexers/scss.rb +2 -2
- data/lib/rouge/lexers/sed.rb +1 -1
- data/lib/rouge/lexers/shell.rb +5 -5
- data/lib/rouge/lexers/slice.rb +2 -2
- data/lib/rouge/lexers/sparql.rb +1 -1
- data/lib/rouge/lexers/sqf/keywords.rb +5 -3
- data/lib/rouge/lexers/sqf.rb +3 -4
- data/lib/rouge/lexers/stan.rb +9 -15
- data/lib/rouge/lexers/svelte.rb +2 -2
- data/lib/rouge/lexers/swift.rb +2 -2
- data/lib/rouge/lexers/tcl.rb +1 -1
- data/lib/rouge/lexers/terraform.rb +3 -3
- data/lib/rouge/lexers/thrift.rb +120 -0
- data/lib/rouge/lexers/tsx.rb +3 -3
- data/lib/rouge/lexers/ttcn3.rb +1 -1
- data/lib/rouge/lexers/twig.rb +2 -2
- data/lib/rouge/lexers/typescript.rb +3 -3
- data/lib/rouge/lexers/varnish.rb +8 -8
- data/lib/rouge/lexers/veryl.rb +109 -0
- data/lib/rouge/lexers/viml/keywords.rb +5 -7
- data/lib/rouge/lexers/viml.rb +8 -10
- data/lib/rouge/lexers/vue.rb +2 -2
- data/lib/rouge/lexers/xquery.rb +2 -1
- data/lib/rouge/lexers/yaml.rb +13 -1
- data/lib/rouge/lexers/yang.rb +42 -74
- data/lib/rouge/lexers/zig.rb +10 -10
- data/lib/rouge/plugins/redcarpet.rb +3 -2
- data/lib/rouge/regex_lexer.rb +25 -14
- data/lib/rouge/themes/gruvbox.rb +3 -0
- data/lib/rouge/token.rb +1 -1
- data/lib/rouge/util.rb +1 -1
- data/lib/rouge/version.rb +1 -1
- data/lib/rouge.rb +70 -59
- data/lib/rubocop/cop/rouge/no_building_alternation_pattern_in_regexp.rb +71 -0
- data/lib/rubocop/cop/rouge/no_huge_collections.rb +37 -0
- data/rouge.gemspec +8 -5
- metadata +44 -9
- data/lib/rouge/lexers/isbl/builtins.rb +0 -17
- data/lib/rouge/lexers/matlab/builtins.rb +0 -11
- /data/lib/rouge/demos/{coq → rocq} +0 -0
data/lib/rouge/lexers/abap.rb
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*- #
|
|
2
2
|
# frozen_string_literal: true
|
|
3
3
|
|
|
4
|
-
# ABAP elements taken from http://help.sap.com/abapdocu_750/en/index.htm?file=abapdo.htm
|
|
5
|
-
|
|
6
4
|
module Rouge
|
|
7
5
|
module Lexers
|
|
8
6
|
class ABAP < RegexLexer
|
|
@@ -12,205 +10,93 @@ module Rouge
|
|
|
12
10
|
filenames '*.abap'
|
|
13
11
|
mimetypes 'text/x-abap'
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
@keywords = Set.new %w(
|
|
17
|
-
*-INPUT ?TO ABAP-SOURCE ABBREVIATED ABS ABSTRACT ACCEPT ACCEPTING
|
|
18
|
-
ACCORDING ACCP ACTIVATION ACTUAL ADD ADD-CORRESPONDING ADJACENT
|
|
19
|
-
AFTER ALIAS ALIASES ALIGN ALL ALLOCATE ALPHA ANALYSIS ANALYZER AND
|
|
20
|
-
ANY APPEND APPENDAGE APPENDING APPLICATION ARCHIVE AREA ARITHMETIC
|
|
21
|
-
AS ASCENDING ASPECT ASSERT ASSIGN ASSIGNED ASSIGNING ASSOCIATION
|
|
22
|
-
ASYNCHRONOUS AT ATTRIBUTES AUTHORITY AUTHORITY-CHECK AVG BACK
|
|
23
|
-
BACKGROUND BACKUP BACKWARD BADI BASE BEFORE BEGIN BETWEEN BIG BINARY
|
|
24
|
-
BINTOHEX BIT BIT-AND BIT-NOT BIT-OR BIT-XOR BLACK BLANK BLANKS BLOB
|
|
25
|
-
BLOCK BLOCKS BLUE BOUND BOUNDARIES BOUNDS BOXED BREAK-POINT BT
|
|
26
|
-
BUFFER BY BYPASSING BYTE BYTE-CA BYTE-CN BYTE-CO BYTE-CS BYTE-NA
|
|
27
|
-
BYTE-NS BYTE-ORDER CA CALL CALLING CASE CAST CASTING CATCH CEIL
|
|
28
|
-
CENTER CENTERED CHAIN CHAIN-INPUT CHAIN-REQUEST CHANGE CHANGING
|
|
29
|
-
CHANNELS CHAR CHAR-TO-HEX CHARACTER CHECK CHECKBOX CIRCULAR CLASS
|
|
30
|
-
CLASS-CODING CLASS-DATA CLASS-EVENTS CLASS-METHODS CLASS-POOL
|
|
31
|
-
CLEANUP CLEAR CLIENT CLNT CLOB CLOCK CLOSE CN CO COALESCE CODE
|
|
32
|
-
CODING COLLECT COLOR COLUMN COLUMNS COL_BACKGROUND COL_GROUP
|
|
33
|
-
COL_HEADING COL_KEY COL_NEGATIVE COL_NORMAL COL_POSITIVE COL_TOTAL
|
|
34
|
-
COMMENT COMMENTS COMMIT COMMON COMMUNICATION COMPARING COMPONENT
|
|
35
|
-
COMPONENTS COMPRESSION COMPUTE CONCAT CONCATENATE CONCAT_WITH_SPACE
|
|
36
|
-
COND CONDENSE CONDITION CONNECT CONNECTION CONSTANTS CONTEXT
|
|
37
|
-
CONTEXTS CONTINUE CONTROL CONTROLS CONV CONVERSION CONVERT COPIES
|
|
38
|
-
COPY CORRESPONDING COUNT COUNTRY COVER CP CPI CREATE CREATING
|
|
39
|
-
CRITICAL CS CUKY CURR CURRENCY CURRENCY_CONVERSION CURRENT CURSOR
|
|
40
|
-
CURSOR-SELECTION CUSTOMER CUSTOMER-FUNCTION CX_DYNAMIC_CHECK
|
|
41
|
-
CX_NO_CHECK CX_ROOT CX_SQL_EXCEPTION CX_STATIC_CHECK DANGEROUS DATA
|
|
42
|
-
DATABASE DATAINFO DATASET DATE DATS DATS_ADD_DAYS DATS_ADD_MONTHS
|
|
43
|
-
DATS_DAYS_BETWEEN DATS_IS_VALID DAYLIGHT DD/MM/YY DD/MM/YYYY DDMMYY
|
|
44
|
-
DEALLOCATE DEC DECIMALS DECIMAL_SHIFT DECLARATIONS DEEP DEFAULT
|
|
45
|
-
DEFERRED DEFINE DEFINING DEFINITION DELETE DELETING DEMAND
|
|
46
|
-
DEPARTMENT DESCENDING DESCRIBE DESTINATION DETAIL DF16_DEC DF16_RAW
|
|
47
|
-
DF16_SCL DF34_DEC DF34_RAW DF34_SCL DIALOG DIRECTORY DISCONNECT
|
|
48
|
-
DISPLAY DISPLAY-MODE DISTANCE DISTINCT DIV DIVIDE
|
|
49
|
-
DIVIDE-CORRESPONDING DIVISION DO DUMMY DUPLICATE DUPLICATES DURATION
|
|
50
|
-
DURING DYNAMIC DYNPRO E EDIT EDITOR-CALL ELSE ELSEIF EMPTY ENABLED
|
|
51
|
-
ENABLING ENCODING END END-ENHANCEMENT-SECTION END-LINES
|
|
52
|
-
END-OF-DEFINITION END-OF-FILE END-OF-PAGE END-OF-SELECTION
|
|
53
|
-
END-TEST-INJECTION END-TEST-SEAM ENDAT ENDCASE ENDCATCH ENDCHAIN
|
|
54
|
-
ENDCLASS ENDDO ENDENHANCEMENT ENDEXEC ENDFORM ENDFUNCTION ENDIAN
|
|
55
|
-
ENDIF ENDING ENDINTERFACE ENDLOOP ENDMETHOD ENDMODULE ENDON
|
|
56
|
-
ENDPROVIDE ENDSELECT ENDTRY ENDWHILE ENDWITH ENGINEERING ENHANCEMENT
|
|
57
|
-
ENHANCEMENT-POINT ENHANCEMENT-SECTION ENHANCEMENTS ENTRIES ENTRY
|
|
58
|
-
ENVIRONMENT EQ EQUIV ERRORMESSAGE ERRORS ESCAPE ESCAPING EVENT
|
|
59
|
-
EVENTS EXACT EXCEPT EXCEPTION EXCEPTION-TABLE EXCEPTIONS EXCLUDE
|
|
60
|
-
EXCLUDING EXEC EXECUTE EXISTS EXIT EXIT-COMMAND EXPAND EXPANDING
|
|
61
|
-
EXPIRATION EXPLICIT EXPONENT EXPORT EXPORTING EXTEND EXTENDED
|
|
62
|
-
EXTENSION EXTRACT FAIL FETCH FIELD FIELD-GROUPS FIELD-SYMBOL
|
|
63
|
-
FIELD-SYMBOLS FIELDS FILE FILTER FILTER-TABLE FILTERS FINAL FIND
|
|
64
|
-
FIRST FIRST-LINE FIXED-POINT FKEQ FKGE FLOOR FLTP FLUSH FONT FOR
|
|
65
|
-
FORM FORMAT FORWARD FOUND FRAME FRAMES FREE FRIENDS FROM FUNCTION
|
|
66
|
-
FUNCTION-POOL FUNCTIONALITY FURTHER GAPS GE GENERATE GET
|
|
67
|
-
GET_PRINT_PARAMETERS GIVING GKEQ GKGE GLOBAL GRANT GREEN GROUP
|
|
68
|
-
GROUPS GT HANDLE HANDLER HARMLESS HASHED HAVING HDB HEAD-LINES
|
|
69
|
-
HEADER HEADERS HEADING HELP-ID HELP-REQUEST HEXTOBIN HIDE HIGH HINT
|
|
70
|
-
HOLD HOTSPOT I ICON ID IDENTIFICATION IDENTIFIER IDS IF
|
|
71
|
-
IF_ABAP_CLOSE_RESOURCE IF_ABAP_CODEPAGE IF_ABAP_DB_BLOB_HANDLE
|
|
72
|
-
IF_ABAP_DB_CLOB_HANDLE IF_ABAP_DB_LOB_HANDLE IF_ABAP_DB_READER
|
|
73
|
-
IF_ABAP_DB_WRITER IF_ABAP_READER IF_ABAP_WRITER IF_MESSAGE
|
|
74
|
-
IF_OS_CA_INSTANCE IF_OS_CA_PERSISTENCY IF_OS_FACTORY IF_OS_QUERY
|
|
75
|
-
IF_OS_QUERY_MANAGER IF_OS_QUERY_OPTIONS IF_OS_STATE
|
|
76
|
-
IF_OS_TRANSACTION IF_OS_TRANSACTION_MANAGER IF_SERIALIZABLE_OBJECT
|
|
77
|
-
IF_SHM_BUILD_INSTANCE IF_SYSTEM_UUID IF_T100_DYN_MSG IF_T100_MESSAGE
|
|
78
|
-
IGNORE IGNORING IMMEDIATELY IMPLEMENTATION IMPLEMENTATIONS
|
|
79
|
-
IMPLEMENTED IMPLICIT IMPORT IMPORTING IN INACTIVE INCL INCLUDE
|
|
80
|
-
INCLUDES INCLUDING INCREMENT INDEX INDEX-LINE INFOTYPES INHERITING
|
|
81
|
-
INIT INITIAL INITIALIZATION INNER INOUT INPUT INSERT INSTANCE
|
|
82
|
-
INSTANCES INSTR INT1 INT2 INT4 INT8 INTENSIFIED INTERFACE
|
|
83
|
-
INTERFACE-POOL INTERFACES INTERNAL INTERVALS INTO INVERSE
|
|
84
|
-
INVERTED-DATE IS ISO ITNO JOB JOIN KEEP KEEPING KERNEL KEY KEYS
|
|
85
|
-
KEYWORDS KIND LANG LANGUAGE LAST LATE LAYOUT LCHR LDB_PROCESS LE
|
|
86
|
-
LEADING LEAVE LEFT LEFT-JUSTIFIED LEFTPLUS LEFTSPACE LEGACY LENGTH
|
|
87
|
-
LET LEVEL LEVELS LIKE LINE LINE-COUNT LINE-SELECTION LINE-SIZE
|
|
88
|
-
LINEFEED LINES LIST LIST-PROCESSING LISTBOX LITTLE LLANG LOAD
|
|
89
|
-
LOAD-OF-PROGRAM LOB LOCAL LOCALE LOCATOR LOG-POINT LOGFILE LOGICAL
|
|
90
|
-
LONG LOOP LOW LOWER LPAD LPI LRAW LT LTRIM M MAIL MAIN MAJOR-ID
|
|
91
|
-
MAPPING MARGIN MARK MASK MATCH MATCHCODE MAX MAXIMUM MEDIUM MEMBERS
|
|
92
|
-
MEMORY MESH MESSAGE MESSAGE-ID MESSAGES MESSAGING METHOD METHODS MIN
|
|
93
|
-
MINIMUM MINOR-ID MM/DD/YY MM/DD/YYYY MMDDYY MOD MODE MODIF MODIFIER
|
|
94
|
-
MODIFY MODULE MOVE MOVE-CORRESPONDING MULTIPLY
|
|
95
|
-
MULTIPLY-CORRESPONDING NA NAME NAMETAB NATIVE NB NE NESTED NESTING
|
|
96
|
-
NEW NEW-LINE NEW-PAGE NEW-SECTION NEXT NO NO-DISPLAY NO-EXTENSION
|
|
97
|
-
NO-GAP NO-GAPS NO-GROUPING NO-HEADING NO-SCROLLING NO-SIGN NO-TITLE
|
|
98
|
-
NO-TOPOFPAGE NO-ZERO NODE NODES NON-UNICODE NON-UNIQUE NOT NP NS
|
|
99
|
-
NULL NUMBER NUMC O OBJECT OBJECTS OBLIGATORY OCCURRENCE OCCURRENCES
|
|
100
|
-
OCCURS OF OFF OFFSET ON ONLY OPEN OPTION OPTIONAL OPTIONS OR ORDER
|
|
101
|
-
OTHER OTHERS OUT OUTER OUTPUT OUTPUT-LENGTH OVERFLOW OVERLAY PACK
|
|
102
|
-
PACKAGE PAD PADDING PAGE PAGES PARAMETER PARAMETER-TABLE PARAMETERS
|
|
103
|
-
PART PARTIALLY PATTERN PERCENTAGE PERFORM PERFORMING PERSON PF
|
|
104
|
-
PF-STATUS PINK PLACES POOL POSITION POS_HIGH POS_LOW PRAGMAS PREC
|
|
105
|
-
PRECOMPILED PREFERRED PRESERVING PRIMARY PRINT PRINT-CONTROL
|
|
106
|
-
PRIORITY PRIVATE PROCEDURE PROCESS PROGRAM PROPERTY PROTECTED
|
|
107
|
-
PROVIDE PUBLIC PUSH PUSHBUTTON PUT QUAN QUEUE-ONLY QUICKINFO
|
|
108
|
-
RADIOBUTTON RAISE RAISING RANGE RANGES RAW RAWSTRING READ READ-ONLY
|
|
109
|
-
READER RECEIVE RECEIVED RECEIVER RECEIVING RED REDEFINITION REDUCE
|
|
110
|
-
REDUCED REF REFERENCE REFRESH REGEX REJECT REMOTE RENAMING REPLACE
|
|
111
|
-
REPLACEMENT REPLACING REPORT REQUEST REQUESTED RESERVE RESET
|
|
112
|
-
RESOLUTION RESPECTING RESPONSIBLE RESULT RESULTS RESUMABLE RESUME
|
|
113
|
-
RETRY RETURN RETURNCODE RETURNING RETURNS RIGHT RIGHT-JUSTIFIED
|
|
114
|
-
RIGHTPLUS RIGHTSPACE RISK RMC_COMMUNICATION_FAILURE
|
|
115
|
-
RMC_INVALID_STATUS RMC_SYSTEM_FAILURE ROLE ROLLBACK ROUND ROWS RPAD
|
|
116
|
-
RTRIM RUN SAP SAP-SPOOL SAVING SCALE_PRESERVING
|
|
117
|
-
SCALE_PRESERVING_SCIENTIFIC SCAN SCIENTIFIC
|
|
118
|
-
SCIENTIFIC_WITH_LEADING_ZERO SCREEN SCROLL SCROLL-BOUNDARY SCROLLING
|
|
119
|
-
SEARCH SECONDARY SECONDS SECTION SELECT SELECT-OPTIONS SELECTION
|
|
120
|
-
SELECTION-SCREEN SELECTION-SET SELECTION-SETS SELECTION-TABLE
|
|
121
|
-
SELECTIONS SEND SEPARATE SEPARATED SET SHARED SHIFT SHORT
|
|
122
|
-
SHORTDUMP-ID SIGN SIGN_AS_POSTFIX SIMPLE SINGLE SIZE SKIP SKIPPING
|
|
123
|
-
SMART SOME SORT SORTABLE SORTED SOURCE SPACE SPECIFIED SPLIT SPOOL
|
|
124
|
-
SPOTS SQL SQLSCRIPT SSTRING STABLE STAMP STANDARD START-OF-SELECTION
|
|
125
|
-
STARTING STATE STATEMENT STATEMENTS STATIC STATICS STATUSINFO
|
|
126
|
-
STEP-LOOP STOP STRING STRUCTURE STRUCTURES STYLE SUBKEY SUBMATCHES
|
|
127
|
-
SUBMIT SUBROUTINE SUBSCREEN SUBSTRING SUBTRACT
|
|
128
|
-
SUBTRACT-CORRESPONDING SUFFIX SUM SUMMARY SUMMING SUPPLIED SUPPLY
|
|
129
|
-
SUPPRESS SWITCH SWITCHSTATES SYMBOL SYNCPOINTS SYNTAX SYNTAX-CHECK
|
|
130
|
-
SYNTAX-TRACE SYST SYSTEM-CALL SYSTEM-EXCEPTIONS SYSTEM-EXIT TAB
|
|
131
|
-
TABBED TABLE TABLES TABLEVIEW TABSTRIP TARGET TASK TASKS TEST
|
|
132
|
-
TEST-INJECTION TEST-SEAM TESTING TEXT TEXTPOOL THEN THROW TIME TIMES
|
|
133
|
-
TIMESTAMP TIMEZONE TIMS TIMS_IS_VALID TITLE TITLE-LINES TITLEBAR TO
|
|
134
|
-
TOKENIZATION TOKENS TOP-LINES TOP-OF-PAGE TRACE-FILE TRACE-TABLE
|
|
135
|
-
TRAILING TRANSACTION TRANSFER TRANSFORMATION TRANSLATE TRANSPORTING
|
|
136
|
-
TRMAC TRUNCATE TRUNCATION TRY TSTMP_ADD_SECONDS
|
|
137
|
-
TSTMP_CURRENT_UTCTIMESTAMP TSTMP_IS_VALID TSTMP_SECONDS_BETWEEN TYPE
|
|
138
|
-
TYPE-POOL TYPE-POOLS TYPES ULINE UNASSIGN UNDER UNICODE UNION UNIQUE
|
|
139
|
-
UNIT UNIT_CONVERSION UNIX UNPACK UNTIL UNWIND UP UPDATE UPPER USER
|
|
140
|
-
USER-COMMAND USING UTF-8 VALID VALUE VALUE-REQUEST VALUES VARC VARY
|
|
141
|
-
VARYING VERIFICATION-MESSAGE VERSION VIA VIEW VISIBLE WAIT WARNING
|
|
142
|
-
WHEN WHENEVER WHERE WHILE WIDTH WINDOW WINDOWS WITH WITH-HEADING
|
|
143
|
-
WITH-TITLE WITHOUT WORD WORK WRITE WRITER XML XSD YELLOW YES YYMMDD
|
|
144
|
-
Z ZERO ZONE
|
|
145
|
-
)
|
|
146
|
-
end
|
|
147
|
-
|
|
148
|
-
def self.builtins
|
|
149
|
-
@keywords = Set.new %w(
|
|
150
|
-
acos apply asin assign atan attribute bit-set boolc boolx call
|
|
151
|
-
call-method cast ceil cfunc charlen char_off class_constructor clear
|
|
152
|
-
cluster cmax cmin cnt communication_failure concat_lines_of cond
|
|
153
|
-
cond-var condense constructor contains contains_any_not_of
|
|
154
|
-
contains_any_of copy cos cosh count count_any_not_of count_any_of
|
|
155
|
-
create cursor data dbmaxlen dbtab deserialize destructor distance
|
|
156
|
-
empty error_message escape exp extensible find find_any_not_of
|
|
157
|
-
find_any_of find_end floor frac from_mixed group hashed header idx
|
|
158
|
-
include index insert ipow itab key lax lines line_exists line_index
|
|
159
|
-
log log10 loop loop_key match matches me mesh_path namespace nmax
|
|
160
|
-
nmin node numeric numofchar object parameter primary_key read ref
|
|
161
|
-
repeat replace rescale resource_failure reverse root round segment
|
|
162
|
-
sender serialize shift_left shift_right sign simple sin sinh skip
|
|
163
|
-
sorted space sqrt standard strlen substring substring_after
|
|
164
|
-
substring_before substring_from substring_to sum switch switch-var
|
|
165
|
-
system_failure table table_line tan tanh template text to_lower
|
|
166
|
-
to_mixed to_upper transform translate trunc type value variable write
|
|
167
|
-
xsdbool xsequence xstrlen
|
|
168
|
-
)
|
|
169
|
-
end
|
|
13
|
+
lazy { require_relative 'abap/builtins' }
|
|
170
14
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
)
|
|
176
|
-
end
|
|
15
|
+
TYPES = Set.new %w(
|
|
16
|
+
b c d decfloat16 decfloat34 f i int8 n p s t x
|
|
17
|
+
clike csequence decfloat string xstring
|
|
18
|
+
)
|
|
177
19
|
|
|
178
|
-
|
|
179
|
-
@types = Set.new %w(
|
|
180
|
-
DATA FIELD-SYMBOL
|
|
181
|
-
)
|
|
182
|
-
end
|
|
20
|
+
NEW_KEYWORDS = Set.new %w(DATA FIELD-SYMBOL)
|
|
183
21
|
|
|
184
22
|
state :root do
|
|
185
23
|
rule %r/\s+/m, Text
|
|
186
24
|
|
|
187
|
-
rule %r/"
|
|
188
|
-
rule %r(
|
|
25
|
+
rule %r/(".*?$)/, Comment::Single
|
|
26
|
+
rule %r/(^\*.*?$)/, Comment::Single
|
|
189
27
|
rule %r/\d+/, Num::Integer
|
|
28
|
+
|
|
29
|
+
# String templates |...|
|
|
30
|
+
rule %r/\|/, Str::Interpol, :string_template
|
|
31
|
+
|
|
190
32
|
rule %r/('|`)/, Str::Single, :single_string
|
|
191
|
-
|
|
33
|
+
|
|
34
|
+
# CDS annotations: @KEYWORD.field
|
|
35
|
+
rule %r/(@)([A-Z][A-Za-z0-9_]*)(\.)([A-Za-z][A-Za-z0-9_]*)/ do |m|
|
|
36
|
+
token Operator, m[1]
|
|
37
|
+
if KEYWORDS.include? m[2].upcase
|
|
38
|
+
token Keyword, m[2]
|
|
39
|
+
else
|
|
40
|
+
token Name, m[2]
|
|
41
|
+
end
|
|
42
|
+
token Punctuation, m[3]
|
|
43
|
+
token Name, m[4]
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# structure field access with dot (table.field should not highlight field as keyword)
|
|
47
|
+
# This must come before the general punctuation rule
|
|
48
|
+
# In dot-access patterns, treat both parts as names (even if they match keywords)
|
|
49
|
+
rule %r/([A-Za-z][A-Za-z0-9_]*)(\.)([A-Za-z][A-Za-z0-9_]*)/ do |m|
|
|
50
|
+
token Name, m[1]
|
|
51
|
+
token Punctuation, m[2]
|
|
52
|
+
token Name, m[3]
|
|
53
|
+
end
|
|
54
|
+
# Parameter names in function/method interfaces (word before =)
|
|
55
|
+
# Matches word followed by optional whitespace and =
|
|
56
|
+
# This handles EXPORTING/IMPORTING/CHANGING/TABLES/USING parameter names
|
|
57
|
+
rule %r/([A-Za-z][A-Za-z0-9_]*)(?=\s*=)/ do |m|
|
|
58
|
+
token Name, m[1]
|
|
59
|
+
end
|
|
60
|
+
rule %r/[\[\]\(\)\{\}\.,:]/, Punctuation
|
|
192
61
|
|
|
193
62
|
# builtins / new ABAP 7.40 keywords (@DATA(), ...)
|
|
194
63
|
rule %r/(->|=>)?([A-Za-z][A-Za-z0-9_\-]*)(\()/ do |m|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
64
|
+
token Operator, m[1]
|
|
65
|
+
|
|
66
|
+
word = m[2]
|
|
198
67
|
|
|
199
|
-
if (
|
|
68
|
+
if (NEW_KEYWORDS.include? word.upcase) && m[1].nil?
|
|
200
69
|
token Keyword, m[2]
|
|
201
|
-
elsif (
|
|
70
|
+
elsif (BUILTINS.include? word.downcase) && m[1].nil?
|
|
202
71
|
token Name::Builtin, m[2]
|
|
203
72
|
else
|
|
204
73
|
token Name, m[2]
|
|
205
74
|
end
|
|
75
|
+
|
|
206
76
|
token Punctuation, m[3]
|
|
207
77
|
end
|
|
208
78
|
|
|
79
|
+
# hyphenated keywords (like NON-UNIQUE)
|
|
80
|
+
rule %r/[A-Za-z][A-Za-z0-9_]*(-[A-Za-z][A-Za-z0-9_]*)+/ do |m|
|
|
81
|
+
if KEYWORDS.include? m[0].upcase
|
|
82
|
+
token Keyword
|
|
83
|
+
else
|
|
84
|
+
token Name
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# structure component access (variable-component should not be highlighted as keyword)
|
|
89
|
+
# this rule matches: word-word where the second part is lowercase or starts lowercase
|
|
90
|
+
rule %r/[A-Za-z][A-Za-z0-9_]*-[a-z][A-Za-z0-9_]*/, Name
|
|
91
|
+
|
|
92
|
+
# variable names starting with $ (like $session)
|
|
93
|
+
rule %r/\$[A-Za-z][A-Za-z0-9_]*/, Name
|
|
94
|
+
|
|
209
95
|
# keywords, types and normal text
|
|
210
96
|
rule %r/\w\w*/ do |m|
|
|
211
|
-
if
|
|
97
|
+
if KEYWORDS.include? m[0].upcase
|
|
212
98
|
token Keyword
|
|
213
|
-
elsif
|
|
99
|
+
elsif TYPES.include? m[0].downcase
|
|
214
100
|
token Keyword::Type
|
|
215
101
|
else
|
|
216
102
|
token Name
|
|
@@ -235,6 +121,12 @@ module Rouge
|
|
|
235
121
|
rule %r/[^\\'`]+/, Str::Single
|
|
236
122
|
end
|
|
237
123
|
|
|
124
|
+
state :string_template do
|
|
125
|
+
rule %r/\{[^}]*\}/, Str::Interpol # embedded expressions
|
|
126
|
+
rule %r/\|/, Str::Interpol, :pop!
|
|
127
|
+
rule %r/[^|{]+/, Str::Interpol
|
|
128
|
+
end
|
|
129
|
+
|
|
238
130
|
end
|
|
239
131
|
end
|
|
240
132
|
end
|
data/lib/rouge/lexers/ada.rb
CHANGED
|
@@ -12,7 +12,7 @@ module Rouge
|
|
|
12
12
|
desc 'The Ada 2012 programming language'
|
|
13
13
|
|
|
14
14
|
# Ada identifiers are Unicode with underscores only allowed as separators.
|
|
15
|
-
ID =
|
|
15
|
+
ID = /[[:alpha:]](?:\p{Pc}?[[:alnum:]])*\b/
|
|
16
16
|
|
|
17
17
|
# Numerals can also contain underscores.
|
|
18
18
|
NUM = /\d(_?\d)*/
|
|
@@ -8,17 +8,9 @@
|
|
|
8
8
|
module Rouge
|
|
9
9
|
module Lexers
|
|
10
10
|
class Apache
|
|
11
|
-
def self.directives
|
|
12
|
-
@directives ||= Set.new ["acceptfilter", "acceptpathinfo", "accessfilename", "action", "addalt", "addaltbyencoding", "addaltbytype", "addcharset", "adddefaultcharset", "adddescription", "addencoding", "addhandler", "addicon", "addiconbyencoding", "addiconbytype", "addinputfilter", "addlanguage", "addmoduleinfo", "addoutputfilter", "addoutputfilterbytype", "addtype", "alias", "aliasmatch", "allow", "allowconnect", "allowencodedslashes", "allowmethods", "allowoverride", "allowoverridelist", "anonymous", "anonymous_logemail", "anonymous_mustgiveemail", "anonymous_nouserid", "anonymous_verifyemail", "asyncrequestworkerfactor", "authbasicauthoritative", "authbasicfake", "authbasicprovider", "authbasicusedigestalgorithm", "authdbduserpwquery", "authdbduserrealmquery", "authdbmgroupfile", "authdbmtype", "authdbmuserfile", "authdigestalgorithm", "authdigestdomain", "authdigestnoncelifetime", "authdigestprovider", "authdigestqop", "authdigestshmemsize", "authformauthoritative", "authformbody", "authformdisablenostore", "authformfakebasicauth", "authformlocation", "authformloginrequiredlocation", "authformloginsuccesslocation", "authformlogoutlocation", "authformmethod", "authformmimetype", "authformpassword", "authformprovider", "authformsitepassphrase", "authformsize", "authformusername", "authgroupfile", "authldapauthorizeprefix", "authldapbindauthoritative", "authldapbinddn", "authldapbindpassword", "authldapcharsetconfig", "authldapcompareasuser", "authldapcomparednonserver", "authldapdereferencealiases", "authldapgroupattribute", "authldapgroupattributeisdn", "authldapinitialbindasuser", "authldapinitialbindpattern", "authldapmaxsubgroupdepth", "authldapremoteuserattribute", "authldapremoteuserisdn", "authldapsearchasuser", "authldapsubgroupattribute", "authldapsubgroupclass", "authldapurl", "authmerging", "authname", "authncachecontext", "authncacheenable", "authncacheprovidefor", "authncachesocache", "authncachetimeout", "authnzfcgicheckauthnprovider", "authnzfcgidefineprovider", "authtype", "authuserfile", "authzdbdlogintoreferer", "authzdbdquery", "authzdbdredirectquery", "authzdbmtype", "authzsendforbiddenonfailure", "balancergrowth", "balancerinherit", "balancermember", "balancerpersist", "brotlialteretag", "brotlicompressionmaxinputblock", "brotlicompressionquality", "brotlicompressionwindow", "brotlifilternote", "browsermatch", "browsermatchnocase", "bufferedlogs", "buffersize", "cachedefaultexpire", "cachedetailheader", "cachedirlength", "cachedirlevels", "cachedisable", "cacheenable", "cachefile", "cacheheader", "cacheignorecachecontrol", "cacheignoreheaders", "cacheignorenolastmod", "cacheignorequerystring", "cacheignoreurlsessionidentifiers", "cachekeybaseurl", "cachelastmodifiedfactor", "cachelock", "cachelockmaxage", "cachelockpath", "cachemaxexpire", "cachemaxfilesize", "cacheminexpire", "cacheminfilesize", "cachenegotiateddocs", "cachequickhandler", "cachereadsize", "cachereadtime", "cacheroot", "cachesocache", "cachesocachemaxsize", "cachesocachemaxtime", "cachesocachemintime", "cachesocachereadsize", "cachesocachereadtime", "cachestaleonerror", "cachestoreexpired", "cachestorenostore", "cachestoreprivate", "cgidscripttimeout", "cgimapextension", "cgipassauth", "cgivar", "charsetdefault", "charsetoptions", "charsetsourceenc", "checkcaseonly", "checkspelling", "chrootdir", "contentdigest", "cookiedomain", "cookieexpires", "cookiename", "cookiestyle", "cookietracking", "coredumpdirectory", "customlog", "dav", "davdepthinfinity", "davgenericlockdb", "davlockdb", "davmintimeout", "dbdexptime", "dbdinitsql", "dbdkeep", "dbdmax", "dbdmin", "dbdparams", "dbdpersist", "dbdpreparesql", "dbdriver", "defaulticon", "defaultlanguage", "defaultruntimedir", "defaulttype", "define", "deflatebuffersize", "deflatecompressionlevel", "deflatefilternote", "deflateinflatelimitrequestbody", "deflateinflateratioburst", "deflateinflateratiolimit", "deflatememlevel", "deflatewindowsize", "deny", "directorycheckhandler", "directoryindex", "directoryindexredirect", "directoryslash", "documentroot", "dtraceprivileges", "dumpioinput", "dumpiooutput", "enableexceptionhook", "enablemmap", "enablesendfile", "error", "errordocument", "errorlog", "errorlogformat", "example", "expiresactive", "expiresbytype", "expiresdefault", "extendedstatus", "extfilterdefine", "extfilteroptions", "fallbackresource", "fileetag", "filterchain", "filterdeclare", "filterprotocol", "filterprovider", "filtertrace", "forcelanguagepriority", "forcetype", "forensiclog", "globallog", "gprofdir", "gracefulshutdowntimeout", "group", "h2copyfiles", "h2direct", "h2earlyhints", "h2maxsessionstreams", "h2maxworkeridleseconds", "h2maxworkers", "h2minworkers", "h2moderntlsonly", "h2push", "h2pushdiarysize", "h2pushpriority", "h2pushresource", "h2serializeheaders", "h2streammaxmemsize", "h2tlscooldownsecs", "h2tlswarmupsize", "h2upgrade", "h2windowsize", "header", "headername", "heartbeataddress", "heartbeatlisten", "heartbeatmaxservers", "heartbeatstorage", "heartbeatstorage", "hostnamelookups", "httpprotocoloptions", "identitycheck", "identitychecktimeout", "imapbase", "imapdefault", "imapmenu", "include", "includeoptional", "indexheadinsert", "indexignore", "indexignorereset", "indexoptions", "indexorderdefault", "indexstylesheet", "inputsed", "isapiappendlogtoerrors", "isapiappendlogtoquery", "isapicachefile", "isapifakeasync", "isapilognotsupported", "isapireadaheadbuffer", "keepalive", "keepalivetimeout", "keptbodysize", "languagepriority", "ldapcacheentries", "ldapcachettl", "ldapconnectionpoolttl", "ldapconnectiontimeout", "ldaplibrarydebug", "ldapopcacheentries", "ldapopcachettl", "ldapreferralhoplimit", "ldapreferrals", "ldapretries", "ldapretrydelay", "ldapsharedcachefile", "ldapsharedcachesize", "ldaptimeout", "ldaptrustedclientcert", "ldaptrustedglobalcert", "ldaptrustedmode", "ldapverifyservercert", "limitinternalrecursion", "limitrequestbody", "limitrequestfields", "limitrequestfieldsize", "limitrequestline", "limitxmlrequestbody", "listen", "listenbacklog", "listencoresbucketsratio", "loadfile", "loadmodule", "logformat", "logiotrackttfb", "loglevel", "logmessage", "luaauthzprovider", "luacodecache", "luahookaccesschecker", "luahookauthchecker", "luahookcheckuserid", "luahookfixups", "luahookinsertfilter", "luahooklog", "luahookmaptostorage", "luahooktranslatename", "luahooktypechecker", "luainherit", "luainputfilter", "luamaphandler", "luaoutputfilter", "luapackagecpath", "luapackagepath", "luaquickhandler", "luaroot", "luascope", "maxconnectionsperchild", "maxkeepaliverequests", "maxmemfree", "maxrangeoverlaps", "maxrangereversals", "maxranges", "maxrequestworkers", "maxspareservers", "maxsparethreads", "maxthreads", "mdbaseserver", "mdcachallenges", "mdcertificateagreement", "mdcertificateauthority", "mdcertificateprotocol", "mddrivemode", "mdhttpproxy", "mdmember", "mdmembers", "mdmuststaple", "mdnotifycmd", "mdomain", "mdportmap", "mdprivatekeys", "mdrenewwindow", "mdrequirehttps", "mdstoredir", "memcacheconnttl", "mergetrailers", "metadir", "metafiles", "metasuffix", "mimemagicfile", "minspareservers", "minsparethreads", "mmapfile", "modemstandard", "modmimeusepathinfo", "multiviewsmatch", "mutex", "namevirtualhost", "noproxy", "nwssltrustedcerts", "nwsslupgradeable", "options", "order", "outputsed", "passenv", "pidfile", "privilegesmode", "protocol", "protocolecho", "protocols", "protocolshonororder", "proxyaddheaders", "proxybadheader", "proxyblock", "proxydomain", "proxyerroroverride", "proxyexpressdbmfile", "proxyexpressdbmtype", "proxyexpressenable", "proxyfcgibackendtype", "proxyfcgisetenvif", "proxyftpdircharset", "proxyftpescapewildcards", "proxyftplistonwildcard", "proxyhcexpr", "proxyhctemplate", "proxyhctpsize", "proxyhtmlbufsize", "proxyhtmlcharsetout", "proxyhtmldoctype", "proxyhtmlenable", "proxyhtmlevents", "proxyhtmlextended", "proxyhtmlfixups", "proxyhtmlinterp", "proxyhtmllinks", "proxyhtmlmeta", "proxyhtmlstripcomments", "proxyhtmlurlmap", "proxyiobuffersize", "proxymaxforwards", "proxypass", "proxypassinherit", "proxypassinterpolateenv", "proxypassmatch", "proxypassreverse", "proxypassreversecookiedomain", "proxypassreversecookiepath", "proxypreservehost", "proxyreceivebuffersize", "proxyremote", "proxyremotematch", "proxyrequests", "proxyscgiinternalredirect", "proxyscgisendfile", "proxyset", "proxysourceaddress", "proxystatus", "proxytimeout", "proxyvia", "qualifyredirecturl", "readmename", "receivebuffersize", "redirect", "redirectmatch", "redirectpermanent", "redirecttemp", "reflectorheader", "registerhttpmethod", "remoteipheader", "remoteipinternalproxy", "remoteipinternalproxylist", "remoteipproxiesheader", "remoteipproxyprotocol", "remoteipproxyprotocolexceptions", "remoteiptrustedproxy", "remoteiptrustedproxylist", "removecharset", "removeencoding", "removehandler", "removeinputfilter", "removelanguage", "removeoutputfilter", "removetype", "requestheader", "requestreadtimeout", "require", "rewritebase", "rewritecond", "rewriteengine", "rewritemap", "rewriteoptions", "rewriterule", "rlimitcpu", "rlimitmem", "rlimitnproc", "satisfy", "scoreboardfile", "script", "scriptalias", "scriptaliasmatch", "scriptinterpretersource", "scriptlog", "scriptlogbuffer", "scriptloglength", "scriptsock", "securelisten", "seerequesttail", "sendbuffersize", "serveradmin", "serveralias", "serverlimit", "servername", "serverpath", "serverroot", "serversignature", "servertokens", "session", "sessioncookiename", "sessioncookiename2", "sessioncookieremove", "sessioncryptocipher", "sessioncryptodriver", "sessioncryptopassphrase", "sessioncryptopassphrasefile", "sessiondbdcookiename", "sessiondbdcookiename2", "sessiondbdcookieremove", "sessiondbddeletelabel", "sessiondbdinsertlabel", "sessiondbdperuser", "sessiondbdselectlabel", "sessiondbdupdatelabel", "sessionenv", "sessionexclude", "sessionheader", "sessioninclude", "sessionmaxage", "setenv", "setenvif", "setenvifexpr", "setenvifnocase", "sethandler", "setinputfilter", "setoutputfilter", "ssiendtag", "ssierrormsg", "ssietag", "ssilastmodified", "ssilegacyexprparser", "ssistarttag", "ssitimeformat", "ssiundefinedecho", "sslcacertificatefile", "sslcacertificatepath", "sslcadnrequestfile", "sslcadnrequestpath", "sslcarevocationcheck", "sslcarevocationfile", "sslcarevocationpath", "sslcertificatechainfile", "sslcertificatefile", "sslcertificatekeyfile", "sslciphersuite", "sslcompression", "sslcryptodevice", "sslengine", "sslfips", "sslhonorcipherorder", "sslinsecurerenegotiation", "sslocspdefaultresponder", "sslocspenable", "sslocspnoverify", "sslocspoverrideresponder", "sslocspproxyurl", "sslocsprespondercertificatefile", "sslocsprespondertimeout", "sslocspresponsemaxage", "sslocspresponsetimeskew", "sslocspuserequestnonce", "sslopensslconfcmd", "ssloptions", "sslpassphrasedialog", "sslprotocol", "sslproxycacertificatefile", "sslproxycacertificatepath", "sslproxycarevocationcheck", "sslproxycarevocationfile", "sslproxycarevocationpath", "sslproxycheckpeercn", "sslproxycheckpeerexpire", "sslproxycheckpeername", "sslproxyciphersuite", "sslproxyengine", "sslproxymachinecertificatechainfile", "sslproxymachinecertificatefile", "sslproxymachinecertificatepath", "sslproxyprotocol", "sslproxyverify", "sslproxyverifydepth", "sslrandomseed", "sslrenegbuffersize", "sslrequire", "sslrequiressl", "sslsessioncache", "sslsessioncachetimeout", "sslsessionticketkeyfile", "sslsessiontickets", "sslsrpunknownuserseed", "sslsrpverifierfile", "sslstaplingcache", "sslstaplingerrorcachetimeout", "sslstaplingfaketrylater", "sslstaplingforceurl", "sslstaplingrespondertimeout", "sslstaplingresponsemaxage", "sslstaplingresponsetimeskew", "sslstaplingreturnrespondererrors", "sslstaplingstandardcachetimeout", "sslstrictsnivhostcheck", "sslusername", "sslusestapling", "sslverifyclient", "sslverifydepth", "startservers", "startthreads", "substitute", "substituteinheritbefore", "substitutemaxlinelength", "suexec", "suexecusergroup", "threadlimit", "threadsperchild", "threadstacksize", "timeout", "traceenable", "transferlog", "typesconfig", "undefine", "undefmacro", "unsetenv", "use", "usecanonicalname", "usecanonicalphysicalport", "user", "userdir", "vhostcgimode", "vhostcgiprivs", "vhostgroup", "vhostprivs", "vhostsecure", "vhostuser", "virtualdocumentroot", "virtualdocumentrootip", "virtualscriptalias", "virtualscriptaliasip", "watchdoginterval", "xbithack", "xml2encalias", "xml2encdefault", "xml2startparse"]
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def self.sections
|
|
16
|
-
@sections ||= Set.new ["authnprovideralias", "authzprovideralias", "directory", "directorymatch", "else", "elseif", "files", "filesmatch", "if", "ifdefine", "ifmodule", "ifversion", "limit", "limitexcept", "location", "locationmatch", "macro", "mdomainset", "proxy", "proxymatch", "requireall", "requireany", "requirenone", "virtualhost"]
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
def self.values
|
|
20
|
-
@values ||= Set.new ["add", "addaltclass", "addsuffix", "alias", "all", "allow", "allowanyuri", "allownoslash", "always", "and", "any", "ap_auth_internal_per_uri", "api_version", "append", "ascending", "attribute", "auth", "auth-int", "authconfig", "auto", "backend-address", "balancer_name", "balancer_route_changed", "balancer_session_route", "balancer_session_sticky", "balancer_worker_name", "balancer_worker_route", "base", "basedn", "basic", "before", "block", "boolean", "byte", "byteranges", "cache", "cache-hit", "cache-invalidate", "cache-miss", "cache-revalidate", "cgi", "chain", "change", "charset", "circle", "cmd", "conditional-expression", "condpattern", "conn", "conn_remote_addr", "cookie", "cookie2", "current-uri", "date", "date_gmt", "date_local", "db", "dbm", "decoding", "default", "deny", "descending", "description", "descriptionwidth", "digest", "disabled", "disableenv", "dns", "document_args", "document_name", "document_root", "document_uri", "domain", "double", "duration", "early", "echo", "echomsg", "edit", "edit*", "email", "enableenv", "encoding", "env", "environment-variable-name", "errmsg", "error", "errorlog", "errorlogformat", "execcgi", "expr", "fallback", "fancyindexing", "fast", "file", "file-group", "file-owner", "fileinfo", "filename", "filter", "filter-name", "filter_name", "filters", "finding", "first-dot", "foldersfirst", "followsymlinks", "forever", "form", "formatted", "fpm", "from", "ftype", "full", "function_name", "gdbm", "generic", "gone", "handlers", "hit", "hook_function_name", "host", "hostname", "hse_append_log_parameter", "hse_req_done_with_session", "hse_req_is_connected", "hse_req_is_keep_conn", "hse_req_map_url_to_path", "hse_req_send_response_header", "hse_req_send_response_header_ex", "hse_req_send_url", "hse_req_send_url_redirect_resp", "html", "htmltable", "https", "iconheight", "iconsarelinks", "iconwidth", "ignore", "ignorecase", "ignoreclient", "ignorecontextinfo", "ignoreinherit", "imal", "in", "includes", "includesnoexec", "indexes", "inherit", "inheritbefore", "inheritdown", "inheritdownbefore", "inode", "input", "int", "integer", "intype", "ipaddr", "is_subreq", "iserror", "last-dot", "last_modified", "ldap", "leaf", "legacyprefixdocroot", "level", "limit", "log_function_name", "major", "manual", "map", "map1", "map2", "max", "md5", "md5-sess", "menu", "merge", "mergebase", "minor", "miss", "mod_cache_disk", "mod_cache_socache", "mode", "mtime", "multiviews", "mutual-failure", "mysql", "name", "namewidth", "ndbm", "negotiatedonly", "never", "no", "nochange", "nocontent", "nodecode", "none", "nonfatal", "note", "number-of-ranges", "odbc", "off", "on", "once", "onerror", "onfail", "option", "optional", "options", "or", "oracle", "order", "original-uri", "os", "output", "outtype", "parent-first", "parent-last", "path", "path_info", "permanent", "pipe", "point", "poly", "postgresql", "prefer", "preservescontentlength", "prg", "protocol", "provider-name", "provider_name", "proxy", "proxy-chain-auth", "proxy-fcgi-pathinfo", "proxy-initial-not-pooled", "proxy-interim-response", "proxy-nokeepalive", "proxy-scgi-pathinfo", "proxy-sendcl", "proxy-sendextracrlf", "proxy-source-port", "proxy-status", "qs", "query_string_unescaped", "range", "ratio", "rect", "referer", "regex", "registry", "registry-strict", "remote_addr", "remote_host", "remote_ident", "remote_user", "remove", "request", "request_filename", "request_rec", "request_scheme", "request_uri", "reset", "revalidate", "rewritecond", "rfc2109", "rnd", "scanhtmltitles", "scope", "script", "sdbm", "searching", "secure", "seeother", "selective", "semiformatted", "server", "server_addr", "server_admin", "server_name", "set", "setifempty", "showforbidden", "size", "sizefmt", "sqlite2", "sqlite3", "ssl", "ssl-access-forbidden", "ssl-secure-reneg", "startbody", "stat", "string", "string1", "subnet", "suppresscolumnsorting", "suppressdescription", "suppresshtmlpreamble", "suppressicon", "suppresslastmodified", "suppressrules", "suppresssize", "symlinksifownermatch", "temp", "temporary", "test_condition1", "the_request", "thread", "timefmt", "tls", "to-pattern", "trackmodified", "transform", "txt", "type", "uctonly", "uid", "unescape", "unformatted", "unlimited", "unset", "uri-pattern", "url", "url-of-terms-of-service", "url-path", "useolddateformat", "value", "value-expression", "var", "versionsort", "virtual", "x-forwarded-for", "x-forwarded-host", "x-forwarded-server", "xhtml"]
|
|
21
|
-
end
|
|
11
|
+
DIRECTIVES = Set["accepterrorsnonfatal", "acceptfilter", "acceptmutex", "acceptpathinfo", "accessfilename", "action", "addalt", "addaltbyencoding", "addaltbytype", "addcharset", "adddefaultcharset", "adddescription", "addencoding", "addhandler", "addicon", "addiconbyencoding", "addiconbytype", "addinputfilter", "addlanguage", "addmoduleinfo", "addoutputfilter", "addoutputfilterbytype", "addtype", "alias", "aliasmatch", "aliaspreservepath", "allow", "allowconnect", "allowencodedslashes", "allowhandlers", "allowmethods", "allowoverride", "allowoverridelist", "anonymous", "anonymous_logemail", "anonymous_mustgiveemail", "anonymous_nouserid", "anonymous_verifyemail", "asyncfilter", "authbasicauthoritative", "authbasicfake", "authbasicprovider", "authbasicusedigestalgorithm", "authbearerauthoritative", "authbearerprovider", "authbearerproxy", "authdbduserpwquery", "authdbduserrealmquery", "authdbmgroupfile", "authdbmtype", "authdbmuserfile", "authdigestalgorithm", "authdigestdomain", "authdigestnccheck", "authdigestnonceformat", "authdigestnoncelifetime", "authdigestprovider", "authdigestqop", "authdigestshmemsize", "authformauthoritative", "authformbody", "authformdisablenostore", "authformfakebasicauth", "authformlocation", "authformloginrequiredlocation", "authformloginsuccesslocation", "authformlogoutlocation", "authformmethod", "authformmimetype", "authformpassword", "authformprovider", "authformsitepassphrase", "authformsize", "authformusername", "authgroupfile", "authldapauthorizeprefix", "authldapbindauthoritative", "authldapbinddn", "authldapbindpassword", "authldapcharsetconfig", "authldapcompareasuser", "authldapcomparednonserver", "authldapdereferencealiases", "authldapgroupattribute", "authldapgroupattributeisdn", "authldapinitialbindasuser", "authldapinitialbindpattern", "authldapmaxsubgroupdepth", "authldapremoteuserattribute", "authldapremoteuserisdn", "authldapsearchasuser", "authldapsubgroupattribute", "authldapsubgroupclass", "authldapurl", "authmerging", "authname", "authncachecontext", "authncacheenable", "authncacheprovidefor", "authncachesocache", "authncachetimeout", "authnzfcgicheckauthnprovider", "authnzfcgidefineprovider", "authtjwtclaim", "authtjwtdriver", "authtjwtsign", "authtjwtverify", "authtype", "authuserfile", "authzdbdlogintoreferer", "authzdbdquery", "authzdbdredirectquery", "authzdbmauthoritative", "authzdbmtype", "authzgroupfileauthoritative", "authzownerauthoritative", "authzsendforbiddenonfailure", "authzuserauthoritative", "balancergrowth", "balancerinherit", "balancermember", "balancerpersist", "brotlialteretag", "brotlicompressionmaxinputblock", "brotlicompressionquality", "brotlicompressionwindow", "brotlifilternote", "browsermatch", "browsermatchnocase", "bufferedlogs", "buffersize", "cachedefaultexpire", "cachedetailheader", "cachedirlength", "cachedirlevels", "cachedisable", "cacheenable", "cachefile", "cacheheader", "cacheignorecachecontrol", "cacheignoreheaders", "cacheignorenolastmod", "cacheignorequerystring", "cacheignoreurlsessionidentifiers", "cachekeybaseurl", "cachelastmodifiedfactor", "cachelock", "cachelockmaxage", "cachelockpath", "cachemaxexpire", "cachemaxfilesize", "cacheminexpire", "cacheminfilesize", "cachenegotiateddocs", "cachequickhandler", "cachereadsize", "cachereadtime", "cacheroot", "cachesocache", "cachesocachemaxsize", "cachesocachemaxtime", "cachesocachemintime", "cachesocachereadsize", "cachesocachereadtime", "cachestaleonerror", "cachestoreexpired", "cachestorenostore", "cachestoreprivate", "cgidscripttimeout", "cgimapextension", "cgipassauth", "cgiscripttimeout", "cgivar", "charsetdefault", "charsetoptions", "charsetsourceenc", "checkbasenamematch", "checkcaseonly", "checkspelling", "chrootdir", "contentdigest", "cookiedomain", "cookieexpires", "cookiehttponly", "cookielog", "cookiename", "cookiesamesite", "cookiesecure", "cookiestyle", "cookietracking", "coredumpdirectory", "cryptocipher", "cryptodriver", "cryptoiv", "cryptokey", "cryptosize", "ctauditstorage", "ctlogclient", "ctlogconfigdb", "ctmaxsctage", "ctproxyawareness", "ctsctstorage", "ctserverhellosctlimit", "ctstaticlogconfig", "ctstaticscts", "customlog", "dav", "davbasepath", "davdepthinfinity", "davgenericlockdb", "davlockdb", "davlockdbtype", "davlockdiscovery", "davmintimeout", "davmsext", "davquota", "dbdexptime", "dbdinitsql", "dbdkeep", "dbdmax", "dbdmin", "dbdparams", "dbdpersist", "dbdpreparesql", "dbdriver", "defaulticon", "defaultlanguage", "defaultruntimedir", "defaultstatedir", "defaulttype", "define", "deflatealteretag", "deflatebuffersize", "deflatecompressionlevel", "deflatefilternote", "deflateinflatelimitrequestbody", "deflateinflateratioburst", "deflateinflateratiolimit", "deflatememlevel", "deflatewindowsize", "deny", "directorycheckhandler", "directoryindex", "directoryindexredirect", "directoryslash", "documentroot", "dtraceprivileges", "dumpioinput", "dumpiologlevel", "dumpiooutput", "enableexceptionhook", "enablemmap", "enablesendfile", "error", "errordocument", "errorlog", "errorlogformat", "example", "expiresactive", "expiresbytype", "expiresdefault", "extendedstatus", "extfilterdefine", "extfilteroptions", "fallbackresource", "fileetag", "filterchain", "filterdeclare", "filterprotocol", "filterprovider", "filtertrace", "firehoseconnectioninput", "firehoseconnectionoutput", "firehoseproxyconnectioninput", "firehoseproxyconnectionoutput", "firehoserequestinput", "firehoserequestoutput", "flushmaxpipelined", "flushmaxthreshold", "forcelanguagepriority", "forcetype", "forensiclog", "globallog", "gprofdir", "gracefulshutdowntimeout", "group", "h2copyfiles", "h2direct", "h2earlyhint", "h2earlyhints", "h2maxdataframelen", "h2maxheaderblocklen", "h2maxsessionstreams", "h2maxstreamerrors", "h2maxworkeridleseconds", "h2maxworkers", "h2minworkers", "h2moderntlsonly", "h2outputbuffering", "h2padding", "h2proxyrequests", "h2push", "h2pushdiarysize", "h2pushpriority", "h2pushresource", "h2serializeheaders", "h2streammaxmemsize", "h2streamtimeout", "h2tlscooldownsecs", "h2tlswarmupsize", "h2upgrade", "h2websockets", "h2windowsize", "header", "headername", "heartbeataddress", "heartbeatlisten", "heartbeatmaxservers", "heartbeatstorage", "hostnamelookups", "httpprotocoloptions", "identitycheck", "identitychecktimeout", "imapbase", "imapdefault", "imapmenu", "include", "includeoptional", "indexforbiddenreturn404", "indexheadinsert", "indexignore", "indexignorereset", "indexoptions", "indexorderdefault", "indexstylesheet", "inputsed", "isapiappendlogtoerrors", "isapiappendlogtoquery", "isapicachefile", "isapifakeasync", "isapilognotsupported", "isapireadaheadbuffer", "keepalive", "keepalivetimeout", "keptbodysize", "languagepriority", "ldapcacheentries", "ldapcachettl", "ldapconnectionpoolttl", "ldapconnectiontimeout", "ldaplibrarydebug", "ldapopcacheentries", "ldapopcachettl", "ldapreferralhoplimit", "ldapreferrals", "ldapretries", "ldapretrydelay", "ldapsharedcachefile", "ldapsharedcachesize", "ldaptimeout", "ldaptrustedclientcert", "ldaptrustedglobalcert", "ldaptrustedmode", "ldapverifyservercert", "limitinternalrecursion", "limitrequestbody", "limitrequestfields", "limitrequestfieldsize", "limitrequestline", "limitxmlrequestbody", "listen", "listenbacklog", "listencoresbucketsratio", "listentcpdeferaccept", "loadfile", "loadmodule", "lockfile", "logformat", "logiotrackttfb", "logiotrackttfu", "loglevel", "logleveloverride", "logmessage", "luaauthzprovider", "luacodecache", "luahookaccesschecker", "luahookauthchecker", "luahookcheckuserid", "luahookfixups", "luahookinsertfilter", "luahooklog", "luahookmaptostorage", "luahookpretranslate", "luahooktranslatename", "luahooktypechecker", "luainherit", "luainputfilter", "luamaphandler", "luaoutputfilter", "luapackagecpath", "luapackagepath", "luaquickhandler", "luaroot", "luascope", "macroignorebadnesting", "macroignoreemptyargs", "maxclients", "maxconnectionsperchild", "maxkeepaliverequests", "maxmemfree", "maxrangeoverlaps", "maxrangereversals", "maxranges", "maxrequestsperchild", "maxrequestworkers", "maxspareservers", "maxsparethreads", "maxthreads", "mdactivationdelay", "mdbaseserver", "mdcacertificatefile", "mdcachallenges", "mdcertificateagreement", "mdcertificateauthority", "mdcertificatecheck", "mdcertificatefile", "mdcertificatekeyfile", "mdcertificatemonitor", "mdcertificateprotocol", "mdcertificatestatus", "mdchallengedns01", "mdchallengedns01version", "mdcheckinterval", "mdcontactemail", "mddrivemode", "mdexternalaccountbinding", "mdhttpproxy", "mdinitialdelay", "mdmatchnames", "mdmember", "mdmembers", "mdmessagecmd", "mdmuststaple", "mdnotifycmd", "mdomain", "mdportmap", "mdprivatekeys", "mdprofile", "mdprofilemandatory", "mdrenewmode", "mdrenewviaari", "mdrenewwindow", "mdrequirehttps", "mdretrydelay", "mdretryfailover", "mdserverstatus", "mdstapleothers", "mdstapling", "mdstaplingkeepresponse", "mdstaplingrenewwindow", "mdstoredir", "mdstorelocks", "mdwarnwindow", "memcacheconnttl", "mergeslashes", "mergetrailers", "metadir", "metafiles", "metasuffix", "mimemagicfile", "mimeoptions", "minspareservers", "minsparethreads", "mmapfile", "modemstandard", "modmimeusepathinfo", "multiviewsmatch", "mutex", "namevirtualhost", "noproxy", "nwssltrustedcerts", "nwsslupgradeable", "options", "order", "outputsed", "passenv", "pidfile", "policyconditional", "policyconditionalurl", "policyenvironment", "policyfilter", "policykeepalive", "policykeepaliveurl", "policylength", "policylengthurl", "policymaxage", "policymaxageurl", "policynocache", "policynocacheurl", "policytype", "policytypeurl", "policyvalidation", "policyvalidationurl", "policyvary", "policyvaryurl", "policyversion", "policyversionurl", "privilegesmode", "protocol", "protocolecho", "protocols", "protocolshonororder", "proxy100continue", "proxyaddheaders", "proxybadheader", "proxyblock", "proxydomain", "proxyerroroverride", "proxyexpressdbmfile", "proxyexpressdbmtype", "proxyexpressenable", "proxyfcgibackendtype", "proxyfcgisetenvif", "proxyftpdircharset", "proxyftpescapewildcards", "proxyftplistonwildcard", "proxyhcexpr", "proxyhctemplate", "proxyhctpsize", "proxyhtmlbufsize", "proxyhtmlcharsetout", "proxyhtmldoctype", "proxyhtmlenable", "proxyhtmlevents", "proxyhtmlextended", "proxyhtmlfixups", "proxyhtmlinterp", "proxyhtmllinks", "proxyhtmlmeta", "proxyhtmlstripcomments", "proxyhtmlurlmap", "proxyiobuffersize", "proxymaxforwards", "proxypass", "proxypassinherit", "proxypassinterpolateenv", "proxypassmatch", "proxypassreverse", "proxypassreversecookiedomain", "proxypassreversecookiepath", "proxypreservehost", "proxyreceivebuffersize", "proxyremote", "proxyremotematch", "proxyrequests", "proxyscgiinternalredirect", "proxyscgisendfile", "proxyset", "proxysourceaddress", "proxystatus", "proxytimeout", "proxyvia", "proxywebsocketasync", "proxywebsocketasyncdelay", "proxywebsocketfallbacktoproxyhttp", "proxywebsocketidletimeout", "qualifyredirecturl", "readbuffersize", "readmename", "receivebuffersize", "redirect", "redirectmatch", "redirectpermanent", "redirectrelative", "redirecttemp", "redisconnpoolttl", "redistimeout", "reflectorheader", "regexdefaultoptions", "registerhttpmethod", "remoteipheader", "remoteipinternalproxy", "remoteipinternalproxylist", "remoteipproxiesheader", "remoteipproxyprotocol", "remoteipproxyprotocolexceptions", "remoteiptrustedproxy", "remoteiptrustedproxylist", "removecharset", "removeencoding", "removehandler", "removeinputfilter", "removelanguage", "removeoutputfilter", "removetype", "requestheader", "requestreadtimeout", "require", "rewritebase", "rewritecond", "rewriteengine", "rewritemap", "rewriteoptions", "rewriterule", "rlimitcpu", "rlimitmem", "rlimitnproc", "satisfy", "scoreboardfile", "script", "scriptalias", "scriptaliasmatch", "scriptinterpretersource", "scriptlog", "scriptlogbuffer", "scriptloglength", "scriptsock", "securelisten", "seerequesttail", "sendbuffersize", "serveradmin", "serveralias", "serverlimit", "servername", "serverpath", "serverroot", "serversignature", "servertokens", "session", "sessioncookiemaxage", "sessioncookiename", "sessioncookiename2", "sessioncookieremove", "sessioncryptocipher", "sessioncryptodriver", "sessioncryptopassphrase", "sessioncryptopassphrasefile", "sessiondbdcookiename", "sessiondbdcookiename2", "sessiondbdcookieremove", "sessiondbddeletelabel", "sessiondbdinsertlabel", "sessiondbdperuser", "sessiondbdselectlabel", "sessiondbdupdatelabel", "sessionenv", "sessionexclude", "sessionexpiryupdateinterval", "sessionheader", "sessioninclude", "sessionmaxage", "setenv", "setenvif", "setenvifexpr", "setenvifnocase", "sethandler", "setinputfilter", "setoutputfilter", "ssiaccessenable", "ssiendtag", "ssierrormsg", "ssietag", "ssilastmodified", "ssilegacyexprparser", "ssistarttag", "ssitimeformat", "ssiundefinedecho", "sslcacertificatefile", "sslcacertificatepath", "sslcadnrequestfile", "sslcadnrequestpath", "sslcarevocationcheck", "sslcarevocationfile", "sslcarevocationpath", "sslcertificatechainfile", "sslcertificatefile", "sslcertificatekeyfile", "sslciphersuite", "sslclienthellovars", "sslcompression", "sslcryptodevice", "sslechkeydir", "sslengine", "sslfips", "sslhonorcipherorder", "sslinsecurerenegotiation", "sslocspdefaultresponder", "sslocspenable", "sslocspnoverify", "sslocspoverrideresponder", "sslocspproxyurl", "sslocsprespondercertificatefile", "sslocsprespondertimeout", "sslocspresponsemaxage", "sslocspresponsetimeskew", "sslocspuserequestnonce", "sslopensslconfcmd", "ssloptions", "sslpassphrasedialog", "sslpolicy", "sslprotocol", "sslproxycacertificatefile", "sslproxycacertificatepath", "sslproxycarevocationcheck", "sslproxycarevocationfile", "sslproxycarevocationpath", "sslproxycheckpeercn", "sslproxycheckpeerexpire", "sslproxycheckpeername", "sslproxyciphersuite", "sslproxyengine", "sslproxymachinecertificatechainfile", "sslproxymachinecertificatefile", "sslproxymachinecertificatepath", "sslproxypolicy", "sslproxyprotocol", "sslproxyverify", "sslproxyverifydepth", "sslrandomseed", "sslrenegbuffersize", "sslrequire", "sslrequiressl", "sslsessioncache", "sslsessioncachetimeout", "sslsessionticketkeyfile", "sslsessiontickets", "sslsrpunknownuserseed", "sslsrpverifierfile", "sslstaplingcache", "sslstaplingerrorcachetimeout", "sslstaplingfaketrylater", "sslstaplingforceurl", "sslstaplingrespondertimeout", "sslstaplingresponsemaxage", "sslstaplingresponsetimeskew", "sslstaplingreturnrespondererrors", "sslstaplingstandardcachetimeout", "sslstrictsnivhostcheck", "sslusername", "sslusestapling", "sslverifyclient", "sslverifydepth", "sslvhostsnipolicy", "startservers", "startthreads", "stricthostcheck", "substitute", "substituteinheritbefore", "substitutemaxlinelength", "suexec", "suexecusergroup", "threadlimit", "threadsperchild", "threadstacksize", "timeout", "traceenable", "transferlog", "typesconfig", "unclist", "undefine", "undefmacro", "unsetenv", "use", "usecanonicalname", "usecanonicalphysicalport", "user", "userdir", "vhostcgimode", "vhostcgiprivs", "vhostgroup", "vhostprivs", "vhostsecure", "vhostuser", "virtualdocumentroot", "virtualdocumentrootip", "virtualscriptalias", "virtualscriptaliasip", "warning", "watchdoginterval", "xbithack", "xml2encalias", "xml2encdefault", "xml2startparse"]
|
|
12
|
+
VALUES = Set["accepted", "add", "addsuffix", "all", "alllastextension", "allowanyuri", "allownoslash", "always", "and", "any", "api_version", "append", "ascending", "auth", "auth-int", "authbasicprovider", "authn", "authnz", "authonly", "authz", "auto", "base", "basic", "before", "block", "byteranges", "cache", "cgi", "chain", "change", "charset", "check_user_id", "circle", "cmd", "conn", "conn_remote_addr", "connection", "cookie", "cookie2", "current-uri", "date", "date_gmt", "date_local", "db", "debuglevel", "decoding", "default", "descending", "description", "descriptionwidth", "digest", "directory", "disable", "disabled", "disableenv", "dns", "document_args", "document_name", "document_path_info", "document_uri", "dollar_endonly", "dotall", "double", "duration", "early", "echo", "echomsg", "edit", "edit*", "email", "enable", "enableenv", "encoding", "entier", "env", "errmsg", "error", "es", "execcgi", "expr", "extended", "fallback", "fancyindexing", "fast", "fcntl", "file", "filter_name", "filters", "finding", "flock", "foldersfirst", "followsymlinks", "forever", "form", "formatted", "fpm", "from", "ftype", "full", "function_name", "gdbm", "generic", "gone", "handlers", "hook_function_name", "host", "hse_append_log_parameter", "hse_req_done_with_session", "hse_req_is_connected", "hse_req_is_keep_conn", "hse_req_map_url_to_path", "hse_req_send_response_header", "hse_req_send_response_header_ex", "hse_req_send_url", "hse_req_send_url_redirect_resp", "html", "html5or", "htmltable", "https", "icase", "iconheight", "iconsarelinks", "iconwidth", "ignore", "ignorecase", "ignoreclient", "ignorecontextinfo", "ignoreinherit", "imal", "includes", "includesnoexec", "indexes", "inherit", "inheritbefore", "inheritdown", "inheritdownbefore", "input", "insecure", "integer", "intype", "is_subreq", "iserror", "last_modified", "lax", "leaf", "legacyprefixdocroot", "level", "log", "log_function_name", "longurloptimization", "major", "manual", "map", "max", "md5", "md5-sess", "menu", "merge", "mergebase", "minor", "mode", "modele-uri", "ms", "multiviews", "mutual-failure", "name", "namewidth", "ndbm", "negotiatedonly", "netscape", "network", "never", "no", "noalllastextension", "nochange", "nocontent", "nodecode", "nom_fonction_hook", "none", "note", "notfound", "notypeslastextension", "off", "on", "once", "onerror", "onfail", "optional", "or", "original-uri", "os", "output", "outtype", "parent-first", "parent-last", "permanent", "point", "poly", "posixsem", "prefer", "preservescontentlength", "provider_name", "proxy", "proxyhtmldoctype", "pthread", "qs", "query_string_unescaped", "range", "ratio", "rect", "referer", "registry", "registry-strict", "remote_addr", "remove", "request", "request_filename", "request_hostname", "request_scheme", "request_uri", "request_user", "request_useragent_ip", "require", "reset", "rfc2109", "rfc2965", "scanhtmltitles", "script", "sdbm", "searching", "secure", "seeother", "selective", "sem", "semiformatted", "server", "server_hostname", "servernames", "set", "setifempty", "showforbidden", "size", "sizefmt", "ssl", "ssl-access-forbidden", "ssl-secure-reneg", "startbody", "stat", "strict", "suppresscolumnsorting", "suppressdescription", "suppresshtmlpreamble", "suppressicon", "suppresslastmodified", "suppressrules", "suppresssize", "symlinksifownermatch", "sysvsem", "temp", "temporary", "the_request", "thread", "timefmt", "tls", "trackmodified", "transform", "typeslastextension", "uctonly", "uid", "unformatted", "unlimited", "unset", "uri-pattern", "url", "user_name", "value", "var", "versionsort", "virtual", "x-forwarded-for", "x-forwarded-host", "x-forwarded-server", "xhtml"]
|
|
13
|
+
SECTIONS = Set["authnprovideralias", "authtprovideralias", "authzprovideralias", "directory", "directorymatch", "else", "elseif", "files", "filesmatch", "if", "ifdefine", "ifdirective", "iffile", "ifmodule", "ifsection", "ifversion", "limit", "limitexcept", "location", "locationmatch", "macro", "mdomainset", "proxy", "proxymatch", "requireall", "requireany", "requirenone", "sslpolicydefine", "virtualhost"]
|
|
22
14
|
end
|
|
23
15
|
end
|
|
24
16
|
end
|
data/lib/rouge/lexers/apache.rb
CHANGED
|
@@ -12,31 +12,18 @@ module Rouge
|
|
|
12
12
|
filenames '.htaccess', 'httpd.conf'
|
|
13
13
|
|
|
14
14
|
# self-modifying method that loads the keywords file
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
directives
|
|
15
|
+
lazy do
|
|
16
|
+
require_relative 'apache/keywords'
|
|
18
17
|
end
|
|
19
18
|
|
|
20
|
-
def
|
|
21
|
-
|
|
22
|
-
sections
|
|
23
|
-
end
|
|
19
|
+
def name_for_token(token, tktype)
|
|
20
|
+
token = token.downcase
|
|
24
21
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
end
|
|
22
|
+
return tktype if SECTIONS.include?(token)
|
|
23
|
+
return tktype if DIRECTIVES.include?(token)
|
|
24
|
+
return tktype if VALUES.include?(token)
|
|
29
25
|
|
|
30
|
-
|
|
31
|
-
if self.class.sections.include? token
|
|
32
|
-
tktype
|
|
33
|
-
elsif self.class.directives.include? token
|
|
34
|
-
tktype
|
|
35
|
-
elsif self.class.values.include? token
|
|
36
|
-
tktype
|
|
37
|
-
else
|
|
38
|
-
Text
|
|
39
|
-
end
|
|
26
|
+
Text
|
|
40
27
|
end
|
|
41
28
|
|
|
42
29
|
state :whitespace do
|
|
@@ -48,12 +35,12 @@ module Rouge
|
|
|
48
35
|
mixin :whitespace
|
|
49
36
|
|
|
50
37
|
rule %r/(<\/?)(\w+)/ do |m|
|
|
51
|
-
groups Punctuation, name_for_token(m[2]
|
|
38
|
+
groups Punctuation, name_for_token(m[2], Name::Label)
|
|
52
39
|
push :section
|
|
53
40
|
end
|
|
54
41
|
|
|
55
42
|
rule %r/\w+/ do |m|
|
|
56
|
-
token name_for_token(m[0]
|
|
43
|
+
token name_for_token(m[0], Name::Class)
|
|
57
44
|
push :directive
|
|
58
45
|
end
|
|
59
46
|
end
|
|
@@ -75,8 +62,22 @@ module Rouge
|
|
|
75
62
|
mixin :whitespace
|
|
76
63
|
|
|
77
64
|
rule %r/\S+/ do |m|
|
|
78
|
-
|
|
65
|
+
if VALUES.include?(m[0].downcase)
|
|
66
|
+
token Literal::String::Symbol
|
|
67
|
+
else
|
|
68
|
+
fallthrough!
|
|
69
|
+
end
|
|
79
70
|
end
|
|
71
|
+
|
|
72
|
+
rule(%r/(?=\S)/) { push :value }
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
state :value do
|
|
76
|
+
rule %r/[ \t]+/, Text, :pop!
|
|
77
|
+
rule %r/[^\s%]+/, Text
|
|
78
|
+
rule %r/%{.*?}/, Name::Variable
|
|
79
|
+
rule %r/[%]/, Text
|
|
80
|
+
rule(/(?=\n)/) { pop! }
|
|
80
81
|
end
|
|
81
82
|
end
|
|
82
83
|
end
|
data/lib/rouge/lexers/apex.rb
CHANGED
|
@@ -30,8 +30,8 @@ module Rouge
|
|
|
30
30
|
def self.soql
|
|
31
31
|
@soql ||= Set.new %w(
|
|
32
32
|
SELECT FROM WHERE UPDATE LIKE TYPEOF END USING SCOPE WITH DATA
|
|
33
|
-
CATEGORY GROUP BY ROLLUP CUBE HAVING ORDER
|
|
34
|
-
LAST LIMIT OFFSET FOR VIEW REFERENCE
|
|
33
|
+
CATEGORY GROUP BY ROLLUP CUBE HAVING ORDER ASC DESC NULLS FIRST
|
|
34
|
+
LAST LIMIT OFFSET FOR VIEW REFERENCE TRACKING VIEWSTAT OR AND
|
|
35
35
|
)
|
|
36
36
|
end
|
|
37
37
|
|
data/lib/rouge/lexers/bicep.rb
CHANGED
|
@@ -9,7 +9,7 @@ module Rouge
|
|
|
9
9
|
|
|
10
10
|
def self.keywords
|
|
11
11
|
@keywords ||= Set.new %w(
|
|
12
|
-
as assert existing extends extension false for from func if import in metadata module
|
|
12
|
+
as assert existing extends extension false for from func if import in metadata module
|
|
13
13
|
none null output param provider resource targetScope test true type using var void with
|
|
14
14
|
)
|
|
15
15
|
end
|
|
@@ -76,7 +76,7 @@ module Rouge
|
|
|
76
76
|
# Ignore whitespace
|
|
77
77
|
rule %r/\s+/, Text
|
|
78
78
|
end
|
|
79
|
-
|
|
79
|
+
|
|
80
80
|
state :comments do
|
|
81
81
|
rule %r(//[^\n\r]+), Comment::Single
|
|
82
82
|
rule %r(/\*.*?\*/)m, Comment::Multiline
|
data/lib/rouge/lexers/biml.rb
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require_relative 'xml'
|
|
4
|
+
require_relative 'csharp'
|
|
5
|
+
|
|
3
6
|
module Rouge
|
|
4
7
|
module Lexers
|
|
5
|
-
load_lexer 'xml.rb'
|
|
6
|
-
|
|
7
8
|
class BIML < XML
|
|
8
9
|
title "BIML"
|
|
9
10
|
desc "BIML, Business Intelligence Markup Language"
|
|
@@ -14,22 +15,48 @@ module Rouge
|
|
|
14
15
|
return true if text =~ /<\s*Biml\b/
|
|
15
16
|
end
|
|
16
17
|
|
|
18
|
+
start do
|
|
19
|
+
@csharp = CSharp.new(options)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
state :biml_interp do
|
|
23
|
+
rule %r(<#[=]?)m do
|
|
24
|
+
token Name::Tag
|
|
25
|
+
push :directive_as_csharp
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
17
29
|
prepend :root do
|
|
18
30
|
rule %r(<#\@\s*)m, Name::Tag, :directive_tag
|
|
19
31
|
|
|
20
|
-
|
|
32
|
+
mixin :biml_interp
|
|
21
33
|
end
|
|
22
34
|
|
|
23
35
|
prepend :attr do
|
|
24
|
-
|
|
25
|
-
|
|
36
|
+
rule(%r/"/) { token Str::Double; goto :biml_dq }
|
|
37
|
+
rule(%r/'/) { token Str::Double; goto :biml_sq }
|
|
38
|
+
|
|
39
|
+
mixin :biml_interp
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
state :biml_dq do
|
|
43
|
+
rule %r/[^<"]+/, Str::Double
|
|
44
|
+
mixin :biml_interp
|
|
45
|
+
rule %r/"/, Str::Double, :pop!
|
|
46
|
+
rule %r/</, Str::Double
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
state :biml_sq do
|
|
50
|
+
rule %r/[^<']+/, Str::Single
|
|
51
|
+
mixin :biml_interp
|
|
52
|
+
rule %r/'/, Str::Single, :pop!
|
|
53
|
+
rule %r/</, Str::Single
|
|
26
54
|
end
|
|
27
55
|
|
|
28
56
|
state :directive_as_csharp do
|
|
29
|
-
rule
|
|
30
|
-
rule %r
|
|
31
|
-
|
|
32
|
-
end
|
|
57
|
+
rule(/[^#]+/) { delegate @csharp }
|
|
58
|
+
rule %r/#>/, Name::Tag, :pop!
|
|
59
|
+
rule(/[#>]/) { delegate @csharp }
|
|
33
60
|
end
|
|
34
61
|
|
|
35
62
|
state :directive_tag do
|