├── .abapgit.xml ├── .github ├── dependabot.yml └── workflows │ └── test.yaml ├── .gitignore ├── LICENSE ├── README.md ├── abap_transpile.json ├── abaplint.json ├── abaplint_downport.json ├── devcontainer.json ├── input ├── day01.txt ├── day02.txt ├── day03.txt ├── day04.txt ├── day05.txt ├── day06.txt ├── day07.txt ├── day08.txt ├── day09.txt ├── day10.txt ├── day11.txt ├── day12.txt ├── day13.txt ├── day14.txt ├── day15.txt ├── day16.txt ├── day17.txt ├── day18.txt ├── day19.txt ├── day20.txt ├── day21.txt ├── day22.txt ├── day23.txt └── day24.txt ├── package-lock.json ├── package.json ├── run.mjs └── src ├── day01 ├── package.devc.xml ├── zcl_advent2020_day01_rename.clas.abap └── zcl_advent2020_day01_rename.clas.xml ├── day02 ├── package.devc.xml ├── zcl_advent2020_day02_rename.clas.abap └── zcl_advent2020_day02_rename.clas.xml ├── day03 ├── package.devc.xml ├── zcl_advent2020_day03_rename.clas.abap └── zcl_advent2020_day03_rename.clas.xml ├── day04 ├── package.devc.xml ├── zcl_advent2020_day04_rename.clas.abap └── zcl_advent2020_day04_rename.clas.xml ├── day05 ├── package.devc.xml ├── zcl_advent2020_day05_rename.clas.abap └── zcl_advent2020_day05_rename.clas.xml ├── day06 ├── package.devc.xml ├── zcl_advent2020_day06_rename.clas.abap └── zcl_advent2020_day06_rename.clas.xml ├── day07 ├── package.devc.xml ├── zcl_advent2020_day07_rename.clas.abap └── zcl_advent2020_day07_rename.clas.xml ├── day08 ├── package.devc.xml ├── zcl_advent2020_day08_rename.clas.abap └── zcl_advent2020_day08_rename.clas.xml ├── day09 ├── package.devc.xml ├── zcl_advent2020_day09_rename.clas.abap └── zcl_advent2020_day09_rename.clas.xml ├── day10 ├── package.devc.xml ├── zcl_advent2020_day10_rename.clas.abap └── zcl_advent2020_day10_rename.clas.xml ├── day11 ├── package.devc.xml ├── zcl_advent2020_day11_rename.clas.abap └── zcl_advent2020_day11_rename.clas.xml ├── day12 ├── package.devc.xml ├── zcl_advent2020_day12_rename.clas.abap └── zcl_advent2020_day12_rename.clas.xml ├── day13 ├── package.devc.xml ├── zcl_advent2020_day13_rename.clas.abap └── zcl_advent2020_day13_rename.clas.xml ├── day14 ├── package.devc.xml ├── zcl_advent2020_day14_rename.clas.abap └── zcl_advent2020_day14_rename.clas.xml ├── day15 ├── package.devc.xml ├── zcl_advent2020_day15_rename.clas.abap └── zcl_advent2020_day15_rename.clas.xml ├── day16 ├── package.devc.xml ├── zcl_advent2020_day16_rename.clas.abap └── zcl_advent2020_day16_rename.clas.xml ├── day17 ├── package.devc.xml ├── zcl_advent2020_day17_rename.clas.abap └── zcl_advent2020_day17_rename.clas.xml ├── day18 ├── package.devc.xml ├── zcl_advent2020_day18_rename.clas.abap └── zcl_advent2020_day18_rename.clas.xml ├── day19 ├── package.devc.xml ├── zcl_advent2020_day19_rename.clas.abap └── zcl_advent2020_day19_rename.clas.xml ├── day20 ├── package.devc.xml ├── zcl_advent2020_day20_rename.clas.abap └── zcl_advent2020_day20_rename.clas.xml ├── day21 ├── package.devc.xml ├── zcl_advent2020_day21_rename.clas.abap └── zcl_advent2020_day21_rename.clas.xml ├── day22 ├── package.devc.xml ├── zcl_advent2020_day22_rename.clas.abap └── zcl_advent2020_day22_rename.clas.xml ├── day23 ├── package.devc.xml ├── zcl_advent2020_day23_rename.clas.abap └── zcl_advent2020_day23_rename.clas.xml ├── day24 ├── package.devc.xml ├── zcl_advent2020_day24_rename.clas.abap └── zcl_advent2020_day24_rename.clas.xml ├── package.devc.xml ├── zif_advent2020_rename.intf.abap └── zif_advent2020_rename.intf.xml /.abapgit.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | E 6 | /src/ 7 | PREFIX 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: npm 4 | directory: "/" 5 | schedule: 6 | interval: monthly 7 | time: "04:00" 8 | open-pull-requests-limit: 10 9 | versioning-strategy: increase 10 | -------------------------------------------------------------------------------- /.github/workflows/test.yaml: -------------------------------------------------------------------------------- 1 | name: unittest 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | unittest: 7 | 8 | runs-on: ubuntu-latest 9 | 10 | steps: 11 | - uses: actions/checkout@v2 12 | with: 13 | fetch-depth: 2 14 | - name: Use Node.js 15 | uses: actions/setup-node@v1 16 | with: 17 | node-version: '16' 18 | - name: npm install 19 | run: npm install 20 | - name: npm run downport 21 | run: npm run downport 22 | - name: npm run unit 23 | run: npm run unit -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | downport 3 | output 4 | renamed -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # abap-advent-2020-template 2 | [Advent of Code](https://adventofcode.com) 2020 - ABAP Template 3 | 4 | Let's do it the difficult way! By ABAP running on [NodeJS](https://nodejs.org) 5 | 6 | ## Prerequsites 7 | 8 | NodeJS 12 installed 9 | 10 | No ABAP system required 11 | 12 | However, _a lot_ of patience is required to get the ABAP running in Node, this will involve debugging of javascript and typescript code! 13 | 14 | ## Initial Setup 15 | 16 | After cloning this template repository, please rename all objects, this is done by changing the configuration in `abaplint.json` and then running `npm install && npm run rename` 17 | 18 | Enable [abaplint.app](https://github.com/marketplace/abaplint) to get nice linter errors. 19 | 20 | Adjust `abaplint.json` to match your preferences 21 | 22 | ## Commands 23 | 24 | `npm install` to install dependencies, make sure to keep file `package.json` up to date with latest dependencies 25 | 26 | `npm run lint` to run linter 27 | 28 | `npm run downport` will downport the code to 702, into directory "downport" 29 | 30 | `npm run unit` takes downported code, transpiles it, and runs unit tests 31 | 32 | `npm test` does linting, downporting and unit testing in that sequence 33 | 34 | `npm run input -- 01` to run day 01 with input from `/input/day01.txt` 35 | -------------------------------------------------------------------------------- /abap_transpile.json: -------------------------------------------------------------------------------- 1 | { 2 | "input_folder": "downport", 3 | "input_filter": [], 4 | "output_folder": "output", 5 | "lib": "https://github.com/open-abap/open-abap", 6 | "write_unit_tests": true, 7 | "options": { 8 | "ignoreSyntaxCheck": false, 9 | "addFilenames": true, 10 | "addCommonJS": true 11 | } 12 | } -------------------------------------------------------------------------------- /abaplint.json: -------------------------------------------------------------------------------- 1 | { 2 | "global": { 3 | "files": "/src/**/*.*", 4 | "exclude": [], 5 | "skipGeneratedGatewayClasses": true, 6 | "skipGeneratedPersistentClasses": true, 7 | "skipGeneratedFunctionGroups": true, 8 | "useApackDependencies": false 9 | }, 10 | "dependencies": [ 11 | { 12 | "url": "https://github.com/open-abap/open-abap", 13 | "folder": "/deps", 14 | "files": "/src/**/*.*" 15 | } 16 | ], 17 | "rename": { 18 | "output": "renamed", 19 | "skip": [], 20 | "patterns": [{"type": "CLAS|INTF", "oldName": "(.*)_rename", "newName": "$1_foobar"}] 21 | }, 22 | "syntax": { 23 | "version": "v740sp08", 24 | "errorNamespace": "^(Z|Y|LCL_|TY_|LIF_)", 25 | "globalConstants": [], 26 | "globalMacros": [] 27 | }, 28 | "rules": { 29 | "7bit_ascii": true, 30 | "abapdoc": false, 31 | "allowed_object_naming": true, 32 | "allowed_object_types": { 33 | "exclude": [], 34 | "severity": "Error", 35 | "allowed": [] 36 | }, 37 | "ambiguous_statement": true, 38 | "avoid_use": { 39 | "exclude": [], 40 | "severity": "Error", 41 | "define": true, 42 | "endselect": true, 43 | "execSQL": true, 44 | "kernelCall": true, 45 | "communication": true, 46 | "statics": true, 47 | "systemCall": true, 48 | "defaultKey": true, 49 | "break": true, 50 | "describeLines": true 51 | }, 52 | "begin_end_names": true, 53 | "begin_single_include": true, 54 | "call_transaction_authority_check": true, 55 | "chain_mainly_declarations": { 56 | "exclude": [], 57 | "severity": "Error", 58 | "definitions": true, 59 | "write": true, 60 | "move": true, 61 | "refresh": true, 62 | "unassign": true, 63 | "clear": true, 64 | "hide": true, 65 | "free": true, 66 | "include": true, 67 | "check": true 68 | }, 69 | "check_abstract": true, 70 | "check_comments": { 71 | "exclude": [], 72 | "severity": "Error", 73 | "allowEndOfLine": false 74 | }, 75 | "check_ddic": true, 76 | "check_include": true, 77 | "check_no_handler_pragma": true, 78 | "check_subrc": { 79 | "exclude": [], 80 | "severity": "Error", 81 | "openDataset": true, 82 | "authorityCheck": true, 83 | "selectSingle": true, 84 | "updateDatabase": true, 85 | "insertDatabase": true, 86 | "modifyDatabase": true, 87 | "readTable": true, 88 | "assign": true, 89 | "find": true 90 | }, 91 | "check_syntax": true, 92 | "check_text_elements": true, 93 | "check_transformation_exists": true, 94 | "class_attribute_names": { 95 | "exclude": [], 96 | "severity": "Error", 97 | "patternKind": "required", 98 | "ignoreNames": [], 99 | "ignorePatterns": [], 100 | "ignoreExceptions": true, 101 | "ignoreLocal": true, 102 | "ignoreInterfaces": false, 103 | "statics": "^G._.+$", 104 | "instance": "^M._.+$", 105 | "constants": "" 106 | }, 107 | "cloud_types": true, 108 | "colon_missing_space": true, 109 | "commented_code": { 110 | "exclude": [], 111 | "severity": "Error", 112 | "allowIncludeInFugr": true 113 | }, 114 | "constructor_visibility_public": true, 115 | "contains_tab": { 116 | "exclude": [], 117 | "severity": "Error", 118 | "spaces": 1 119 | }, 120 | "cyclomatic_complexity": { 121 | "exclude": [], 122 | "severity": "Error", 123 | "max": 20 124 | }, 125 | "definitions_top": true, 126 | "description_empty": true, 127 | "double_space": { 128 | "exclude": [], 129 | "severity": "Error", 130 | "keywords": true, 131 | "startParen": true, 132 | "endParen": true, 133 | "afterColon": true 134 | }, 135 | "downport": true, 136 | "empty_line_in_statement": { 137 | "exclude": [], 138 | "severity": "Error", 139 | "allowChained": false 140 | }, 141 | "empty_statement": true, 142 | "empty_structure": { 143 | "exclude": [], 144 | "severity": "Error", 145 | "loop": true, 146 | "if": true, 147 | "while": true, 148 | "case": true, 149 | "select": true, 150 | "do": true, 151 | "at": true, 152 | "try": true 153 | }, 154 | "exit_or_check": true, 155 | "exporting": true, 156 | "forbidden_identifier": { 157 | "exclude": [], 158 | "severity": "Error", 159 | "check": [] 160 | }, 161 | "forbidden_pseudo_and_pragma": { 162 | "exclude": [], 163 | "severity": "Error", 164 | "pseudo": [], 165 | "pragmas": [], 166 | "ignoreGlobalClassDefinition": false, 167 | "ignoreGlobalInterface": false 168 | }, 169 | "forbidden_void_type": { 170 | "exclude": [], 171 | "severity": "Error", 172 | "check": [] 173 | }, 174 | "form_tables_obsolete": true, 175 | "fully_type_constants": { 176 | "exclude": [], 177 | "severity": "Error", 178 | "checkData": true 179 | }, 180 | "function_module_recommendations": true, 181 | "functional_writing": { 182 | "exclude": [], 183 | "severity": "Error", 184 | "ignoreExceptions": true 185 | }, 186 | "global_class": true, 187 | "identical_conditions": true, 188 | "identical_contents": true, 189 | "identical_form_names": true, 190 | "if_in_if": true, 191 | "implement_methods": true, 192 | "in_statement_indentation": { 193 | "exclude": [], 194 | "severity": "Error", 195 | "ignoreExceptions": true 196 | }, 197 | "indentation": { 198 | "exclude": [], 199 | "severity": "Error", 200 | "ignoreExceptions": true, 201 | "alignTryCatch": false, 202 | "globalClassSkipFirst": false, 203 | "ignoreGlobalClassDefinition": false, 204 | "ignoreGlobalInterface": false 205 | }, 206 | "inline_data_old_versions": true, 207 | "intf_referencing_clas": true, 208 | "keep_single_parameter_on_one_line": { 209 | "exclude": [], 210 | "severity": "Error", 211 | "length": 120 212 | }, 213 | "keyword_case": { 214 | "exclude": [], 215 | "severity": "Error", 216 | "style": "upper", 217 | "ignoreExceptions": true, 218 | "ignoreLowerClassImplmentationStatement": true, 219 | "ignoreGlobalClassDefinition": false, 220 | "ignoreGlobalInterface": false, 221 | "ignoreFunctionModuleName": false, 222 | "ignoreGlobalClassBoundaries": false, 223 | "ignoreKeywords": [] 224 | }, 225 | "line_break_multiple_parameters": true, 226 | "line_break_style": false, 227 | "line_length": { 228 | "exclude": [], 229 | "severity": "Error", 230 | "length": 120 231 | }, 232 | "line_only_punc": { 233 | "exclude": [], 234 | "severity": "Error", 235 | "ignoreExceptions": true 236 | }, 237 | "local_class_naming": { 238 | "exclude": [], 239 | "severity": "Error", 240 | "patternKind": "required", 241 | "ignoreNames": [], 242 | "ignorePatterns": [], 243 | "local": "^LCL_.+$", 244 | "exception": "^LCX_.+$", 245 | "test": "^LTCL_.+$" 246 | }, 247 | "local_testclass_location": true, 248 | "local_variable_names": false, 249 | "main_file_contents": true, 250 | "many_parenthesis": true, 251 | "max_one_statement": true, 252 | "message_exists": true, 253 | "method_length": { 254 | "exclude": [], 255 | "severity": "Error", 256 | "statements": 100, 257 | "errorWhenEmpty": true, 258 | "ignoreTestClasses": false 259 | }, 260 | "method_overwrites_builtin": true, 261 | "method_parameter_names": false, 262 | "mix_returning": true, 263 | "msag_consistency": true, 264 | "names_no_dash": true, 265 | "nesting": true, 266 | "newline_between_methods": true, 267 | "no_public_attributes": { 268 | "exclude": [], 269 | "severity": "Error", 270 | "allowReadOnly": false 271 | }, 272 | "object_naming": { 273 | "exclude": [], 274 | "severity": "Error", 275 | "patternKind": "required", 276 | "ignoreNames": [], 277 | "ignorePatterns": [], 278 | "clas": "^ZC(L|X)\\_", 279 | "intf": "^ZIF\\_", 280 | "prog": "^Z", 281 | "fugr": "^Z", 282 | "tabl": "^Z", 283 | "ttyp": "^Z", 284 | "dtel": "^Z", 285 | "doma": "^Z", 286 | "msag": "^Z", 287 | "tran": "^Z", 288 | "enqu": "^EZ", 289 | "auth": "^Z", 290 | "pinf": "^Z", 291 | "idoc": "^Z", 292 | "xslt": "^Z", 293 | "ssfo": "^Z", 294 | "ssst": "^Z", 295 | "shlp": "^Z" 296 | }, 297 | "obsolete_statement": { 298 | "exclude": [], 299 | "severity": "Error", 300 | "refresh": true, 301 | "compute": true, 302 | "add": true, 303 | "subtract": true, 304 | "multiply": true, 305 | "move": true, 306 | "divide": true, 307 | "requested": true, 308 | "occurs": true, 309 | "setExtended": true, 310 | "withHeaderLine": true, 311 | "fieldSymbolStructure": true, 312 | "typePools": true, 313 | "load": true 314 | }, 315 | "omit_parameter_name": true, 316 | "omit_receiving": true, 317 | "parser_702_chaining": true, 318 | "parser_error": true, 319 | "parser_missing_space": true, 320 | "prefer_inline": true, 321 | "prefer_is_not": true, 322 | "prefer_returning_to_exporting": true, 323 | "prefer_xsdbool": true, 324 | "preferred_compare_operator": { 325 | "exclude": [], 326 | "severity": "Error", 327 | "badOperators": [ 328 | "EQ", 329 | "><", 330 | "NE", 331 | "GE", 332 | "GT", 333 | "LT", 334 | "LE" 335 | ] 336 | }, 337 | "prefix_is_current_class": { 338 | "exclude": [], 339 | "severity": "Error", 340 | "omitMeInstanceCalls": true 341 | }, 342 | "reduce_string_templates": true, 343 | "release_idoc": true, 344 | "remove_descriptions": { 345 | "exclude": [], 346 | "severity": "Error", 347 | "ignoreExceptions": false, 348 | "ignoreWorkflow": true 349 | }, 350 | "rfc_error_handling": true, 351 | "selection_screen_naming": { 352 | "exclude": [], 353 | "severity": "Error", 354 | "patternKind": "required", 355 | "ignoreNames": [], 356 | "ignorePatterns": [], 357 | "parameter": "^P_.+$", 358 | "selectOption": "^S_.+$" 359 | }, 360 | "sequential_blank": { 361 | "exclude": [], 362 | "severity": "Error", 363 | "lines": 4 364 | }, 365 | "short_case": { 366 | "exclude": [], 367 | "severity": "Error", 368 | "length": 1, 369 | "allow": [] 370 | }, 371 | "sicf_consistency": true, 372 | "space_before_colon": true, 373 | "space_before_dot": { 374 | "exclude": [], 375 | "severity": "Error", 376 | "ignoreGlobalDefinition": true, 377 | "ignoreExceptions": true 378 | }, 379 | "sql_escape_host_variables": true, 380 | "start_at_tab": true, 381 | "superclass_final": true, 382 | "sy_modification": true, 383 | "tabl_enhancement_category": true, 384 | "try_without_catch": true, 385 | "type_form_parameters": true, 386 | "types_naming": { 387 | "exclude": [], 388 | "severity": "Error", 389 | "pattern": "^TY_.+$" 390 | }, 391 | "unknown_types": true, 392 | "unreachable_code": true, 393 | "unused_methods": true, 394 | "unused_types": { 395 | "exclude": [], 396 | "severity": "Error", 397 | "skipNames": [] 398 | }, 399 | "unused_variables": { 400 | "exclude": [], 401 | "severity": "Error", 402 | "skipNames": [] 403 | }, 404 | "use_bool_expression": true, 405 | "use_line_exists": true, 406 | "use_new": true, 407 | "when_others_last": true, 408 | "whitespace_end": true, 409 | "xml_consistency": true 410 | } 411 | } 412 | -------------------------------------------------------------------------------- /abaplint_downport.json: -------------------------------------------------------------------------------- 1 | { 2 | "global": { 3 | "files": "/downport/**/*.*", 4 | "skipGeneratedGatewayClasses": true, 5 | "skipGeneratedPersistentClasses": true, 6 | "skipGeneratedFunctionGroups": true, 7 | "useApackDependencies": false 8 | }, 9 | "dependencies": [ 10 | { 11 | "url": "https://github.com/open-abap/open-abap", 12 | "folder": "/deps", 13 | "files": "/**/*.*" 14 | } 15 | ], 16 | "syntax": { 17 | "version": "v702", 18 | "errorNamespace": "" 19 | }, 20 | "rules": { 21 | "downport": true, 22 | "check_syntax": true, 23 | "keyword_case": true, 24 | "indentation": true, 25 | "definitions_top": true, 26 | "whitespace_end": true, 27 | "line_break_multiple_parameters": true, 28 | "parser_error": true 29 | } 30 | } -------------------------------------------------------------------------------- /devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "abap-advent-2020-template", 3 | "image": "mcr.microsoft.com/vscode/devcontainers/javascript-node:0-12", 4 | "extensions": ["larshp.vscode-abaplint"], 5 | "postCreateCommand": "npm install" 6 | } -------------------------------------------------------------------------------- /input/day01.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larshp/abap-advent-2020-template/39dd43dee796785bb603ff1a71f79d7c44e14cbd/input/day01.txt -------------------------------------------------------------------------------- /input/day02.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larshp/abap-advent-2020-template/39dd43dee796785bb603ff1a71f79d7c44e14cbd/input/day02.txt -------------------------------------------------------------------------------- /input/day03.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larshp/abap-advent-2020-template/39dd43dee796785bb603ff1a71f79d7c44e14cbd/input/day03.txt -------------------------------------------------------------------------------- /input/day04.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larshp/abap-advent-2020-template/39dd43dee796785bb603ff1a71f79d7c44e14cbd/input/day04.txt -------------------------------------------------------------------------------- /input/day05.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larshp/abap-advent-2020-template/39dd43dee796785bb603ff1a71f79d7c44e14cbd/input/day05.txt -------------------------------------------------------------------------------- /input/day06.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larshp/abap-advent-2020-template/39dd43dee796785bb603ff1a71f79d7c44e14cbd/input/day06.txt -------------------------------------------------------------------------------- /input/day07.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larshp/abap-advent-2020-template/39dd43dee796785bb603ff1a71f79d7c44e14cbd/input/day07.txt -------------------------------------------------------------------------------- /input/day08.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larshp/abap-advent-2020-template/39dd43dee796785bb603ff1a71f79d7c44e14cbd/input/day08.txt -------------------------------------------------------------------------------- /input/day09.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larshp/abap-advent-2020-template/39dd43dee796785bb603ff1a71f79d7c44e14cbd/input/day09.txt -------------------------------------------------------------------------------- /input/day10.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larshp/abap-advent-2020-template/39dd43dee796785bb603ff1a71f79d7c44e14cbd/input/day10.txt -------------------------------------------------------------------------------- /input/day11.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larshp/abap-advent-2020-template/39dd43dee796785bb603ff1a71f79d7c44e14cbd/input/day11.txt -------------------------------------------------------------------------------- /input/day12.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larshp/abap-advent-2020-template/39dd43dee796785bb603ff1a71f79d7c44e14cbd/input/day12.txt -------------------------------------------------------------------------------- /input/day13.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larshp/abap-advent-2020-template/39dd43dee796785bb603ff1a71f79d7c44e14cbd/input/day13.txt -------------------------------------------------------------------------------- /input/day14.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larshp/abap-advent-2020-template/39dd43dee796785bb603ff1a71f79d7c44e14cbd/input/day14.txt -------------------------------------------------------------------------------- /input/day15.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larshp/abap-advent-2020-template/39dd43dee796785bb603ff1a71f79d7c44e14cbd/input/day15.txt -------------------------------------------------------------------------------- /input/day16.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larshp/abap-advent-2020-template/39dd43dee796785bb603ff1a71f79d7c44e14cbd/input/day16.txt -------------------------------------------------------------------------------- /input/day17.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larshp/abap-advent-2020-template/39dd43dee796785bb603ff1a71f79d7c44e14cbd/input/day17.txt -------------------------------------------------------------------------------- /input/day18.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larshp/abap-advent-2020-template/39dd43dee796785bb603ff1a71f79d7c44e14cbd/input/day18.txt -------------------------------------------------------------------------------- /input/day19.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larshp/abap-advent-2020-template/39dd43dee796785bb603ff1a71f79d7c44e14cbd/input/day19.txt -------------------------------------------------------------------------------- /input/day20.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larshp/abap-advent-2020-template/39dd43dee796785bb603ff1a71f79d7c44e14cbd/input/day20.txt -------------------------------------------------------------------------------- /input/day21.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larshp/abap-advent-2020-template/39dd43dee796785bb603ff1a71f79d7c44e14cbd/input/day21.txt -------------------------------------------------------------------------------- /input/day22.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larshp/abap-advent-2020-template/39dd43dee796785bb603ff1a71f79d7c44e14cbd/input/day22.txt -------------------------------------------------------------------------------- /input/day23.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larshp/abap-advent-2020-template/39dd43dee796785bb603ff1a71f79d7c44e14cbd/input/day23.txt -------------------------------------------------------------------------------- /input/day24.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larshp/abap-advent-2020-template/39dd43dee796785bb603ff1a71f79d7c44e14cbd/input/day24.txt -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "abap-advent-2020-template", 3 | "version": "1.0.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "abap-advent-2020-template", 9 | "version": "1.0.0", 10 | "license": "Unlicense", 11 | "dependencies": { 12 | "@abaplint/cli": "^2.104.6", 13 | "@abaplint/runtime": "^2.7.136", 14 | "@abaplint/transpiler-cli": "^2.7.136" 15 | } 16 | }, 17 | "node_modules/@abaplint/cli": { 18 | "version": "2.104.6", 19 | "resolved": "https://registry.npmjs.org/@abaplint/cli/-/cli-2.104.6.tgz", 20 | "integrity": "sha512-0gHsK9BOPPYctZezRFOyugaCd4miJcsmX/ZQ6gKZNcowgBxEp0Dc8y3q6EqCSdLDGPkX0ZYBptgfsdccYCuBtA==", 21 | "bin": { 22 | "abaplint": "abaplint" 23 | }, 24 | "engines": { 25 | "node": ">=12.0.0" 26 | }, 27 | "funding": { 28 | "url": "https://github.com/sponsors/larshp" 29 | } 30 | }, 31 | "node_modules/@abaplint/runtime": { 32 | "version": "2.7.136", 33 | "resolved": "https://registry.npmjs.org/@abaplint/runtime/-/runtime-2.7.136.tgz", 34 | "integrity": "sha512-w8//A4ee3/zrqGft3Mckr7KyqtwMOdIPobfoCEzqTpL2wziGlgtp9GHoMZX1e/x3EtbiLWwxfJCGHvERag59ig==", 35 | "dependencies": { 36 | "temporal-polyfill": "^0.1.1" 37 | }, 38 | "funding": { 39 | "url": "https://github.com/sponsors/larshp" 40 | } 41 | }, 42 | "node_modules/@abaplint/transpiler-cli": { 43 | "version": "2.7.136", 44 | "resolved": "https://registry.npmjs.org/@abaplint/transpiler-cli/-/transpiler-cli-2.7.136.tgz", 45 | "integrity": "sha512-baVz9h7zij90+T5fxCN3aHVxQh0Up2+ICybTakleZLDSMgRzkpq8LQ+lmNRK44suAadrc74WDvWJ7OODlcJnyA==", 46 | "bin": { 47 | "abap_transpile": "abap_transpile" 48 | }, 49 | "funding": { 50 | "url": "https://github.com/sponsors/larshp" 51 | } 52 | }, 53 | "node_modules/temporal-polyfill": { 54 | "version": "0.1.1", 55 | "resolved": "https://registry.npmjs.org/temporal-polyfill/-/temporal-polyfill-0.1.1.tgz", 56 | "integrity": "sha512-/5e4EVRA0wBI/bEhWLirSjwUg1lELhQyTXxw9zNbVhqjKvI9BLczs+3wtsoD9sn3HN2ImAMW5XJQwAiXgWT+GA==", 57 | "dependencies": { 58 | "temporal-spec": "~0.1.0" 59 | } 60 | }, 61 | "node_modules/temporal-spec": { 62 | "version": "0.1.0", 63 | "resolved": "https://registry.npmjs.org/temporal-spec/-/temporal-spec-0.1.0.tgz", 64 | "integrity": "sha512-sMNggMeS6trCgMQuudgFHhX1gtBK3e+AT1zGrMsFYG1wlqtRT5E9rcvm3I1iNlvHpJX/3DO6L4qtWAuEl/T04Q==" 65 | } 66 | }, 67 | "dependencies": { 68 | "@abaplint/cli": { 69 | "version": "2.104.6", 70 | "resolved": "https://registry.npmjs.org/@abaplint/cli/-/cli-2.104.6.tgz", 71 | "integrity": "sha512-0gHsK9BOPPYctZezRFOyugaCd4miJcsmX/ZQ6gKZNcowgBxEp0Dc8y3q6EqCSdLDGPkX0ZYBptgfsdccYCuBtA==" 72 | }, 73 | "@abaplint/runtime": { 74 | "version": "2.7.136", 75 | "resolved": "https://registry.npmjs.org/@abaplint/runtime/-/runtime-2.7.136.tgz", 76 | "integrity": "sha512-w8//A4ee3/zrqGft3Mckr7KyqtwMOdIPobfoCEzqTpL2wziGlgtp9GHoMZX1e/x3EtbiLWwxfJCGHvERag59ig==", 77 | "requires": { 78 | "temporal-polyfill": "^0.1.1" 79 | } 80 | }, 81 | "@abaplint/transpiler-cli": { 82 | "version": "2.7.136", 83 | "resolved": "https://registry.npmjs.org/@abaplint/transpiler-cli/-/transpiler-cli-2.7.136.tgz", 84 | "integrity": "sha512-baVz9h7zij90+T5fxCN3aHVxQh0Up2+ICybTakleZLDSMgRzkpq8LQ+lmNRK44suAadrc74WDvWJ7OODlcJnyA==" 85 | }, 86 | "temporal-polyfill": { 87 | "version": "0.1.1", 88 | "resolved": "https://registry.npmjs.org/temporal-polyfill/-/temporal-polyfill-0.1.1.tgz", 89 | "integrity": "sha512-/5e4EVRA0wBI/bEhWLirSjwUg1lELhQyTXxw9zNbVhqjKvI9BLczs+3wtsoD9sn3HN2ImAMW5XJQwAiXgWT+GA==", 90 | "requires": { 91 | "temporal-spec": "~0.1.0" 92 | } 93 | }, 94 | "temporal-spec": { 95 | "version": "0.1.0", 96 | "resolved": "https://registry.npmjs.org/temporal-spec/-/temporal-spec-0.1.0.tgz", 97 | "integrity": "sha512-sMNggMeS6trCgMQuudgFHhX1gtBK3e+AT1zGrMsFYG1wlqtRT5E9rcvm3I1iNlvHpJX/3DO6L4qtWAuEl/T04Q==" 98 | } 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "abap-advent-2020-template", 3 | "private": true, 4 | "version": "1.0.0", 5 | "description": "Advent of Code 2020 - ABAP template", 6 | "scripts": { 7 | "downport": "rm -rf downport && cp src -r downport && abaplint --fix abaplint_downport.json", 8 | "unit": "rm -rf output && abap_transpile && echo RUNNING && node output/index.mjs", 9 | "lint": "abaplint", 10 | "rename": "abaplint --rename && rm -rf src && cp -r renamed/src . && abaplint --fix", 11 | "test": "npm run lint && npm run downport && npm run unit", 12 | "input": "node run.mjs" 13 | }, 14 | "author": "", 15 | "license": "Unlicense", 16 | "dependencies": { 17 | "@abaplint/cli": "^2.104.6", 18 | "@abaplint/runtime": "^2.7.136", 19 | "@abaplint/transpiler-cli": "^2.7.136" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /run.mjs: -------------------------------------------------------------------------------- 1 | import fs from "fs"; 2 | import path from "path"; 3 | import { ABAP } from "@abaplint/runtime"; 4 | 5 | async function run() { 6 | const day = process.argv[2]; 7 | console.log("# Day " + day); 8 | 9 | const files = fs 10 | .readdirSync("output") 11 | .filter((n) => n.includes("day" + day) && n.endsWith(".clas.mjs")); 12 | if (files.length !== 1) { 13 | throw "Class not found for this day"; 14 | } 15 | 16 | const abap = new ABAP(); 17 | global.abap = abap; 18 | const clas = await import("." + path.sep + "output" + path.sep + files[0]); 19 | 20 | const inputFile = "." + path.sep + "input" + path.sep + "day" + day + ".txt"; 21 | const input = fs.readFileSync(inputFile).toString(); 22 | 23 | const className = Object.keys(clas)[0]; 24 | const instance = new clas[className](); 25 | const methodName = Object.getOwnPropertyNames( 26 | clas[className].prototype 27 | ).filter((m) => m.endsWith("$solve"))[0]; 28 | console.log("Class: " + className.toUpperCase()); 29 | console.log("Method: " + methodName.toUpperCase()); 30 | console.log("Input: " + inputFile); 31 | 32 | const result = await instance[methodName]({ input: input }); 33 | const output = abap.console.get(); 34 | if (output && output !== "") { 35 | console.dir(output); 36 | } 37 | 38 | console.log("\nResult:"); 39 | console.log(result); 40 | } 41 | 42 | run() 43 | .then(() => { 44 | process.exit(); 45 | }) 46 | .catch((err) => { 47 | console.log(err); 48 | process.exit(1); 49 | }); 50 | -------------------------------------------------------------------------------- /src/day01/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Advent of Code 2020 - Day 01 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/day01/zcl_advent2020_day01_rename.clas.abap: -------------------------------------------------------------------------------- 1 | CLASS zcl_advent2020_day01_rename DEFINITION 2 | PUBLIC 3 | FINAL 4 | CREATE PUBLIC . 5 | 6 | PUBLIC SECTION. 7 | 8 | INTERFACES zif_advent2020_rename . 9 | PROTECTED SECTION. 10 | PRIVATE SECTION. 11 | ENDCLASS. 12 | 13 | 14 | 15 | CLASS ZCL_ADVENT2020_DAY01_RENAME IMPLEMENTATION. 16 | 17 | 18 | METHOD zif_advent2020_rename~solve. 19 | 20 | output = 'todo'. 21 | 22 | ENDMETHOD. 23 | ENDCLASS. 24 | -------------------------------------------------------------------------------- /src/day01/zcl_advent2020_day01_rename.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_ADVENT2020_DAY01_RENAME 7 | E 8 | Advent of Code - Day 01 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/day02/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Advent of Code 2020 - Day 02 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/day02/zcl_advent2020_day02_rename.clas.abap: -------------------------------------------------------------------------------- 1 | CLASS zcl_advent2020_day02_rename DEFINITION 2 | PUBLIC 3 | FINAL 4 | CREATE PUBLIC . 5 | 6 | PUBLIC SECTION. 7 | 8 | INTERFACES zif_advent2020_rename . 9 | PROTECTED SECTION. 10 | PRIVATE SECTION. 11 | ENDCLASS. 12 | 13 | 14 | 15 | CLASS ZCL_ADVENT2020_DAY02_RENAME IMPLEMENTATION. 16 | 17 | 18 | METHOD zif_advent2020_rename~solve. 19 | 20 | output = 'todo'. 21 | 22 | ENDMETHOD. 23 | ENDCLASS. 24 | -------------------------------------------------------------------------------- /src/day02/zcl_advent2020_day02_rename.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_ADVENT2020_DAY02_RENAME 7 | E 8 | Advent of Code - Day 02 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/day03/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Advent of Code 2020 - Day 03 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/day03/zcl_advent2020_day03_rename.clas.abap: -------------------------------------------------------------------------------- 1 | CLASS zcl_advent2020_day03_rename DEFINITION 2 | PUBLIC 3 | FINAL 4 | CREATE PUBLIC . 5 | 6 | PUBLIC SECTION. 7 | 8 | INTERFACES zif_advent2020_rename . 9 | PROTECTED SECTION. 10 | PRIVATE SECTION. 11 | ENDCLASS. 12 | 13 | 14 | 15 | CLASS ZCL_ADVENT2020_DAY03_RENAME IMPLEMENTATION. 16 | 17 | 18 | METHOD zif_advent2020_rename~solve. 19 | 20 | output = 'todo'. 21 | 22 | ENDMETHOD. 23 | ENDCLASS. 24 | -------------------------------------------------------------------------------- /src/day03/zcl_advent2020_day03_rename.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_ADVENT2020_DAY03_RENAME 7 | E 8 | Advent of Code - Day 03 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/day04/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Advent of Code 2020 - Day 04 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/day04/zcl_advent2020_day04_rename.clas.abap: -------------------------------------------------------------------------------- 1 | CLASS zcl_advent2020_day04_rename DEFINITION 2 | PUBLIC 3 | FINAL 4 | CREATE PUBLIC . 5 | 6 | PUBLIC SECTION. 7 | 8 | INTERFACES zif_advent2020_rename . 9 | PROTECTED SECTION. 10 | PRIVATE SECTION. 11 | ENDCLASS. 12 | 13 | 14 | 15 | CLASS ZCL_ADVENT2020_DAY04_RENAME IMPLEMENTATION. 16 | 17 | 18 | METHOD zif_advent2020_rename~solve. 19 | 20 | output = 'todo'. 21 | 22 | ENDMETHOD. 23 | ENDCLASS. 24 | -------------------------------------------------------------------------------- /src/day04/zcl_advent2020_day04_rename.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_ADVENT2020_DAY04_RENAME 7 | E 8 | Advent of Code - Day 04 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/day05/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Advent of Code 2020 - Day 05 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/day05/zcl_advent2020_day05_rename.clas.abap: -------------------------------------------------------------------------------- 1 | CLASS zcl_advent2020_day05_rename DEFINITION 2 | PUBLIC 3 | FINAL 4 | CREATE PUBLIC . 5 | 6 | PUBLIC SECTION. 7 | 8 | INTERFACES zif_advent2020_rename . 9 | PROTECTED SECTION. 10 | PRIVATE SECTION. 11 | ENDCLASS. 12 | 13 | 14 | 15 | CLASS ZCL_ADVENT2020_DAY05_RENAME IMPLEMENTATION. 16 | 17 | 18 | METHOD zif_advent2020_rename~solve. 19 | 20 | output = 'todo'. 21 | 22 | ENDMETHOD. 23 | ENDCLASS. 24 | -------------------------------------------------------------------------------- /src/day05/zcl_advent2020_day05_rename.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_ADVENT2020_DAY05_RENAME 7 | E 8 | Advent of Code - Day 05 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/day06/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Advent of Code 2020 - Day 06 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/day06/zcl_advent2020_day06_rename.clas.abap: -------------------------------------------------------------------------------- 1 | CLASS zcl_advent2020_day06_rename DEFINITION 2 | PUBLIC 3 | FINAL 4 | CREATE PUBLIC . 5 | 6 | PUBLIC SECTION. 7 | 8 | INTERFACES zif_advent2020_rename . 9 | PROTECTED SECTION. 10 | PRIVATE SECTION. 11 | ENDCLASS. 12 | 13 | 14 | 15 | CLASS ZCL_ADVENT2020_DAY06_RENAME IMPLEMENTATION. 16 | 17 | 18 | METHOD zif_advent2020_rename~solve. 19 | 20 | output = 'todo'. 21 | 22 | ENDMETHOD. 23 | ENDCLASS. 24 | -------------------------------------------------------------------------------- /src/day06/zcl_advent2020_day06_rename.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_ADVENT2020_DAY06_RENAME 7 | E 8 | Advent of Code - Day 06 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/day07/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Advent of Code 2020 - Day 07 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/day07/zcl_advent2020_day07_rename.clas.abap: -------------------------------------------------------------------------------- 1 | CLASS zcl_advent2020_day07_rename DEFINITION 2 | PUBLIC 3 | FINAL 4 | CREATE PUBLIC . 5 | 6 | PUBLIC SECTION. 7 | 8 | INTERFACES zif_advent2020_rename . 9 | PROTECTED SECTION. 10 | PRIVATE SECTION. 11 | ENDCLASS. 12 | 13 | 14 | 15 | CLASS ZCL_ADVENT2020_DAY07_RENAME IMPLEMENTATION. 16 | 17 | 18 | METHOD zif_advent2020_rename~solve. 19 | 20 | output = 'todo'. 21 | 22 | ENDMETHOD. 23 | ENDCLASS. 24 | -------------------------------------------------------------------------------- /src/day07/zcl_advent2020_day07_rename.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_ADVENT2020_DAY07_RENAME 7 | E 8 | Advent of Code - Day 07 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/day08/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Advent of Code 2020 - Day 08 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/day08/zcl_advent2020_day08_rename.clas.abap: -------------------------------------------------------------------------------- 1 | CLASS zcl_advent2020_day08_rename DEFINITION 2 | PUBLIC 3 | FINAL 4 | CREATE PUBLIC . 5 | 6 | PUBLIC SECTION. 7 | 8 | INTERFACES zif_advent2020_rename . 9 | PROTECTED SECTION. 10 | PRIVATE SECTION. 11 | ENDCLASS. 12 | 13 | 14 | 15 | CLASS ZCL_ADVENT2020_DAY08_RENAME IMPLEMENTATION. 16 | 17 | 18 | METHOD zif_advent2020_rename~solve. 19 | 20 | output = 'todo'. 21 | 22 | ENDMETHOD. 23 | ENDCLASS. 24 | -------------------------------------------------------------------------------- /src/day08/zcl_advent2020_day08_rename.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_ADVENT2020_DAY08_RENAME 7 | E 8 | Advent of Code - Day 08 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/day09/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Advent of Code 2020 - Day 09 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/day09/zcl_advent2020_day09_rename.clas.abap: -------------------------------------------------------------------------------- 1 | CLASS zcl_advent2020_day09_rename DEFINITION 2 | PUBLIC 3 | FINAL 4 | CREATE PUBLIC . 5 | 6 | PUBLIC SECTION. 7 | 8 | INTERFACES zif_advent2020_rename . 9 | PROTECTED SECTION. 10 | PRIVATE SECTION. 11 | ENDCLASS. 12 | 13 | 14 | 15 | CLASS ZCL_ADVENT2020_DAY09_RENAME IMPLEMENTATION. 16 | 17 | 18 | METHOD zif_advent2020_rename~solve. 19 | 20 | output = 'todo'. 21 | 22 | ENDMETHOD. 23 | ENDCLASS. 24 | -------------------------------------------------------------------------------- /src/day09/zcl_advent2020_day09_rename.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_ADVENT2020_DAY09_RENAME 7 | E 8 | Advent of Code - Day 09 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/day10/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Advent of Code 2020 - Day 10 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/day10/zcl_advent2020_day10_rename.clas.abap: -------------------------------------------------------------------------------- 1 | CLASS zcl_advent2020_day10_rename DEFINITION 2 | PUBLIC 3 | FINAL 4 | CREATE PUBLIC . 5 | 6 | PUBLIC SECTION. 7 | 8 | INTERFACES zif_advent2020_rename . 9 | PROTECTED SECTION. 10 | PRIVATE SECTION. 11 | ENDCLASS. 12 | 13 | 14 | 15 | CLASS ZCL_ADVENT2020_DAY10_RENAME IMPLEMENTATION. 16 | 17 | 18 | METHOD zif_advent2020_rename~solve. 19 | 20 | output = 'todo'. 21 | 22 | ENDMETHOD. 23 | ENDCLASS. 24 | -------------------------------------------------------------------------------- /src/day10/zcl_advent2020_day10_rename.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_ADVENT2020_DAY10_RENAME 7 | E 8 | Advent of Code - Day 10 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/day11/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Advent of Code 2020 - Day 11 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/day11/zcl_advent2020_day11_rename.clas.abap: -------------------------------------------------------------------------------- 1 | CLASS zcl_advent2020_day11_rename DEFINITION 2 | PUBLIC 3 | FINAL 4 | CREATE PUBLIC . 5 | 6 | PUBLIC SECTION. 7 | 8 | INTERFACES zif_advent2020_rename . 9 | PROTECTED SECTION. 10 | PRIVATE SECTION. 11 | ENDCLASS. 12 | 13 | 14 | 15 | CLASS ZCL_ADVENT2020_DAY11_RENAME IMPLEMENTATION. 16 | 17 | 18 | METHOD zif_advent2020_rename~solve. 19 | 20 | output = 'todo'. 21 | 22 | ENDMETHOD. 23 | ENDCLASS. 24 | -------------------------------------------------------------------------------- /src/day11/zcl_advent2020_day11_rename.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_ADVENT2020_DAY11_RENAME 7 | E 8 | Advent of Code - Day 11 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/day12/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Advent of Code 2020 - Day 12 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/day12/zcl_advent2020_day12_rename.clas.abap: -------------------------------------------------------------------------------- 1 | CLASS zcl_advent2020_day12_rename DEFINITION 2 | PUBLIC 3 | FINAL 4 | CREATE PUBLIC . 5 | 6 | PUBLIC SECTION. 7 | 8 | INTERFACES zif_advent2020_rename . 9 | PROTECTED SECTION. 10 | PRIVATE SECTION. 11 | ENDCLASS. 12 | 13 | 14 | 15 | CLASS ZCL_ADVENT2020_DAY12_RENAME IMPLEMENTATION. 16 | 17 | 18 | METHOD zif_advent2020_rename~solve. 19 | 20 | output = 'todo'. 21 | 22 | ENDMETHOD. 23 | ENDCLASS. 24 | -------------------------------------------------------------------------------- /src/day12/zcl_advent2020_day12_rename.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_ADVENT2020_DAY12_RENAME 7 | E 8 | Advent of Code - Day 12 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/day13/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Advent of Code 2020 - Day 13 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/day13/zcl_advent2020_day13_rename.clas.abap: -------------------------------------------------------------------------------- 1 | CLASS zcl_advent2020_day13_rename DEFINITION 2 | PUBLIC 3 | FINAL 4 | CREATE PUBLIC . 5 | 6 | PUBLIC SECTION. 7 | 8 | INTERFACES zif_advent2020_rename . 9 | PROTECTED SECTION. 10 | PRIVATE SECTION. 11 | ENDCLASS. 12 | 13 | 14 | 15 | CLASS ZCL_ADVENT2020_DAY13_RENAME IMPLEMENTATION. 16 | 17 | 18 | METHOD zif_advent2020_rename~solve. 19 | 20 | output = 'todo'. 21 | 22 | ENDMETHOD. 23 | ENDCLASS. 24 | -------------------------------------------------------------------------------- /src/day13/zcl_advent2020_day13_rename.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_ADVENT2020_DAY13_RENAME 7 | E 8 | Advent of Code - Day 13 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/day14/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Advent of Code 2020 - Day 14 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/day14/zcl_advent2020_day14_rename.clas.abap: -------------------------------------------------------------------------------- 1 | CLASS zcl_advent2020_day14_rename DEFINITION 2 | PUBLIC 3 | FINAL 4 | CREATE PUBLIC . 5 | 6 | PUBLIC SECTION. 7 | 8 | INTERFACES zif_advent2020_rename . 9 | PROTECTED SECTION. 10 | PRIVATE SECTION. 11 | ENDCLASS. 12 | 13 | 14 | 15 | CLASS ZCL_ADVENT2020_DAY14_RENAME IMPLEMENTATION. 16 | 17 | 18 | METHOD zif_advent2020_rename~solve. 19 | 20 | output = 'todo'. 21 | 22 | ENDMETHOD. 23 | ENDCLASS. 24 | -------------------------------------------------------------------------------- /src/day14/zcl_advent2020_day14_rename.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_ADVENT2020_DAY14_RENAME 7 | E 8 | Advent of Code - Day 14 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/day15/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Advent of Code 2020 - Day 15 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/day15/zcl_advent2020_day15_rename.clas.abap: -------------------------------------------------------------------------------- 1 | CLASS zcl_advent2020_day15_rename DEFINITION 2 | PUBLIC 3 | FINAL 4 | CREATE PUBLIC . 5 | 6 | PUBLIC SECTION. 7 | 8 | INTERFACES zif_advent2020_rename . 9 | PROTECTED SECTION. 10 | PRIVATE SECTION. 11 | ENDCLASS. 12 | 13 | 14 | 15 | CLASS ZCL_ADVENT2020_DAY15_RENAME IMPLEMENTATION. 16 | 17 | 18 | METHOD zif_advent2020_rename~solve. 19 | 20 | output = 'todo'. 21 | 22 | ENDMETHOD. 23 | ENDCLASS. 24 | -------------------------------------------------------------------------------- /src/day15/zcl_advent2020_day15_rename.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_ADVENT2020_DAY15_RENAME 7 | E 8 | Advent of Code - Day 15 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/day16/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Advent of Code 2020 - Day 16 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/day16/zcl_advent2020_day16_rename.clas.abap: -------------------------------------------------------------------------------- 1 | CLASS zcl_advent2020_day16_rename DEFINITION 2 | PUBLIC 3 | FINAL 4 | CREATE PUBLIC . 5 | 6 | PUBLIC SECTION. 7 | 8 | INTERFACES zif_advent2020_rename . 9 | PROTECTED SECTION. 10 | PRIVATE SECTION. 11 | ENDCLASS. 12 | 13 | 14 | 15 | CLASS ZCL_ADVENT2020_DAY16_RENAME IMPLEMENTATION. 16 | 17 | 18 | METHOD zif_advent2020_rename~solve. 19 | 20 | output = 'todo'. 21 | 22 | ENDMETHOD. 23 | ENDCLASS. 24 | -------------------------------------------------------------------------------- /src/day16/zcl_advent2020_day16_rename.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_ADVENT2020_DAY16_RENAME 7 | E 8 | Advent of Code - Day 16 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/day17/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Advent of Code 2020 - Day 17 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/day17/zcl_advent2020_day17_rename.clas.abap: -------------------------------------------------------------------------------- 1 | CLASS zcl_advent2020_day17_rename DEFINITION 2 | PUBLIC 3 | FINAL 4 | CREATE PUBLIC . 5 | 6 | PUBLIC SECTION. 7 | 8 | INTERFACES zif_advent2020_rename . 9 | PROTECTED SECTION. 10 | PRIVATE SECTION. 11 | ENDCLASS. 12 | 13 | 14 | 15 | CLASS ZCL_ADVENT2020_DAY17_RENAME IMPLEMENTATION. 16 | 17 | 18 | METHOD zif_advent2020_rename~solve. 19 | 20 | output = 'todo'. 21 | 22 | ENDMETHOD. 23 | ENDCLASS. 24 | -------------------------------------------------------------------------------- /src/day17/zcl_advent2020_day17_rename.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_ADVENT2020_DAY17_RENAME 7 | E 8 | Advent of Code - Day 17 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/day18/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Advent of Code 2020 - Day 18 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/day18/zcl_advent2020_day18_rename.clas.abap: -------------------------------------------------------------------------------- 1 | CLASS zcl_advent2020_day18_rename DEFINITION 2 | PUBLIC 3 | FINAL 4 | CREATE PUBLIC . 5 | 6 | PUBLIC SECTION. 7 | 8 | INTERFACES zif_advent2020_rename . 9 | PROTECTED SECTION. 10 | PRIVATE SECTION. 11 | ENDCLASS. 12 | 13 | 14 | 15 | CLASS ZCL_ADVENT2020_DAY18_RENAME IMPLEMENTATION. 16 | 17 | 18 | METHOD zif_advent2020_rename~solve. 19 | 20 | output = 'todo'. 21 | 22 | ENDMETHOD. 23 | ENDCLASS. 24 | -------------------------------------------------------------------------------- /src/day18/zcl_advent2020_day18_rename.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_ADVENT2020_DAY18_RENAME 7 | E 8 | Advent of Code - Day 18 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/day19/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Advent of Code 2020 - Day 19 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/day19/zcl_advent2020_day19_rename.clas.abap: -------------------------------------------------------------------------------- 1 | CLASS zcl_advent2020_day19_rename DEFINITION 2 | PUBLIC 3 | FINAL 4 | CREATE PUBLIC . 5 | 6 | PUBLIC SECTION. 7 | 8 | INTERFACES zif_advent2020_rename . 9 | PROTECTED SECTION. 10 | PRIVATE SECTION. 11 | ENDCLASS. 12 | 13 | 14 | 15 | CLASS ZCL_ADVENT2020_DAY19_RENAME IMPLEMENTATION. 16 | 17 | 18 | METHOD zif_advent2020_rename~solve. 19 | 20 | output = 'todo'. 21 | 22 | ENDMETHOD. 23 | ENDCLASS. 24 | -------------------------------------------------------------------------------- /src/day19/zcl_advent2020_day19_rename.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_ADVENT2020_DAY19_RENAME 7 | E 8 | Advent of Code - Day 19 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/day20/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Advent of Code 2020 - Day 20 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/day20/zcl_advent2020_day20_rename.clas.abap: -------------------------------------------------------------------------------- 1 | CLASS zcl_advent2020_day20_rename DEFINITION 2 | PUBLIC 3 | FINAL 4 | CREATE PUBLIC . 5 | 6 | PUBLIC SECTION. 7 | 8 | INTERFACES zif_advent2020_rename . 9 | PROTECTED SECTION. 10 | PRIVATE SECTION. 11 | ENDCLASS. 12 | 13 | 14 | 15 | CLASS ZCL_ADVENT2020_DAY20_RENAME IMPLEMENTATION. 16 | 17 | 18 | METHOD zif_advent2020_rename~solve. 19 | 20 | output = 'todo'. 21 | 22 | ENDMETHOD. 23 | ENDCLASS. 24 | -------------------------------------------------------------------------------- /src/day20/zcl_advent2020_day20_rename.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_ADVENT2020_DAY20_RENAME 7 | E 8 | Advent of Code - Day 20 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/day21/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Advent of Code 2020 - Day 21 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/day21/zcl_advent2020_day21_rename.clas.abap: -------------------------------------------------------------------------------- 1 | CLASS zcl_advent2020_day21_rename DEFINITION 2 | PUBLIC 3 | FINAL 4 | CREATE PUBLIC . 5 | 6 | PUBLIC SECTION. 7 | 8 | INTERFACES zif_advent2020_rename . 9 | PROTECTED SECTION. 10 | PRIVATE SECTION. 11 | ENDCLASS. 12 | 13 | 14 | 15 | CLASS ZCL_ADVENT2020_DAY21_RENAME IMPLEMENTATION. 16 | 17 | 18 | METHOD zif_advent2020_rename~solve. 19 | 20 | output = 'todo'. 21 | 22 | ENDMETHOD. 23 | ENDCLASS. 24 | -------------------------------------------------------------------------------- /src/day21/zcl_advent2020_day21_rename.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_ADVENT2020_DAY21_RENAME 7 | E 8 | Advent of Code - Day 21 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/day22/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Advent of Code 2020 - Day 22 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/day22/zcl_advent2020_day22_rename.clas.abap: -------------------------------------------------------------------------------- 1 | CLASS zcl_advent2020_day22_rename DEFINITION 2 | PUBLIC 3 | FINAL 4 | CREATE PUBLIC . 5 | 6 | PUBLIC SECTION. 7 | 8 | INTERFACES zif_advent2020_rename . 9 | PROTECTED SECTION. 10 | PRIVATE SECTION. 11 | ENDCLASS. 12 | 13 | 14 | 15 | CLASS ZCL_ADVENT2020_DAY22_RENAME IMPLEMENTATION. 16 | 17 | 18 | METHOD zif_advent2020_rename~solve. 19 | 20 | output = 'todo'. 21 | 22 | ENDMETHOD. 23 | ENDCLASS. 24 | -------------------------------------------------------------------------------- /src/day22/zcl_advent2020_day22_rename.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_ADVENT2020_DAY22_RENAME 7 | E 8 | Advent of Code - Day 22 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/day23/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Advent of Code 2020 - Day 23 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/day23/zcl_advent2020_day23_rename.clas.abap: -------------------------------------------------------------------------------- 1 | CLASS zcl_advent2020_day23_rename DEFINITION 2 | PUBLIC 3 | FINAL 4 | CREATE PUBLIC . 5 | 6 | PUBLIC SECTION. 7 | 8 | INTERFACES zif_advent2020_rename . 9 | PROTECTED SECTION. 10 | PRIVATE SECTION. 11 | ENDCLASS. 12 | 13 | 14 | 15 | CLASS ZCL_ADVENT2020_DAY23_RENAME IMPLEMENTATION. 16 | 17 | 18 | METHOD zif_advent2020_rename~solve. 19 | 20 | output = 'todo'. 21 | 22 | ENDMETHOD. 23 | ENDCLASS. 24 | -------------------------------------------------------------------------------- /src/day23/zcl_advent2020_day23_rename.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_ADVENT2020_DAY23_RENAME 7 | E 8 | Advent of Code - Day 23 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/day24/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Advent of Code 2020 - Day 24 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/day24/zcl_advent2020_day24_rename.clas.abap: -------------------------------------------------------------------------------- 1 | CLASS zcl_advent2020_day24_rename DEFINITION 2 | PUBLIC 3 | FINAL 4 | CREATE PUBLIC . 5 | 6 | PUBLIC SECTION. 7 | 8 | INTERFACES zif_advent2020_rename . 9 | PROTECTED SECTION. 10 | PRIVATE SECTION. 11 | ENDCLASS. 12 | 13 | 14 | 15 | CLASS ZCL_ADVENT2020_DAY24_RENAME IMPLEMENTATION. 16 | 17 | 18 | METHOD zif_advent2020_rename~solve. 19 | 20 | output = 'todo'. 21 | 22 | ENDMETHOD. 23 | ENDCLASS. 24 | -------------------------------------------------------------------------------- /src/day24/zcl_advent2020_day24_rename.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_ADVENT2020_DAY24_RENAME 7 | E 8 | Advent of Code - Day 24 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Advent of Code 2020 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/zif_advent2020_rename.intf.abap: -------------------------------------------------------------------------------- 1 | INTERFACE zif_advent2020_rename 2 | PUBLIC . 3 | 4 | 5 | METHODS solve 6 | IMPORTING 7 | !input TYPE string 8 | RETURNING 9 | VALUE(output) TYPE string . 10 | ENDINTERFACE. 11 | -------------------------------------------------------------------------------- /src/zif_advent2020_rename.intf.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZIF_ADVENT2020_RENAME 7 | E 8 | Advent of Code - 2020 9 | 2 10 | 1 11 | X 12 | 13 | 14 | 15 | 16 | --------------------------------------------------------------------------------