ignalxy 4 éve
szülő
commit
28ced0497d
28 módosított fájl, 23 hozzáadás és 1350 törlés
  1. 1 0
      .gitignore
  2. 1 1
      .idea/modules.xml
  3. 0 0
      ANTLR.iml
  4. 3 3
      AidlToJson.java
  5. 0 1327
      json/IBluetoothGatt.json
  6. 1 1
      src/main/java/xyz/ignatz/antlr/aidl/gen/Aidl.interp
  7. 0 0
      src/main/java/xyz/ignatz/antlr/aidl/gen/Aidl.tokens
  8. 1 1
      src/main/java/xyz/ignatz/antlr/aidl/gen/AidlBaseListener.java
  9. 1 1
      src/main/java/xyz/ignatz/antlr/aidl/gen/AidlBaseVisitor.java
  10. 0 0
      src/main/java/xyz/ignatz/antlr/aidl/gen/AidlLexer.interp
  11. 2 5
      src/main/java/xyz/ignatz/antlr/aidl/gen/AidlLexer.java
  12. 0 0
      src/main/java/xyz/ignatz/antlr/aidl/gen/AidlLexer.tokens
  13. 1 1
      src/main/java/xyz/ignatz/antlr/aidl/gen/AidlListener.java
  14. 3 3
      src/main/java/xyz/ignatz/antlr/aidl/gen/AidlParser.java
  15. 1 1
      src/main/java/xyz/ignatz/antlr/aidl/gen/AidlVisitor.java
  16. 5 3
      src/main/java/xyz/ignatz/antlr/aidl/tools/AidlLoader.java
  17. 1 1
      src/main/java/xyz/ignatz/tools/MapToJson.java
  18. 0 0
      src/main/resources/example/aidl/AudioPolicyConfig.aidl
  19. 0 0
      src/main/resources/example/aidl/IAccessibilityInteractionConnection.aidl
  20. 0 0
      src/main/resources/example/aidl/IAccessibilityServiceConnection.aidl
  21. 0 0
      src/main/resources/example/aidl/IBluetoothGatt.aidl
  22. 0 0
      src/main/resources/example/aidl/IBluetoothHeadsetClient.aidl
  23. 0 0
      src/main/resources/example/aidl/IConnectionServiceAdapter.aidl
  24. 0 0
      src/main/resources/example/aidl/IFingerprintDaemonCallback.aidl
  25. 1 1
      src/main/resources/example/aidl/INetworkManagementService.aidl
  26. 0 0
      src/main/resources/example/aidl/IOnAppsChangedListener.aidl
  27. 0 0
      src/main/resources/example/aidl/IUserManager.aidl
  28. 1 1
      src/main/resources/grammar/Aidl.g4

+ 1 - 0
.gitignore

@@ -1 +1,2 @@
 /out/
+/.idea/

+ 1 - 1
.idea/modules.xml

@@ -2,7 +2,7 @@
 <project version="4">
   <component name="ProjectModuleManager">
     <modules>
-      <module fileurl="file://$PROJECT_DIR$/ANTLR_AIDL.iml" filepath="$PROJECT_DIR$/ANTLR_AIDL.iml" />
+      <module fileurl="file://$PROJECT_DIR$/ANTLR.iml" filepath="$PROJECT_DIR$/ANTLR.iml" />
     </modules>
   </component>
 </project>

+ 0 - 0
ANTLR_AIDL.iml → ANTLR.iml


+ 3 - 3
AidlToJson.java

@@ -1,11 +1,11 @@
 import java.io.*;
 
-import antlr.aidl.tools.AidlLoader;
+import src.main.java.xyz.ignatz.antlr.aidl.gen.AidlLexer;
+import src.main.java.xyz.ignatz.antlr.aidl.gen.AidlParser;
+import src.main.java.xyz.ignatz.antlr.aidl.tools.AidlLoader;
 import org.antlr.v4.runtime.*;
 import org.antlr.v4.runtime.tree.*;
 
