⁠
kyle wood: Create obfuscation-explorer project
This is a separate plugin to support all different Java mapping
formats. This plugin will provide a extension points for the Minecraft
Development plugin to hook into and provide mapping information. It
will also provide a generic settings page to allow users to configure
their own mappings for the project.
This is a separate plugin to support all different Java mapping
formats. This plugin will provide a extension points for the Minecraft
Development plugin to hook into and provide mapping information. It
will also provide a generic settings page to allow users to configure
their own mappings for the project.
- /*
- * Minecraft Development for IntelliJ
- *
- * https://mcdev.io/
- *
- * Copyright (C) 2024 minecraft-dev
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, version 3.0 only.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
- {
- parserClass="io.mcdev.obfex.formats.jam.gen.JamParser"
- extends="com.intellij.extapi.psi.ASTWrapperPsiElement"
- psiClassPrefix="Jam"
- psiImplClassSuffix="Impl"
- psiPackage="io.mcdev.obfex.formats.jam.gen.psi"
- psiImplPackage="io.mcdev.obfex.formats.jam.gen.psi.impl"
- elementTypeHolderClass="io.mcdev.obfex.formats.jam.gen.psi.JamTypes"
- elementTypeClass="io.mcdev.obfex.formats.jam.lang.psi.JamElementType"
- tokenTypeClass="io.mcdev.obfex.formats.jam.lang.psi.JamTokenType"
- tokens=[
- COMMENT="regexp:\s*#.*"
- ]
- // do not record error reporting information in recover rules
- consumeTokenMethod(".*_recover")="consumeTokenFast"
- }
- srg_file ::= line*
- private line ::= !<<eof>> mapping? line_end {pin=2 recoverWhile=line_recover}
- private line_end ::= <<eof>> | CRLF
- private line_recover ::= !(mapping | line_end)
- mapping ::= class_mapping | field_mapping | method_mapping | param_mapping
- class_mapping ::= CLASS_KEY mapping_part mapping_part {
- pin=1
- methods=[
- obfName="/mapping_part[0]"
- deobfName="/mapping_part[1]"
- ]
- }
- field_mapping ::= FIELD_KEY mapping_part mapping_part type_desc mapping_part {
- pin=1
- methods=[
- obfClassName="/mapping_part[0]"
- obfFieldName="/mapping_part[1]"
- obfType="/type_desc"
- deobfName="/mapping_part[2]"
- ]
- }
- method_mapping ::= METHOD_KEY mapping_part mapping_part method_signature mapping_part {
- pin=1
- methods=[
- obfClassName="/mapping_part[0]"
- obfMethodName="/mapping_part[1]"
- obfSignature="/method_signature"
- deobfName="/mapping_part[2]"
- ]
- }
- param_mapping ::= PARAM_KEY mapping_part mapping_part method_signature mapping_part mapping_part {
- pin=1
- methods=[
- obfClassName="/mapping_part[0]"
- obfMethodName="/mapping_part[1]"
- obfSignature="/method_signature"
- parameterIndex="/mapping_part[2]"
- deobfName="/mapping_part[3]"
- ]
- }
- mapping_part ::= PRIMITIVE | identifier | INDEX
- type_desc ::= PRIMITIVE | CLASS_TYPE
- identifier ::= NAME_ELEMENT (SLASH NAME_ELEMENT)* {pin(".*")=1}
- method_signature ::= OPEN_PAREN param_types CLOSE_PAREN return_type {pin=1}
- param_types ::= type_desc*
- return_type ::= type_desc