Class: Rouge::Lexers::ABAP

Inherits:
RegexLexer show all
Defined in:
lib/rouge/lexers/abap.rb

Constant Summary

Constants inherited from RegexLexer

RegexLexer::MAX_NULL_SCANS

Constants included from Token::Tokens

Token::Tokens::Num, Token::Tokens::Str

Instance Attribute Summary

Attributes inherited from Rouge::Lexer

#options

Class Method Summary collapse

Methods inherited from RegexLexer

append, #delegate, #goto, #group, #groups, #in_state?, #pop!, prepend, #push, #recurse, replace_state, #reset!, #reset_stack, #stack, start, start_procs, state, #state, #state?, state_definitions, states, #step, #stream_tokens, #token

Methods inherited from Rouge::Lexer

aliases, all, #as_bool, #as_lexer, #as_list, #as_string, #as_token, #bool_option, continue_lex, #continue_lex, debug_enabled?, demo, demo_file, desc, detect?, detectable?, disable_debug!, enable_debug!, filenames, find, find_fancy, guess, guess_by_filename, guess_by_mimetype, guess_by_source, guesses, #hash_option, #initialize, lex, #lex, #lexer_option, #list_option, lookup_fancy, mimetypes, option, option_docs, #reset!, #stream_tokens, #string_option, tag, #tag, title, #token_option, #with

Methods included from Token::Tokens

token

Constructor Details

This class inherits a constructor from Rouge::Lexer

Class Method Details

.builtinsObject



148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# File 'lib/rouge/lexers/abap.rb', line 148

def self.builtins
  @keywords = Set.new %w(
    acos apply asin assign atan attribute bit-set boolc boolx call
    call-method cast ceil cfunc charlen char_off class_constructor clear
    cluster cmax cmin cnt communication_failure concat_lines_of cond
    cond-var condense constructor contains contains_any_not_of
    contains_any_of copy cos cosh count count_any_not_of count_any_of
    create cursor data dbmaxlen dbtab deserialize destructor distance
    empty error_message escape exp extensible find find_any_not_of
    find_any_of find_end floor frac from_mixed group hashed header idx
    include index insert ipow itab key lax lines line_exists line_index
    log log10 loop loop_key match matches me mesh_path namespace nmax
    nmin node numeric numofchar object parameter primary_key read ref
    repeat replace rescale resource_failure reverse root round segment
    sender serialize shift_left shift_right sign simple sin sinh skip
    sorted space sqrt standard strlen substring substring_after
    substring_before substring_from substring_to sum switch switch-var
    system_failure table table_line tan tanh template text to_lower
    to_mixed to_upper transform translate trunc type value variable write
    xsdbool xsequence xstrlen
  )
end

.keywordsObject



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# File 'lib/rouge/lexers/abap.rb', line 15