-import antlr.aidl.*;
-
 public class AidlToJson
 {
     public static void main(String[] args)

+ 0 - 1327
json/IBluetoothGatt.json

@@ -1,1327 +0,0 @@
-{
-    "imports": [
-        "android.app.PendingIntent",
-        "android.bluetooth.BluetoothDevice",
-        "android.bluetooth.BluetoothGattService",
-        "android.bluetooth.le.AdvertiseSettings",
-        "android.bluetooth.le.AdvertiseData",
-        "android.bluetooth.le.AdvertisingSetParameters",
-        "android.bluetooth.le.PeriodicAdvertisingParameters",
-        "android.bluetooth.le.ScanFilter",
-        "android.bluetooth.le.ScanResult",
-        "android.bluetooth.le.ScanSettings",
-        "android.bluetooth.le.ResultStorageDescriptor",
-        "android.os.ParcelUuid",
-        "android.os.WorkSource",
-        "android.bluetooth.IBluetoothGattCallback",
-        "android.bluetooth.IBluetoothGattServerCallback",
-        "android.bluetooth.le.IAdvertisingSetCallback",
-        "android.bluetooth.le.IPeriodicAdvertisingCallback",
-        "android.bluetooth.le.IScannerCallback"
-    ],
-    "name": "IBluetoothGatt",
-    "statements": [
-        {
-            "id": "getDevicesMatchingConnectionStates",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "states",
-                    "type": "int[]",
-                    "tid": 0
-                }
-            ],
-            "return": "List<BluetoothDevice>"
-        },
-        {
-            "id": "registerScanner",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "callback",
-                    "type": "IScannerCallback",
-                    "tid": -1
-                },
-                {
-                    "tag": "in",
-                    "id": "workSource",
-                    "type": "WorkSource",
-                    "tid": -1
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "unregisterScanner",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "scannerId",
-                    "type": "int",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "startScan",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "scannerId",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "settings",
-                    "type": "ScanSettings",
-                    "tid": -1
-                },
-                {
-                    "tag": "in",
-                    "id": "filters",
-                    "type": "List<ScanFilter>",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "scanStorages",
-                    "type": "List",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "callingPackage",
-                    "type": "String",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "startScanForIntent",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "intent",
-                    "type": "PendingIntent",
-                    "tid": -1
-                },
-                {
-                    "tag": "in",
-                    "id": "settings",
-                    "type": "ScanSettings",
-                    "tid": -1
-                },
-                {
-                    "tag": "in",
-                    "id": "filters",
-                    "type": "List<ScanFilter>",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "callingPackage",
-                    "type": "String",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "stopScanForIntent",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "intent",
-                    "type": "PendingIntent",
-                    "tid": -1
-                },
-                {
-                    "tag": "in",
-                    "id": "callingPackage",
-                    "type": "String",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "stopScan",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "scannerId",
-                    "type": "int",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "flushPendingBatchResults",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "scannerId",
-                    "type": "int",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "startAdvertisingSet",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "parameters",
-                    "type": "AdvertisingSetParameters",
-                    "tid": -1
-                },
-                {
-                    "tag": "in",
-                    "id": "advertiseData",
-                    "type": "AdvertiseData",
-                    "tid": -1
-                },
-                {
-                    "tag": "in",
-                    "id": "scanResponse",
-                    "type": "AdvertiseData",
-                    "tid": -1
-                },
-                {
-                    "tag": "in",
-                    "id": "periodicParameters",
-                    "type": "PeriodicAdvertisingParameters",
-                    "tid": -1
-                },
-                {
-                    "tag": "in",
-                    "id": "periodicData",
-                    "type": "AdvertiseData",
-                    "tid": -1
-                },
-                {
-                    "tag": "in",
-                    "id": "duration",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "maxExtAdvEvents",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "callback",
-                    "type": "IAdvertisingSetCallback",
-                    "tid": -1
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "stopAdvertisingSet",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "callback",
-                    "type": "IAdvertisingSetCallback",
-                    "tid": -1
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "getOwnAddress",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "advertiserId",
-                    "type": "int",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "enableAdvertisingSet",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "advertiserId",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "enable",
-                    "type": "boolean",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "duration",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "maxExtAdvEvents",
-                    "type": "int",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "setAdvertisingData",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "advertiserId",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "data",
-                    "type": "AdvertiseData",
-                    "tid": -1
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "setScanResponseData",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "advertiserId",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "data",
-                    "type": "AdvertiseData",
-                    "tid": -1
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "setAdvertisingParameters",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "advertiserId",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "parameters",
-                    "type": "AdvertisingSetParameters",
-                    "tid": -1
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "setPeriodicAdvertisingParameters",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "advertiserId",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "parameters",
-                    "type": "PeriodicAdvertisingParameters",
-                    "tid": -1
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "setPeriodicAdvertisingData",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "advertiserId",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "data",
-                    "type": "AdvertiseData",
-                    "tid": -1
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "setPeriodicAdvertisingEnable",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "advertiserId",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "enable",
-                    "type": "boolean",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "registerSync",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "scanResult",
-                    "type": "ScanResult",
-                    "tid": -1
-                },
-                {
-                    "tag": "in",
-                    "id": "skip",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "timeout",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "callback",
-                    "type": "IPeriodicAdvertisingCallback",
-                    "tid": -1
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "unregisterSync",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "callback",
-                    "type": "IPeriodicAdvertisingCallback",
-                    "tid": -1
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "registerClient",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "appId",
-                    "type": "ParcelUuid",
-                    "tid": -1
-                },
-                {
-                    "tag": "in",
-                    "id": "callback",
-                    "type": "IBluetoothGattCallback",
-                    "tid": -1
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "unregisterClient",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "clientIf",
-                    "type": "int",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "clientConnect",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "clientIf",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "address",
-                    "type": "String",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "isDirect",
-                    "type": "boolean",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "transport",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "opportunistic",
-                    "type": "boolean",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "phy",
-                    "type": "int",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "clientDisconnect",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "clientIf",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "address",
-                    "type": "String",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "clientSetPreferredPhy",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "clientIf",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "address",
-                    "type": "String",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "txPhy",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "rxPhy",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "phyOptions",
-                    "type": "int",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "clientReadPhy",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "clientIf",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "address",
-                    "type": "String",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "refreshDevice",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "clientIf",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "address",
-                    "type": "String",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "discoverServices",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "clientIf",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "address",
-                    "type": "String",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "discoverServiceByUuid",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "clientIf",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "address",
-                    "type": "String",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "uuid",
-                    "type": "ParcelUuid",
-                    "tid": -1
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "readCharacteristic",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "clientIf",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "address",
-                    "type": "String",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "handle",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "authReq",
-                    "type": "int",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "readUsingCharacteristicUuid",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "clientIf",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "address",
-                    "type": "String",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "uuid",
-                    "type": "ParcelUuid",
-                    "tid": -1
-                },
-                {
-                    "tag": "in",
-                    "id": "startHandle",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "endHandle",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "authReq",
-                    "type": "int",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "writeCharacteristic",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "clientIf",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "address",
-                    "type": "String",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "handle",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "writeType",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "authReq",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "value",
-                    "type": "byte[]",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "readDescriptor",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "clientIf",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "address",
-                    "type": "String",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "handle",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "authReq",
-                    "type": "int",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "writeDescriptor",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "clientIf",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "address",
-                    "type": "String",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "handle",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "authReq",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "value",
-                    "type": "byte[]",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "registerForNotification",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "clientIf",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "address",
-                    "type": "String",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "handle",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "enable",
-                    "type": "boolean",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "beginReliableWrite",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "clientIf",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "address",
-                    "type": "String",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "endReliableWrite",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "clientIf",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "address",
-                    "type": "String",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "execute",
-                    "type": "boolean",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "readRemoteRssi",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "clientIf",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "address",
-                    "type": "String",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "configureMTU",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "clientIf",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "address",
-                    "type": "String",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "mtu",
-                    "type": "int",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "connectionParameterUpdate",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "clientIf",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "address",
-                    "type": "String",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "connectionPriority",
-                    "type": "int",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "leConnectionUpdate",
-            "type": "method",
-            "params": [
-                {
-                    "id": "clientIf",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "id": "address",
-                    "type": "String",
-                    "tid": 0
-                },
-                {
-                    "id": "minInterval",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "id": "maxInterval",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "id": "slaveLatency",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "id": "supervisionTimeout",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "id": "minConnectionEventLen",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "id": "maxConnectionEventLen",
-                    "type": "int",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "registerServer",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "appId",
-                    "type": "ParcelUuid",
-                    "tid": -1
-                },
-                {
-                    "tag": "in",
-                    "id": "callback",
-                    "type": "IBluetoothGattServerCallback",
-                    "tid": -1
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "unregisterServer",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "serverIf",
-                    "type": "int",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "serverConnect",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "serverIf",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "address",
-                    "type": "String",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "isDirect",
-                    "type": "boolean",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "transport",
-                    "type": "int",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "serverDisconnect",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "serverIf",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "address",
-                    "type": "String",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "serverSetPreferredPhy",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "clientIf",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "address",
-                    "type": "String",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "txPhy",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "rxPhy",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "phyOptions",
-                    "type": "int",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "serverReadPhy",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "clientIf",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "address",
-                    "type": "String",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "addService",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "serverIf",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "service",
-                    "type": "BluetoothGattService",
-                    "tid": -1
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "removeService",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "serverIf",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "handle",
-                    "type": "int",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "clearServices",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "serverIf",
-                    "type": "int",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "sendResponse",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "serverIf",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "address",
-                    "type": "String",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "requestId",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "status",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "offset",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "value",
-                    "type": "byte[]",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "sendNotification",
-            "type": "method",
-            "params": [
-                {
-                    "tag": "in",
-                    "id": "serverIf",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "address",
-                    "type": "String",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "handle",
-                    "type": "int",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "confirm",
-                    "type": "boolean",
-                    "tid": 0
-                },
-                {
-                    "tag": "in",
-                    "id": "value",
-                    "type": "byte[]",
-                    "tid": 0
-                }
-            ],
-            "return": "void"
-        },
-        {
-            "id": "disconnectAll",
-            "type": "method",
-            "return": "void"
-        },
-        {
-            "id": "unregAll",
-            "type": "method",
-            "return": "void"
-        },
-        {
-            "id": "numHwTrackFiltersAvailable",
-            "type": "method",
-            "return": "int"
-        }
-    ],
-    "type": "interface"
-}

+ 1 - 1
antlr/aidl/Aidl.interp → src/main/java/xyz/ignatz/antlr/aidl/gen/Aidl.interp

@@ -93,7 +93,7 @@ COMMENT_BLOCK
 COMMENT_LINE
 
 rule names:
-antlr.aidl
+src.main.java.xyz.ignatz.antlr.aidl
 packageStatement
 parcelableStatement
 importStatement

+ 0 - 0
antlr/aidl/Aidl.tokens → src/main/java/xyz/ignatz/antlr/aidl/gen/Aidl.tokens


+ 1 - 1
antlr/aidl/AidlBaseListener.java → src/main/java/xyz/ignatz/antlr/aidl/gen/AidlBaseListener.java

@@ -1,5 +1,5 @@
 // Generated from E:/subjects/Compilers Principle/exp/2/antlr\Aidl.g4 by ANTLR 4.9.1
-package antlr.aidl;
+package src.main.java.xyz.ignatz.antlr.aidl.gen;
 
 import org.antlr.v4.runtime.ParserRuleContext;
 import org.antlr.v4.runtime.tree.ErrorNode;

+ 1 - 1
antlr/aidl/AidlBaseVisitor.java → src/main/java/xyz/ignatz/antlr/aidl/gen/AidlBaseVisitor.java

@@ -1,5 +1,5 @@
 // Generated from E:/subjects/Compilers Principle/exp/2/antlr\Aidl.g4 by ANTLR 4.9.1
-package antlr.aidl;
+package src.main.java.xyz.ignatz.antlr.aidl.gen;
 import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor;
 
 /**

+ 0 - 0
antlr/aidl/AidlLexer.interp → src/main/java/xyz/ignatz/antlr/aidl/gen/AidlLexer.interp


+ 2 - 5
antlr/aidl/AidlLexer.java → src/main/java/xyz/ignatz/antlr/aidl/gen/AidlLexer.java

@@ -1,13 +1,10 @@
 // Generated from E:/subjects/Compilers Principle/exp/2/antlr\Aidl.g4 by ANTLR 4.9.1
-package antlr.aidl;
+package src.main.java.xyz.ignatz.antlr.aidl.gen;
 import org.antlr.v4.runtime.Lexer;
 import org.antlr.v4.runtime.CharStream;
-import org.antlr.v4.runtime.Token;
-import org.antlr.v4.runtime.TokenStream;
 import org.antlr.v4.runtime.*;
 import org.antlr.v4.runtime.atn.*;
 import org.antlr.v4.runtime.dfa.DFA;
-import org.antlr.v4.runtime.misc.*;
 
 @SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
 public class AidlLexer extends Lexer {
@@ -108,7 +105,7 @@ public class AidlLexer extends Lexer {
 	}
 
 	@Override
-	public String getGrammarFileName() { return "Aidl.g4"; }
+	public String getGrammarFileName() { return "src/main/resources/grammar/Aidl.g4"; }
 
 	@Override
 	public String[] getRuleNames() { return ruleNames; }

+ 0 - 0
antlr/aidl/AidlLexer.tokens → src/main/java/xyz/ignatz/antlr/aidl/gen/AidlLexer.tokens


+ 1 - 1
antlr/aidl/AidlListener.java → src/main/java/xyz/ignatz/antlr/aidl/gen/AidlListener.java

@@ -1,5 +1,5 @@
 // Generated from E:/subjects/Compilers Principle/exp/2/antlr\Aidl.g4 by ANTLR 4.9.1
-package antlr.aidl;
+package src.main.java.xyz.ignatz.antlr.aidl.gen;
 import org.antlr.v4.runtime.tree.ParseTreeListener;
 
 /**

+ 3 - 3
antlr/aidl/AidlParser.java → src/main/java/xyz/ignatz/antlr/aidl/gen/AidlParser.java

@@ -1,5 +1,5 @@
 // Generated from E:/subjects/Compilers Principle/exp/2/antlr\Aidl.g4 by ANTLR 4.9.1
-package antlr.aidl;
+package src.main.java.xyz.ignatz.antlr.aidl.gen;
 import org.antlr.v4.runtime.atn.*;
 import org.antlr.v4.runtime.dfa.DFA;
 import org.antlr.v4.runtime.*;
@@ -29,7 +29,7 @@ public class AidlParser extends Parser {
 		RULE_name = 17, RULE_path = 18, RULE_id = 19;
 	private static String[] makeRuleNames() {
 		return new String[] {
-				"antlr/aidl", "packageStatement", "parcelableStatement", "importStatement",
+				"src/main/java/xyz/ignatz/antlr/aidl", "packageStatement", "parcelableStatement", "importStatement",
 			"interfaceStatement", "interfaceSubStatement", "methodStatement", "constStatement", 
 			"methodReturnType", "paramList", "param", "paramTag", "paramType", "type", 
 			"list", "interfaceName", "className", "name", "path", "id"
@@ -93,7 +93,7 @@ public class AidlParser extends Parser {
 	}
 
 	@Override
-	public String getGrammarFileName() { return "Aidl.g4"; }
+	public String getGrammarFileName() { return "src/main/resources/grammar/Aidl.g4"; }
 
 	@Override
 	public String[] getRuleNames() { return ruleNames; }

+ 1 - 1
antlr/aidl/AidlVisitor.java → src/main/java/xyz/ignatz/antlr/aidl/gen/AidlVisitor.java

@@ -1,5 +1,5 @@
 // Generated from E:/subjects/Compilers Principle/exp/2/antlr\Aidl.g4 by ANTLR 4.9.1
-package antlr.aidl;
+package src.main.java.xyz.ignatz.antlr.aidl.gen;
 import org.antlr.v4.runtime.tree.ParseTreeVisitor;
 
 /**

+ 5 - 3
antlr/aidl/tools/AidlLoader.java → src/main/java/xyz/ignatz/antlr/aidl/tools/AidlLoader.java

@@ -1,8 +1,10 @@
-package antlr.aidl.tools;
+package src.main.java.xyz.ignatz.antlr.aidl.tools;
 
 import java.util.*;
-import antlr.aidl.*;
-import tools.MapToJson;
+
+import src.main.java.xyz.ignatz.antlr.aidl.gen.AidlBaseListener;
+import src.main.java.xyz.ignatz.antlr.aidl.gen.AidlParser;
+import src.main.java.xyz.ignatz.tools.MapToJson;
 
 public class AidlLoader extends AidlBaseListener
 {

+ 1 - 1
tools/MapToJson.java → src/main/java/xyz/ignatz/tools/MapToJson.java

@@ -1,4 +1,4 @@
-package tools;
+package src.main.java.xyz.ignatz.tools;
 
 import java.util.ArrayList;
 import java.util.Map;

+ 0 - 0
aidl/AudioPolicyConfig.aidl → src/main/resources/example/aidl/AudioPolicyConfig.aidl


+ 0 - 0
aidl/IAccessibilityInteractionConnection.aidl → src/main/resources/example/aidl/IAccessibilityInteractionConnection.aidl


+ 0 - 0
aidl/IAccessibilityServiceConnection.aidl → src/main/resources/example/aidl/IAccessibilityServiceConnection.aidl


+ 0 - 0
aidl/IBluetoothGatt.aidl → src/main/resources/example/aidl/IBluetoothGatt.aidl


+ 0 - 0
aidl/IBluetoothHeadsetClient.aidl → src/main/resources/example/aidl/IBluetoothHeadsetClient.aidl


+ 0 - 0
aidl/IConnectionServiceAdapter.aidl → src/main/resources/example/aidl/IConnectionServiceAdapter.aidl


+ 0 - 0
aidl/IFingerprintDaemonCallback.aidl → src/main/resources/example/aidl/IFingerprintDaemonCallback.aidl


+ 1 - 1
aidl/INetworkManagementService.aidl → src/main/resources/example/aidl/INetworkManagementService.aidl

@@ -1,4 +1,4 @@
-/* //device/java/android/android/os/INetworkManagementService.antlr.aidl
+/* //device/java/android/android/os/INetworkManagementService.src.main.java.xyz.ignatz.antlr.aidl
 **
 ** Copyright 2007, The Android Open Source Project
 **

+ 0 - 0
aidl/IOnAppsChangedListener.aidl → src/main/resources/example/aidl/IOnAppsChangedListener.aidl


+ 0 - 0
aidl/IUserManager.aidl → src/main/resources/example/aidl/IUserManager.aidl


+ 1 - 1
Aidl.g4 → src/main/resources/grammar/Aidl.g4

@@ -1,4 +1,4 @@
-grammar Aidl;
+src.main.resources.grammar Aidl;
 
 @members {
     int oneway = 0;