def self.keywords
  @keywords = Set.new %w(
    *-INPUT ?TO ABAP-SOURCE ABBREVIATED ABS ABSTRACT ACCEPT ACCEPTING
    ACCORDING ACCP ACTIVATION ACTUAL ADD ADD-CORRESPONDING ADJACENT
    AFTER ALIAS ALIASES ALIGN ALL ALLOCATE ALPHA ANALYSIS ANALYZER AND
    ANY APPEND APPENDAGE APPENDING APPLICATION ARCHIVE AREA ARITHMETIC
    AS ASCENDING ASPECT ASSERT ASSIGN ASSIGNED ASSIGNING ASSOCIATION
    ASYNCHRONOUS AT ATTRIBUTES AUTHORITY AUTHORITY-CHECK AVG BACK
    BACKGROUND BACKUP BACKWARD BADI BASE BEFORE BEGIN BETWEEN BIG BINARY
    BINTOHEX BIT BIT-AND BIT-NOT BIT-OR BIT-XOR BLACK BLANK BLANKS BLOB
    BLOCK BLOCKS BLUE BOUND BOUNDARIES BOUNDS BOXED BREAK-POINT BT
    BUFFER BY BYPASSING BYTE BYTE-CA BYTE-CN BYTE-CO BYTE-CS BYTE-NA
    BYTE-NS BYTE-ORDER CA CALL CALLING CASE CAST CASTING CATCH CEIL
    CENTER CENTERED CHAIN CHAIN-INPUT CHAIN-REQUEST CHANGE CHANGING
    CHANNELS CHAR CHAR-TO-HEX CHARACTER CHECK CHECKBOX CIRCULAR CLASS
    CLASS-CODING CLASS-DATA CLASS-EVENTS CLASS-METHODS CLASS-POOL
    CLEANUP CLEAR CLIENT CLNT CLOB CLOCK CLOSE CN CO COALESCE CODE
    CODING COLLECT COLOR COLUMN COLUMNS COL_BACKGROUND COL_GROUP
    COL_HEADING COL_KEY COL_NEGATIVE COL_NORMAL COL_POSITIVE COL_TOTAL
    COMMENT COMMENTS COMMIT COMMON COMMUNICATION COMPARING COMPONENT
    COMPONENTS COMPRESSION COMPUTE CONCAT CONCATENATE CONCAT_WITH_SPACE
    COND CONDENSE CONDITION CONNECT CONNECTION CONSTANTS CONTEXT
    CONTEXTS CONTINUE CONTROL CONTROLS CONV CONVERSION CONVERT COPIES
    COPY CORRESPONDING COUNT COUNTRY COVER CP CPI CREATE CREATING
    CRITICAL CS CUKY CURR CURRENCY CURRENCY_CONVERSION CURRENT CURSOR
    CURSOR-SELECTION CUSTOMER CUSTOMER-FUNCTION CX_DYNAMIC_CHECK
    CX_NO_CHECK CX_ROOT CX_SQL_EXCEPTION CX_STATIC_CHECK DANGEROUS DATA
    DATABASE DATAINFO DATASET DATE DATS DATS_ADD_DAYS DATS_ADD_MONTHS
    DATS_DAYS_BETWEEN DATS_IS_VALID DAYLIGHT DD/MM/YY DD/MM/YYYY DDMMYY
    DEALLOCATE DEC DECIMALS DECIMAL_SHIFT DECLARATIONS DEEP DEFAULT
    DEFERRED DEFINE DEFINING DEFINITION DELETE DELETING DEMAND
    DEPARTMENT DESCENDING DESCRIBE DESTINATION DETAIL DF16_DEC DF16_RAW
    DF16_SCL DF34_DEC DF34_RAW DF34_SCL DIALOG DIRECTORY DISCONNECT
    DISPLAY DISPLAY-MODE DISTANCE DISTINCT DIV DIVIDE
    DIVIDE-CORRESPONDING DIVISION DO DUMMY DUPLICATE DUPLICATES DURATION
    DURING DYNAMIC DYNPRO E EDIT EDITOR-CALL ELSE ELSEIF EMPTY ENABLED
    ENABLING ENCODING END END-ENHANCEMENT-SECTION END-LINES
    END-OF-DEFINITION END-OF-FILE END-OF-PAGE END-OF-SELECTION
    END-TEST-INJECTION END-TEST-SEAM ENDAT ENDCASE ENDCATCH ENDCHAIN
    ENDCLASS ENDDO ENDENHANCEMENT ENDEXEC ENDFORM ENDFUNCTION ENDIAN
    ENDIF ENDING ENDINTERFACE ENDLOOP ENDMETHOD ENDMODULE ENDON
    ENDPROVIDE ENDSELECT ENDTRY ENDWHILE ENDWITH ENGINEERING ENHANCEMENT
    ENHANCEMENT-POINT ENHANCEMENT-SECTION ENHANCEMENTS ENTRIES ENTRY
    ENVIRONMENT EQ EQUIV ERRORMESSAGE ERRORS ESCAPE ESCAPING EVENT
    EVENTS EXACT EXCEPT EXCEPTION EXCEPTION-TABLE EXCEPTIONS EXCLUDE
    EXCLUDING EXEC EXECUTE EXISTS EXIT EXIT-COMMAND EXPAND EXPANDING
    EXPIRATION EXPLICIT EXPONENT EXPORT EXPORTING EXTEND EXTENDED
    EXTENSION EXTRACT FAIL FETCH FIELD FIELD-GROUPS FIELD-SYMBOL
    FIELD-SYMBOLS FIELDS FILE FILTER FILTER-TABLE FILTERS FINAL FIND
    FIRST FIRST-LINE FIXED-POINT FKEQ FKGE FLOOR FLTP FLUSH FONT FOR
    FORM FORMAT FORWARD FOUND FRAME FRAMES FREE FRIENDS FROM FUNCTION
    FUNCTION-POOL FUNCTIONALITY FURTHER GAPS GE GENERATE GET
    GET_PRINT_PARAMETERS GIVING GKEQ GKGE GLOBAL GRANT GREEN GROUP
    GROUPS GT HANDLE HANDLER HARMLESS HASHED HAVING HDB HEAD-LINES
    HEADER HEADERS HEADING HELP-ID HELP-REQUEST HEXTOBIN HIDE HIGH HINT
    HOLD HOTSPOT I ICON ID IDENTIFICATION IDENTIFIER IDS IF
    IF_ABAP_CLOSE_RESOURCE IF_ABAP_CODEPAGE IF_ABAP_DB_BLOB_HANDLE
    IF_ABAP_DB_CLOB_HANDLE IF_ABAP_DB_LOB_HANDLE IF_ABAP_DB_READER
    IF_ABAP_DB_WRITER IF_ABAP_READER IF_ABAP_WRITER IF_MESSAGE
    IF_OS_CA_INSTANCE IF_OS_CA_PERSISTENCY IF_OS_FACTORY IF_OS_QUERY
    IF_OS_QUERY_MANAGER IF_OS_QUERY_OPTIONS IF_OS_STATE
    IF_OS_TRANSACTION IF_OS_TRANSACTION_MANAGER IF_SERIALIZABLE_OBJECT
    IF_SHM_BUILD_INSTANCE IF_SYSTEM_UUID IF_T100_DYN_MSG IF_T100_MESSAGE
    IGNORE IGNORING IMMEDIATELY IMPLEMENTATION IMPLEMENTATIONS
    IMPLEMENTED IMPLICIT IMPORT IMPORTING IN INACTIVE INCL INCLUDE
    INCLUDES INCLUDING INCREMENT INDEX INDEX-LINE INFOTYPES INHERITING
    INIT INITIAL INITIALIZATION INNER INOUT INPUT INSERT INSTANCE
    INSTANCES INSTR INT1 INT2 INT4 INT8 INTENSIFIED INTERFACE
    INTERFACE-POOL INTERFACES INTERNAL INTERVALS INTO INVERSE
    INVERTED-DATE IS ISO ITNO JOB JOIN KEEP KEEPING KERNEL KEY KEYS
    KEYWORDS KIND LANG LANGUAGE LAST LATE LAYOUT LCHR LDB_PROCESS LE
    LEADING LEAVE LEFT LEFT-JUSTIFIED LEFTPLUS LEFTSPACE LEGACY LENGTH
    LET LEVEL LEVELS LIKE LINE LINE-COUNT LINE-SELECTION LINE-SIZE
    LINEFEED LINES LIST LIST-PROCESSING LISTBOX LITTLE LLANG LOAD
    LOAD-OF-PROGRAM LOB LOCAL LOCALE LOCATOR LOG-POINT LOGFILE LOGICAL
    LONG LOOP LOW LOWER LPAD LPI LRAW LT LTRIM M MAIL MAIN MAJOR-ID
    MAPPING MARGIN MARK MASK MATCH MATCHCODE MAX MAXIMUM MEDIUM MEMBERS
    MEMORY MESH MESSAGE MESSAGE-ID MESSAGES MESSAGING METHOD METHODS MIN
    MINIMUM MINOR-ID MM/DD/YY MM/DD/YYYY MMDDYY MOD MODE MODIF MODIFIER
    MODIFY MODULE MOVE MOVE-CORRESPONDING MULTIPLY
    MULTIPLY-CORRESPONDING NA NAME NAMETAB NATIVE NB NE NESTED NESTING
    NEW NEW-LINE NEW-PAGE NEW-SECTION NEXT NO NO-DISPLAY NO-EXTENSION
    NO-GAP NO-GAPS NO-GROUPING NO-HEADING NO-SCROLLING NO-SIGN NO-TITLE
    NO-TOPOFPAGE NO-ZERO NODE NODES NON-UNICODE NON-UNIQUE NOT NP NS
    NULL NUMBER NUMC O OBJECT OBJECTS OBLIGATORY OCCURRENCE OCCURRENCES
    OCCURS OF OFF OFFSET ON ONLY OPEN OPTION OPTIONAL OPTIONS OR ORDER
    OTHER OTHERS OUT OUTER OUTPUT OUTPUT-LENGTH OVERFLOW OVERLAY PACK
    PACKAGE PAD PADDING PAGE PAGES PARAMETER PARAMETER-TABLE PARAMETERS
    PART PARTIALLY PATTERN PERCENTAGE PERFORM PERFORMING PERSON PF
    PF-STATUS PINK PLACES POOL POSITION POS_HIGH POS_LOW PRAGMAS PREC
    PRECOMPILED PREFERRED PRESERVING PRIMARY PRINT PRINT-CONTROL
    PRIORITY PRIVATE PROCEDURE PROCESS PROGRAM PROPERTY PROTECTED
    PROVIDE PUBLIC PUSH PUSHBUTTON PUT QUAN QUEUE-ONLY QUICKINFO
    RADIOBUTTON RAISE RAISING RANGE RANGES RAW RAWSTRING READ READ-ONLY
    READER RECEIVE RECEIVED RECEIVER RECEIVING RED REDEFINITION REDUCE
    REDUCED REF REFERENCE REFRESH REGEX REJECT REMOTE RENAMING REPLACE
    REPLACEMENT REPLACING REPORT REQUEST REQUESTED RESERVE RESET
    RESOLUTION RESPECTING RESPONSIBLE RESULT RESULTS RESUMABLE RESUME
    RETRY RETURN RETURNCODE RETURNING RETURNS RIGHT RIGHT-JUSTIFIED
    RIGHTPLUS RIGHTSPACE RISK RMC_COMMUNICATION_FAILURE
    RMC_INVALID_STATUS RMC_SYSTEM_FAILURE ROLE ROLLBACK ROUND ROWS RPAD
    RTRIM RUN SAP SAP-SPOOL SAVING SCALE_PRESERVING
    SCALE_PRESERVING_SCIENTIFIC SCAN SCIENTIFIC
    SCIENTIFIC_WITH_LEADING_ZERO SCREEN SCROLL SCROLL-BOUNDARY SCROLLING
    SEARCH SECONDARY SECONDS SECTION SELECT SELECT-OPTIONS SELECTION
    SELECTION-SCREEN SELECTION-SET SELECTION-SETS SELECTION-TABLE
    SELECTIONS SEND SEPARATE SEPARATED SET SHARED SHIFT SHORT
    SHORTDUMP-ID SIGN SIGN_AS_POSTFIX SIMPLE SINGLE SIZE SKIP SKIPPING
    SMART SOME SORT SORTABLE SORTED SOURCE SPACE SPECIFIED SPLIT SPOOL
    SPOTS SQL SQLSCRIPT SSTRING STABLE STAMP STANDARD START-OF-SELECTION
    STARTING STATE STATEMENT STATEMENTS STATIC STATICS STATUSINFO
    STEP-LOOP STOP STRING STRUCTURE STRUCTURES STYLE SUBKEY SUBMATCHES
    SUBMIT SUBROUTINE SUBSCREEN SUBSTRING SUBTRACT
    SUBTRACT-CORRESPONDING SUFFIX SUM SUMMARY SUMMING SUPPLIED SUPPLY
    SUPPRESS SWITCH SWITCHSTATES SYMBOL SYNCPOINTS SYNTAX SYNTAX-CHECK
    SYNTAX-TRACE SYST SYSTEM-CALL SYSTEM-EXCEPTIONS SYSTEM-EXIT TAB
    TABBED TABLE TABLES TABLEVIEW TABSTRIP TARGET TASK TASKS TEST
    TEST-INJECTION TEST-SEAM TESTING TEXT TEXTPOOL THEN THROW TIME TIMES
    TIMESTAMP TIMEZONE TIMS TIMS_IS_VALID TITLE TITLE-LINES TITLEBAR TO
    TOKENIZATION TOKENS TOP-LINES TOP-OF-PAGE TRACE-FILE TRACE-TABLE
    TRAILING TRANSACTION TRANSFER TRANSFORMATION TRANSLATE TRANSPORTING
    TRMAC TRUNCATE TRUNCATION TRY TSTMP_ADD_SECONDS
    TSTMP_CURRENT_UTCTIMESTAMP TSTMP_IS_VALID TSTMP_SECONDS_BETWEEN TYPE
    TYPE-POOL TYPE-POOLS TYPES ULINE UNASSIGN UNDER UNICODE UNION UNIQUE
    UNIT UNIT_CONVERSION UNIX UNPACK UNTIL UNWIND UP UPDATE UPPER USER
    USER-COMMAND USING UTF-8 VALID VALUE VALUE-REQUEST VALUES VARC VARY
    VARYING VERIFICATION-MESSAGE VERSION VIA VIEW VISIBLE WAIT WARNING
    WHEN WHENEVER WHERE WHILE WIDTH WINDOW WINDOWS WITH WITH-HEADING
    WITH-TITLE WITHOUT WORD WORK WRITE WRITER XML XSD YELLOW YES YYMMDD
    Z ZERO ZONE
  )
end

.new_keywordsObject



178
179
180
181
182
# File 'lib/rouge/lexers/abap.rb', line 178

def self.new_keywords
  @types = Set.new %w(
    DATA FIELD-SYMBOL
  )
end

.typesObject



171
172
173
174
175
176
# File 'lib/rouge/lexers/abap.rb', line 171

def self.types
  @types = Set.new %w(
   b c d decfloat16 decfloat34 f i int8 n p s t x
   clike csequence decfloat string xstring
  )
end