From ce445fedf1568067b9271d9f04f7e219c681f0da Mon Sep 17 00:00:00 2001 From: BSTHOSHAN Date: Fri, 30 Jan 2026 10:49:12 -0600 Subject: [PATCH 01/21] Frist commit of swerve drive subsystem reference --- .../deploy/swerve/controllerproperties.json | 8 ++++++ src/main/deploy/swerve/modules/backleft.json | 27 +++++++++++++++++++ src/main/deploy/swerve/modules/backright.json | 27 +++++++++++++++++++ src/main/deploy/swerve/modules/frontleft.json | 27 +++++++++++++++++++ .../deploy/swerve/modules/frontright.json | 27 +++++++++++++++++++ .../swerve/modules/physicalproperties.json | 24 +++++++++++++++++ .../deploy/swerve/modules/pidfproperties.json | 16 +++++++++++ src/main/deploy/swerve/swervedrive.json | 14 ++++++++++ .../Subsystems/Drive/DriveConstants.java | 5 ++++ .../robot/Subsystems/Drive/DriveStates.java | 17 ++++++++++++ 10 files changed, 192 insertions(+) create mode 100644 src/main/deploy/swerve/controllerproperties.json create mode 100644 src/main/deploy/swerve/modules/backleft.json create mode 100644 src/main/deploy/swerve/modules/backright.json create mode 100644 src/main/deploy/swerve/modules/frontleft.json create mode 100644 src/main/deploy/swerve/modules/frontright.json create mode 100644 src/main/deploy/swerve/modules/physicalproperties.json create mode 100644 src/main/deploy/swerve/modules/pidfproperties.json create mode 100644 src/main/deploy/swerve/swervedrive.json create mode 100644 src/main/java/frc/robot/Subsystems/Drive/DriveConstants.java create mode 100644 src/main/java/frc/robot/Subsystems/Drive/DriveStates.java diff --git a/src/main/deploy/swerve/controllerproperties.json b/src/main/deploy/swerve/controllerproperties.json new file mode 100644 index 0000000..669097e --- /dev/null +++ b/src/main/deploy/swerve/controllerproperties.json @@ -0,0 +1,8 @@ +{ + "angleJoystickRadiusDeadband": 0.5, + "heading": { + "p": 0.4, + "i": 0, + "d": 0.01 + } +} \ No newline at end of file diff --git a/src/main/deploy/swerve/modules/backleft.json b/src/main/deploy/swerve/modules/backleft.json new file mode 100644 index 0000000..d36f690 --- /dev/null +++ b/src/main/deploy/swerve/modules/backleft.json @@ -0,0 +1,27 @@ +{ + "location": { + "front": -10.171, + "left": 13.878 + }, + "absoluteEncoderOffset": 348.3, + "drive": { + "type": "sparkmax", + "id": 2, + "canbus": null + }, + "angle": { + "type": "sparkmax", + "id": 10, + "canbus": null + }, + "encoder": { + "type": "cancoder", + "id": 9, + "canbus": null + }, + "inverted": { + "drive": true, + "angle": true + }, + "absoluteEncoderInverted": false + } \ No newline at end of file diff --git a/src/main/deploy/swerve/modules/backright.json b/src/main/deploy/swerve/modules/backright.json new file mode 100644 index 0000000..b4e715f --- /dev/null +++ b/src/main/deploy/swerve/modules/backright.json @@ -0,0 +1,27 @@ +{ + "location": { + "front": -10.171, + "left": -13.878 + }, + "absoluteEncoderOffset": 168.1, + "drive": { + "type": "sparkmax", + "id": 35, + "canbus": null + }, + "angle": { + "type": "sparkmax", + "id": 1, + "canbus": null + }, + "encoder": { + "type": "cancoder", + "id": 12, + "canbus": null + }, + "inverted": { + "drive": true, + "angle": true + }, + "absoluteEncoderInverted": false +} \ No newline at end of file diff --git a/src/main/deploy/swerve/modules/frontleft.json b/src/main/deploy/swerve/modules/frontleft.json new file mode 100644 index 0000000..ea7866b --- /dev/null +++ b/src/main/deploy/swerve/modules/frontleft.json @@ -0,0 +1,27 @@ +{ + "location": { + "front": 10.171, + "left": 13.878 + }, + "absoluteEncoderOffset": 49.5, + "drive": { + "type": "sparkmax", + "id": 7, + "canbus": null + }, + "angle": { + "type": "sparkmax", + "id": 33, + "canbus": null + }, + "encoder": { + "type": "cancoder", + "id": 6, + "canbus": null + }, + "inverted": { + "drive": true, + "angle": true + }, + "absoluteEncoderInverted": false +} \ No newline at end of file diff --git a/src/main/deploy/swerve/modules/frontright.json b/src/main/deploy/swerve/modules/frontright.json new file mode 100644 index 0000000..8009f65 --- /dev/null +++ b/src/main/deploy/swerve/modules/frontright.json @@ -0,0 +1,27 @@ +{ + "location": { + "front": 10.171, + "left": -13.878 + }, + "absoluteEncoderOffset": 42.5, + "drive": { + "type": "sparkmax", + "id": 11, + "canbus": null + }, + "angle": { + "type": "sparkmax", + "id": 8, + "canbus": null + }, + "encoder": { + "type": "cancoder", + "id": 3, + "canbus": null + }, + "inverted": { + "drive": true, + "angle": true + }, + "absoluteEncoderInverted": false +} \ No newline at end of file diff --git a/src/main/deploy/swerve/modules/physicalproperties.json b/src/main/deploy/swerve/modules/physicalproperties.json new file mode 100644 index 0000000..fc0acff --- /dev/null +++ b/src/main/deploy/swerve/modules/physicalproperties.json @@ -0,0 +1,24 @@ +{ + "optimalVoltage": 12, + "robotMass": 79, + "wheelGripCoefficientOfFriction": 1.542, + "currentLimit": { + "drive": 40, + "angle": 20 + }, + "conversionFactors": { + "angle": { + "gearRatio": 21.4286, + "factor": 0 + }, + "drive": { + "diameter": 3.5, + "gearRatio": 6.75, + "factor": 0 + } + }, + "rampRate": { + "drive": 0.12, + "angle": 0.05 + } +} \ No newline at end of file diff --git a/src/main/deploy/swerve/modules/pidfproperties.json b/src/main/deploy/swerve/modules/pidfproperties.json new file mode 100644 index 0000000..29ee950 --- /dev/null +++ b/src/main/deploy/swerve/modules/pidfproperties.json @@ -0,0 +1,16 @@ +{ + "drive": { + "p": 0, + "i": 0, + "d": 0, + "f": 0, + "iz": 0 + }, + "angle": { + "p": 0.01, + "i": 0, + "d": 0.02, + "f": 0, + "iz": 0 + } +} \ No newline at end of file diff --git a/src/main/deploy/swerve/swervedrive.json b/src/main/deploy/swerve/swervedrive.json new file mode 100644 index 0000000..6ed0b03 --- /dev/null +++ b/src/main/deploy/swerve/swervedrive.json @@ -0,0 +1,14 @@ +{ + "imu": { + "type": "navx_usb", + "id": 0, + "canbus": null + }, + "invertedIMU": false, + "modules": [ + "frontright.json", + "frontleft.json", + "backright.json", + "backleft.json" + ] +} \ No newline at end of file diff --git a/src/main/java/frc/robot/Subsystems/Drive/DriveConstants.java b/src/main/java/frc/robot/Subsystems/Drive/DriveConstants.java new file mode 100644 index 0000000..8ec066e --- /dev/null +++ b/src/main/java/frc/robot/Subsystems/Drive/DriveConstants.java @@ -0,0 +1,5 @@ +package frc.robot.Subsystems.Drive; + +public class DriveConstants { + public static double MAX_SPEED = 5.0; +} diff --git a/src/main/java/frc/robot/Subsystems/Drive/DriveStates.java b/src/main/java/frc/robot/Subsystems/Drive/DriveStates.java new file mode 100644 index 0000000..002f947 --- /dev/null +++ b/src/main/java/frc/robot/Subsystems/Drive/DriveStates.java @@ -0,0 +1,17 @@ +package frc.robot.Subsystems.Drive; + + + +public enum DriveStates { + Manual("Manual"); + + + public String stateString; + DriveStates(String stateString) { + this.stateString = stateString; + } + + public String getStateString() { + return stateString; + } +} From dfe0766c4f13fb0c93f37759b44583abbd1731de Mon Sep 17 00:00:00 2001 From: Connie-bread Date: Sat, 31 Jan 2026 17:41:30 +0000 Subject: [PATCH 02/21] Shooter Subsystem 1st commit --- .../frc/robot/Subsystems/Shooter/Shooter.java | 35 +++++++++++++++++++ .../Subsystems/Shooter/ShooterConstants.java | 28 +++++++++++++++ .../Subsystems/Shooter/ShooterStates.java | 26 ++++++++++++++ 3 files changed, 89 insertions(+) create mode 100644 src/main/java/frc/robot/Subsystems/Shooter/ShooterConstants.java create mode 100644 src/main/java/frc/robot/Subsystems/Shooter/ShooterStates.java diff --git a/src/main/java/frc/robot/Subsystems/Shooter/Shooter.java b/src/main/java/frc/robot/Subsystems/Shooter/Shooter.java index a8fe93f..245a58b 100644 --- a/src/main/java/frc/robot/Subsystems/Shooter/Shooter.java +++ b/src/main/java/frc/robot/Subsystems/Shooter/Shooter.java @@ -1,5 +1,40 @@ package frc.robot.Subsystems.Shooter; +import com.ctre.phoenix6.hardware.TalonFX; + +import edu.wpi.first.math.controller.PIDController; +import frc.robot.Constants; + + + public class Shooter { + private ShooterStates state; + private TalonFX leftMotor; + private TalonFX rightMotor; + private PIDController leadermotorcontrollerleft; + private PIDController followermotorcontrollerright; + + public Shooter() { + state = ShooterStates.IDLE; + motorcontrollerright = new PIDController(Constants.Shooter.MOTOR_RIGHT_PROPORTION, Constants.Shooter.MOTOR_RIGHT_INTEGRAL, Constants.Shooter.MOTOR_RIGHT_DERIVATIVE); //PID Tune values + + followerleftMotor = new TalonFX(Constants.Shooter.LEFT_MOTOR_ID); + leaderrightMotor = new TalonFX(Constants.Shooter.RIGHT_MOTOR_ID); + + followerleftMotor.set(ControlMode.Follower, leaderrightMotor.getDeviceID()); + followerleftMotor.setInverted(TalonFXInvertType.OpposeMaster); // oppose or follow master??? there is a .FollowMaster Method + } + public void setState(ShooterStates state) { + this.state = state; + } + + public void periodic() { + if (state == IDLE) { + rightmotor.set(0); + } else { + rightMotor.set(motorcontrollerright.calculate(rightMotor.getVelocity().getValueAsDouble(), state.getShooterRPS())); + } + } } + diff --git a/src/main/java/frc/robot/Subsystems/Shooter/ShooterConstants.java b/src/main/java/frc/robot/Subsystems/Shooter/ShooterConstants.java new file mode 100644 index 0000000..7038f87 --- /dev/null +++ b/src/main/java/frc/robot/Subsystems/Shooter/ShooterConstants.java @@ -0,0 +1,28 @@ +package frc.robot; + +import edu.wpi.first.math.util.Units; + + +public final class Constants { + + private Constants() { + + } + + public static final class Shooter { + public static final double FIXED_SHOOT_RPS = 70; + public static final int LEFT_MOTOR_ID = 15; + public static final int RIGHT_MOTOR_ID = 14; + public static final double LONG_PASS_RPS = 100; + + + public static final double MOTOR_RIGHT_PROPORTION = 0.0002; + public static final double MOTOR_RIGHT_INTEGRAL = 0; + public static final double MOTOR_RIGHT_DERIVATIVE = 0; + + public static final double MOTOR_LEFT_PROPORTION = 0.0002; + public static final double MOTOR_LEFT_INTEGRAL = 0; + public static final double MOTOR_LEFT_DERIVATIVE = 0; + } + +} \ No newline at end of file diff --git a/src/main/java/frc/robot/Subsystems/Shooter/ShooterStates.java b/src/main/java/frc/robot/Subsystems/Shooter/ShooterStates.java new file mode 100644 index 0000000..0d4f8c5 --- /dev/null +++ b/src/main/java/frc/robot/Subsystems/Shooter/ShooterStates.java @@ -0,0 +1,26 @@ +package frc.robot.Subsystems.Shooter; + +import static frc.robot.Constants.Shooter.*; + +enum ShooterStates { + IDLE(0), + FIXEDSHOOT(FIXED_SHOOT_RPS), + DYNAMICSHOOT(FIXED_SHOOT_RPS), + LONGPASS(LONG_PASS_RPS); + + private String stateString; + private double shooterSpeed; + + ShooterStates(double shooterSpeed) { + this.stateString = this.name(); + this.shooterSpeed = shooterSpeed; + } + + public String getStateString() { + return stateString; + } + + public Double getShooterRPS() { + return shooterSpeed; + } +} \ No newline at end of file From 5d90037b15a2f2419ffcf8fda2fcf2efc0249f88 Mon Sep 17 00:00:00 2001 From: BSTHOSHAN Date: Sat, 31 Jan 2026 16:16:03 -0600 Subject: [PATCH 03/21] Reference commit --- .../frc/robot/Subsystems/Drive/Drive.java | 41 +- .../Subsystems/Drive/DriveConstants.java | 12 +- vendordeps/Phoenix5-replay-5.36.0.json | 221 ++++++++ vendordeps/Phoenix6-replay-26.1.1.json | 497 ++++++++++++++++++ vendordeps/REVLib.json | 133 +++++ vendordeps/ReduxLib-2026.1.1.json | 69 +++ vendordeps/ThriftyLib-2026.json | 20 + vendordeps/yagsl-2026.1.26.json | 58 ++ 8 files changed, 1049 insertions(+), 2 deletions(-) create mode 100644 vendordeps/Phoenix5-replay-5.36.0.json create mode 100644 vendordeps/Phoenix6-replay-26.1.1.json create mode 100644 vendordeps/REVLib.json create mode 100644 vendordeps/ReduxLib-2026.1.1.json create mode 100644 vendordeps/ThriftyLib-2026.json create mode 100644 vendordeps/yagsl-2026.1.26.json diff --git a/src/main/java/frc/robot/Subsystems/Drive/Drive.java b/src/main/java/frc/robot/Subsystems/Drive/Drive.java index b8d2f4b..416acd3 100644 --- a/src/main/java/frc/robot/Subsystems/Drive/Drive.java +++ b/src/main/java/frc/robot/Subsystems/Drive/Drive.java @@ -1,5 +1,44 @@ package frc.robot.Subsystems.Drive; +import java.io.File; + +import edu.wpi.first.math.geometry.Pose2d; +import edu.wpi.first.math.geometry.Rotation2d; +import edu.wpi.first.wpilibj.Filesystem; +import edu.wpi.first.wpilibj.XboxController; +import swervelib.SwerveDrive; +import swervelib.SwerveInputStream; +import swervelib.parser.SwerveParser; +import static frc.robot.Subsystems.Drive.DriveConstants.*; + public class Drive { - + private static Drive instance; + private SwerveInputStream swerveInputs; + private SwerveDrive swerveDrive; + private boolean fieldRelative; + public final XboxController DRIVER_CONTROLLER; + + public static Drive getInstance() { + if (instance == null) { + instance = new Drive(); + } + return instance; + } + + private Drive() { + DRIVER_CONTROLLER = new XboxController(0); + + try { + File swerveJsonDirectory = new File(Filesystem.getDeployDirectory(), "swerve"); + swerveDrive = new SwerveParser(swerveJsonDirectory).createSwerveDrive( + MAX_SPEED.magnitude(), + new Pose2d(9.9, 4.0, Rotation2d.fromDegrees(0)) + ); + } catch (Exception e) { + throw new RuntimeException("Failed to create SwerveDrive", e); + } + swerveDrive.setMotorIdleMode(true); + + swerveInputs = SwerveInputStream.of(swerveDrive, () -> -DRIVER_CONTROLLER.getLeftY(), () -> -DRIVER_CONTROLLER.getLeftX()); + } } diff --git a/src/main/java/frc/robot/Subsystems/Drive/DriveConstants.java b/src/main/java/frc/robot/Subsystems/Drive/DriveConstants.java index 8ec066e..12ff068 100644 --- a/src/main/java/frc/robot/Subsystems/Drive/DriveConstants.java +++ b/src/main/java/frc/robot/Subsystems/Drive/DriveConstants.java @@ -1,5 +1,15 @@ package frc.robot.Subsystems.Drive; +import static edu.wpi.first.units.Units.MetersPerSecond; +import static edu.wpi.first.units.Units.RotationsPerSecond; + +import edu.wpi.first.units.measure.AngularVelocity; +import edu.wpi.first.units.measure.LinearVelocity; + public class DriveConstants { - public static double MAX_SPEED = 5.0; + public static final LinearVelocity MAX_SPEED = MetersPerSecond.of(4.6); + public static final LinearVelocity SLOW_SPEED = MetersPerSecond.of(MAX_SPEED.magnitude() * 0.2); + public static final AngularVelocity MAX_ANGULAR_VELOCITY = RotationsPerSecond.of(3); + public static final AngularVelocity SLOW_ANGULAR_VELOCITY = RotationsPerSecond.of(MAX_ANGULAR_VELOCITY.magnitude() * 0.2); + } diff --git a/vendordeps/Phoenix5-replay-5.36.0.json b/vendordeps/Phoenix5-replay-5.36.0.json new file mode 100644 index 0000000..0e799ed --- /dev/null +++ b/vendordeps/Phoenix5-replay-5.36.0.json @@ -0,0 +1,221 @@ +{ + "fileName": "Phoenix5-replay-5.36.0.json", + "name": "CTRE-Phoenix (v5)", + "version": "5.36.0", + "frcYear": "2026", + "uuid": "fbc886a4-2cec-40c0-9835-71086a8cc3df", + "mavenUrls": [ + "https://maven.ctr-electronics.com/release/" + ], + "jsonUrl": "https://maven.ctr-electronics.com/release/com/ctre/phoenix/Phoenix5-replay-frc2026-latest.json", + "requires": [ + { + "uuid": "e7900d8d-826f-4dca-a1ff-182f658e98af", + "errorMessage": "Phoenix 5 requires low-level libraries from Phoenix 6. Please add the Phoenix 6 vendordep before adding Phoenix 5.", + "offlineFileName": "Phoenix6-replay-frc2026-latest.json", + "onlineUrl": "https://maven.ctr-electronics.com/release/com/ctre/phoenix6/latest/Phoenix6-replay-frc2026-latest.json" + } + ], + "conflictsWith": [ + { + "uuid": "e995de00-2c64-4df5-8831-c1441420ff19", + "errorMessage": "Users must use the regular Phoenix 5 vendordep when using the regular Phoenix 6 vendordep.", + "offlineFileName": "Phoenix6-frc2026-latest.json" + }, + { + "uuid": "ab676553-b602-441f-a38d-f1296eff6537", + "errorMessage": "Users cannot have both the replay and regular Phoenix 5 vendordeps in their robot program.", + "offlineFileName": "Phoenix5-frc2026-latest.json" + } + ], + "javaDependencies": [ + { + "groupId": "com.ctre.phoenix", + "artifactId": "api-java", + "version": "5.36.0" + }, + { + "groupId": "com.ctre.phoenix", + "artifactId": "wpiapi-java", + "version": "5.36.0" + } + ], + "jniDependencies": [ + { + "groupId": "com.ctre.phoenix", + "artifactId": "cci", + "version": "5.36.0", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "linuxathena" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix.replay", + "artifactId": "cci-replay", + "version": "5.36.0", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix.sim", + "artifactId": "cci-sim", + "version": "5.36.0", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + } + ], + "cppDependencies": [ + { + "groupId": "com.ctre.phoenix", + "artifactId": "wpiapi-cpp", + "version": "5.36.0", + "libName": "CTRE_Phoenix_WPI", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "linuxathena" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix", + "artifactId": "api-cpp", + "version": "5.36.0", + "libName": "CTRE_Phoenix", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "linuxathena" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix", + "artifactId": "cci", + "version": "5.36.0", + "libName": "CTRE_PhoenixCCI", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "linuxathena" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix.replay", + "artifactId": "wpiapi-cpp-replay", + "version": "5.36.0", + "libName": "CTRE_Phoenix_WPIReplay", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix.replay", + "artifactId": "api-cpp-replay", + "version": "5.36.0", + "libName": "CTRE_PhoenixReplay", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix.replay", + "artifactId": "cci-replay", + "version": "5.36.0", + "libName": "CTRE_PhoenixCCIReplay", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix.sim", + "artifactId": "wpiapi-cpp-sim", + "version": "5.36.0", + "libName": "CTRE_Phoenix_WPISim", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix.sim", + "artifactId": "api-cpp-sim", + "version": "5.36.0", + "libName": "CTRE_PhoenixSim", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix.sim", + "artifactId": "cci-sim", + "version": "5.36.0", + "libName": "CTRE_PhoenixCCISim", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + } + ] +} \ No newline at end of file diff --git a/vendordeps/Phoenix6-replay-26.1.1.json b/vendordeps/Phoenix6-replay-26.1.1.json new file mode 100644 index 0000000..b25b7e6 --- /dev/null +++ b/vendordeps/Phoenix6-replay-26.1.1.json @@ -0,0 +1,497 @@ +{ + "fileName": "Phoenix6-replay-26.1.1.json", + "name": "CTRE-Phoenix (v6) Replay", + "version": "26.1.1", + "frcYear": "2026", + "uuid": "e7900d8d-826f-4dca-a1ff-182f658e98af", + "mavenUrls": [ + "https://maven.ctr-electronics.com/release/" + ], + "jsonUrl": "https://maven.ctr-electronics.com/release/com/ctre/phoenix6/latest/Phoenix6-replay-frc2026-latest.json", + "conflictsWith": [ + { + "uuid": "e995de00-2c64-4df5-8831-c1441420ff19", + "errorMessage": "Users can not have both the replay and regular Phoenix 6 vendordeps in their robot program.", + "offlineFileName": "Phoenix6-frc2026-latest.json" + } + ], + "javaDependencies": [ + { + "groupId": "com.ctre.phoenix6", + "artifactId": "wpiapi-java", + "version": "26.1.1" + } + ], + "jniDependencies": [ + { + "groupId": "com.ctre.phoenix6", + "artifactId": "api-cpp", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "linuxathena" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix6", + "artifactId": "tools", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "linuxathena" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix6.replay", + "artifactId": "api-cpp-replay", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix6.replay", + "artifactId": "tools-replay", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "api-cpp-sim", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "tools-sim", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simTalonSRX", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simVictorSPX", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simPigeonIMU", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProTalonFX", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProTalonFXS", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProCANcoder", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProPigeon2", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProCANrange", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProCANdi", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProCANdle", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + } + ], + "cppDependencies": [ + { + "groupId": "com.ctre.phoenix6", + "artifactId": "wpiapi-cpp", + "version": "26.1.1", + "libName": "CTRE_Phoenix6_WPI", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "linuxathena" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix6", + "artifactId": "tools", + "version": "26.1.1", + "libName": "CTRE_PhoenixTools", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "linuxathena" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix6.replay", + "artifactId": "wpiapi-cpp-replay", + "version": "26.1.1", + "libName": "CTRE_Phoenix6_WPIReplay", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix6.replay", + "artifactId": "tools-replay", + "version": "26.1.1", + "libName": "CTRE_PhoenixTools_Replay", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "wpiapi-cpp-sim", + "version": "26.1.1", + "libName": "CTRE_Phoenix6_WPISim", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "tools-sim", + "version": "26.1.1", + "libName": "CTRE_PhoenixTools_Sim", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simTalonSRX", + "version": "26.1.1", + "libName": "CTRE_SimTalonSRX", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simVictorSPX", + "version": "26.1.1", + "libName": "CTRE_SimVictorSPX", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simPigeonIMU", + "version": "26.1.1", + "libName": "CTRE_SimPigeonIMU", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProTalonFX", + "version": "26.1.1", + "libName": "CTRE_SimProTalonFX", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProTalonFXS", + "version": "26.1.1", + "libName": "CTRE_SimProTalonFXS", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProCANcoder", + "version": "26.1.1", + "libName": "CTRE_SimProCANcoder", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProPigeon2", + "version": "26.1.1", + "libName": "CTRE_SimProPigeon2", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProCANrange", + "version": "26.1.1", + "libName": "CTRE_SimProCANrange", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProCANdi", + "version": "26.1.1", + "libName": "CTRE_SimProCANdi", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProCANdle", + "version": "26.1.1", + "libName": "CTRE_SimProCANdle", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + } + ] +} \ No newline at end of file diff --git a/vendordeps/REVLib.json b/vendordeps/REVLib.json new file mode 100644 index 0000000..d35e593 --- /dev/null +++ b/vendordeps/REVLib.json @@ -0,0 +1,133 @@ +{ + "fileName": "REVLib.json", + "name": "REVLib", + "version": "2026.0.1", + "frcYear": "2026", + "uuid": "3f48eb8c-50fe-43a6-9cb7-44c86353c4cb", + "mavenUrls": [ + "https://maven.revrobotics.com/" + ], + "jsonUrl": "https://software-metadata.revrobotics.com/REVLib-2026.json", + "javaDependencies": [ + { + "groupId": "com.revrobotics.frc", + "artifactId": "REVLib-java", + "version": "2026.0.1" + } + ], + "jniDependencies": [ + { + "groupId": "com.revrobotics.frc", + "artifactId": "REVLib-driver", + "version": "2026.0.1", + "skipInvalidPlatforms": true, + "isJar": false, + "validPlatforms": [ + "windowsx86-64", + "linuxarm64", + "linuxx86-64", + "linuxathena", + "linuxarm32", + "osxuniversal" + ] + }, + { + "groupId": "com.revrobotics.frc", + "artifactId": "RevLibBackendDriver", + "version": "2026.0.1", + "skipInvalidPlatforms": true, + "isJar": false, + "validPlatforms": [ + "windowsx86-64", + "linuxarm64", + "linuxx86-64", + "linuxathena", + "linuxarm32", + "osxuniversal" + ] + }, + { + "groupId": "com.revrobotics.frc", + "artifactId": "RevLibWpiBackendDriver", + "version": "2026.0.1", + "skipInvalidPlatforms": true, + "isJar": false, + "validPlatforms": [ + "windowsx86-64", + "linuxarm64", + "linuxx86-64", + "linuxathena", + "linuxarm32", + "osxuniversal" + ] + } + ], + "cppDependencies": [ + { + "groupId": "com.revrobotics.frc", + "artifactId": "REVLib-cpp", + "version": "2026.0.1", + "libName": "REVLib", + "headerClassifier": "headers", + "sharedLibrary": false, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxarm64", + "linuxx86-64", + "linuxathena", + "linuxarm32", + "osxuniversal" + ] + }, + { + "groupId": "com.revrobotics.frc", + "artifactId": "REVLib-driver", + "version": "2026.0.1", + "libName": "REVLibDriver", + "headerClassifier": "headers", + "sharedLibrary": false, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxarm64", + "linuxx86-64", + "linuxathena", + "linuxarm32", + "osxuniversal" + ] + }, + { + "groupId": "com.revrobotics.frc", + "artifactId": "RevLibBackendDriver", + "version": "2026.0.1", + "libName": "BackendDriver", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxarm64", + "linuxx86-64", + "linuxathena", + "linuxarm32", + "osxuniversal" + ] + }, + { + "groupId": "com.revrobotics.frc", + "artifactId": "RevLibWpiBackendDriver", + "version": "2026.0.1", + "libName": "REVLibWpi", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxarm64", + "linuxx86-64", + "linuxathena", + "linuxarm32", + "osxuniversal" + ] + } + ] +} \ No newline at end of file diff --git a/vendordeps/ReduxLib-2026.1.1.json b/vendordeps/ReduxLib-2026.1.1.json new file mode 100644 index 0000000..09dd4f0 --- /dev/null +++ b/vendordeps/ReduxLib-2026.1.1.json @@ -0,0 +1,69 @@ +{ + "fileName": "ReduxLib-2026.1.1.json", + "name": "ReduxLib", + "version": "2026.1.1", + "frcYear": "2026", + "uuid": "151ecca8-670b-4026-8160-cdd2679ef2bd", + "mavenUrls": [ + "https://maven.reduxrobotics.com/" + ], + "jsonUrl": "https://frcsdk.reduxrobotics.com/ReduxLib_2026.json", + "javaDependencies": [ + { + "groupId": "com.reduxrobotics.frc", + "artifactId": "ReduxLib-java", + "version": "2026.1.1" + } + ], + "jniDependencies": [ + { + "groupId": "com.reduxrobotics.frc", + "artifactId": "ReduxLib-fifo", + "version": "2026.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "linuxathena", + "linuxx86-64", + "linuxarm64", + "osxuniversal", + "windowsx86-64" + ] + } + ], + "cppDependencies": [ + { + "groupId": "com.reduxrobotics.frc", + "artifactId": "ReduxLib-cpp", + "version": "2026.1.1", + "libName": "ReduxLib", + "headerClassifier": "headers", + "sourcesClassifier": "sources", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "linuxathena", + "linuxx86-64", + "linuxarm64", + "osxuniversal", + "windowsx86-64" + ] + }, + { + "groupId": "com.reduxrobotics.frc", + "artifactId": "ReduxLib-fifo", + "version": "2026.1.1", + "libName": "reduxfifo", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "linuxathena", + "linuxx86-64", + "linuxarm64", + "osxuniversal", + "windowsx86-64" + ] + } + ] +} \ No newline at end of file diff --git a/vendordeps/ThriftyLib-2026.json b/vendordeps/ThriftyLib-2026.json new file mode 100644 index 0000000..9aa5808 --- /dev/null +++ b/vendordeps/ThriftyLib-2026.json @@ -0,0 +1,20 @@ +{ + "fileName": "ThriftyLib-2026.json", + "name": "ThriftyLib", + "version": "2026.0.1", + "frcYear": "2026", + "uuid": "60b2694b-9e6e-4026-81ee-6f167946f4b0", + "mavenUrls": [ + "https://docs.home.thethriftybot.com" + ], + "jsonUrl": "https://docs.home.thethriftybot.com/ThriftyLib-2026.json", + "javaDependencies": [ + { + "groupId": "com.thethriftybot.frc", + "artifactId": "ThriftyLib-java", + "version": "2026.0.1" + } + ], + "jniDependencies": [], + "cppDependencies": [] +} \ No newline at end of file diff --git a/vendordeps/yagsl-2026.1.26.json b/vendordeps/yagsl-2026.1.26.json new file mode 100644 index 0000000..63122ff --- /dev/null +++ b/vendordeps/yagsl-2026.1.26.json @@ -0,0 +1,58 @@ +{ + "fileName": "yagsl-2026.1.26.json", + "name": "YAGSL", + "version": "2026.1.26", + "frcYear": "2026", + "uuid": "1ccce5a4-acd2-4d18-bca3-4b8047188400", + "mavenUrls": [ + "https://yet-another-software-suite.github.io/YAGSL/releases/", + "https://repo1.maven.org/maven2" + ], + "jsonUrl": "https://yet-another-software-suite.github.io/YAGSL/yagsl.json", + "javaDependencies": [ + { + "groupId": "swervelib", + "artifactId": "YAGSL-java", + "version": "2026.1.26" + }, + { + "groupId": "org.dyn4j", + "artifactId": "dyn4j", + "version": "5.0.2" + } + ], + "requires": [ + { + "uuid": "151ecca8-670b-4026-8160-cdd2679ef2bd", + "errorMessage": "ReduxLib is required!", + "offlineFileName": "ReduxLib.json", + "onlineUrl": "https://frcsdk.reduxrobotics.com/ReduxLib_2026.json" + }, + { + "uuid": "3f48eb8c-50fe-43a6-9cb7-44c86353c4cb", + "errorMessage": "REVLib is required!", + "offlineFileName": "REVLib.json", + "onlineUrl": "https://software-metadata.revrobotics.com/REVLib-2026.json" + }, + { + "uuid": "e7900d8d-826f-4dca-a1ff-182f658e98af", + "errorMessage": "Phoenix6 Replay is required!", + "offlineFileName": "Phoenix6-replay-26.1.0.json", + "onlineUrl": "https://maven.ctr-electronics.com/release/com/ctre/phoenix6/latest/Phoenix6-replay-frc2026-latest.json" + }, + { + "uuid": "fbc886a4-2cec-40c0-9835-71086a8cc3df", + "errorMessage": "Phoenix5 Replay Compatibility is required!", + "offlineFileName": "Phoenix5-replay-5.36.0.json", + "onlineUrl": "https://maven.ctr-electronics.com/release/com/ctre/phoenix/Phoenix5-replay-frc2026-latest.json" + }, + { + "uuid": "60b2694b-9e6e-4026-81ee-6f167946f4b0", + "errorMessage": "ThriftyLib is required!", + "offlineFileName": "ThriftyLib.json", + "onlineUrl": "https://docs.home.thethriftybot.com/ThriftyLib-2026.json" + } + ], + "jniDependencies": [], + "cppDependencies": [] +} \ No newline at end of file From 24de118dbd65643a0b32c811d46f3cba2a9b0dd8 Mon Sep 17 00:00:00 2001 From: BSTHOSHAN Date: Sun, 1 Feb 2026 19:38:23 -0600 Subject: [PATCH 04/21] Issue --- simgui-ds.json | 92 +++++++++++++++++++ src/main/java/frc/robot/Robot.java | 11 ++- .../frc/robot/Subsystems/Drive/Drive.java | 25 ++++- .../Subsystems/Drive/DriveConstants.java | 4 +- 4 files changed, 126 insertions(+), 6 deletions(-) create mode 100644 simgui-ds.json diff --git a/simgui-ds.json b/simgui-ds.json new file mode 100644 index 0000000..73cc713 --- /dev/null +++ b/simgui-ds.json @@ -0,0 +1,92 @@ +{ + "keyboardJoysticks": [ + { + "axisConfig": [ + { + "decKey": 65, + "incKey": 68 + }, + { + "decKey": 87, + "incKey": 83 + }, + { + "decKey": 69, + "decayRate": 0.0, + "incKey": 82, + "keyRate": 0.009999999776482582 + } + ], + "axisCount": 3, + "buttonCount": 4, + "buttonKeys": [ + 90, + 88, + 67, + 86 + ], + "povConfig": [ + { + "key0": 328, + "key135": 323, + "key180": 322, + "key225": 321, + "key270": 324, + "key315": 327, + "key45": 329, + "key90": 326 + } + ], + "povCount": 1 + }, + { + "axisConfig": [ + { + "decKey": 74, + "incKey": 76 + }, + { + "decKey": 73, + "incKey": 75 + } + ], + "axisCount": 2, + "buttonCount": 4, + "buttonKeys": [ + 77, + 44, + 46, + 47 + ], + "povCount": 0 + }, + { + "axisConfig": [ + { + "decKey": 263, + "incKey": 262 + }, + { + "decKey": 265, + "incKey": 264 + } + ], + "axisCount": 2, + "buttonCount": 6, + "buttonKeys": [ + 260, + 268, + 266, + 261, + 269, + 267 + ], + "povCount": 0 + }, + { + "axisCount": 0, + "buttonCount": 0, + "povCount": 0 + } + ] +} diff --git a/src/main/java/frc/robot/Robot.java b/src/main/java/frc/robot/Robot.java index fce3ad6..60b2f65 100644 --- a/src/main/java/frc/robot/Robot.java +++ b/src/main/java/frc/robot/Robot.java @@ -5,6 +5,7 @@ package frc.robot; import edu.wpi.first.wpilibj.TimedRobot; +import frc.robot.Subsystems.Drive.Drive; /** * The methods in this class are called automatically corresponding to each mode, as described in @@ -16,10 +17,16 @@ public class Robot extends TimedRobot { * This function is run when the robot is first started up and should be used for any * initialization code. */ - public Robot() {} + Drive drive; + + public Robot() { + drive = Drive.getInstance(); + } @Override - public void robotPeriodic() {} + public void robotPeriodic() { + drive.periodic(); + } @Override public void autonomousInit() {} diff --git a/src/main/java/frc/robot/Subsystems/Drive/Drive.java b/src/main/java/frc/robot/Subsystems/Drive/Drive.java index 416acd3..ed31ce0 100644 --- a/src/main/java/frc/robot/Subsystems/Drive/Drive.java +++ b/src/main/java/frc/robot/Subsystems/Drive/Drive.java @@ -6,6 +6,8 @@ import edu.wpi.first.math.geometry.Rotation2d; import edu.wpi.first.wpilibj.Filesystem; import edu.wpi.first.wpilibj.XboxController; +import edu.wpi.first.wpilibj.smartdashboard.Field2d; +import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import swervelib.SwerveDrive; import swervelib.SwerveInputStream; import swervelib.parser.SwerveParser; @@ -15,8 +17,8 @@ public class Drive { private static Drive instance; private SwerveInputStream swerveInputs; private SwerveDrive swerveDrive; - private boolean fieldRelative; public final XboxController DRIVER_CONTROLLER; + private Field2d field; public static Drive getInstance() { if (instance == null) { @@ -26,12 +28,13 @@ public static Drive getInstance() { } private Drive() { + field = new Field2d(); DRIVER_CONTROLLER = new XboxController(0); try { File swerveJsonDirectory = new File(Filesystem.getDeployDirectory(), "swerve"); swerveDrive = new SwerveParser(swerveJsonDirectory).createSwerveDrive( - MAX_SPEED.magnitude(), + MAX_SPEED, new Pose2d(9.9, 4.0, Rotation2d.fromDegrees(0)) ); } catch (Exception e) { @@ -41,4 +44,22 @@ private Drive() { swerveInputs = SwerveInputStream.of(swerveDrive, () -> -DRIVER_CONTROLLER.getLeftY(), () -> -DRIVER_CONTROLLER.getLeftX()); } + + public void periodic() { + + + field.setRobotPose(swerveDrive.getPose()); + SmartDashboard.putData(field); + } + + public void zeroGyro() { + swerveDrive.resetOdometry( + new Pose2d( + swerveDrive.getPose().getX(), + swerveDrive.getPose().getY(), + Rotation2d.fromDegrees(0) + ) + ); + } + } diff --git a/src/main/java/frc/robot/Subsystems/Drive/DriveConstants.java b/src/main/java/frc/robot/Subsystems/Drive/DriveConstants.java index 12ff068..d51c048 100644 --- a/src/main/java/frc/robot/Subsystems/Drive/DriveConstants.java +++ b/src/main/java/frc/robot/Subsystems/Drive/DriveConstants.java @@ -7,8 +7,8 @@ import edu.wpi.first.units.measure.LinearVelocity; public class DriveConstants { - public static final LinearVelocity MAX_SPEED = MetersPerSecond.of(4.6); - public static final LinearVelocity SLOW_SPEED = MetersPerSecond.of(MAX_SPEED.magnitude() * 0.2); + public static final double MAX_SPEED = 4.6; + public static final LinearVelocity SLOW_SPEED = MetersPerSecond.of(MAX_SPEED * 0.2); public static final AngularVelocity MAX_ANGULAR_VELOCITY = RotationsPerSecond.of(3); public static final AngularVelocity SLOW_ANGULAR_VELOCITY = RotationsPerSecond.of(MAX_ANGULAR_VELOCITY.magnitude() * 0.2); From ceecf5b07630445b613198977e1b1a6263db0f8c Mon Sep 17 00:00:00 2001 From: Aitan Martinez Date: Sun, 1 Feb 2026 21:11:56 -0600 Subject: [PATCH 05/21] fix? --- vendordeps/{yagsl-2026.1.26.json => yagsl-2026.1.30.json} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename vendordeps/{yagsl-2026.1.26.json => yagsl-2026.1.30.json} (95%) diff --git a/vendordeps/yagsl-2026.1.26.json b/vendordeps/yagsl-2026.1.30.json similarity index 95% rename from vendordeps/yagsl-2026.1.26.json rename to vendordeps/yagsl-2026.1.30.json index 63122ff..0ca96e1 100644 --- a/vendordeps/yagsl-2026.1.26.json +++ b/vendordeps/yagsl-2026.1.30.json @@ -1,7 +1,7 @@ { - "fileName": "yagsl-2026.1.26.json", + "fileName": "yagsl-2026.1.30.json", "name": "YAGSL", - "version": "2026.1.26", + "version": "2026.1.30", "frcYear": "2026", "uuid": "1ccce5a4-acd2-4d18-bca3-4b8047188400", "mavenUrls": [ @@ -13,7 +13,7 @@ { "groupId": "swervelib", "artifactId": "YAGSL-java", - "version": "2026.1.26" + "version": "2026.1.30" }, { "groupId": "org.dyn4j", From 1e215b95fe2fb559bd16edba331343cf32b09795 Mon Sep 17 00:00:00 2001 From: Aitan Martinez Date: Sun, 1 Feb 2026 21:12:56 -0600 Subject: [PATCH 06/21] imports --- vendordeps/Studica.json | 71 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 vendordeps/Studica.json diff --git a/vendordeps/Studica.json b/vendordeps/Studica.json new file mode 100644 index 0000000..b51bf58 --- /dev/null +++ b/vendordeps/Studica.json @@ -0,0 +1,71 @@ +{ + "fileName": "Studica.json", + "name": "Studica", + "version": "2026.0.0", + "frcYear": "2026", + "uuid": "cb311d09-36e9-4143-a032-55bb2b94443b", + "mavenUrls": [ + "https://dev.studica.com/maven/release/2026/" + ], + "jsonUrl": "https://dev.studica.com/maven/release/2026/json/Studica-2026.0.0.json", + "javaDependencies": [ + { + "groupId": "com.studica.frc", + "artifactId": "Studica-java", + "version": "2026.0.0" + } + ], + "jniDependencies": [ + { + "groupId": "com.studica.frc", + "artifactId": "Studica-driver", + "version": "2026.0.0", + "skipInvalidPlatforms": true, + "isJar": false, + "validPlatforms": [ + "windowsx86-64", + "linuxarm64", + "linuxx86-64", + "linuxathena", + "linuxarm32", + "osxuniversal" + ] + } + ], + "cppDependencies": [ + { + "groupId": "com.studica.frc", + "artifactId": "Studica-cpp", + "version": "2026.0.0", + "libName": "Studica", + "headerClassifier": "headers", + "sharedLibrary": false, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxarm64", + "linuxx86-64", + "linuxathena", + "linuxarm32", + "osxuniversal" + ] + }, + { + "groupId": "com.studica.frc", + "artifactId": "Studica-driver", + "version": "2026.0.0", + "libName": "StudicaDriver", + "headerClassifier": "headers", + "sharedLibrary": false, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxarm64", + "linuxx86-64", + "linuxathena", + "linuxarm32", + "osxuniversal" + ] + } + ] +} \ No newline at end of file From e9cc6051e2d49ea834875ff44d64563929204d0d Mon Sep 17 00:00:00 2001 From: BSTHOSHAN Date: Sun, 1 Feb 2026 21:37:33 -0600 Subject: [PATCH 07/21] Done --- simgui-ds.json | 5 +++ .../frc/robot/Subsystems/Drive/Drive.java | 34 +++++++++++++++++-- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/simgui-ds.json b/simgui-ds.json index 73cc713..69b1a3c 100644 --- a/simgui-ds.json +++ b/simgui-ds.json @@ -88,5 +88,10 @@ "buttonCount": 0, "povCount": 0 } + ], + "robotJoysticks": [ + { + "guid": "Keyboard0" + } ] } diff --git a/src/main/java/frc/robot/Subsystems/Drive/Drive.java b/src/main/java/frc/robot/Subsystems/Drive/Drive.java index ed31ce0..9dc66fa 100644 --- a/src/main/java/frc/robot/Subsystems/Drive/Drive.java +++ b/src/main/java/frc/robot/Subsystems/Drive/Drive.java @@ -18,7 +18,9 @@ public class Drive { private SwerveInputStream swerveInputs; private SwerveDrive swerveDrive; public final XboxController DRIVER_CONTROLLER; - private Field2d field; + private Field2d field;; + private boolean slow; + private boolean fieldRelative; public static Drive getInstance() { if (instance == null) { @@ -31,6 +33,9 @@ private Drive() { field = new Field2d(); DRIVER_CONTROLLER = new XboxController(0); + slow = false; + fieldRelative = true; + try { File swerveJsonDirectory = new File(Filesystem.getDeployDirectory(), "swerve"); swerveDrive = new SwerveParser(swerveJsonDirectory).createSwerveDrive( @@ -42,11 +47,34 @@ private Drive() { } swerveDrive.setMotorIdleMode(true); - swerveInputs = SwerveInputStream.of(swerveDrive, () -> -DRIVER_CONTROLLER.getLeftY(), () -> -DRIVER_CONTROLLER.getLeftX()); + swerveInputs = SwerveInputStream.of(swerveDrive, () -> DRIVER_CONTROLLER.getLeftY(), () -> DRIVER_CONTROLLER.getLeftX()) + .withControllerRotationAxis(() -> -DRIVER_CONTROLLER.getRightX()) + .allianceRelativeControl(true) + .driveToPoseEnabled(false); } public void periodic() { - + if (slow) { + if (DRIVER_CONTROLLER.getLeftBumperButtonPressed()) slow = false; + swerveInputs.scaleTranslation(0.33); + swerveInputs.scaleRotation(0.33); + } else { + if (DRIVER_CONTROLLER.getLeftBumperButtonPressed()) slow = true; + swerveInputs.scaleTranslation(1); + swerveInputs.scaleRotation(1); + } + + if (fieldRelative) { + if (DRIVER_CONTROLLER.getBackButtonPressed()) { + fieldRelative = false; + } + swerveDrive.driveFieldOriented(swerveInputs.get()); + } else { + if (DRIVER_CONTROLLER.getBackButtonPressed()) { + fieldRelative = true; + } + swerveDrive.drive(swerveInputs.get()); + } field.setRobotPose(swerveDrive.getPose()); SmartDashboard.putData(field); From 0a9fce0d9de3a620c4833fc78d938ba075f25c01 Mon Sep 17 00:00:00 2001 From: BSTHOSHAN Date: Sun, 1 Feb 2026 21:48:04 -0600 Subject: [PATCH 08/21] lil tweak --- src/main/java/frc/robot/Subsystems/Drive/Drive.java | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/main/java/frc/robot/Subsystems/Drive/Drive.java b/src/main/java/frc/robot/Subsystems/Drive/Drive.java index 9dc66fa..4620b5c 100644 --- a/src/main/java/frc/robot/Subsystems/Drive/Drive.java +++ b/src/main/java/frc/robot/Subsystems/Drive/Drive.java @@ -19,7 +19,6 @@ public class Drive { private SwerveDrive swerveDrive; public final XboxController DRIVER_CONTROLLER; private Field2d field;; - private boolean slow; private boolean fieldRelative; public static Drive getInstance() { @@ -33,8 +32,7 @@ private Drive() { field = new Field2d(); DRIVER_CONTROLLER = new XboxController(0); - slow = false; - fieldRelative = true; + try { File swerveJsonDirectory = new File(Filesystem.getDeployDirectory(), "swerve"); @@ -54,15 +52,6 @@ private Drive() { } public void periodic() { - if (slow) { - if (DRIVER_CONTROLLER.getLeftBumperButtonPressed()) slow = false; - swerveInputs.scaleTranslation(0.33); - swerveInputs.scaleRotation(0.33); - } else { - if (DRIVER_CONTROLLER.getLeftBumperButtonPressed()) slow = true; - swerveInputs.scaleTranslation(1); - swerveInputs.scaleRotation(1); - } if (fieldRelative) { if (DRIVER_CONTROLLER.getBackButtonPressed()) { From d11bed14d990e63a4a6f88a369e0c9d1af47a4a2 Mon Sep 17 00:00:00 2001 From: BSTHOSHAN Date: Sun, 1 Feb 2026 21:52:42 -0600 Subject: [PATCH 09/21] actual tweak --- src/main/java/frc/robot/Subsystems/Drive/Drive.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/main/java/frc/robot/Subsystems/Drive/Drive.java b/src/main/java/frc/robot/Subsystems/Drive/Drive.java index 4620b5c..6a49262 100644 --- a/src/main/java/frc/robot/Subsystems/Drive/Drive.java +++ b/src/main/java/frc/robot/Subsystems/Drive/Drive.java @@ -67,16 +67,10 @@ public void periodic() { field.setRobotPose(swerveDrive.getPose()); SmartDashboard.putData(field); - } - public void zeroGyro() { - swerveDrive.resetOdometry( - new Pose2d( - swerveDrive.getPose().getX(), - swerveDrive.getPose().getY(), - Rotation2d.fromDegrees(0) - ) - ); + } + + } From b37308233ba30c6e2aa8b6435192f4e66ef5e1e0 Mon Sep 17 00:00:00 2001 From: BSTHOSHAN Date: Sun, 1 Feb 2026 21:57:21 -0600 Subject: [PATCH 10/21] Fix with format? --- .github/workflows/format.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index a634d86..8cbf622 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -30,17 +30,17 @@ jobs: git pull origin "${GITHUB_REF#refs/heads/}" fi - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version: "16" + # - name: Setup Node + # uses: actions/setup-node@v3 + # with: + # node-version: "16" - - name: Clean Install - run: | - if [ -d "node_modules" ]; then - rm -rf node_modules - fi - npm install + # - name: Clean Install + # run: | + # if [ -d "node_modules" ]; then + # rm -rf node_modules + # fi + # npm install - name: Apply Prettier Foramtting run: npx prettier --write "**/*.java" From eedab424d93374f95a7d1a827b214d072665038a Mon Sep 17 00:00:00 2001 From: Connie Date: Mon, 9 Feb 2026 16:23:07 -0600 Subject: [PATCH 11/21] good shooter --- simgui-ds.json | 98 ++++ src/main/java/frc/robot/Robot.java | 15 +- .../frc/robot/Subsystems/Shooter/Shooter.java | 42 +- .../Subsystems/Shooter/ShooterConstants.java | 22 +- .../robot/Subsystems/Shooter/ShooterSim.java | 60 +++ .../Subsystems/Shooter/ShooterStates.java | 4 +- vendordeps/Phoenix5-replay-5.36.0.json | 221 ++++++++ vendordeps/Phoenix6-replay-26.1.1.json | 497 ++++++++++++++++++ vendordeps/REVLib.json | 133 +++++ vendordeps/ReduxLib-2026.1.1.json | 69 +++ vendordeps/ThriftyLib-2026.json | 20 + vendordeps/yagsl-2026.1.30.json | 58 ++ 12 files changed, 1202 insertions(+), 37 deletions(-) create mode 100644 simgui-ds.json create mode 100644 src/main/java/frc/robot/Subsystems/Shooter/ShooterSim.java create mode 100644 vendordeps/Phoenix5-replay-5.36.0.json create mode 100644 vendordeps/Phoenix6-replay-26.1.1.json create mode 100644 vendordeps/REVLib.json create mode 100644 vendordeps/ReduxLib-2026.1.1.json create mode 100644 vendordeps/ThriftyLib-2026.json create mode 100644 vendordeps/yagsl-2026.1.30.json diff --git a/simgui-ds.json b/simgui-ds.json new file mode 100644 index 0000000..c4b7efd --- /dev/null +++ b/simgui-ds.json @@ -0,0 +1,98 @@ +{ + "keyboardJoysticks": [ + { + "axisConfig": [ + { + "decKey": 65, + "incKey": 68 + }, + { + "decKey": 87, + "incKey": 83 + }, + { + "decKey": 69, + "decayRate": 0.0, + "incKey": 82, + "keyRate": 0.009999999776482582 + } + ], + "axisCount": 3, + "buttonCount": 4, + "buttonKeys": [ + 90, + 88, + 67, + 86 + ], + "povConfig": [ + { + "key0": 328, + "key135": 323, + "key180": 322, + "key225": 321, + "key270": 324, + "key315": 327, + "key45": 329, + "key90": 326 + } + ], + "povCount": 1 + }, + { + "axisConfig": [ + { + "decKey": 74, + "incKey": 76 + }, + { + "decKey": 73, + "incKey": 75 + } + ], + "axisCount": 2, + "buttonCount": 4, + "buttonKeys": [ + 77, + 44, + 46, + 47 + ], + "povCount": 0 + }, + { + "axisConfig": [ + { + "decKey": 263, + "incKey": 262 + }, + { + "decKey": 265, + "incKey": 264 + } + ], + "axisCount": 2, + "buttonCount": 6, + "buttonKeys": [ + 260, + 268, + 266, + 261, + 269, + 267 + ], + "povCount": 0 + }, + { + "axisCount": 0, + "buttonCount": 0, + "povCount": 0 + } + ], + "robotJoysticks": [ + { + "guid": "78696e70757401000000000000000000", + "useGamepad": true + } + ] +} diff --git a/src/main/java/frc/robot/Robot.java b/src/main/java/frc/robot/Robot.java index fce3ad6..dec858e 100644 --- a/src/main/java/frc/robot/Robot.java +++ b/src/main/java/frc/robot/Robot.java @@ -5,6 +5,9 @@ package frc.robot; import edu.wpi.first.wpilibj.TimedRobot; +import edu.wpi.first.wpilibj.XboxController; +import frc.robot.Subsystems.Shooter.ShooterSim; +import frc.robot.Subsystems.Shooter.ShooterStates; /** * The methods in this class are called automatically corresponding to each mode, as described in @@ -16,10 +19,20 @@ public class Robot extends TimedRobot { * This function is run when the robot is first started up and should be used for any * initialization code. */ + private XboxController controller = new XboxController(0); + private ShooterSim shooter = new ShooterSim(); public Robot() {} @Override - public void robotPeriodic() {} + public void robotPeriodic() { + if (controller.getBButtonPressed()) { + shooter.setState(ShooterStates.IDLE); + } else if (controller.getAButtonPressed()) { + shooter.setState(ShooterStates.FIXEDSHOOT); + } + + shooter.periodic(); + } @Override public void autonomousInit() {} diff --git a/src/main/java/frc/robot/Subsystems/Shooter/Shooter.java b/src/main/java/frc/robot/Subsystems/Shooter/Shooter.java index 245a58b..7b55792 100644 --- a/src/main/java/frc/robot/Subsystems/Shooter/Shooter.java +++ b/src/main/java/frc/robot/Subsystems/Shooter/Shooter.java @@ -1,39 +1,45 @@ package frc.robot.Subsystems.Shooter; -import com.ctre.phoenix6.hardware.TalonFX; +import com.revrobotics.PersistMode; +import com.revrobotics.ResetMode; +import com.revrobotics.spark.SparkMax; +import com.revrobotics.spark.SparkLowLevel.MotorType; +import com.revrobotics.spark.config.SparkMaxConfig; import edu.wpi.first.math.controller.PIDController; -import frc.robot.Constants; - +import edu.wpi.first.math.controller.SimpleMotorFeedforward; +import static frc.robot.Subsystems.Shooter.ShooterConstants.*; public class Shooter { - private ShooterStates state; - private TalonFX leftMotor; - private TalonFX rightMotor; - private PIDController leadermotorcontrollerleft; - private PIDController followermotorcontrollerright; + protected ShooterStates state; + protected SparkMax followerleftMotor; + protected SparkMax leaderrightMotor; + protected PIDController motorcontrollerright; + private SparkMaxConfig followerConfig; + protected SimpleMotorFeedforward feedforward; public Shooter() { state = ShooterStates.IDLE; - motorcontrollerright = new PIDController(Constants.Shooter.MOTOR_RIGHT_PROPORTION, Constants.Shooter.MOTOR_RIGHT_INTEGRAL, Constants.Shooter.MOTOR_RIGHT_DERIVATIVE); //PID Tune values - - followerleftMotor = new TalonFX(Constants.Shooter.LEFT_MOTOR_ID); - leaderrightMotor = new TalonFX(Constants.Shooter.RIGHT_MOTOR_ID); - - followerleftMotor.set(ControlMode.Follower, leaderrightMotor.getDeviceID()); - followerleftMotor.setInverted(TalonFXInvertType.OpposeMaster); // oppose or follow master??? there is a .FollowMaster Method + motorcontrollerright = new PIDController(MOTOR_RIGHT_PROPORTION, MOTOR_RIGHT_INTEGRAL, MOTOR_RIGHT_DERIVATIVE); //PID Tune values + followerleftMotor = new SparkMax(LEFT_MOTOR_ID, MotorType.kBrushless); + leaderrightMotor = new SparkMax(RIGHT_MOTOR_ID, MotorType.kBrushless); + followerConfig = new SparkMaxConfig(); + followerConfig.follow(leaderrightMotor, true); + followerleftMotor.configure(followerConfig, ResetMode.kResetSafeParameters, PersistMode.kNoPersistParameters); + feedforward = new SimpleMotorFeedforward(kS, kV, kA); } public void setState(ShooterStates state) { this.state = state; } + public void periodic() { - if (state == IDLE) { - rightmotor.set(0); + if (state == ShooterStates.IDLE) { + leaderrightMotor.set(0); } else { - rightMotor.set(motorcontrollerright.calculate(rightMotor.getVelocity().getValueAsDouble(), state.getShooterRPS())); + leaderrightMotor.set(motorcontrollerright.calculate(leaderrightMotor.getEncoder().getVelocity(), state.getShooterRPS() * 60) + feedforward.calculate(state.getShooterRPS() * 60)); } } } diff --git a/src/main/java/frc/robot/Subsystems/Shooter/ShooterConstants.java b/src/main/java/frc/robot/Subsystems/Shooter/ShooterConstants.java index 7038f87..7cf6beb 100644 --- a/src/main/java/frc/robot/Subsystems/Shooter/ShooterConstants.java +++ b/src/main/java/frc/robot/Subsystems/Shooter/ShooterConstants.java @@ -1,16 +1,8 @@ -package frc.robot; +package frc.robot.Subsystems.Shooter; -import edu.wpi.first.math.util.Units; - -public final class Constants { - - private Constants() { - - } - - public static final class Shooter { - public static final double FIXED_SHOOT_RPS = 70; +public final class ShooterConstants { + public static final double FIXED_SHOOT_RPS = 30; public static final int LEFT_MOTOR_ID = 15; public static final int RIGHT_MOTOR_ID = 14; public static final double LONG_PASS_RPS = 100; @@ -20,9 +12,7 @@ public static final class Shooter { public static final double MOTOR_RIGHT_INTEGRAL = 0; public static final double MOTOR_RIGHT_DERIVATIVE = 0; - public static final double MOTOR_LEFT_PROPORTION = 0.0002; - public static final double MOTOR_LEFT_INTEGRAL = 0; - public static final double MOTOR_LEFT_DERIVATIVE = 0; - } - + public static final double kS = 0; + public static final double kV = 0; + public static final double kA = 0; } \ No newline at end of file diff --git a/src/main/java/frc/robot/Subsystems/Shooter/ShooterSim.java b/src/main/java/frc/robot/Subsystems/Shooter/ShooterSim.java new file mode 100644 index 0000000..01c0979 --- /dev/null +++ b/src/main/java/frc/robot/Subsystems/Shooter/ShooterSim.java @@ -0,0 +1,60 @@ +package frc.robot.Subsystems.Shooter; + +import com.revrobotics.sim.SparkMaxSim; +import edu.wpi.first.math.system.plant.DCMotor; +import edu.wpi.first.math.system.plant.LinearSystemId; +import edu.wpi.first.math.util.Units; +import edu.wpi.first.wpilibj.simulation.FlywheelSim; +import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; + +public class ShooterSim extends Shooter { + private SparkMaxSim leftSim; + private SparkMaxSim rightSim; + private FlywheelSim bigWheel; + + public ShooterSim() { + leftSim = new SparkMaxSim(followerleftMotor, DCMotor.getNEO(1)); + rightSim = new SparkMaxSim(leaderrightMotor, DCMotor.getNEO(1)); + bigWheel = new FlywheelSim( + LinearSystemId.createFlywheelSystem( + DCMotor.getNEO(2), + 0.001, + 1 + ), + DCMotor.getNEO(2)); + } + + public void setState(ShooterStates state) { + this.state = state; + } + + public void periodic() { + // Rand sim annoying stuffs + leftSim.setVelocity(Units.radiansToRotations(bigWheel.getAngularVelocityRadPerSec())); + rightSim.setVelocity(Units.radiansToRotations(bigWheel.getAngularVelocityRadPerSec())); + leftSim.setBusVoltage(12); + rightSim.setBusVoltage(12); + bigWheel.update(0.02); + + // Logging + SmartDashboard.putNumber("Shooter/Current Speed (RPM)", bigWheel.getAngularVelocityRPM()); + SmartDashboard.putNumber("Shooter/Target Speed (RPM)", state.getShooterRPS() * 60); + SmartDashboard.putData("Shooter/PID Controller", motorcontrollerright); + + feedforward.setKa(SmartDashboard.getNumber("kA", 0)); + SmartDashboard.putNumber("kA", feedforward.getKa()); + feedforward.setKv(SmartDashboard.getNumber("kV", 0.001)); + SmartDashboard.putNumber("kV", feedforward.getKv()); + feedforward.setKs(SmartDashboard.getNumber("kS", 0.1)); + SmartDashboard.putNumber("kS", feedforward.getKs()); + + + + if (state == ShooterStates.IDLE) { + bigWheel.setInputVoltage(0); + } else { + bigWheel.setInputVoltage(12 * motorcontrollerright.calculate(bigWheel.getAngularVelocityRPM(), state.getShooterRPS() * 60) + feedforward.calculate(state.getShooterRPS() * 60)); + } + } + +} diff --git a/src/main/java/frc/robot/Subsystems/Shooter/ShooterStates.java b/src/main/java/frc/robot/Subsystems/Shooter/ShooterStates.java index 0d4f8c5..79aaf29 100644 --- a/src/main/java/frc/robot/Subsystems/Shooter/ShooterStates.java +++ b/src/main/java/frc/robot/Subsystems/Shooter/ShooterStates.java @@ -1,8 +1,8 @@ package frc.robot.Subsystems.Shooter; -import static frc.robot.Constants.Shooter.*; +import static frc.robot.Subsystems.Shooter.ShooterConstants.*; -enum ShooterStates { +public enum ShooterStates { IDLE(0), FIXEDSHOOT(FIXED_SHOOT_RPS), DYNAMICSHOOT(FIXED_SHOOT_RPS), diff --git a/vendordeps/Phoenix5-replay-5.36.0.json b/vendordeps/Phoenix5-replay-5.36.0.json new file mode 100644 index 0000000..0e799ed --- /dev/null +++ b/vendordeps/Phoenix5-replay-5.36.0.json @@ -0,0 +1,221 @@ +{ + "fileName": "Phoenix5-replay-5.36.0.json", + "name": "CTRE-Phoenix (v5)", + "version": "5.36.0", + "frcYear": "2026", + "uuid": "fbc886a4-2cec-40c0-9835-71086a8cc3df", + "mavenUrls": [ + "https://maven.ctr-electronics.com/release/" + ], + "jsonUrl": "https://maven.ctr-electronics.com/release/com/ctre/phoenix/Phoenix5-replay-frc2026-latest.json", + "requires": [ + { + "uuid": "e7900d8d-826f-4dca-a1ff-182f658e98af", + "errorMessage": "Phoenix 5 requires low-level libraries from Phoenix 6. Please add the Phoenix 6 vendordep before adding Phoenix 5.", + "offlineFileName": "Phoenix6-replay-frc2026-latest.json", + "onlineUrl": "https://maven.ctr-electronics.com/release/com/ctre/phoenix6/latest/Phoenix6-replay-frc2026-latest.json" + } + ], + "conflictsWith": [ + { + "uuid": "e995de00-2c64-4df5-8831-c1441420ff19", + "errorMessage": "Users must use the regular Phoenix 5 vendordep when using the regular Phoenix 6 vendordep.", + "offlineFileName": "Phoenix6-frc2026-latest.json" + }, + { + "uuid": "ab676553-b602-441f-a38d-f1296eff6537", + "errorMessage": "Users cannot have both the replay and regular Phoenix 5 vendordeps in their robot program.", + "offlineFileName": "Phoenix5-frc2026-latest.json" + } + ], + "javaDependencies": [ + { + "groupId": "com.ctre.phoenix", + "artifactId": "api-java", + "version": "5.36.0" + }, + { + "groupId": "com.ctre.phoenix", + "artifactId": "wpiapi-java", + "version": "5.36.0" + } + ], + "jniDependencies": [ + { + "groupId": "com.ctre.phoenix", + "artifactId": "cci", + "version": "5.36.0", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "linuxathena" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix.replay", + "artifactId": "cci-replay", + "version": "5.36.0", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix.sim", + "artifactId": "cci-sim", + "version": "5.36.0", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + } + ], + "cppDependencies": [ + { + "groupId": "com.ctre.phoenix", + "artifactId": "wpiapi-cpp", + "version": "5.36.0", + "libName": "CTRE_Phoenix_WPI", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "linuxathena" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix", + "artifactId": "api-cpp", + "version": "5.36.0", + "libName": "CTRE_Phoenix", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "linuxathena" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix", + "artifactId": "cci", + "version": "5.36.0", + "libName": "CTRE_PhoenixCCI", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "linuxathena" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix.replay", + "artifactId": "wpiapi-cpp-replay", + "version": "5.36.0", + "libName": "CTRE_Phoenix_WPIReplay", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix.replay", + "artifactId": "api-cpp-replay", + "version": "5.36.0", + "libName": "CTRE_PhoenixReplay", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix.replay", + "artifactId": "cci-replay", + "version": "5.36.0", + "libName": "CTRE_PhoenixCCIReplay", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix.sim", + "artifactId": "wpiapi-cpp-sim", + "version": "5.36.0", + "libName": "CTRE_Phoenix_WPISim", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix.sim", + "artifactId": "api-cpp-sim", + "version": "5.36.0", + "libName": "CTRE_PhoenixSim", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix.sim", + "artifactId": "cci-sim", + "version": "5.36.0", + "libName": "CTRE_PhoenixCCISim", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + } + ] +} \ No newline at end of file diff --git a/vendordeps/Phoenix6-replay-26.1.1.json b/vendordeps/Phoenix6-replay-26.1.1.json new file mode 100644 index 0000000..b25b7e6 --- /dev/null +++ b/vendordeps/Phoenix6-replay-26.1.1.json @@ -0,0 +1,497 @@ +{ + "fileName": "Phoenix6-replay-26.1.1.json", + "name": "CTRE-Phoenix (v6) Replay", + "version": "26.1.1", + "frcYear": "2026", + "uuid": "e7900d8d-826f-4dca-a1ff-182f658e98af", + "mavenUrls": [ + "https://maven.ctr-electronics.com/release/" + ], + "jsonUrl": "https://maven.ctr-electronics.com/release/com/ctre/phoenix6/latest/Phoenix6-replay-frc2026-latest.json", + "conflictsWith": [ + { + "uuid": "e995de00-2c64-4df5-8831-c1441420ff19", + "errorMessage": "Users can not have both the replay and regular Phoenix 6 vendordeps in their robot program.", + "offlineFileName": "Phoenix6-frc2026-latest.json" + } + ], + "javaDependencies": [ + { + "groupId": "com.ctre.phoenix6", + "artifactId": "wpiapi-java", + "version": "26.1.1" + } + ], + "jniDependencies": [ + { + "groupId": "com.ctre.phoenix6", + "artifactId": "api-cpp", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "linuxathena" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix6", + "artifactId": "tools", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "linuxathena" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix6.replay", + "artifactId": "api-cpp-replay", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix6.replay", + "artifactId": "tools-replay", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "api-cpp-sim", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "tools-sim", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simTalonSRX", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simVictorSPX", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simPigeonIMU", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProTalonFX", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProTalonFXS", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProCANcoder", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProPigeon2", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProCANrange", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProCANdi", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProCANdle", + "version": "26.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + } + ], + "cppDependencies": [ + { + "groupId": "com.ctre.phoenix6", + "artifactId": "wpiapi-cpp", + "version": "26.1.1", + "libName": "CTRE_Phoenix6_WPI", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "linuxathena" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix6", + "artifactId": "tools", + "version": "26.1.1", + "libName": "CTRE_PhoenixTools", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "linuxathena" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix6.replay", + "artifactId": "wpiapi-cpp-replay", + "version": "26.1.1", + "libName": "CTRE_Phoenix6_WPIReplay", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix6.replay", + "artifactId": "tools-replay", + "version": "26.1.1", + "libName": "CTRE_PhoenixTools_Replay", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "hwsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "wpiapi-cpp-sim", + "version": "26.1.1", + "libName": "CTRE_Phoenix6_WPISim", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "tools-sim", + "version": "26.1.1", + "libName": "CTRE_PhoenixTools_Sim", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simTalonSRX", + "version": "26.1.1", + "libName": "CTRE_SimTalonSRX", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simVictorSPX", + "version": "26.1.1", + "libName": "CTRE_SimVictorSPX", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simPigeonIMU", + "version": "26.1.1", + "libName": "CTRE_SimPigeonIMU", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProTalonFX", + "version": "26.1.1", + "libName": "CTRE_SimProTalonFX", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProTalonFXS", + "version": "26.1.1", + "libName": "CTRE_SimProTalonFXS", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProCANcoder", + "version": "26.1.1", + "libName": "CTRE_SimProCANcoder", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProPigeon2", + "version": "26.1.1", + "libName": "CTRE_SimProPigeon2", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProCANrange", + "version": "26.1.1", + "libName": "CTRE_SimProCANrange", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProCANdi", + "version": "26.1.1", + "libName": "CTRE_SimProCANdi", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + }, + { + "groupId": "com.ctre.phoenix6.sim", + "artifactId": "simProCANdle", + "version": "26.1.1", + "libName": "CTRE_SimProCANdle", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "linuxarm64", + "osxuniversal" + ], + "simMode": "swsim" + } + ] +} \ No newline at end of file diff --git a/vendordeps/REVLib.json b/vendordeps/REVLib.json new file mode 100644 index 0000000..d35e593 --- /dev/null +++ b/vendordeps/REVLib.json @@ -0,0 +1,133 @@ +{ + "fileName": "REVLib.json", + "name": "REVLib", + "version": "2026.0.1", + "frcYear": "2026", + "uuid": "3f48eb8c-50fe-43a6-9cb7-44c86353c4cb", + "mavenUrls": [ + "https://maven.revrobotics.com/" + ], + "jsonUrl": "https://software-metadata.revrobotics.com/REVLib-2026.json", + "javaDependencies": [ + { + "groupId": "com.revrobotics.frc", + "artifactId": "REVLib-java", + "version": "2026.0.1" + } + ], + "jniDependencies": [ + { + "groupId": "com.revrobotics.frc", + "artifactId": "REVLib-driver", + "version": "2026.0.1", + "skipInvalidPlatforms": true, + "isJar": false, + "validPlatforms": [ + "windowsx86-64", + "linuxarm64", + "linuxx86-64", + "linuxathena", + "linuxarm32", + "osxuniversal" + ] + }, + { + "groupId": "com.revrobotics.frc", + "artifactId": "RevLibBackendDriver", + "version": "2026.0.1", + "skipInvalidPlatforms": true, + "isJar": false, + "validPlatforms": [ + "windowsx86-64", + "linuxarm64", + "linuxx86-64", + "linuxathena", + "linuxarm32", + "osxuniversal" + ] + }, + { + "groupId": "com.revrobotics.frc", + "artifactId": "RevLibWpiBackendDriver", + "version": "2026.0.1", + "skipInvalidPlatforms": true, + "isJar": false, + "validPlatforms": [ + "windowsx86-64", + "linuxarm64", + "linuxx86-64", + "linuxathena", + "linuxarm32", + "osxuniversal" + ] + } + ], + "cppDependencies": [ + { + "groupId": "com.revrobotics.frc", + "artifactId": "REVLib-cpp", + "version": "2026.0.1", + "libName": "REVLib", + "headerClassifier": "headers", + "sharedLibrary": false, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxarm64", + "linuxx86-64", + "linuxathena", + "linuxarm32", + "osxuniversal" + ] + }, + { + "groupId": "com.revrobotics.frc", + "artifactId": "REVLib-driver", + "version": "2026.0.1", + "libName": "REVLibDriver", + "headerClassifier": "headers", + "sharedLibrary": false, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxarm64", + "linuxx86-64", + "linuxathena", + "linuxarm32", + "osxuniversal" + ] + }, + { + "groupId": "com.revrobotics.frc", + "artifactId": "RevLibBackendDriver", + "version": "2026.0.1", + "libName": "BackendDriver", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxarm64", + "linuxx86-64", + "linuxathena", + "linuxarm32", + "osxuniversal" + ] + }, + { + "groupId": "com.revrobotics.frc", + "artifactId": "RevLibWpiBackendDriver", + "version": "2026.0.1", + "libName": "REVLibWpi", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxarm64", + "linuxx86-64", + "linuxathena", + "linuxarm32", + "osxuniversal" + ] + } + ] +} \ No newline at end of file diff --git a/vendordeps/ReduxLib-2026.1.1.json b/vendordeps/ReduxLib-2026.1.1.json new file mode 100644 index 0000000..09dd4f0 --- /dev/null +++ b/vendordeps/ReduxLib-2026.1.1.json @@ -0,0 +1,69 @@ +{ + "fileName": "ReduxLib-2026.1.1.json", + "name": "ReduxLib", + "version": "2026.1.1", + "frcYear": "2026", + "uuid": "151ecca8-670b-4026-8160-cdd2679ef2bd", + "mavenUrls": [ + "https://maven.reduxrobotics.com/" + ], + "jsonUrl": "https://frcsdk.reduxrobotics.com/ReduxLib_2026.json", + "javaDependencies": [ + { + "groupId": "com.reduxrobotics.frc", + "artifactId": "ReduxLib-java", + "version": "2026.1.1" + } + ], + "jniDependencies": [ + { + "groupId": "com.reduxrobotics.frc", + "artifactId": "ReduxLib-fifo", + "version": "2026.1.1", + "isJar": false, + "skipInvalidPlatforms": true, + "validPlatforms": [ + "linuxathena", + "linuxx86-64", + "linuxarm64", + "osxuniversal", + "windowsx86-64" + ] + } + ], + "cppDependencies": [ + { + "groupId": "com.reduxrobotics.frc", + "artifactId": "ReduxLib-cpp", + "version": "2026.1.1", + "libName": "ReduxLib", + "headerClassifier": "headers", + "sourcesClassifier": "sources", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "linuxathena", + "linuxx86-64", + "linuxarm64", + "osxuniversal", + "windowsx86-64" + ] + }, + { + "groupId": "com.reduxrobotics.frc", + "artifactId": "ReduxLib-fifo", + "version": "2026.1.1", + "libName": "reduxfifo", + "headerClassifier": "headers", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "linuxathena", + "linuxx86-64", + "linuxarm64", + "osxuniversal", + "windowsx86-64" + ] + } + ] +} \ No newline at end of file diff --git a/vendordeps/ThriftyLib-2026.json b/vendordeps/ThriftyLib-2026.json new file mode 100644 index 0000000..9aa5808 --- /dev/null +++ b/vendordeps/ThriftyLib-2026.json @@ -0,0 +1,20 @@ +{ + "fileName": "ThriftyLib-2026.json", + "name": "ThriftyLib", + "version": "2026.0.1", + "frcYear": "2026", + "uuid": "60b2694b-9e6e-4026-81ee-6f167946f4b0", + "mavenUrls": [ + "https://docs.home.thethriftybot.com" + ], + "jsonUrl": "https://docs.home.thethriftybot.com/ThriftyLib-2026.json", + "javaDependencies": [ + { + "groupId": "com.thethriftybot.frc", + "artifactId": "ThriftyLib-java", + "version": "2026.0.1" + } + ], + "jniDependencies": [], + "cppDependencies": [] +} \ No newline at end of file diff --git a/vendordeps/yagsl-2026.1.30.json b/vendordeps/yagsl-2026.1.30.json new file mode 100644 index 0000000..0ca96e1 --- /dev/null +++ b/vendordeps/yagsl-2026.1.30.json @@ -0,0 +1,58 @@ +{ + "fileName": "yagsl-2026.1.30.json", + "name": "YAGSL", + "version": "2026.1.30", + "frcYear": "2026", + "uuid": "1ccce5a4-acd2-4d18-bca3-4b8047188400", + "mavenUrls": [ + "https://yet-another-software-suite.github.io/YAGSL/releases/", + "https://repo1.maven.org/maven2" + ], + "jsonUrl": "https://yet-another-software-suite.github.io/YAGSL/yagsl.json", + "javaDependencies": [ + { + "groupId": "swervelib", + "artifactId": "YAGSL-java", + "version": "2026.1.30" + }, + { + "groupId": "org.dyn4j", + "artifactId": "dyn4j", + "version": "5.0.2" + } + ], + "requires": [ + { + "uuid": "151ecca8-670b-4026-8160-cdd2679ef2bd", + "errorMessage": "ReduxLib is required!", + "offlineFileName": "ReduxLib.json", + "onlineUrl": "https://frcsdk.reduxrobotics.com/ReduxLib_2026.json" + }, + { + "uuid": "3f48eb8c-50fe-43a6-9cb7-44c86353c4cb", + "errorMessage": "REVLib is required!", + "offlineFileName": "REVLib.json", + "onlineUrl": "https://software-metadata.revrobotics.com/REVLib-2026.json" + }, + { + "uuid": "e7900d8d-826f-4dca-a1ff-182f658e98af", + "errorMessage": "Phoenix6 Replay is required!", + "offlineFileName": "Phoenix6-replay-26.1.0.json", + "onlineUrl": "https://maven.ctr-electronics.com/release/com/ctre/phoenix6/latest/Phoenix6-replay-frc2026-latest.json" + }, + { + "uuid": "fbc886a4-2cec-40c0-9835-71086a8cc3df", + "errorMessage": "Phoenix5 Replay Compatibility is required!", + "offlineFileName": "Phoenix5-replay-5.36.0.json", + "onlineUrl": "https://maven.ctr-electronics.com/release/com/ctre/phoenix/Phoenix5-replay-frc2026-latest.json" + }, + { + "uuid": "60b2694b-9e6e-4026-81ee-6f167946f4b0", + "errorMessage": "ThriftyLib is required!", + "offlineFileName": "ThriftyLib.json", + "onlineUrl": "https://docs.home.thethriftybot.com/ThriftyLib-2026.json" + } + ], + "jniDependencies": [], + "cppDependencies": [] +} \ No newline at end of file From f4ed5cb437244aee50f4619f20221d10238add97 Mon Sep 17 00:00:00 2001 From: Connie-bread Date: Wed, 11 Feb 2026 16:05:51 -0600 Subject: [PATCH 12/21] done hopefully --- .../frc/robot/Subsystems/Shooter/Shooter.java | 4 +-- .../Subsystems/Shooter/ShooterConstants.java | 23 +++++++++++++ .../robot/Subsystems/Shooter/ShooterSim.java | 32 ++++++++++--------- .../Subsystems/Shooter/ShooterStates.java | 2 +- 4 files changed, 43 insertions(+), 18 deletions(-) diff --git a/src/main/java/frc/robot/Subsystems/Shooter/Shooter.java b/src/main/java/frc/robot/Subsystems/Shooter/Shooter.java index 7b55792..d4080c4 100644 --- a/src/main/java/frc/robot/Subsystems/Shooter/Shooter.java +++ b/src/main/java/frc/robot/Subsystems/Shooter/Shooter.java @@ -37,9 +37,9 @@ public void setState(ShooterStates state) { public void periodic() { if (state == ShooterStates.IDLE) { - leaderrightMotor.set(0); + leaderrightMotor.set(IDLESpeedOrVoltage); } else { - leaderrightMotor.set(motorcontrollerright.calculate(leaderrightMotor.getEncoder().getVelocity(), state.getShooterRPS() * 60) + feedforward.calculate(state.getShooterRPS() * 60)); + leaderrightMotor.set(motorcontrollerright.calculate(leaderrightMotor.getEncoder().getVelocity(), state.getShooterRPS() * RPStoRPMConversionFactor) + feedforward.calculate(state.getShooterRPS() * RPStoRPMConversionFactor)); } } } diff --git a/src/main/java/frc/robot/Subsystems/Shooter/ShooterConstants.java b/src/main/java/frc/robot/Subsystems/Shooter/ShooterConstants.java index 7cf6beb..a447885 100644 --- a/src/main/java/frc/robot/Subsystems/Shooter/ShooterConstants.java +++ b/src/main/java/frc/robot/Subsystems/Shooter/ShooterConstants.java @@ -2,6 +2,7 @@ public final class ShooterConstants { + public static final double IDLE_RPS = 0; public static final double FIXED_SHOOT_RPS = 30; public static final int LEFT_MOTOR_ID = 15; public static final int RIGHT_MOTOR_ID = 14; @@ -15,4 +16,26 @@ public final class ShooterConstants { public static final double kS = 0; public static final double kV = 0; public static final double kA = 0; + + // for Simulation + public static final int leftSimMotor = 1; + public static final int rightSimMotor = 1; + public static final double JKgMetersSquared = 0.001; + public static final double gearing = 0.001; + + public static final int busVoltage = 12; + public static final double bigWheelUpdate = 0.02; + + public static final double kADefaultValue = 0.02; + public static final double kVDefaultValue = 0.02; + public static final double kDefaultValue = 0.02; + + public static final double kADefaultValueSim = 0; + public static final double kVDefaultValueSim = 0.001; + public static final double kSDefaultValueSim = 0.1; + + public static final int RPStoRPMConversionFactor = 60; + public static final int IDLESpeedOrVoltage = 0; + public static final int BigWheelVoltageInitalCalcFactor = 12; + } \ No newline at end of file diff --git a/src/main/java/frc/robot/Subsystems/Shooter/ShooterSim.java b/src/main/java/frc/robot/Subsystems/Shooter/ShooterSim.java index 01c0979..e419c49 100644 --- a/src/main/java/frc/robot/Subsystems/Shooter/ShooterSim.java +++ b/src/main/java/frc/robot/Subsystems/Shooter/ShooterSim.java @@ -1,5 +1,7 @@ package frc.robot.Subsystems.Shooter; +import static frc.robot.Subsystems.Shooter.ShooterConstants.*; + import com.revrobotics.sim.SparkMaxSim; import edu.wpi.first.math.system.plant.DCMotor; import edu.wpi.first.math.system.plant.LinearSystemId; @@ -13,15 +15,15 @@ public class ShooterSim extends Shooter { private FlywheelSim bigWheel; public ShooterSim() { - leftSim = new SparkMaxSim(followerleftMotor, DCMotor.getNEO(1)); - rightSim = new SparkMaxSim(leaderrightMotor, DCMotor.getNEO(1)); + leftSim = new SparkMaxSim(followerleftMotor, DCMotor.getNEO(leftSimMotor)); + rightSim = new SparkMaxSim(leaderrightMotor, DCMotor.getNEO(rightSimMotor)); bigWheel = new FlywheelSim( LinearSystemId.createFlywheelSystem( - DCMotor.getNEO(2), - 0.001, - 1 + DCMotor.getNEO(leftSimMotor + rightSimMotor), + JKgMetersSquared, + gearing ), - DCMotor.getNEO(2)); + DCMotor.getNEO(leftSimMotor + rightSimMotor)); } public void setState(ShooterStates state) { @@ -32,28 +34,28 @@ public void periodic() { // Rand sim annoying stuffs leftSim.setVelocity(Units.radiansToRotations(bigWheel.getAngularVelocityRadPerSec())); rightSim.setVelocity(Units.radiansToRotations(bigWheel.getAngularVelocityRadPerSec())); - leftSim.setBusVoltage(12); - rightSim.setBusVoltage(12); - bigWheel.update(0.02); + leftSim.setBusVoltage(busVoltage); + rightSim.setBusVoltage(busVoltage); + bigWheel.update(bigWheelUpdate); // Logging SmartDashboard.putNumber("Shooter/Current Speed (RPM)", bigWheel.getAngularVelocityRPM()); - SmartDashboard.putNumber("Shooter/Target Speed (RPM)", state.getShooterRPS() * 60); + SmartDashboard.putNumber("Shooter/Target Speed (RPM)", state.getShooterRPS() * RPStoRPMConversionFactor); SmartDashboard.putData("Shooter/PID Controller", motorcontrollerright); - feedforward.setKa(SmartDashboard.getNumber("kA", 0)); + feedforward.setKa(SmartDashboard.getNumber("kA", kADefaultValueSim)); SmartDashboard.putNumber("kA", feedforward.getKa()); - feedforward.setKv(SmartDashboard.getNumber("kV", 0.001)); + feedforward.setKv(SmartDashboard.getNumber("kV", kVDefaultValueSim)); SmartDashboard.putNumber("kV", feedforward.getKv()); - feedforward.setKs(SmartDashboard.getNumber("kS", 0.1)); + feedforward.setKs(SmartDashboard.getNumber("kS", kSDefaultValueSim)); SmartDashboard.putNumber("kS", feedforward.getKs()); if (state == ShooterStates.IDLE) { - bigWheel.setInputVoltage(0); + bigWheel.setInputVoltage(IDLESpeedOrVoltage); } else { - bigWheel.setInputVoltage(12 * motorcontrollerright.calculate(bigWheel.getAngularVelocityRPM(), state.getShooterRPS() * 60) + feedforward.calculate(state.getShooterRPS() * 60)); + bigWheel.setInputVoltage(BigWheelVoltageInitalCalcFactor * motorcontrollerright.calculate(bigWheel.getAngularVelocityRPM(), state.getShooterRPS() * RPStoRPMConversionFactor) + feedforward.calculate(state.getShooterRPS() * RPStoRPMConversionFactor)); } } diff --git a/src/main/java/frc/robot/Subsystems/Shooter/ShooterStates.java b/src/main/java/frc/robot/Subsystems/Shooter/ShooterStates.java index 79aaf29..bd7daa4 100644 --- a/src/main/java/frc/robot/Subsystems/Shooter/ShooterStates.java +++ b/src/main/java/frc/robot/Subsystems/Shooter/ShooterStates.java @@ -3,7 +3,7 @@ import static frc.robot.Subsystems.Shooter.ShooterConstants.*; public enum ShooterStates { - IDLE(0), + IDLE(IDLE_RPS), FIXEDSHOOT(FIXED_SHOOT_RPS), DYNAMICSHOOT(FIXED_SHOOT_RPS), LONGPASS(LONG_PASS_RPS); From 549f49b29994f4e8d667647a639bfb9535ad5a2b Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 11 Feb 2026 22:07:35 +0000 Subject: [PATCH 13/21] Apply Prettier format --- node_modules/.bin/prettier | 1 + node_modules/.package-lock.json | 137 + .../@chevrotain/cst-dts-gen/LICENSE.txt | 202 + .../@chevrotain/cst-dts-gen/lib/src/api.d.ts | 2 + .../@chevrotain/cst-dts-gen/lib/src/api.js | 12 + .../cst-dts-gen/lib/src/api.js.map | 1 + .../cst-dts-gen/lib/src/generate.d.ts | 3 + .../cst-dts-gen/lib/src/generate.js | 65 + .../cst-dts-gen/lib/src/generate.js.map | 1 + .../cst-dts-gen/lib/src/model.d.ts | 19 + .../@chevrotain/cst-dts-gen/lib/src/model.js | 96 + .../cst-dts-gen/lib/src/model.js.map | 1 + .../@chevrotain/cst-dts-gen/package.json | 50 + .../@chevrotain/cst-dts-gen/src/api.ts | 22 + .../@chevrotain/cst-dts-gen/src/generate.ts | 98 + .../@chevrotain/cst-dts-gen/src/model.ts | 172 + node_modules/@chevrotain/gast/LICENSE.txt | 202 + .../@chevrotain/gast/lib/src/api.d.ts | 3 + node_modules/@chevrotain/gast/lib/src/api.js | 4 + .../@chevrotain/gast/lib/src/api.js.map | 1 + .../@chevrotain/gast/lib/src/helpers.d.ts | 10 + .../@chevrotain/gast/lib/src/helpers.js | 79 + .../@chevrotain/gast/lib/src/helpers.js.map | 1 + .../@chevrotain/gast/lib/src/model.d.ts | 144 + .../@chevrotain/gast/lib/src/model.js | 225 + .../@chevrotain/gast/lib/src/model.js.map | 1 + .../@chevrotain/gast/lib/src/visitor.d.ts | 15 + .../@chevrotain/gast/lib/src/visitor.js | 52 + .../@chevrotain/gast/lib/src/visitor.js.map | 1 + node_modules/@chevrotain/gast/package.json | 52 + node_modules/@chevrotain/gast/src/api.ts | 23 + node_modules/@chevrotain/gast/src/helpers.ts | 98 + node_modules/@chevrotain/gast/src/model.ts | 416 + node_modules/@chevrotain/gast/src/visitor.ts | 76 + .../@chevrotain/regexp-to-ast/LICENSE.txt | 202 + .../@chevrotain/regexp-to-ast/lib/src/api.js | 3 + .../regexp-to-ast/lib/src/api.js.map | 1 + .../lib/src/base-regexp-visitor.js | 86 + .../lib/src/base-regexp-visitor.js.map | 1 + .../lib/src/character-classes.js | 42 + .../lib/src/character-classes.js.map | 1 + .../regexp-to-ast/lib/src/regexp-parser.js | 731 + .../lib/src/regexp-parser.js.map | 1 + .../regexp-to-ast/lib/src/utils.js | 35 + .../regexp-to-ast/lib/src/utils.js.map | 1 + .../@chevrotain/regexp-to-ast/package.json | 47 + .../@chevrotain/regexp-to-ast/src/api.ts | 2 + .../regexp-to-ast/src/base-regexp-visitor.ts | 116 + .../regexp-to-ast/src/character-classes.ts | 45 + .../regexp-to-ast/src/regexp-parser.ts | 840 + .../@chevrotain/regexp-to-ast/src/utils.ts | 44 + .../@chevrotain/regexp-to-ast/types.d.ts | 134 + node_modules/@chevrotain/types/LICENSE.txt | 202 + node_modules/@chevrotain/types/api.d.ts | 2790 ++ node_modules/@chevrotain/types/package.json | 50 + node_modules/@chevrotain/utils/LICENSE.txt | 202 + .../@chevrotain/utils/lib/src/api.d.ts | 3 + node_modules/@chevrotain/utils/lib/src/api.js | 4 + .../@chevrotain/utils/lib/src/api.js.map | 1 + .../@chevrotain/utils/lib/src/print.d.ts | 2 + .../@chevrotain/utils/lib/src/print.js | 14 + .../@chevrotain/utils/lib/src/print.js.map | 1 + .../@chevrotain/utils/lib/src/timer.d.ts | 4 + .../@chevrotain/utils/lib/src/timer.js | 8 + .../@chevrotain/utils/lib/src/timer.js.map | 1 + .../utils/lib/src/to-fast-properties.d.ts | 1 + .../utils/lib/src/to-fast-properties.js | 24 + .../utils/lib/src/to-fast-properties.js.map | 1 + node_modules/@chevrotain/utils/package.json | 46 + node_modules/@chevrotain/utils/src/api.ts | 3 + node_modules/@chevrotain/utils/src/print.ts | 14 + node_modules/@chevrotain/utils/src/timer.ts | 7 + .../utils/src/to-fast-properties.ts | 27 + node_modules/chevrotain-allstar/LICENSE | 16 + node_modules/chevrotain-allstar/README.md | 22 + .../lib/all-star-lookahead.d.ts | 36 + .../lib/all-star-lookahead.d.ts.map | 1 + .../lib/all-star-lookahead.js | 556 + .../lib/all-star-lookahead.js.map | 1 + node_modules/chevrotain-allstar/lib/atn.d.ts | 105 + .../chevrotain-allstar/lib/atn.d.ts.map | 1 + node_modules/chevrotain-allstar/lib/atn.js | 404 + .../chevrotain-allstar/lib/atn.js.map | 1 + node_modules/chevrotain-allstar/lib/dfa.d.ts | 37 + .../chevrotain-allstar/lib/dfa.d.ts.map | 1 + node_modules/chevrotain-allstar/lib/dfa.js | 46 + .../chevrotain-allstar/lib/dfa.js.map | 1 + .../chevrotain-allstar/lib/index.d.ts | 7 + .../chevrotain-allstar/lib/index.d.ts.map | 1 + node_modules/chevrotain-allstar/lib/index.js | 7 + .../chevrotain-allstar/lib/index.js.map | 1 + node_modules/chevrotain-allstar/package.json | 52 + .../src/all-star-lookahead.ts | 763 + .../chevrotain-allstar/src/atn.test.ts | 302 + node_modules/chevrotain-allstar/src/atn.ts | 642 + node_modules/chevrotain-allstar/src/dfa.ts | 78 + node_modules/chevrotain-allstar/src/index.ts | 11 + node_modules/chevrotain/BREAKING_CHANGES.md | 1 + node_modules/chevrotain/CHANGELOG.md | 1 + node_modules/chevrotain/LICENSE.txt | 202 + node_modules/chevrotain/README.md | 20 + node_modules/chevrotain/chevrotain.d.ts | 2 + node_modules/chevrotain/diagrams/README.md | 1 + node_modules/chevrotain/diagrams/diagrams.css | 85 + .../diagrams/src/diagrams_behavior.js | 223 + .../diagrams/src/diagrams_builder.js | 204 + .../diagrams/src/diagrams_serializer.js | 20 + node_modules/chevrotain/diagrams/src/main.js | 30 + .../diagrams/vendor/railroad-diagrams.js | 968 + .../chevrotain/lib/chevrotain.min.mjs | 165 + node_modules/chevrotain/lib/chevrotain.mjs | 9554 ++++++ node_modules/chevrotain/lib/src/api.js | 33 + node_modules/chevrotain/lib/src/api.js.map | 1 + .../lib/src/diagrams/render_public.js | 39 + .../lib/src/diagrams/render_public.js.map | 1 + .../lib/src/lang/lang_extensions.js | 10 + .../lib/src/lang/lang_extensions.js.map | 1 + .../chevrotain/lib/src/parse/constants.js | 3 + .../chevrotain/lib/src/parse/constants.js.map | 1 + .../chevrotain/lib/src/parse/cst/cst.js | 71 + .../chevrotain/lib/src/parse/cst/cst.js.map | 1 + .../lib/src/parse/cst/cst_visitor.js | 90 + .../lib/src/parse/cst/cst_visitor.js.map | 1 + .../chevrotain/lib/src/parse/errors_public.js | 175 + .../lib/src/parse/errors_public.js.map | 1 + .../lib/src/parse/exceptions_public.js | 58 + .../lib/src/parse/exceptions_public.js.map | 1 + .../lib/src/parse/grammar/checks.js | 435 + .../lib/src/parse/grammar/checks.js.map | 1 + .../chevrotain/lib/src/parse/grammar/first.js | 56 + .../lib/src/parse/grammar/first.js.map | 1 + .../lib/src/parse/grammar/follow.js | 45 + .../lib/src/parse/grammar/follow.js.map | 1 + .../grammar/gast/gast_resolver_public.js | 21 + .../grammar/gast/gast_resolver_public.js.map | 1 + .../lib/src/parse/grammar/interpreter.js | 492 + .../lib/src/parse/grammar/interpreter.js.map | 1 + .../chevrotain/lib/src/parse/grammar/keys.js | 26 + .../lib/src/parse/grammar/keys.js.map | 1 + .../lib/src/parse/grammar/llk_lookahead.js | 47 + .../src/parse/grammar/llk_lookahead.js.map | 1 + .../lib/src/parse/grammar/lookahead.js | 471 + .../lib/src/parse/grammar/lookahead.js.map | 1 + .../lib/src/parse/grammar/resolver.js | 38 + .../lib/src/parse/grammar/resolver.js.map | 1 + .../chevrotain/lib/src/parse/grammar/rest.js | 103 + .../lib/src/parse/grammar/rest.js.map | 1 + .../chevrotain/lib/src/parse/grammar/types.js | 2 + .../lib/src/parse/grammar/types.js.map | 1 + .../chevrotain/lib/src/parse/parser/parser.js | 201 + .../lib/src/parse/parser/parser.js.map | 1 + .../src/parse/parser/traits/context_assist.js | 22 + .../parse/parser/traits/context_assist.js.map | 1 + .../src/parse/parser/traits/error_handler.js | 74 + .../parse/parser/traits/error_handler.js.map | 1 + .../src/parse/parser/traits/gast_recorder.js | 295 + .../parse/parser/traits/gast_recorder.js.map | 1 + .../src/parse/parser/traits/lexer_adapter.js | 70 + .../parse/parser/traits/lexer_adapter.js.map | 1 + .../lib/src/parse/parser/traits/looksahead.js | 134 + .../src/parse/parser/traits/looksahead.js.map | 1 + .../src/parse/parser/traits/parser_traits.js | 4 + .../parse/parser/traits/parser_traits.js.map | 1 + .../src/parse/parser/traits/perf_tracer.js | 48 + .../parse/parser/traits/perf_tracer.js.map | 1 + .../src/parse/parser/traits/recognizer_api.js | 334 + .../parse/parser/traits/recognizer_api.js.map | 1 + .../parse/parser/traits/recognizer_engine.js | 542 + .../parser/traits/recognizer_engine.js.map | 1 + .../src/parse/parser/traits/recoverable.js | 290 + .../parse/parser/traits/recoverable.js.map | 1 + .../src/parse/parser/traits/tree_builder.js | 191 + .../parse/parser/traits/tree_builder.js.map | 1 + .../chevrotain/lib/src/parse/parser/types.js | 2 + .../lib/src/parse/parser/types.js.map | 1 + .../src/parse/parser/utils/apply_mixins.js | 20 + .../parse/parser/utils/apply_mixins.js.map | 1 + node_modules/chevrotain/lib/src/scan/lexer.js | 875 + .../chevrotain/lib/src/scan/lexer.js.map | 1 + .../lib/src/scan/lexer_errors_public.js | 9 + .../lib/src/scan/lexer_errors_public.js.map | 1 + .../chevrotain/lib/src/scan/lexer_public.js | 646 + .../lib/src/scan/lexer_public.js.map | 1 + .../chevrotain/lib/src/scan/reg_exp.js | 240 + .../chevrotain/lib/src/scan/reg_exp.js.map | 1 + .../chevrotain/lib/src/scan/reg_exp_parser.js | 18 + .../lib/src/scan/reg_exp_parser.js.map | 1 + .../chevrotain/lib/src/scan/tokens.js | 114 + .../chevrotain/lib/src/scan/tokens.js.map | 1 + .../lib/src/scan/tokens_constants.js | 2 + .../lib/src/scan/tokens_constants.js.map | 1 + .../chevrotain/lib/src/scan/tokens_public.js | 87 + .../lib/src/scan/tokens_public.js.map | 1 + node_modules/chevrotain/lib/src/text/range.js | 28 + .../chevrotain/lib/src/text/range.js.map | 1 + node_modules/chevrotain/lib/src/version.js | 5 + .../chevrotain/lib/src/version.js.map | 1 + node_modules/chevrotain/package.json | 94 + node_modules/chevrotain/src/api.ts | 87 + .../chevrotain/src/diagrams/render_public.ts | 53 + .../chevrotain/src/lang/lang_extensions.ts | 10 + .../chevrotain/src/parse/constants.ts | 2 + node_modules/chevrotain/src/parse/cst/cst.ts | 87 + .../chevrotain/src/parse/cst/cst_visitor.ts | 153 + .../chevrotain/src/parse/errors_public.ts | 325 + .../chevrotain/src/parse/exceptions_public.ts | 89 + .../chevrotain/src/parse/grammar/checks.ts | 712 + .../chevrotain/src/parse/grammar/first.ts | 70 + .../chevrotain/src/parse/grammar/follow.ts | 67 + .../grammar/gast/gast_resolver_public.ts | 50 + .../src/parse/grammar/interpreter.ts | 623 + .../chevrotain/src/parse/grammar/keys.ts | 33 + .../src/parse/grammar/llk_lookahead.ts | 139 + .../chevrotain/src/parse/grammar/lookahead.ts | 739 + .../chevrotain/src/parse/grammar/resolver.ts | 57 + .../chevrotain/src/parse/grammar/rest.ts | 163 + .../chevrotain/src/parse/grammar/types.ts | 97 + .../chevrotain/src/parse/parser/parser.ts | 318 + .../src/parse/parser/traits/context_assist.ts | 51 + .../src/parse/parser/traits/error_handler.ts | 124 + .../src/parse/parser/traits/gast_recorder.ts | 456 + .../src/parse/parser/traits/lexer_adapter.ts | 86 + .../src/parse/parser/traits/looksahead.ts | 269 + .../src/parse/parser/traits/parser_traits.ts | 58 + .../src/parse/parser/traits/perf_tracer.ts | 54 + .../src/parse/parser/traits/recognizer_api.ts | 719 + .../parse/parser/traits/recognizer_engine.ts | 867 + .../src/parse/parser/traits/recoverable.ts | 473 + .../src/parse/parser/traits/tree_builder.ts | 275 + .../chevrotain/src/parse/parser/types.ts | 16 + .../src/parse/parser/utils/apply_mixins.ts | 28 + node_modules/chevrotain/src/scan/lexer.ts | 1175 + .../src/scan/lexer_errors_public.ts | 21 + .../chevrotain/src/scan/lexer_public.ts | 972 + node_modules/chevrotain/src/scan/reg_exp.ts | 315 + .../chevrotain/src/scan/reg_exp_parser.ts | 34 + node_modules/chevrotain/src/scan/tokens.ts | 167 + .../chevrotain/src/scan/tokens_constants.ts | 1 + .../chevrotain/src/scan/tokens_public.ts | 121 + node_modules/chevrotain/src/text/range.ts | 49 + node_modules/chevrotain/src/version.ts | 4 + node_modules/java-parser/LICENSE | 204 + node_modules/java-parser/README.md | 78 + node_modules/java-parser/api.d.ts | 3436 +++ node_modules/java-parser/package.json | 26 + node_modules/java-parser/src/comments.js | 308 + node_modules/java-parser/src/index.js | 72 + node_modules/java-parser/src/lexer.js | 8 + node_modules/java-parser/src/parser.js | 129 + .../java-parser/src/productions/arrays.js | 28 + .../src/productions/blocks-and-statements.js | 503 + .../java-parser/src/productions/classes.js | 735 + .../src/productions/expressions.js | 683 + .../java-parser/src/productions/interfaces.js | 266 + .../src/productions/lexical-structure.js | 37 + .../java-parser/src/productions/names.js | 81 + .../src/productions/packages-and-modules.js | 227 + .../productions/types-values-and-variables.js | 218 + node_modules/java-parser/src/tokens.js | 595 + node_modules/java-parser/src/unicodesets.js | 1001 + node_modules/java-parser/src/utils.js | 15 + node_modules/lodash-es/LICENSE | 47 + node_modules/lodash-es/README.md | 10 + node_modules/lodash-es/_DataView.js | 7 + node_modules/lodash-es/_Hash.js | 32 + node_modules/lodash-es/_LazyWrapper.js | 28 + node_modules/lodash-es/_ListCache.js | 32 + node_modules/lodash-es/_LodashWrapper.js | 22 + node_modules/lodash-es/_Map.js | 7 + node_modules/lodash-es/_MapCache.js | 32 + node_modules/lodash-es/_Promise.js | 7 + node_modules/lodash-es/_Set.js | 7 + node_modules/lodash-es/_SetCache.js | 27 + node_modules/lodash-es/_Stack.js | 27 + node_modules/lodash-es/_Symbol.js | 6 + node_modules/lodash-es/_Uint8Array.js | 6 + node_modules/lodash-es/_WeakMap.js | 7 + node_modules/lodash-es/_addMapEntry.js | 15 + node_modules/lodash-es/_addSetEntry.js | 15 + node_modules/lodash-es/_apply.js | 21 + node_modules/lodash-es/_arrayAggregator.js | 22 + node_modules/lodash-es/_arrayEach.js | 22 + node_modules/lodash-es/_arrayEachRight.js | 21 + node_modules/lodash-es/_arrayEvery.js | 23 + node_modules/lodash-es/_arrayFilter.js | 25 + node_modules/lodash-es/_arrayIncludes.js | 17 + node_modules/lodash-es/_arrayIncludesWith.js | 22 + node_modules/lodash-es/_arrayLikeKeys.js | 49 + node_modules/lodash-es/_arrayMap.js | 21 + node_modules/lodash-es/_arrayPush.js | 20 + node_modules/lodash-es/_arrayReduce.js | 26 + node_modules/lodash-es/_arrayReduceRight.js | 24 + node_modules/lodash-es/_arraySample.js | 15 + node_modules/lodash-es/_arraySampleSize.js | 17 + node_modules/lodash-es/_arrayShuffle.js | 15 + node_modules/lodash-es/_arraySome.js | 23 + node_modules/lodash-es/_asciiSize.js | 12 + node_modules/lodash-es/_asciiToArray.js | 12 + node_modules/lodash-es/_asciiWords.js | 15 + node_modules/lodash-es/_assignMergeValue.js | 20 + node_modules/lodash-es/_assignValue.js | 28 + node_modules/lodash-es/_assocIndexOf.js | 21 + node_modules/lodash-es/_baseAggregator.js | 21 + node_modules/lodash-es/_baseAssign.js | 17 + node_modules/lodash-es/_baseAssignIn.js | 17 + node_modules/lodash-es/_baseAssignValue.js | 25 + node_modules/lodash-es/_baseAt.js | 23 + node_modules/lodash-es/_baseClamp.js | 22 + node_modules/lodash-es/_baseClone.js | 166 + node_modules/lodash-es/_baseConforms.js | 18 + node_modules/lodash-es/_baseConformsTo.js | 27 + node_modules/lodash-es/_baseCreate.js | 30 + node_modules/lodash-es/_baseDelay.js | 21 + node_modules/lodash-es/_baseDifference.js | 67 + node_modules/lodash-es/_baseEach.js | 14 + node_modules/lodash-es/_baseEachRight.js | 14 + node_modules/lodash-es/_baseEvery.js | 21 + node_modules/lodash-es/_baseExtremum.js | 32 + node_modules/lodash-es/_baseFill.js | 32 + node_modules/lodash-es/_baseFilter.js | 21 + node_modules/lodash-es/_baseFindIndex.js | 24 + node_modules/lodash-es/_baseFindKey.js | 23 + node_modules/lodash-es/_baseFlatten.js | 38 + node_modules/lodash-es/_baseFor.js | 16 + node_modules/lodash-es/_baseForOwn.js | 16 + node_modules/lodash-es/_baseForOwnRight.js | 16 + node_modules/lodash-es/_baseForRight.js | 15 + node_modules/lodash-es/_baseFunctions.js | 19 + node_modules/lodash-es/_baseGet.js | 24 + node_modules/lodash-es/_baseGetAllKeys.js | 20 + node_modules/lodash-es/_baseGetTag.js | 28 + node_modules/lodash-es/_baseGt.js | 14 + node_modules/lodash-es/_baseHas.js | 19 + node_modules/lodash-es/_baseHasIn.js | 13 + node_modules/lodash-es/_baseInRange.js | 18 + node_modules/lodash-es/_baseIndexOf.js | 20 + node_modules/lodash-es/_baseIndexOfWith.js | 23 + node_modules/lodash-es/_baseIntersection.js | 74 + node_modules/lodash-es/_baseInverter.js | 21 + node_modules/lodash-es/_baseInvoke.js | 24 + node_modules/lodash-es/_baseIsArguments.js | 18 + node_modules/lodash-es/_baseIsArrayBuffer.js | 17 + node_modules/lodash-es/_baseIsDate.js | 18 + node_modules/lodash-es/_baseIsEqual.js | 28 + node_modules/lodash-es/_baseIsEqualDeep.js | 83 + node_modules/lodash-es/_baseIsMap.js | 18 + node_modules/lodash-es/_baseIsMatch.js | 62 + node_modules/lodash-es/_baseIsNaN.js | 12 + node_modules/lodash-es/_baseIsNative.js | 47 + node_modules/lodash-es/_baseIsRegExp.js | 18 + node_modules/lodash-es/_baseIsSet.js | 18 + node_modules/lodash-es/_baseIsTypedArray.js | 60 + node_modules/lodash-es/_baseIteratee.js | 31 + node_modules/lodash-es/_baseKeys.js | 30 + node_modules/lodash-es/_baseKeysIn.js | 33 + node_modules/lodash-es/_baseLodash.js | 10 + node_modules/lodash-es/_baseLt.js | 14 + node_modules/lodash-es/_baseMap.js | 22 + node_modules/lodash-es/_baseMatches.js | 22 + .../lodash-es/_baseMatchesProperty.js | 33 + node_modules/lodash-es/_baseMean.js | 20 + node_modules/lodash-es/_baseMerge.js | 42 + node_modules/lodash-es/_baseMergeDeep.js | 94 + node_modules/lodash-es/_baseNth.js | 20 + node_modules/lodash-es/_baseOrderBy.js | 49 + node_modules/lodash-es/_basePick.js | 19 + node_modules/lodash-es/_basePickBy.js | 30 + node_modules/lodash-es/_baseProperty.js | 14 + node_modules/lodash-es/_basePropertyDeep.js | 16 + node_modules/lodash-es/_basePropertyOf.js | 14 + node_modules/lodash-es/_basePullAll.js | 51 + node_modules/lodash-es/_basePullAt.js | 37 + node_modules/lodash-es/_baseRandom.js | 18 + node_modules/lodash-es/_baseRange.js | 28 + node_modules/lodash-es/_baseReduce.js | 23 + node_modules/lodash-es/_baseRepeat.js | 35 + node_modules/lodash-es/_baseRest.js | 17 + node_modules/lodash-es/_baseSample.js | 15 + node_modules/lodash-es/_baseSampleSize.js | 18 + node_modules/lodash-es/_baseSet.js | 51 + node_modules/lodash-es/_baseSetData.js | 17 + node_modules/lodash-es/_baseSetToString.js | 22 + node_modules/lodash-es/_baseShuffle.js | 15 + node_modules/lodash-es/_baseSlice.js | 31 + node_modules/lodash-es/_baseSome.js | 22 + node_modules/lodash-es/_baseSortBy.js | 21 + node_modules/lodash-es/_baseSortedIndex.js | 42 + node_modules/lodash-es/_baseSortedIndexBy.js | 67 + node_modules/lodash-es/_baseSortedUniq.js | 30 + node_modules/lodash-es/_baseSum.js | 24 + node_modules/lodash-es/_baseTimes.js | 20 + node_modules/lodash-es/_baseToNumber.js | 24 + node_modules/lodash-es/_baseToPairs.js | 18 + node_modules/lodash-es/_baseToString.js | 37 + node_modules/lodash-es/_baseTrim.js | 19 + node_modules/lodash-es/_baseUnary.js | 14 + node_modules/lodash-es/_baseUniq.js | 72 + node_modules/lodash-es/_baseUnset.js | 20 + node_modules/lodash-es/_baseUpdate.js | 18 + node_modules/lodash-es/_baseValues.js | 19 + node_modules/lodash-es/_baseWhile.js | 26 + node_modules/lodash-es/_baseWrapperValue.js | 25 + node_modules/lodash-es/_baseXor.js | 36 + node_modules/lodash-es/_baseZipObject.js | 23 + node_modules/lodash-es/_cacheHas.js | 13 + .../lodash-es/_castArrayLikeObject.js | 14 + node_modules/lodash-es/_castFunction.js | 14 + node_modules/lodash-es/_castPath.js | 21 + node_modules/lodash-es/_castRest.js | 14 + node_modules/lodash-es/_castSlice.js | 18 + node_modules/lodash-es/_charsEndIndex.js | 19 + node_modules/lodash-es/_charsStartIndex.js | 20 + node_modules/lodash-es/_cloneArrayBuffer.js | 16 + node_modules/lodash-es/_cloneBuffer.js | 35 + node_modules/lodash-es/_cloneDataView.js | 16 + node_modules/lodash-es/_cloneMap.js | 22 + node_modules/lodash-es/_cloneRegExp.js | 17 + node_modules/lodash-es/_cloneSet.js | 22 + node_modules/lodash-es/_cloneSymbol.js | 18 + node_modules/lodash-es/_cloneTypedArray.js | 16 + node_modules/lodash-es/_compareAscending.js | 41 + node_modules/lodash-es/_compareMultiple.js | 44 + node_modules/lodash-es/_composeArgs.js | 39 + node_modules/lodash-es/_composeArgsRight.js | 41 + node_modules/lodash-es/_copyArray.js | 20 + node_modules/lodash-es/_copyObject.js | 40 + node_modules/lodash-es/_copySymbols.js | 16 + node_modules/lodash-es/_copySymbolsIn.js | 16 + node_modules/lodash-es/_coreJsData.js | 6 + node_modules/lodash-es/_countHolders.js | 21 + node_modules/lodash-es/_createAggregator.js | 23 + node_modules/lodash-es/_createAssigner.js | 37 + node_modules/lodash-es/_createBaseEach.js | 32 + node_modules/lodash-es/_createBaseFor.js | 25 + node_modules/lodash-es/_createBind.js | 28 + node_modules/lodash-es/_createCaseFirst.js | 33 + node_modules/lodash-es/_createCompounder.js | 24 + node_modules/lodash-es/_createCtor.js | 37 + node_modules/lodash-es/_createCurry.js | 46 + node_modules/lodash-es/_createFind.js | 25 + node_modules/lodash-es/_createFlow.js | 78 + node_modules/lodash-es/_createHybrid.js | 92 + node_modules/lodash-es/_createInverter.js | 17 + .../lodash-es/_createMathOperation.js | 38 + node_modules/lodash-es/_createOver.js | 27 + node_modules/lodash-es/_createPadding.js | 33 + node_modules/lodash-es/_createPartial.js | 43 + node_modules/lodash-es/_createRange.js | 30 + node_modules/lodash-es/_createRecurry.js | 56 + .../lodash-es/_createRelationalOperation.js | 20 + node_modules/lodash-es/_createRound.js | 35 + node_modules/lodash-es/_createSet.js | 19 + node_modules/lodash-es/_createToPairs.js | 30 + node_modules/lodash-es/_createWrap.js | 106 + .../lodash-es/_customDefaultsAssignIn.js | 29 + .../lodash-es/_customDefaultsMerge.js | 28 + node_modules/lodash-es/_customOmitClone.js | 16 + node_modules/lodash-es/_deburrLetter.js | 71 + node_modules/lodash-es/_defineProperty.js | 11 + node_modules/lodash-es/_equalArrays.js | 84 + node_modules/lodash-es/_equalByTag.js | 112 + node_modules/lodash-es/_equalObjects.js | 90 + node_modules/lodash-es/_escapeHtmlChar.js | 21 + node_modules/lodash-es/_escapeStringChar.js | 22 + node_modules/lodash-es/_flatRest.js | 16 + node_modules/lodash-es/_freeGlobal.js | 4 + node_modules/lodash-es/_getAllKeys.js | 16 + node_modules/lodash-es/_getAllKeysIn.js | 17 + node_modules/lodash-es/_getData.js | 15 + node_modules/lodash-es/_getFuncName.js | 31 + node_modules/lodash-es/_getHolder.js | 13 + node_modules/lodash-es/_getMapData.js | 18 + node_modules/lodash-es/_getMatchData.js | 24 + node_modules/lodash-es/_getNative.js | 17 + node_modules/lodash-es/_getPrototype.js | 6 + node_modules/lodash-es/_getRawTag.js | 46 + node_modules/lodash-es/_getSymbols.js | 30 + node_modules/lodash-es/_getSymbolsIn.js | 25 + node_modules/lodash-es/_getTag.js | 58 + node_modules/lodash-es/_getValue.js | 13 + node_modules/lodash-es/_getView.js | 33 + node_modules/lodash-es/_getWrapDetails.js | 17 + node_modules/lodash-es/_hasPath.js | 39 + node_modules/lodash-es/_hasUnicode.js | 26 + node_modules/lodash-es/_hasUnicodeWord.js | 15 + node_modules/lodash-es/_hashClear.js | 15 + node_modules/lodash-es/_hashDelete.js | 17 + node_modules/lodash-es/_hashGet.js | 30 + node_modules/lodash-es/_hashHas.js | 23 + node_modules/lodash-es/_hashSet.js | 23 + node_modules/lodash-es/_initCloneArray.js | 26 + node_modules/lodash-es/_initCloneByTag.js | 77 + node_modules/lodash-es/_initCloneObject.js | 18 + node_modules/lodash-es/_insertWrapDetails.js | 23 + node_modules/lodash-es/_isFlattenable.js | 20 + node_modules/lodash-es/_isIndex.js | 25 + node_modules/lodash-es/_isIterateeCall.js | 30 + node_modules/lodash-es/_isKey.js | 29 + node_modules/lodash-es/_isKeyable.js | 15 + node_modules/lodash-es/_isLaziable.js | 28 + node_modules/lodash-es/_isMaskable.js | 14 + node_modules/lodash-es/_isMasked.js | 20 + node_modules/lodash-es/_isPrototype.js | 18 + node_modules/lodash-es/_isStrictComparable.js | 15 + node_modules/lodash-es/_iteratorToArray.js | 18 + node_modules/lodash-es/_lazyClone.js | 23 + node_modules/lodash-es/_lazyReverse.js | 23 + node_modules/lodash-es/_lazyValue.js | 69 + node_modules/lodash-es/_listCacheClear.js | 13 + node_modules/lodash-es/_listCacheDelete.js | 35 + node_modules/lodash-es/_listCacheGet.js | 19 + node_modules/lodash-es/_listCacheHas.js | 16 + node_modules/lodash-es/_listCacheSet.js | 26 + node_modules/lodash-es/_mapCacheClear.js | 21 + node_modules/lodash-es/_mapCacheDelete.js | 18 + node_modules/lodash-es/_mapCacheGet.js | 16 + node_modules/lodash-es/_mapCacheHas.js | 16 + node_modules/lodash-es/_mapCacheSet.js | 22 + node_modules/lodash-es/_mapToArray.js | 18 + .../lodash-es/_matchesStrictComparable.js | 20 + node_modules/lodash-es/_memoizeCapped.js | 26 + node_modules/lodash-es/_mergeData.js | 90 + node_modules/lodash-es/_metaMap.js | 6 + node_modules/lodash-es/_nativeCreate.js | 6 + node_modules/lodash-es/_nativeKeys.js | 6 + node_modules/lodash-es/_nativeKeysIn.js | 20 + node_modules/lodash-es/_nodeUtil.js | 30 + node_modules/lodash-es/_objectToString.js | 22 + node_modules/lodash-es/_overArg.js | 15 + node_modules/lodash-es/_overRest.js | 36 + node_modules/lodash-es/_parent.js | 16 + node_modules/lodash-es/_reEscape.js | 4 + node_modules/lodash-es/_reEvaluate.js | 4 + node_modules/lodash-es/_reInterpolate.js | 4 + node_modules/lodash-es/_realNames.js | 4 + node_modules/lodash-es/_reorder.js | 29 + node_modules/lodash-es/_replaceHolders.js | 29 + node_modules/lodash-es/_root.js | 9 + node_modules/lodash-es/_safeGet.js | 21 + node_modules/lodash-es/_setCacheAdd.js | 19 + node_modules/lodash-es/_setCacheHas.js | 14 + node_modules/lodash-es/_setData.js | 20 + node_modules/lodash-es/_setToArray.js | 18 + node_modules/lodash-es/_setToPairs.js | 18 + node_modules/lodash-es/_setToString.js | 14 + node_modules/lodash-es/_setWrapToString.js | 21 + node_modules/lodash-es/_shortOut.js | 37 + node_modules/lodash-es/_shuffleSelf.js | 28 + node_modules/lodash-es/_stackClear.js | 15 + node_modules/lodash-es/_stackDelete.js | 18 + node_modules/lodash-es/_stackGet.js | 14 + node_modules/lodash-es/_stackHas.js | 14 + node_modules/lodash-es/_stackSet.js | 34 + node_modules/lodash-es/_strictIndexOf.js | 23 + node_modules/lodash-es/_strictLastIndexOf.js | 21 + node_modules/lodash-es/_stringSize.js | 18 + node_modules/lodash-es/_stringToArray.js | 18 + node_modules/lodash-es/_stringToPath.js | 27 + node_modules/lodash-es/_toKey.js | 21 + node_modules/lodash-es/_toSource.js | 26 + node_modules/lodash-es/_trimmedEndIndex.js | 19 + node_modules/lodash-es/_unescapeHtmlChar.js | 21 + node_modules/lodash-es/_unicodeSize.js | 44 + node_modules/lodash-es/_unicodeToArray.js | 40 + node_modules/lodash-es/_unicodeWords.js | 69 + node_modules/lodash-es/_updateWrapDetails.js | 46 + node_modules/lodash-es/_wrapperClone.js | 23 + node_modules/lodash-es/add.js | 22 + node_modules/lodash-es/after.js | 42 + node_modules/lodash-es/array.default.js | 81 + node_modules/lodash-es/array.js | 66 + node_modules/lodash-es/ary.js | 29 + node_modules/lodash-es/assign.js | 58 + node_modules/lodash-es/assignIn.js | 40 + node_modules/lodash-es/assignInWith.js | 38 + node_modules/lodash-es/assignWith.js | 37 + node_modules/lodash-es/at.js | 23 + node_modules/lodash-es/attempt.js | 35 + node_modules/lodash-es/before.js | 40 + node_modules/lodash-es/bind.js | 57 + node_modules/lodash-es/bindAll.js | 41 + node_modules/lodash-es/bindKey.js | 68 + node_modules/lodash-es/camelCase.js | 29 + node_modules/lodash-es/capitalize.js | 23 + node_modules/lodash-es/castArray.js | 44 + node_modules/lodash-es/ceil.js | 26 + node_modules/lodash-es/chain.js | 38 + node_modules/lodash-es/chunk.js | 50 + node_modules/lodash-es/clamp.js | 39 + node_modules/lodash-es/clone.js | 36 + node_modules/lodash-es/cloneDeep.js | 29 + node_modules/lodash-es/cloneDeepWith.js | 40 + node_modules/lodash-es/cloneWith.js | 42 + node_modules/lodash-es/collection.default.js | 37 + node_modules/lodash-es/collection.js | 29 + node_modules/lodash-es/commit.js | 33 + node_modules/lodash-es/compact.js | 31 + node_modules/lodash-es/concat.js | 43 + node_modules/lodash-es/cond.js | 60 + node_modules/lodash-es/conforms.js | 35 + node_modules/lodash-es/conformsTo.js | 32 + node_modules/lodash-es/constant.js | 26 + node_modules/lodash-es/countBy.js | 40 + node_modules/lodash-es/create.js | 43 + node_modules/lodash-es/curry.js | 57 + node_modules/lodash-es/curryRight.js | 54 + node_modules/lodash-es/date.default.js | 5 + node_modules/lodash-es/date.js | 2 + node_modules/lodash-es/debounce.js | 191 + node_modules/lodash-es/deburr.js | 45 + node_modules/lodash-es/defaultTo.js | 25 + node_modules/lodash-es/defaults.js | 64 + node_modules/lodash-es/defaultsDeep.js | 30 + node_modules/lodash-es/defer.js | 26 + node_modules/lodash-es/delay.js | 28 + node_modules/lodash-es/difference.js | 33 + node_modules/lodash-es/differenceBy.js | 44 + node_modules/lodash-es/differenceWith.js | 40 + node_modules/lodash-es/divide.js | 22 + node_modules/lodash-es/drop.js | 38 + node_modules/lodash-es/dropRight.js | 39 + node_modules/lodash-es/dropRightWhile.js | 45 + node_modules/lodash-es/dropWhile.js | 45 + node_modules/lodash-es/each.js | 1 + node_modules/lodash-es/eachRight.js | 1 + node_modules/lodash-es/endsWith.js | 43 + node_modules/lodash-es/entries.js | 1 + node_modules/lodash-es/entriesIn.js | 1 + node_modules/lodash-es/eq.js | 37 + node_modules/lodash-es/escape.js | 43 + node_modules/lodash-es/escapeRegExp.js | 32 + node_modules/lodash-es/every.js | 56 + node_modules/lodash-es/extend.js | 1 + node_modules/lodash-es/extendWith.js | 1 + node_modules/lodash-es/fill.js | 45 + node_modules/lodash-es/filter.js | 52 + node_modules/lodash-es/find.js | 42 + node_modules/lodash-es/findIndex.js | 55 + node_modules/lodash-es/findKey.js | 44 + node_modules/lodash-es/findLast.js | 25 + node_modules/lodash-es/findLastIndex.js | 59 + node_modules/lodash-es/findLastKey.js | 44 + node_modules/lodash-es/first.js | 1 + node_modules/lodash-es/flake.lock | 40 + node_modules/lodash-es/flake.nix | 20 + node_modules/lodash-es/flatMap.js | 29 + node_modules/lodash-es/flatMapDeep.js | 31 + node_modules/lodash-es/flatMapDepth.js | 31 + node_modules/lodash-es/flatten.js | 22 + node_modules/lodash-es/flattenDeep.js | 25 + node_modules/lodash-es/flattenDepth.js | 33 + node_modules/lodash-es/flip.js | 28 + node_modules/lodash-es/floor.js | 26 + node_modules/lodash-es/flow.js | 27 + node_modules/lodash-es/flowRight.js | 26 + node_modules/lodash-es/forEach.js | 41 + node_modules/lodash-es/forEachRight.js | 31 + node_modules/lodash-es/forIn.js | 39 + node_modules/lodash-es/forInRight.js | 37 + node_modules/lodash-es/forOwn.js | 36 + node_modules/lodash-es/forOwnRight.js | 34 + node_modules/lodash-es/fromPairs.js | 28 + node_modules/lodash-es/function.default.js | 31 + node_modules/lodash-es/function.js | 24 + node_modules/lodash-es/functions.js | 31 + node_modules/lodash-es/functionsIn.js | 31 + node_modules/lodash-es/get.js | 33 + node_modules/lodash-es/groupBy.js | 41 + node_modules/lodash-es/gt.js | 29 + node_modules/lodash-es/gte.js | 30 + node_modules/lodash-es/has.js | 35 + node_modules/lodash-es/hasIn.js | 34 + node_modules/lodash-es/head.js | 23 + node_modules/lodash-es/identity.js | 21 + node_modules/lodash-es/inRange.js | 55 + node_modules/lodash-es/includes.js | 53 + node_modules/lodash-es/indexOf.js | 42 + node_modules/lodash-es/initial.js | 22 + node_modules/lodash-es/intersection.js | 30 + node_modules/lodash-es/intersectionBy.js | 45 + node_modules/lodash-es/intersectionWith.js | 41 + node_modules/lodash-es/invert.js | 42 + node_modules/lodash-es/invertBy.js | 56 + node_modules/lodash-es/invoke.js | 24 + node_modules/lodash-es/invokeMap.js | 41 + node_modules/lodash-es/isArguments.js | 36 + node_modules/lodash-es/isArray.js | 26 + node_modules/lodash-es/isArrayBuffer.js | 27 + node_modules/lodash-es/isArrayLike.js | 33 + node_modules/lodash-es/isArrayLikeObject.js | 33 + node_modules/lodash-es/isBoolean.js | 29 + node_modules/lodash-es/isBuffer.js | 38 + node_modules/lodash-es/isDate.js | 27 + node_modules/lodash-es/isElement.js | 25 + node_modules/lodash-es/isEmpty.js | 77 + node_modules/lodash-es/isEqual.js | 35 + node_modules/lodash-es/isEqualWith.js | 41 + node_modules/lodash-es/isError.js | 36 + node_modules/lodash-es/isFinite.js | 36 + node_modules/lodash-es/isFunction.js | 37 + node_modules/lodash-es/isInteger.js | 33 + node_modules/lodash-es/isLength.js | 35 + node_modules/lodash-es/isMap.js | 27 + node_modules/lodash-es/isMatch.js | 36 + node_modules/lodash-es/isMatchWith.js | 41 + node_modules/lodash-es/isNaN.js | 38 + node_modules/lodash-es/isNative.js | 40 + node_modules/lodash-es/isNil.js | 25 + node_modules/lodash-es/isNull.js | 22 + node_modules/lodash-es/isNumber.js | 38 + node_modules/lodash-es/isObject.js | 31 + node_modules/lodash-es/isObjectLike.js | 29 + node_modules/lodash-es/isPlainObject.js | 62 + node_modules/lodash-es/isRegExp.js | 27 + node_modules/lodash-es/isSafeInteger.js | 37 + node_modules/lodash-es/isSet.js | 27 + node_modules/lodash-es/isString.js | 30 + node_modules/lodash-es/isSymbol.js | 29 + node_modules/lodash-es/isTypedArray.js | 27 + node_modules/lodash-es/isUndefined.js | 22 + node_modules/lodash-es/isWeakMap.js | 28 + node_modules/lodash-es/isWeakSet.js | 28 + node_modules/lodash-es/iteratee.js | 53 + node_modules/lodash-es/join.js | 26 + node_modules/lodash-es/kebabCase.js | 28 + node_modules/lodash-es/keyBy.js | 36 + node_modules/lodash-es/keys.js | 37 + node_modules/lodash-es/keysIn.js | 32 + node_modules/lodash-es/lang.default.js | 71 + node_modules/lodash-es/lang.js | 57 + node_modules/lodash-es/last.js | 20 + node_modules/lodash-es/lastIndexOf.js | 46 + node_modules/lodash-es/lodash.default.js | 643 + node_modules/lodash-es/lodash.js | 331 + node_modules/lodash-es/lowerCase.js | 27 + node_modules/lodash-es/lowerFirst.js | 22 + node_modules/lodash-es/lt.js | 29 + node_modules/lodash-es/lte.js | 30 + node_modules/lodash-es/map.js | 53 + node_modules/lodash-es/mapKeys.js | 36 + node_modules/lodash-es/mapValues.js | 43 + node_modules/lodash-es/matches.js | 46 + node_modules/lodash-es/matchesProperty.js | 44 + node_modules/lodash-es/math.default.js | 21 + node_modules/lodash-es/math.js | 16 + node_modules/lodash-es/max.js | 29 + node_modules/lodash-es/maxBy.js | 34 + node_modules/lodash-es/mean.js | 22 + node_modules/lodash-es/meanBy.js | 31 + node_modules/lodash-es/memoize.js | 73 + node_modules/lodash-es/merge.js | 39 + node_modules/lodash-es/mergeWith.js | 39 + node_modules/lodash-es/method.js | 34 + node_modules/lodash-es/methodOf.js | 33 + node_modules/lodash-es/min.js | 29 + node_modules/lodash-es/minBy.js | 34 + node_modules/lodash-es/mixin.js | 74 + node_modules/lodash-es/multiply.js | 22 + node_modules/lodash-es/negate.js | 40 + node_modules/lodash-es/next.js | 35 + node_modules/lodash-es/noop.js | 17 + node_modules/lodash-es/now.js | 23 + node_modules/lodash-es/nth.js | 29 + node_modules/lodash-es/nthArg.js | 32 + node_modules/lodash-es/number.default.js | 7 + node_modules/lodash-es/number.js | 4 + node_modules/lodash-es/object.default.js | 60 + node_modules/lodash-es/object.js | 48 + node_modules/lodash-es/omit.js | 57 + node_modules/lodash-es/omitBy.js | 29 + node_modules/lodash-es/once.js | 25 + node_modules/lodash-es/orderBy.js | 47 + node_modules/lodash-es/over.js | 24 + node_modules/lodash-es/overArgs.js | 61 + node_modules/lodash-es/overEvery.js | 34 + node_modules/lodash-es/overSome.js | 37 + node_modules/lodash-es/package.json | 21 + node_modules/lodash-es/pad.js | 49 + node_modules/lodash-es/padEnd.js | 39 + node_modules/lodash-es/padStart.js | 39 + node_modules/lodash-es/parseInt.js | 43 + node_modules/lodash-es/partial.js | 50 + node_modules/lodash-es/partialRight.js | 49 + node_modules/lodash-es/partition.js | 43 + node_modules/lodash-es/pick.js | 25 + node_modules/lodash-es/pickBy.js | 37 + node_modules/lodash-es/plant.js | 48 + node_modules/lodash-es/property.js | 32 + node_modules/lodash-es/propertyOf.js | 30 + node_modules/lodash-es/pull.js | 29 + node_modules/lodash-es/pullAll.js | 29 + node_modules/lodash-es/pullAllBy.js | 33 + node_modules/lodash-es/pullAllWith.js | 32 + node_modules/lodash-es/pullAt.js | 43 + node_modules/lodash-es/random.js | 82 + node_modules/lodash-es/range.js | 46 + node_modules/lodash-es/rangeRight.js | 41 + node_modules/lodash-es/rearg.js | 33 + node_modules/lodash-es/reduce.js | 51 + node_modules/lodash-es/reduceRight.js | 36 + node_modules/lodash-es/reject.js | 46 + node_modules/lodash-es/release.md | 48 + node_modules/lodash-es/remove.js | 53 + node_modules/lodash-es/repeat.js | 37 + node_modules/lodash-es/replace.js | 29 + node_modules/lodash-es/rest.js | 40 + node_modules/lodash-es/result.js | 56 + node_modules/lodash-es/reverse.js | 34 + node_modules/lodash-es/round.js | 26 + node_modules/lodash-es/sample.js | 24 + node_modules/lodash-es/sampleSize.js | 37 + node_modules/lodash-es/seq.default.js | 20 + node_modules/lodash-es/seq.js | 15 + node_modules/lodash-es/set.js | 35 + node_modules/lodash-es/setWith.js | 32 + node_modules/lodash-es/shuffle.js | 25 + node_modules/lodash-es/size.js | 46 + node_modules/lodash-es/slice.js | 37 + node_modules/lodash-es/snakeCase.js | 28 + node_modules/lodash-es/some.js | 51 + node_modules/lodash-es/sortBy.js | 48 + node_modules/lodash-es/sortedIndex.js | 24 + node_modules/lodash-es/sortedIndexBy.js | 33 + node_modules/lodash-es/sortedIndexOf.js | 31 + node_modules/lodash-es/sortedLastIndex.js | 25 + node_modules/lodash-es/sortedLastIndexBy.js | 33 + node_modules/lodash-es/sortedLastIndexOf.js | 31 + node_modules/lodash-es/sortedUniq.js | 24 + node_modules/lodash-es/sortedUniqBy.js | 26 + node_modules/lodash-es/split.js | 52 + node_modules/lodash-es/spread.js | 63 + node_modules/lodash-es/startCase.js | 29 + node_modules/lodash-es/startsWith.js | 39 + node_modules/lodash-es/string.default.js | 41 + node_modules/lodash-es/string.js | 32 + node_modules/lodash-es/stubArray.js | 23 + node_modules/lodash-es/stubFalse.js | 18 + node_modules/lodash-es/stubObject.js | 23 + node_modules/lodash-es/stubString.js | 18 + node_modules/lodash-es/stubTrue.js | 18 + node_modules/lodash-es/subtract.js | 22 + node_modules/lodash-es/sum.js | 24 + node_modules/lodash-es/sumBy.js | 33 + node_modules/lodash-es/tail.js | 22 + node_modules/lodash-es/take.js | 37 + node_modules/lodash-es/takeRight.js | 39 + node_modules/lodash-es/takeRightWhile.js | 45 + node_modules/lodash-es/takeWhile.js | 45 + node_modules/lodash-es/tap.js | 29 + node_modules/lodash-es/template.js | 272 + node_modules/lodash-es/templateSettings.js | 67 + node_modules/lodash-es/throttle.js | 69 + node_modules/lodash-es/thru.js | 28 + node_modules/lodash-es/times.js | 51 + node_modules/lodash-es/toArray.js | 58 + node_modules/lodash-es/toFinite.js | 42 + node_modules/lodash-es/toInteger.js | 36 + node_modules/lodash-es/toIterator.js | 23 + node_modules/lodash-es/toJSON.js | 1 + node_modules/lodash-es/toLength.js | 38 + node_modules/lodash-es/toLower.js | 28 + node_modules/lodash-es/toNumber.js | 64 + node_modules/lodash-es/toPairs.js | 30 + node_modules/lodash-es/toPairsIn.js | 30 + node_modules/lodash-es/toPath.js | 33 + node_modules/lodash-es/toPlainObject.js | 32 + node_modules/lodash-es/toSafeInteger.js | 37 + node_modules/lodash-es/toString.js | 28 + node_modules/lodash-es/toUpper.js | 28 + node_modules/lodash-es/transform.js | 65 + node_modules/lodash-es/trim.js | 47 + node_modules/lodash-es/trimEnd.js | 41 + node_modules/lodash-es/trimStart.js | 43 + node_modules/lodash-es/truncate.js | 111 + node_modules/lodash-es/unary.js | 22 + node_modules/lodash-es/unescape.js | 34 + node_modules/lodash-es/union.js | 26 + node_modules/lodash-es/unionBy.js | 39 + node_modules/lodash-es/unionWith.js | 34 + node_modules/lodash-es/uniq.js | 25 + node_modules/lodash-es/uniqBy.js | 31 + node_modules/lodash-es/uniqWith.js | 28 + node_modules/lodash-es/uniqueId.js | 28 + node_modules/lodash-es/unset.js | 34 + node_modules/lodash-es/unzip.js | 45 + node_modules/lodash-es/unzipWith.js | 39 + node_modules/lodash-es/update.js | 35 + node_modules/lodash-es/updateWith.js | 33 + node_modules/lodash-es/upperCase.js | 27 + node_modules/lodash-es/upperFirst.js | 22 + node_modules/lodash-es/util.default.js | 42 + node_modules/lodash-es/util.js | 33 + node_modules/lodash-es/value.js | 1 + node_modules/lodash-es/valueOf.js | 1 + node_modules/lodash-es/values.js | 34 + node_modules/lodash-es/valuesIn.js | 32 + node_modules/lodash-es/without.js | 31 + node_modules/lodash-es/words.js | 35 + node_modules/lodash-es/wrap.js | 30 + node_modules/lodash-es/wrapperAt.js | 48 + node_modules/lodash-es/wrapperChain.js | 34 + node_modules/lodash-es/wrapperLodash.js | 147 + node_modules/lodash-es/wrapperReverse.js | 44 + node_modules/lodash-es/wrapperValue.js | 21 + node_modules/lodash-es/xor.js | 28 + node_modules/lodash-es/xorBy.js | 39 + node_modules/lodash-es/xorWith.js | 34 + node_modules/lodash-es/zip.js | 22 + node_modules/lodash-es/zipObject.js | 24 + node_modules/lodash-es/zipObjectDeep.js | 23 + node_modules/lodash-es/zipWith.js | 32 + node_modules/lodash/LICENSE | 47 + node_modules/lodash/README.md | 39 + node_modules/lodash/_DataView.js | 7 + node_modules/lodash/_Hash.js | 32 + node_modules/lodash/_LazyWrapper.js | 28 + node_modules/lodash/_ListCache.js | 32 + node_modules/lodash/_LodashWrapper.js | 22 + node_modules/lodash/_Map.js | 7 + node_modules/lodash/_MapCache.js | 32 + node_modules/lodash/_Promise.js | 7 + node_modules/lodash/_Set.js | 7 + node_modules/lodash/_SetCache.js | 27 + node_modules/lodash/_Stack.js | 27 + node_modules/lodash/_Symbol.js | 6 + node_modules/lodash/_Uint8Array.js | 6 + node_modules/lodash/_WeakMap.js | 7 + node_modules/lodash/_apply.js | 21 + node_modules/lodash/_arrayAggregator.js | 22 + node_modules/lodash/_arrayEach.js | 22 + node_modules/lodash/_arrayEachRight.js | 21 + node_modules/lodash/_arrayEvery.js | 23 + node_modules/lodash/_arrayFilter.js | 25 + node_modules/lodash/_arrayIncludes.js | 17 + node_modules/lodash/_arrayIncludesWith.js | 22 + node_modules/lodash/_arrayLikeKeys.js | 49 + node_modules/lodash/_arrayMap.js | 21 + node_modules/lodash/_arrayPush.js | 20 + node_modules/lodash/_arrayReduce.js | 26 + node_modules/lodash/_arrayReduceRight.js | 24 + node_modules/lodash/_arraySample.js | 15 + node_modules/lodash/_arraySampleSize.js | 17 + node_modules/lodash/_arrayShuffle.js | 15 + node_modules/lodash/_arraySome.js | 23 + node_modules/lodash/_asciiSize.js | 12 + node_modules/lodash/_asciiToArray.js | 12 + node_modules/lodash/_asciiWords.js | 15 + node_modules/lodash/_assignMergeValue.js | 20 + node_modules/lodash/_assignValue.js | 28 + node_modules/lodash/_assocIndexOf.js | 21 + node_modules/lodash/_baseAggregator.js | 21 + node_modules/lodash/_baseAssign.js | 17 + node_modules/lodash/_baseAssignIn.js | 17 + node_modules/lodash/_baseAssignValue.js | 25 + node_modules/lodash/_baseAt.js | 23 + node_modules/lodash/_baseClamp.js | 22 + node_modules/lodash/_baseClone.js | 166 + node_modules/lodash/_baseConforms.js | 18 + node_modules/lodash/_baseConformsTo.js | 27 + node_modules/lodash/_baseCreate.js | 30 + node_modules/lodash/_baseDelay.js | 21 + node_modules/lodash/_baseDifference.js | 67 + node_modules/lodash/_baseEach.js | 14 + node_modules/lodash/_baseEachRight.js | 14 + node_modules/lodash/_baseEvery.js | 21 + node_modules/lodash/_baseExtremum.js | 32 + node_modules/lodash/_baseFill.js | 32 + node_modules/lodash/_baseFilter.js | 21 + node_modules/lodash/_baseFindIndex.js | 24 + node_modules/lodash/_baseFindKey.js | 23 + node_modules/lodash/_baseFlatten.js | 38 + node_modules/lodash/_baseFor.js | 16 + node_modules/lodash/_baseForOwn.js | 16 + node_modules/lodash/_baseForOwnRight.js | 16 + node_modules/lodash/_baseForRight.js | 15 + node_modules/lodash/_baseFunctions.js | 19 + node_modules/lodash/_baseGet.js | 24 + node_modules/lodash/_baseGetAllKeys.js | 20 + node_modules/lodash/_baseGetTag.js | 28 + node_modules/lodash/_baseGt.js | 14 + node_modules/lodash/_baseHas.js | 19 + node_modules/lodash/_baseHasIn.js | 13 + node_modules/lodash/_baseInRange.js | 18 + node_modules/lodash/_baseIndexOf.js | 20 + node_modules/lodash/_baseIndexOfWith.js | 23 + node_modules/lodash/_baseIntersection.js | 74 + node_modules/lodash/_baseInverter.js | 21 + node_modules/lodash/_baseInvoke.js | 24 + node_modules/lodash/_baseIsArguments.js | 18 + node_modules/lodash/_baseIsArrayBuffer.js | 17 + node_modules/lodash/_baseIsDate.js | 18 + node_modules/lodash/_baseIsEqual.js | 28 + node_modules/lodash/_baseIsEqualDeep.js | 83 + node_modules/lodash/_baseIsMap.js | 18 + node_modules/lodash/_baseIsMatch.js | 62 + node_modules/lodash/_baseIsNaN.js | 12 + node_modules/lodash/_baseIsNative.js | 47 + node_modules/lodash/_baseIsRegExp.js | 18 + node_modules/lodash/_baseIsSet.js | 18 + node_modules/lodash/_baseIsTypedArray.js | 60 + node_modules/lodash/_baseIteratee.js | 31 + node_modules/lodash/_baseKeys.js | 30 + node_modules/lodash/_baseKeysIn.js | 33 + node_modules/lodash/_baseLodash.js | 10 + node_modules/lodash/_baseLt.js | 14 + node_modules/lodash/_baseMap.js | 22 + node_modules/lodash/_baseMatches.js | 22 + node_modules/lodash/_baseMatchesProperty.js | 33 + node_modules/lodash/_baseMean.js | 20 + node_modules/lodash/_baseMerge.js | 42 + node_modules/lodash/_baseMergeDeep.js | 94 + node_modules/lodash/_baseNth.js | 20 + node_modules/lodash/_baseOrderBy.js | 49 + node_modules/lodash/_basePick.js | 19 + node_modules/lodash/_basePickBy.js | 30 + node_modules/lodash/_baseProperty.js | 14 + node_modules/lodash/_basePropertyDeep.js | 16 + node_modules/lodash/_basePropertyOf.js | 14 + node_modules/lodash/_basePullAll.js | 51 + node_modules/lodash/_basePullAt.js | 37 + node_modules/lodash/_baseRandom.js | 18 + node_modules/lodash/_baseRange.js | 28 + node_modules/lodash/_baseReduce.js | 23 + node_modules/lodash/_baseRepeat.js | 35 + node_modules/lodash/_baseRest.js | 17 + node_modules/lodash/_baseSample.js | 15 + node_modules/lodash/_baseSampleSize.js | 18 + node_modules/lodash/_baseSet.js | 51 + node_modules/lodash/_baseSetData.js | 17 + node_modules/lodash/_baseSetToString.js | 22 + node_modules/lodash/_baseShuffle.js | 15 + node_modules/lodash/_baseSlice.js | 31 + node_modules/lodash/_baseSome.js | 22 + node_modules/lodash/_baseSortBy.js | 21 + node_modules/lodash/_baseSortedIndex.js | 42 + node_modules/lodash/_baseSortedIndexBy.js | 67 + node_modules/lodash/_baseSortedUniq.js | 30 + node_modules/lodash/_baseSum.js | 24 + node_modules/lodash/_baseTimes.js | 20 + node_modules/lodash/_baseToNumber.js | 24 + node_modules/lodash/_baseToPairs.js | 18 + node_modules/lodash/_baseToString.js | 37 + node_modules/lodash/_baseTrim.js | 19 + node_modules/lodash/_baseUnary.js | 14 + node_modules/lodash/_baseUniq.js | 72 + node_modules/lodash/_baseUnset.js | 20 + node_modules/lodash/_baseUpdate.js | 18 + node_modules/lodash/_baseValues.js | 19 + node_modules/lodash/_baseWhile.js | 26 + node_modules/lodash/_baseWrapperValue.js | 25 + node_modules/lodash/_baseXor.js | 36 + node_modules/lodash/_baseZipObject.js | 23 + node_modules/lodash/_cacheHas.js | 13 + node_modules/lodash/_castArrayLikeObject.js | 14 + node_modules/lodash/_castFunction.js | 14 + node_modules/lodash/_castPath.js | 21 + node_modules/lodash/_castRest.js | 14 + node_modules/lodash/_castSlice.js | 18 + node_modules/lodash/_charsEndIndex.js | 19 + node_modules/lodash/_charsStartIndex.js | 20 + node_modules/lodash/_cloneArrayBuffer.js | 16 + node_modules/lodash/_cloneBuffer.js | 35 + node_modules/lodash/_cloneDataView.js | 16 + node_modules/lodash/_cloneRegExp.js | 17 + node_modules/lodash/_cloneSymbol.js | 18 + node_modules/lodash/_cloneTypedArray.js | 16 + node_modules/lodash/_compareAscending.js | 41 + node_modules/lodash/_compareMultiple.js | 44 + node_modules/lodash/_composeArgs.js | 39 + node_modules/lodash/_composeArgsRight.js | 41 + node_modules/lodash/_copyArray.js | 20 + node_modules/lodash/_copyObject.js | 40 + node_modules/lodash/_copySymbols.js | 16 + node_modules/lodash/_copySymbolsIn.js | 16 + node_modules/lodash/_coreJsData.js | 6 + node_modules/lodash/_countHolders.js | 21 + node_modules/lodash/_createAggregator.js | 23 + node_modules/lodash/_createAssigner.js | 37 + node_modules/lodash/_createBaseEach.js | 32 + node_modules/lodash/_createBaseFor.js | 25 + node_modules/lodash/_createBind.js | 28 + node_modules/lodash/_createCaseFirst.js | 33 + node_modules/lodash/_createCompounder.js | 24 + node_modules/lodash/_createCtor.js | 37 + node_modules/lodash/_createCurry.js | 46 + node_modules/lodash/_createFind.js | 25 + node_modules/lodash/_createFlow.js | 78 + node_modules/lodash/_createHybrid.js | 92 + node_modules/lodash/_createInverter.js | 17 + node_modules/lodash/_createMathOperation.js | 38 + node_modules/lodash/_createOver.js | 27 + node_modules/lodash/_createPadding.js | 33 + node_modules/lodash/_createPartial.js | 43 + node_modules/lodash/_createRange.js | 30 + node_modules/lodash/_createRecurry.js | 56 + .../lodash/_createRelationalOperation.js | 20 + node_modules/lodash/_createRound.js | 35 + node_modules/lodash/_createSet.js | 19 + node_modules/lodash/_createToPairs.js | 30 + node_modules/lodash/_createWrap.js | 106 + .../lodash/_customDefaultsAssignIn.js | 29 + node_modules/lodash/_customDefaultsMerge.js | 28 + node_modules/lodash/_customOmitClone.js | 16 + node_modules/lodash/_deburrLetter.js | 71 + node_modules/lodash/_defineProperty.js | 11 + node_modules/lodash/_equalArrays.js | 84 + node_modules/lodash/_equalByTag.js | 112 + node_modules/lodash/_equalObjects.js | 90 + node_modules/lodash/_escapeHtmlChar.js | 21 + node_modules/lodash/_escapeStringChar.js | 22 + node_modules/lodash/_flatRest.js | 16 + node_modules/lodash/_freeGlobal.js | 4 + node_modules/lodash/_getAllKeys.js | 16 + node_modules/lodash/_getAllKeysIn.js | 17 + node_modules/lodash/_getData.js | 15 + node_modules/lodash/_getFuncName.js | 31 + node_modules/lodash/_getHolder.js | 13 + node_modules/lodash/_getMapData.js | 18 + node_modules/lodash/_getMatchData.js | 24 + node_modules/lodash/_getNative.js | 17 + node_modules/lodash/_getPrototype.js | 6 + node_modules/lodash/_getRawTag.js | 46 + node_modules/lodash/_getSymbols.js | 30 + node_modules/lodash/_getSymbolsIn.js | 25 + node_modules/lodash/_getTag.js | 58 + node_modules/lodash/_getValue.js | 13 + node_modules/lodash/_getView.js | 33 + node_modules/lodash/_getWrapDetails.js | 17 + node_modules/lodash/_hasPath.js | 39 + node_modules/lodash/_hasUnicode.js | 26 + node_modules/lodash/_hasUnicodeWord.js | 15 + node_modules/lodash/_hashClear.js | 15 + node_modules/lodash/_hashDelete.js | 17 + node_modules/lodash/_hashGet.js | 30 + node_modules/lodash/_hashHas.js | 23 + node_modules/lodash/_hashSet.js | 23 + node_modules/lodash/_initCloneArray.js | 26 + node_modules/lodash/_initCloneByTag.js | 77 + node_modules/lodash/_initCloneObject.js | 18 + node_modules/lodash/_insertWrapDetails.js | 23 + node_modules/lodash/_isFlattenable.js | 20 + node_modules/lodash/_isIndex.js | 25 + node_modules/lodash/_isIterateeCall.js | 30 + node_modules/lodash/_isKey.js | 29 + node_modules/lodash/_isKeyable.js | 15 + node_modules/lodash/_isLaziable.js | 28 + node_modules/lodash/_isMaskable.js | 14 + node_modules/lodash/_isMasked.js | 20 + node_modules/lodash/_isPrototype.js | 18 + node_modules/lodash/_isStrictComparable.js | 15 + node_modules/lodash/_iteratorToArray.js | 18 + node_modules/lodash/_lazyClone.js | 23 + node_modules/lodash/_lazyReverse.js | 23 + node_modules/lodash/_lazyValue.js | 69 + node_modules/lodash/_listCacheClear.js | 13 + node_modules/lodash/_listCacheDelete.js | 35 + node_modules/lodash/_listCacheGet.js | 19 + node_modules/lodash/_listCacheHas.js | 16 + node_modules/lodash/_listCacheSet.js | 26 + node_modules/lodash/_mapCacheClear.js | 21 + node_modules/lodash/_mapCacheDelete.js | 18 + node_modules/lodash/_mapCacheGet.js | 16 + node_modules/lodash/_mapCacheHas.js | 16 + node_modules/lodash/_mapCacheSet.js | 22 + node_modules/lodash/_mapToArray.js | 18 + .../lodash/_matchesStrictComparable.js | 20 + node_modules/lodash/_memoizeCapped.js | 26 + node_modules/lodash/_mergeData.js | 90 + node_modules/lodash/_metaMap.js | 6 + node_modules/lodash/_nativeCreate.js | 6 + node_modules/lodash/_nativeKeys.js | 6 + node_modules/lodash/_nativeKeysIn.js | 20 + node_modules/lodash/_nodeUtil.js | 30 + node_modules/lodash/_objectToString.js | 22 + node_modules/lodash/_overArg.js | 15 + node_modules/lodash/_overRest.js | 36 + node_modules/lodash/_parent.js | 16 + node_modules/lodash/_reEscape.js | 4 + node_modules/lodash/_reEvaluate.js | 4 + node_modules/lodash/_reInterpolate.js | 4 + node_modules/lodash/_realNames.js | 4 + node_modules/lodash/_reorder.js | 29 + node_modules/lodash/_replaceHolders.js | 29 + node_modules/lodash/_root.js | 9 + node_modules/lodash/_safeGet.js | 21 + node_modules/lodash/_setCacheAdd.js | 19 + node_modules/lodash/_setCacheHas.js | 14 + node_modules/lodash/_setData.js | 20 + node_modules/lodash/_setToArray.js | 18 + node_modules/lodash/_setToPairs.js | 18 + node_modules/lodash/_setToString.js | 14 + node_modules/lodash/_setWrapToString.js | 21 + node_modules/lodash/_shortOut.js | 37 + node_modules/lodash/_shuffleSelf.js | 28 + node_modules/lodash/_stackClear.js | 15 + node_modules/lodash/_stackDelete.js | 18 + node_modules/lodash/_stackGet.js | 14 + node_modules/lodash/_stackHas.js | 14 + node_modules/lodash/_stackSet.js | 34 + node_modules/lodash/_strictIndexOf.js | 23 + node_modules/lodash/_strictLastIndexOf.js | 21 + node_modules/lodash/_stringSize.js | 18 + node_modules/lodash/_stringToArray.js | 18 + node_modules/lodash/_stringToPath.js | 27 + node_modules/lodash/_toKey.js | 21 + node_modules/lodash/_toSource.js | 26 + node_modules/lodash/_trimmedEndIndex.js | 19 + node_modules/lodash/_unescapeHtmlChar.js | 21 + node_modules/lodash/_unicodeSize.js | 44 + node_modules/lodash/_unicodeToArray.js | 40 + node_modules/lodash/_unicodeWords.js | 69 + node_modules/lodash/_updateWrapDetails.js | 46 + node_modules/lodash/_wrapperClone.js | 23 + node_modules/lodash/add.js | 22 + node_modules/lodash/after.js | 42 + node_modules/lodash/array.js | 67 + node_modules/lodash/ary.js | 29 + node_modules/lodash/assign.js | 58 + node_modules/lodash/assignIn.js | 40 + node_modules/lodash/assignInWith.js | 38 + node_modules/lodash/assignWith.js | 37 + node_modules/lodash/at.js | 23 + node_modules/lodash/attempt.js | 35 + node_modules/lodash/before.js | 40 + node_modules/lodash/bind.js | 57 + node_modules/lodash/bindAll.js | 41 + node_modules/lodash/bindKey.js | 68 + node_modules/lodash/camelCase.js | 29 + node_modules/lodash/capitalize.js | 23 + node_modules/lodash/castArray.js | 44 + node_modules/lodash/ceil.js | 26 + node_modules/lodash/chain.js | 38 + node_modules/lodash/chunk.js | 50 + node_modules/lodash/clamp.js | 39 + node_modules/lodash/clone.js | 36 + node_modules/lodash/cloneDeep.js | 29 + node_modules/lodash/cloneDeepWith.js | 40 + node_modules/lodash/cloneWith.js | 42 + node_modules/lodash/collection.js | 30 + node_modules/lodash/commit.js | 33 + node_modules/lodash/compact.js | 31 + node_modules/lodash/concat.js | 43 + node_modules/lodash/cond.js | 60 + node_modules/lodash/conforms.js | 35 + node_modules/lodash/conformsTo.js | 32 + node_modules/lodash/constant.js | 26 + node_modules/lodash/core.js | 3877 +++ node_modules/lodash/core.min.js | 29 + node_modules/lodash/countBy.js | 40 + node_modules/lodash/create.js | 43 + node_modules/lodash/curry.js | 57 + node_modules/lodash/curryRight.js | 54 + node_modules/lodash/date.js | 3 + node_modules/lodash/debounce.js | 191 + node_modules/lodash/deburr.js | 45 + node_modules/lodash/defaultTo.js | 25 + node_modules/lodash/defaults.js | 64 + node_modules/lodash/defaultsDeep.js | 30 + node_modules/lodash/defer.js | 26 + node_modules/lodash/delay.js | 28 + node_modules/lodash/difference.js | 33 + node_modules/lodash/differenceBy.js | 44 + node_modules/lodash/differenceWith.js | 40 + node_modules/lodash/divide.js | 22 + node_modules/lodash/drop.js | 38 + node_modules/lodash/dropRight.js | 39 + node_modules/lodash/dropRightWhile.js | 45 + node_modules/lodash/dropWhile.js | 45 + node_modules/lodash/each.js | 1 + node_modules/lodash/eachRight.js | 1 + node_modules/lodash/endsWith.js | 43 + node_modules/lodash/entries.js | 1 + node_modules/lodash/entriesIn.js | 1 + node_modules/lodash/eq.js | 37 + node_modules/lodash/escape.js | 43 + node_modules/lodash/escapeRegExp.js | 32 + node_modules/lodash/every.js | 56 + node_modules/lodash/extend.js | 1 + node_modules/lodash/extendWith.js | 1 + node_modules/lodash/fill.js | 45 + node_modules/lodash/filter.js | 52 + node_modules/lodash/find.js | 42 + node_modules/lodash/findIndex.js | 55 + node_modules/lodash/findKey.js | 44 + node_modules/lodash/findLast.js | 25 + node_modules/lodash/findLastIndex.js | 59 + node_modules/lodash/findLastKey.js | 44 + node_modules/lodash/first.js | 1 + node_modules/lodash/flake.lock | 40 + node_modules/lodash/flake.nix | 20 + node_modules/lodash/flatMap.js | 29 + node_modules/lodash/flatMapDeep.js | 31 + node_modules/lodash/flatMapDepth.js | 31 + node_modules/lodash/flatten.js | 22 + node_modules/lodash/flattenDeep.js | 25 + node_modules/lodash/flattenDepth.js | 33 + node_modules/lodash/flip.js | 28 + node_modules/lodash/floor.js | 26 + node_modules/lodash/flow.js | 27 + node_modules/lodash/flowRight.js | 26 + node_modules/lodash/forEach.js | 41 + node_modules/lodash/forEachRight.js | 31 + node_modules/lodash/forIn.js | 39 + node_modules/lodash/forInRight.js | 37 + node_modules/lodash/forOwn.js | 36 + node_modules/lodash/forOwnRight.js | 34 + node_modules/lodash/fp.js | 2 + node_modules/lodash/fp/F.js | 1 + node_modules/lodash/fp/T.js | 1 + node_modules/lodash/fp/__.js | 1 + node_modules/lodash/fp/_baseConvert.js | 569 + node_modules/lodash/fp/_convertBrowser.js | 18 + node_modules/lodash/fp/_falseOptions.js | 7 + node_modules/lodash/fp/_mapping.js | 358 + node_modules/lodash/fp/_util.js | 16 + node_modules/lodash/fp/add.js | 5 + node_modules/lodash/fp/after.js | 5 + node_modules/lodash/fp/all.js | 1 + node_modules/lodash/fp/allPass.js | 1 + node_modules/lodash/fp/always.js | 1 + node_modules/lodash/fp/any.js | 1 + node_modules/lodash/fp/anyPass.js | 1 + node_modules/lodash/fp/apply.js | 1 + node_modules/lodash/fp/array.js | 2 + node_modules/lodash/fp/ary.js | 5 + node_modules/lodash/fp/assign.js | 5 + node_modules/lodash/fp/assignAll.js | 5 + node_modules/lodash/fp/assignAllWith.js | 5 + node_modules/lodash/fp/assignIn.js | 5 + node_modules/lodash/fp/assignInAll.js | 5 + node_modules/lodash/fp/assignInAllWith.js | 5 + node_modules/lodash/fp/assignInWith.js | 5 + node_modules/lodash/fp/assignWith.js | 5 + node_modules/lodash/fp/assoc.js | 1 + node_modules/lodash/fp/assocPath.js | 1 + node_modules/lodash/fp/at.js | 5 + node_modules/lodash/fp/attempt.js | 5 + node_modules/lodash/fp/before.js | 5 + node_modules/lodash/fp/bind.js | 5 + node_modules/lodash/fp/bindAll.js | 5 + node_modules/lodash/fp/bindKey.js | 5 + node_modules/lodash/fp/camelCase.js | 5 + node_modules/lodash/fp/capitalize.js | 5 + node_modules/lodash/fp/castArray.js | 5 + node_modules/lodash/fp/ceil.js | 5 + node_modules/lodash/fp/chain.js | 5 + node_modules/lodash/fp/chunk.js | 5 + node_modules/lodash/fp/clamp.js | 5 + node_modules/lodash/fp/clone.js | 5 + node_modules/lodash/fp/cloneDeep.js | 5 + node_modules/lodash/fp/cloneDeepWith.js | 5 + node_modules/lodash/fp/cloneWith.js | 5 + node_modules/lodash/fp/collection.js | 2 + node_modules/lodash/fp/commit.js | 5 + node_modules/lodash/fp/compact.js | 5 + node_modules/lodash/fp/complement.js | 1 + node_modules/lodash/fp/compose.js | 1 + node_modules/lodash/fp/concat.js | 5 + node_modules/lodash/fp/cond.js | 5 + node_modules/lodash/fp/conforms.js | 1 + node_modules/lodash/fp/conformsTo.js | 5 + node_modules/lodash/fp/constant.js | 5 + node_modules/lodash/fp/contains.js | 1 + node_modules/lodash/fp/convert.js | 18 + node_modules/lodash/fp/countBy.js | 5 + node_modules/lodash/fp/create.js | 5 + node_modules/lodash/fp/curry.js | 5 + node_modules/lodash/fp/curryN.js | 5 + node_modules/lodash/fp/curryRight.js | 5 + node_modules/lodash/fp/curryRightN.js | 5 + node_modules/lodash/fp/date.js | 2 + node_modules/lodash/fp/debounce.js | 5 + node_modules/lodash/fp/deburr.js | 5 + node_modules/lodash/fp/defaultTo.js | 5 + node_modules/lodash/fp/defaults.js | 5 + node_modules/lodash/fp/defaultsAll.js | 5 + node_modules/lodash/fp/defaultsDeep.js | 5 + node_modules/lodash/fp/defaultsDeepAll.js | 5 + node_modules/lodash/fp/defer.js | 5 + node_modules/lodash/fp/delay.js | 5 + node_modules/lodash/fp/difference.js | 5 + node_modules/lodash/fp/differenceBy.js | 5 + node_modules/lodash/fp/differenceWith.js | 5 + node_modules/lodash/fp/dissoc.js | 1 + node_modules/lodash/fp/dissocPath.js | 1 + node_modules/lodash/fp/divide.js | 5 + node_modules/lodash/fp/drop.js | 5 + node_modules/lodash/fp/dropLast.js | 1 + node_modules/lodash/fp/dropLastWhile.js | 1 + node_modules/lodash/fp/dropRight.js | 5 + node_modules/lodash/fp/dropRightWhile.js | 5 + node_modules/lodash/fp/dropWhile.js | 5 + node_modules/lodash/fp/each.js | 1 + node_modules/lodash/fp/eachRight.js | 1 + node_modules/lodash/fp/endsWith.js | 5 + node_modules/lodash/fp/entries.js | 1 + node_modules/lodash/fp/entriesIn.js | 1 + node_modules/lodash/fp/eq.js | 5 + node_modules/lodash/fp/equals.js | 1 + node_modules/lodash/fp/escape.js | 5 + node_modules/lodash/fp/escapeRegExp.js | 5 + node_modules/lodash/fp/every.js | 5 + node_modules/lodash/fp/extend.js | 1 + node_modules/lodash/fp/extendAll.js | 1 + node_modules/lodash/fp/extendAllWith.js | 1 + node_modules/lodash/fp/extendWith.js | 1 + node_modules/lodash/fp/fill.js | 5 + node_modules/lodash/fp/filter.js | 5 + node_modules/lodash/fp/find.js | 5 + node_modules/lodash/fp/findFrom.js | 5 + node_modules/lodash/fp/findIndex.js | 5 + node_modules/lodash/fp/findIndexFrom.js | 5 + node_modules/lodash/fp/findKey.js | 5 + node_modules/lodash/fp/findLast.js | 5 + node_modules/lodash/fp/findLastFrom.js | 5 + node_modules/lodash/fp/findLastIndex.js | 5 + node_modules/lodash/fp/findLastIndexFrom.js | 5 + node_modules/lodash/fp/findLastKey.js | 5 + node_modules/lodash/fp/first.js | 1 + node_modules/lodash/fp/flatMap.js | 5 + node_modules/lodash/fp/flatMapDeep.js | 5 + node_modules/lodash/fp/flatMapDepth.js | 5 + node_modules/lodash/fp/flatten.js | 5 + node_modules/lodash/fp/flattenDeep.js | 5 + node_modules/lodash/fp/flattenDepth.js | 5 + node_modules/lodash/fp/flip.js | 5 + node_modules/lodash/fp/floor.js | 5 + node_modules/lodash/fp/flow.js | 5 + node_modules/lodash/fp/flowRight.js | 5 + node_modules/lodash/fp/forEach.js | 5 + node_modules/lodash/fp/forEachRight.js | 5 + node_modules/lodash/fp/forIn.js | 5 + node_modules/lodash/fp/forInRight.js | 5 + node_modules/lodash/fp/forOwn.js | 5 + node_modules/lodash/fp/forOwnRight.js | 5 + node_modules/lodash/fp/fromPairs.js | 5 + node_modules/lodash/fp/function.js | 2 + node_modules/lodash/fp/functions.js | 5 + node_modules/lodash/fp/functionsIn.js | 5 + node_modules/lodash/fp/get.js | 5 + node_modules/lodash/fp/getOr.js | 5 + node_modules/lodash/fp/groupBy.js | 5 + node_modules/lodash/fp/gt.js | 5 + node_modules/lodash/fp/gte.js | 5 + node_modules/lodash/fp/has.js | 5 + node_modules/lodash/fp/hasIn.js | 5 + node_modules/lodash/fp/head.js | 5 + node_modules/lodash/fp/identical.js | 1 + node_modules/lodash/fp/identity.js | 5 + node_modules/lodash/fp/inRange.js | 5 + node_modules/lodash/fp/includes.js | 5 + node_modules/lodash/fp/includesFrom.js | 5 + node_modules/lodash/fp/indexBy.js | 1 + node_modules/lodash/fp/indexOf.js | 5 + node_modules/lodash/fp/indexOfFrom.js | 5 + node_modules/lodash/fp/init.js | 1 + node_modules/lodash/fp/initial.js | 5 + node_modules/lodash/fp/intersection.js | 5 + node_modules/lodash/fp/intersectionBy.js | 5 + node_modules/lodash/fp/intersectionWith.js | 5 + node_modules/lodash/fp/invert.js | 5 + node_modules/lodash/fp/invertBy.js | 5 + node_modules/lodash/fp/invertObj.js | 1 + node_modules/lodash/fp/invoke.js | 5 + node_modules/lodash/fp/invokeArgs.js | 5 + node_modules/lodash/fp/invokeArgsMap.js | 5 + node_modules/lodash/fp/invokeMap.js | 5 + node_modules/lodash/fp/isArguments.js | 5 + node_modules/lodash/fp/isArray.js | 5 + node_modules/lodash/fp/isArrayBuffer.js | 5 + node_modules/lodash/fp/isArrayLike.js | 5 + node_modules/lodash/fp/isArrayLikeObject.js | 5 + node_modules/lodash/fp/isBoolean.js | 5 + node_modules/lodash/fp/isBuffer.js | 5 + node_modules/lodash/fp/isDate.js | 5 + node_modules/lodash/fp/isElement.js | 5 + node_modules/lodash/fp/isEmpty.js | 5 + node_modules/lodash/fp/isEqual.js | 5 + node_modules/lodash/fp/isEqualWith.js | 5 + node_modules/lodash/fp/isError.js | 5 + node_modules/lodash/fp/isFinite.js | 5 + node_modules/lodash/fp/isFunction.js | 5 + node_modules/lodash/fp/isInteger.js | 5 + node_modules/lodash/fp/isLength.js | 5 + node_modules/lodash/fp/isMap.js | 5 + node_modules/lodash/fp/isMatch.js | 5 + node_modules/lodash/fp/isMatchWith.js | 5 + node_modules/lodash/fp/isNaN.js | 5 + node_modules/lodash/fp/isNative.js | 5 + node_modules/lodash/fp/isNil.js | 5 + node_modules/lodash/fp/isNull.js | 5 + node_modules/lodash/fp/isNumber.js | 5 + node_modules/lodash/fp/isObject.js | 5 + node_modules/lodash/fp/isObjectLike.js | 5 + node_modules/lodash/fp/isPlainObject.js | 5 + node_modules/lodash/fp/isRegExp.js | 5 + node_modules/lodash/fp/isSafeInteger.js | 5 + node_modules/lodash/fp/isSet.js | 5 + node_modules/lodash/fp/isString.js | 5 + node_modules/lodash/fp/isSymbol.js | 5 + node_modules/lodash/fp/isTypedArray.js | 5 + node_modules/lodash/fp/isUndefined.js | 5 + node_modules/lodash/fp/isWeakMap.js | 5 + node_modules/lodash/fp/isWeakSet.js | 5 + node_modules/lodash/fp/iteratee.js | 5 + node_modules/lodash/fp/join.js | 5 + node_modules/lodash/fp/juxt.js | 1 + node_modules/lodash/fp/kebabCase.js | 5 + node_modules/lodash/fp/keyBy.js | 5 + node_modules/lodash/fp/keys.js | 5 + node_modules/lodash/fp/keysIn.js | 5 + node_modules/lodash/fp/lang.js | 2 + node_modules/lodash/fp/last.js | 5 + node_modules/lodash/fp/lastIndexOf.js | 5 + node_modules/lodash/fp/lastIndexOfFrom.js | 5 + node_modules/lodash/fp/lowerCase.js | 5 + node_modules/lodash/fp/lowerFirst.js | 5 + node_modules/lodash/fp/lt.js | 5 + node_modules/lodash/fp/lte.js | 5 + node_modules/lodash/fp/map.js | 5 + node_modules/lodash/fp/mapKeys.js | 5 + node_modules/lodash/fp/mapValues.js | 5 + node_modules/lodash/fp/matches.js | 1 + node_modules/lodash/fp/matchesProperty.js | 5 + node_modules/lodash/fp/math.js | 2 + node_modules/lodash/fp/max.js | 5 + node_modules/lodash/fp/maxBy.js | 5 + node_modules/lodash/fp/mean.js | 5 + node_modules/lodash/fp/meanBy.js | 5 + node_modules/lodash/fp/memoize.js | 5 + node_modules/lodash/fp/merge.js | 5 + node_modules/lodash/fp/mergeAll.js | 5 + node_modules/lodash/fp/mergeAllWith.js | 5 + node_modules/lodash/fp/mergeWith.js | 5 + node_modules/lodash/fp/method.js | 5 + node_modules/lodash/fp/methodOf.js | 5 + node_modules/lodash/fp/min.js | 5 + node_modules/lodash/fp/minBy.js | 5 + node_modules/lodash/fp/mixin.js | 5 + node_modules/lodash/fp/multiply.js | 5 + node_modules/lodash/fp/nAry.js | 1 + node_modules/lodash/fp/negate.js | 5 + node_modules/lodash/fp/next.js | 5 + node_modules/lodash/fp/noop.js | 5 + node_modules/lodash/fp/now.js | 5 + node_modules/lodash/fp/nth.js | 5 + node_modules/lodash/fp/nthArg.js | 5 + node_modules/lodash/fp/number.js | 2 + node_modules/lodash/fp/object.js | 2 + node_modules/lodash/fp/omit.js | 5 + node_modules/lodash/fp/omitAll.js | 1 + node_modules/lodash/fp/omitBy.js | 5 + node_modules/lodash/fp/once.js | 5 + node_modules/lodash/fp/orderBy.js | 5 + node_modules/lodash/fp/over.js | 5 + node_modules/lodash/fp/overArgs.js | 5 + node_modules/lodash/fp/overEvery.js | 5 + node_modules/lodash/fp/overSome.js | 5 + node_modules/lodash/fp/pad.js | 5 + node_modules/lodash/fp/padChars.js | 5 + node_modules/lodash/fp/padCharsEnd.js | 5 + node_modules/lodash/fp/padCharsStart.js | 5 + node_modules/lodash/fp/padEnd.js | 5 + node_modules/lodash/fp/padStart.js | 5 + node_modules/lodash/fp/parseInt.js | 5 + node_modules/lodash/fp/partial.js | 5 + node_modules/lodash/fp/partialRight.js | 5 + node_modules/lodash/fp/partition.js | 5 + node_modules/lodash/fp/path.js | 1 + node_modules/lodash/fp/pathEq.js | 1 + node_modules/lodash/fp/pathOr.js | 1 + node_modules/lodash/fp/paths.js | 1 + node_modules/lodash/fp/pick.js | 5 + node_modules/lodash/fp/pickAll.js | 1 + node_modules/lodash/fp/pickBy.js | 5 + node_modules/lodash/fp/pipe.js | 1 + node_modules/lodash/fp/placeholder.js | 6 + node_modules/lodash/fp/plant.js | 5 + node_modules/lodash/fp/pluck.js | 1 + node_modules/lodash/fp/prop.js | 1 + node_modules/lodash/fp/propEq.js | 1 + node_modules/lodash/fp/propOr.js | 1 + node_modules/lodash/fp/property.js | 1 + node_modules/lodash/fp/propertyOf.js | 5 + node_modules/lodash/fp/props.js | 1 + node_modules/lodash/fp/pull.js | 5 + node_modules/lodash/fp/pullAll.js | 5 + node_modules/lodash/fp/pullAllBy.js | 5 + node_modules/lodash/fp/pullAllWith.js | 5 + node_modules/lodash/fp/pullAt.js | 5 + node_modules/lodash/fp/random.js | 5 + node_modules/lodash/fp/range.js | 5 + node_modules/lodash/fp/rangeRight.js | 5 + node_modules/lodash/fp/rangeStep.js | 5 + node_modules/lodash/fp/rangeStepRight.js | 5 + node_modules/lodash/fp/rearg.js | 5 + node_modules/lodash/fp/reduce.js | 5 + node_modules/lodash/fp/reduceRight.js | 5 + node_modules/lodash/fp/reject.js | 5 + node_modules/lodash/fp/remove.js | 5 + node_modules/lodash/fp/repeat.js | 5 + node_modules/lodash/fp/replace.js | 5 + node_modules/lodash/fp/rest.js | 5 + node_modules/lodash/fp/restFrom.js | 5 + node_modules/lodash/fp/result.js | 5 + node_modules/lodash/fp/reverse.js | 5 + node_modules/lodash/fp/round.js | 5 + node_modules/lodash/fp/sample.js | 5 + node_modules/lodash/fp/sampleSize.js | 5 + node_modules/lodash/fp/seq.js | 2 + node_modules/lodash/fp/set.js | 5 + node_modules/lodash/fp/setWith.js | 5 + node_modules/lodash/fp/shuffle.js | 5 + node_modules/lodash/fp/size.js | 5 + node_modules/lodash/fp/slice.js | 5 + node_modules/lodash/fp/snakeCase.js | 5 + node_modules/lodash/fp/some.js | 5 + node_modules/lodash/fp/sortBy.js | 5 + node_modules/lodash/fp/sortedIndex.js | 5 + node_modules/lodash/fp/sortedIndexBy.js | 5 + node_modules/lodash/fp/sortedIndexOf.js | 5 + node_modules/lodash/fp/sortedLastIndex.js | 5 + node_modules/lodash/fp/sortedLastIndexBy.js | 5 + node_modules/lodash/fp/sortedLastIndexOf.js | 5 + node_modules/lodash/fp/sortedUniq.js | 5 + node_modules/lodash/fp/sortedUniqBy.js | 5 + node_modules/lodash/fp/split.js | 5 + node_modules/lodash/fp/spread.js | 5 + node_modules/lodash/fp/spreadFrom.js | 5 + node_modules/lodash/fp/startCase.js | 5 + node_modules/lodash/fp/startsWith.js | 5 + node_modules/lodash/fp/string.js | 2 + node_modules/lodash/fp/stubArray.js | 5 + node_modules/lodash/fp/stubFalse.js | 5 + node_modules/lodash/fp/stubObject.js | 5 + node_modules/lodash/fp/stubString.js | 5 + node_modules/lodash/fp/stubTrue.js | 5 + node_modules/lodash/fp/subtract.js | 5 + node_modules/lodash/fp/sum.js | 5 + node_modules/lodash/fp/sumBy.js | 5 + node_modules/lodash/fp/symmetricDifference.js | 1 + .../lodash/fp/symmetricDifferenceBy.js | 1 + .../lodash/fp/symmetricDifferenceWith.js | 1 + node_modules/lodash/fp/tail.js | 5 + node_modules/lodash/fp/take.js | 5 + node_modules/lodash/fp/takeLast.js | 1 + node_modules/lodash/fp/takeLastWhile.js | 1 + node_modules/lodash/fp/takeRight.js | 5 + node_modules/lodash/fp/takeRightWhile.js | 5 + node_modules/lodash/fp/takeWhile.js | 5 + node_modules/lodash/fp/tap.js | 5 + node_modules/lodash/fp/template.js | 5 + node_modules/lodash/fp/templateSettings.js | 5 + node_modules/lodash/fp/throttle.js | 5 + node_modules/lodash/fp/thru.js | 5 + node_modules/lodash/fp/times.js | 5 + node_modules/lodash/fp/toArray.js | 5 + node_modules/lodash/fp/toFinite.js | 5 + node_modules/lodash/fp/toInteger.js | 5 + node_modules/lodash/fp/toIterator.js | 5 + node_modules/lodash/fp/toJSON.js | 5 + node_modules/lodash/fp/toLength.js | 5 + node_modules/lodash/fp/toLower.js | 5 + node_modules/lodash/fp/toNumber.js | 5 + node_modules/lodash/fp/toPairs.js | 5 + node_modules/lodash/fp/toPairsIn.js | 5 + node_modules/lodash/fp/toPath.js | 5 + node_modules/lodash/fp/toPlainObject.js | 5 + node_modules/lodash/fp/toSafeInteger.js | 5 + node_modules/lodash/fp/toString.js | 5 + node_modules/lodash/fp/toUpper.js | 5 + node_modules/lodash/fp/transform.js | 5 + node_modules/lodash/fp/trim.js | 5 + node_modules/lodash/fp/trimChars.js | 5 + node_modules/lodash/fp/trimCharsEnd.js | 5 + node_modules/lodash/fp/trimCharsStart.js | 5 + node_modules/lodash/fp/trimEnd.js | 5 + node_modules/lodash/fp/trimStart.js | 5 + node_modules/lodash/fp/truncate.js | 5 + node_modules/lodash/fp/unapply.js | 1 + node_modules/lodash/fp/unary.js | 5 + node_modules/lodash/fp/unescape.js | 5 + node_modules/lodash/fp/union.js | 5 + node_modules/lodash/fp/unionBy.js | 5 + node_modules/lodash/fp/unionWith.js | 5 + node_modules/lodash/fp/uniq.js | 5 + node_modules/lodash/fp/uniqBy.js | 5 + node_modules/lodash/fp/uniqWith.js | 5 + node_modules/lodash/fp/uniqueId.js | 5 + node_modules/lodash/fp/unnest.js | 1 + node_modules/lodash/fp/unset.js | 5 + node_modules/lodash/fp/unzip.js | 5 + node_modules/lodash/fp/unzipWith.js | 5 + node_modules/lodash/fp/update.js | 5 + node_modules/lodash/fp/updateWith.js | 5 + node_modules/lodash/fp/upperCase.js | 5 + node_modules/lodash/fp/upperFirst.js | 5 + node_modules/lodash/fp/useWith.js | 1 + node_modules/lodash/fp/util.js | 2 + node_modules/lodash/fp/value.js | 5 + node_modules/lodash/fp/valueOf.js | 5 + node_modules/lodash/fp/values.js | 5 + node_modules/lodash/fp/valuesIn.js | 5 + node_modules/lodash/fp/where.js | 1 + node_modules/lodash/fp/whereEq.js | 1 + node_modules/lodash/fp/without.js | 5 + node_modules/lodash/fp/words.js | 5 + node_modules/lodash/fp/wrap.js | 5 + node_modules/lodash/fp/wrapperAt.js | 5 + node_modules/lodash/fp/wrapperChain.js | 5 + node_modules/lodash/fp/wrapperLodash.js | 5 + node_modules/lodash/fp/wrapperReverse.js | 5 + node_modules/lodash/fp/wrapperValue.js | 5 + node_modules/lodash/fp/xor.js | 5 + node_modules/lodash/fp/xorBy.js | 5 + node_modules/lodash/fp/xorWith.js | 5 + node_modules/lodash/fp/zip.js | 5 + node_modules/lodash/fp/zipAll.js | 5 + node_modules/lodash/fp/zipObj.js | 1 + node_modules/lodash/fp/zipObject.js | 5 + node_modules/lodash/fp/zipObjectDeep.js | 5 + node_modules/lodash/fp/zipWith.js | 5 + node_modules/lodash/fromPairs.js | 28 + node_modules/lodash/function.js | 25 + node_modules/lodash/functions.js | 31 + node_modules/lodash/functionsIn.js | 31 + node_modules/lodash/get.js | 33 + node_modules/lodash/groupBy.js | 41 + node_modules/lodash/gt.js | 29 + node_modules/lodash/gte.js | 30 + node_modules/lodash/has.js | 35 + node_modules/lodash/hasIn.js | 34 + node_modules/lodash/head.js | 23 + node_modules/lodash/identity.js | 21 + node_modules/lodash/inRange.js | 55 + node_modules/lodash/includes.js | 53 + node_modules/lodash/index.js | 1 + node_modules/lodash/indexOf.js | 42 + node_modules/lodash/initial.js | 22 + node_modules/lodash/intersection.js | 30 + node_modules/lodash/intersectionBy.js | 45 + node_modules/lodash/intersectionWith.js | 41 + node_modules/lodash/invert.js | 42 + node_modules/lodash/invertBy.js | 56 + node_modules/lodash/invoke.js | 24 + node_modules/lodash/invokeMap.js | 41 + node_modules/lodash/isArguments.js | 36 + node_modules/lodash/isArray.js | 26 + node_modules/lodash/isArrayBuffer.js | 27 + node_modules/lodash/isArrayLike.js | 33 + node_modules/lodash/isArrayLikeObject.js | 33 + node_modules/lodash/isBoolean.js | 29 + node_modules/lodash/isBuffer.js | 38 + node_modules/lodash/isDate.js | 27 + node_modules/lodash/isElement.js | 25 + node_modules/lodash/isEmpty.js | 77 + node_modules/lodash/isEqual.js | 35 + node_modules/lodash/isEqualWith.js | 41 + node_modules/lodash/isError.js | 36 + node_modules/lodash/isFinite.js | 36 + node_modules/lodash/isFunction.js | 37 + node_modules/lodash/isInteger.js | 33 + node_modules/lodash/isLength.js | 35 + node_modules/lodash/isMap.js | 27 + node_modules/lodash/isMatch.js | 36 + node_modules/lodash/isMatchWith.js | 41 + node_modules/lodash/isNaN.js | 38 + node_modules/lodash/isNative.js | 40 + node_modules/lodash/isNil.js | 25 + node_modules/lodash/isNull.js | 22 + node_modules/lodash/isNumber.js | 38 + node_modules/lodash/isObject.js | 31 + node_modules/lodash/isObjectLike.js | 29 + node_modules/lodash/isPlainObject.js | 62 + node_modules/lodash/isRegExp.js | 27 + node_modules/lodash/isSafeInteger.js | 37 + node_modules/lodash/isSet.js | 27 + node_modules/lodash/isString.js | 30 + node_modules/lodash/isSymbol.js | 29 + node_modules/lodash/isTypedArray.js | 27 + node_modules/lodash/isUndefined.js | 22 + node_modules/lodash/isWeakMap.js | 28 + node_modules/lodash/isWeakSet.js | 28 + node_modules/lodash/iteratee.js | 53 + node_modules/lodash/join.js | 26 + node_modules/lodash/kebabCase.js | 28 + node_modules/lodash/keyBy.js | 36 + node_modules/lodash/keys.js | 37 + node_modules/lodash/keysIn.js | 32 + node_modules/lodash/lang.js | 58 + node_modules/lodash/last.js | 20 + node_modules/lodash/lastIndexOf.js | 46 + node_modules/lodash/lodash.js | 17209 +++++++++++ node_modules/lodash/lodash.min.js | 140 + node_modules/lodash/lowerCase.js | 27 + node_modules/lodash/lowerFirst.js | 22 + node_modules/lodash/lt.js | 29 + node_modules/lodash/lte.js | 30 + node_modules/lodash/map.js | 53 + node_modules/lodash/mapKeys.js | 36 + node_modules/lodash/mapValues.js | 43 + node_modules/lodash/matches.js | 46 + node_modules/lodash/matchesProperty.js | 44 + node_modules/lodash/math.js | 17 + node_modules/lodash/max.js | 29 + node_modules/lodash/maxBy.js | 34 + node_modules/lodash/mean.js | 22 + node_modules/lodash/meanBy.js | 31 + node_modules/lodash/memoize.js | 73 + node_modules/lodash/merge.js | 39 + node_modules/lodash/mergeWith.js | 39 + node_modules/lodash/method.js | 34 + node_modules/lodash/methodOf.js | 33 + node_modules/lodash/min.js | 29 + node_modules/lodash/minBy.js | 34 + node_modules/lodash/mixin.js | 74 + node_modules/lodash/multiply.js | 22 + node_modules/lodash/negate.js | 40 + node_modules/lodash/next.js | 35 + node_modules/lodash/noop.js | 17 + node_modules/lodash/now.js | 23 + node_modules/lodash/nth.js | 29 + node_modules/lodash/nthArg.js | 32 + node_modules/lodash/number.js | 5 + node_modules/lodash/object.js | 49 + node_modules/lodash/omit.js | 57 + node_modules/lodash/omitBy.js | 29 + node_modules/lodash/once.js | 25 + node_modules/lodash/orderBy.js | 47 + node_modules/lodash/over.js | 24 + node_modules/lodash/overArgs.js | 61 + node_modules/lodash/overEvery.js | 34 + node_modules/lodash/overSome.js | 37 + node_modules/lodash/package.json | 17 + node_modules/lodash/pad.js | 49 + node_modules/lodash/padEnd.js | 39 + node_modules/lodash/padStart.js | 39 + node_modules/lodash/parseInt.js | 43 + node_modules/lodash/partial.js | 50 + node_modules/lodash/partialRight.js | 49 + node_modules/lodash/partition.js | 43 + node_modules/lodash/pick.js | 25 + node_modules/lodash/pickBy.js | 37 + node_modules/lodash/plant.js | 48 + node_modules/lodash/property.js | 32 + node_modules/lodash/propertyOf.js | 30 + node_modules/lodash/pull.js | 29 + node_modules/lodash/pullAll.js | 29 + node_modules/lodash/pullAllBy.js | 33 + node_modules/lodash/pullAllWith.js | 32 + node_modules/lodash/pullAt.js | 43 + node_modules/lodash/random.js | 82 + node_modules/lodash/range.js | 46 + node_modules/lodash/rangeRight.js | 41 + node_modules/lodash/rearg.js | 33 + node_modules/lodash/reduce.js | 51 + node_modules/lodash/reduceRight.js | 36 + node_modules/lodash/reject.js | 46 + node_modules/lodash/release.md | 48 + node_modules/lodash/remove.js | 53 + node_modules/lodash/repeat.js | 37 + node_modules/lodash/replace.js | 29 + node_modules/lodash/rest.js | 40 + node_modules/lodash/result.js | 56 + node_modules/lodash/reverse.js | 34 + node_modules/lodash/round.js | 26 + node_modules/lodash/sample.js | 24 + node_modules/lodash/sampleSize.js | 37 + node_modules/lodash/seq.js | 16 + node_modules/lodash/set.js | 35 + node_modules/lodash/setWith.js | 32 + node_modules/lodash/shuffle.js | 25 + node_modules/lodash/size.js | 46 + node_modules/lodash/slice.js | 37 + node_modules/lodash/snakeCase.js | 28 + node_modules/lodash/some.js | 51 + node_modules/lodash/sortBy.js | 48 + node_modules/lodash/sortedIndex.js | 24 + node_modules/lodash/sortedIndexBy.js | 33 + node_modules/lodash/sortedIndexOf.js | 31 + node_modules/lodash/sortedLastIndex.js | 25 + node_modules/lodash/sortedLastIndexBy.js | 33 + node_modules/lodash/sortedLastIndexOf.js | 31 + node_modules/lodash/sortedUniq.js | 24 + node_modules/lodash/sortedUniqBy.js | 26 + node_modules/lodash/split.js | 52 + node_modules/lodash/spread.js | 63 + node_modules/lodash/startCase.js | 29 + node_modules/lodash/startsWith.js | 39 + node_modules/lodash/string.js | 33 + node_modules/lodash/stubArray.js | 23 + node_modules/lodash/stubFalse.js | 18 + node_modules/lodash/stubObject.js | 23 + node_modules/lodash/stubString.js | 18 + node_modules/lodash/stubTrue.js | 18 + node_modules/lodash/subtract.js | 22 + node_modules/lodash/sum.js | 24 + node_modules/lodash/sumBy.js | 33 + node_modules/lodash/tail.js | 22 + node_modules/lodash/take.js | 37 + node_modules/lodash/takeRight.js | 39 + node_modules/lodash/takeRightWhile.js | 45 + node_modules/lodash/takeWhile.js | 45 + node_modules/lodash/tap.js | 29 + node_modules/lodash/template.js | 272 + node_modules/lodash/templateSettings.js | 67 + node_modules/lodash/throttle.js | 69 + node_modules/lodash/thru.js | 28 + node_modules/lodash/times.js | 51 + node_modules/lodash/toArray.js | 58 + node_modules/lodash/toFinite.js | 42 + node_modules/lodash/toInteger.js | 36 + node_modules/lodash/toIterator.js | 23 + node_modules/lodash/toJSON.js | 1 + node_modules/lodash/toLength.js | 38 + node_modules/lodash/toLower.js | 28 + node_modules/lodash/toNumber.js | 64 + node_modules/lodash/toPairs.js | 30 + node_modules/lodash/toPairsIn.js | 30 + node_modules/lodash/toPath.js | 33 + node_modules/lodash/toPlainObject.js | 32 + node_modules/lodash/toSafeInteger.js | 37 + node_modules/lodash/toString.js | 28 + node_modules/lodash/toUpper.js | 28 + node_modules/lodash/transform.js | 65 + node_modules/lodash/trim.js | 47 + node_modules/lodash/trimEnd.js | 41 + node_modules/lodash/trimStart.js | 43 + node_modules/lodash/truncate.js | 111 + node_modules/lodash/unary.js | 22 + node_modules/lodash/unescape.js | 34 + node_modules/lodash/union.js | 26 + node_modules/lodash/unionBy.js | 39 + node_modules/lodash/unionWith.js | 34 + node_modules/lodash/uniq.js | 25 + node_modules/lodash/uniqBy.js | 31 + node_modules/lodash/uniqWith.js | 28 + node_modules/lodash/uniqueId.js | 28 + node_modules/lodash/unset.js | 34 + node_modules/lodash/unzip.js | 45 + node_modules/lodash/unzipWith.js | 39 + node_modules/lodash/update.js | 35 + node_modules/lodash/updateWith.js | 33 + node_modules/lodash/upperCase.js | 27 + node_modules/lodash/upperFirst.js | 22 + node_modules/lodash/util.js | 34 + node_modules/lodash/value.js | 1 + node_modules/lodash/valueOf.js | 1 + node_modules/lodash/values.js | 34 + node_modules/lodash/valuesIn.js | 32 + node_modules/lodash/without.js | 31 + node_modules/lodash/words.js | 35 + node_modules/lodash/wrap.js | 30 + node_modules/lodash/wrapperAt.js | 48 + node_modules/lodash/wrapperChain.js | 34 + node_modules/lodash/wrapperLodash.js | 147 + node_modules/lodash/wrapperReverse.js | 44 + node_modules/lodash/wrapperValue.js | 21 + node_modules/lodash/xor.js | 28 + node_modules/lodash/xorBy.js | 39 + node_modules/lodash/xorWith.js | 34 + node_modules/lodash/zip.js | 22 + node_modules/lodash/zipObject.js | 24 + node_modules/lodash/zipObjectDeep.js | 23 + node_modules/lodash/zipWith.js | 32 + node_modules/prettier-plugin-java/LICENSE | 204 + node_modules/prettier-plugin-java/README.md | 158 + .../dist/base-cst-printer.js | 55 + .../prettier-plugin-java/dist/cst-printer.js | 29 + .../prettier-plugin-java/dist/index.js | 66 + .../prettier-plugin-java/dist/options.js | 256 + .../prettier-plugin-java/dist/parser.js | 4 + .../prettier-plugin-java/dist/printer.js | 6 + .../dist/printers/arrays.js | 25 + .../dist/printers/blocks-and-statements.js | 432 + .../dist/printers/classes.js | 709 + .../dist/printers/comments/comments-utils.js | 21 + .../dist/printers/comments/format-comments.js | 171 + .../dist/printers/comments/handle-comments.js | 102 + .../dist/printers/expressions.js | 614 + .../dist/printers/interfaces.js | 222 + .../dist/printers/lexical-structure.js | 31 + .../dist/printers/names.js | 29 + .../dist/printers/packages-and-modules.js | 171 + .../dist/printers/prettier-builder.js | 45 + .../dist/printers/printer-utils.js | 598 + .../printers/types-values-and-variables.js | 153 + .../prettier-plugin-java/dist/types/utils.js | 20 + .../prettier-plugin-java/dist/utils/index.js | 2 + .../dist/utils/isEmptyDoc.js | 4 + .../dist/utils/printArgumentListWithBraces.js | 37 + .../node_modules/.bin/prettier | 1 + .../node_modules/prettier/LICENSE | 4857 ++++ .../node_modules/prettier/README.md | 109 + .../node_modules/prettier/doc.d.ts | 243 + .../node_modules/prettier/doc.js | 1328 + .../node_modules/prettier/doc.mjs | 1300 + .../node_modules/prettier/index.cjs | 648 + .../node_modules/prettier/index.d.ts | 940 + .../node_modules/prettier/index.mjs | 24255 ++++++++++++++++ .../node_modules/prettier/internal/cli.mjs | 7089 +++++ .../node_modules/prettier/package.json | 198 + .../node_modules/prettier/plugins/acorn.d.ts | 6 + .../node_modules/prettier/plugins/acorn.js | 13 + .../node_modules/prettier/plugins/acorn.mjs | 13 + .../prettier/plugins/angular.d.ts | 8 + .../node_modules/prettier/plugins/angular.js | 1 + .../node_modules/prettier/plugins/angular.mjs | 1 + .../node_modules/prettier/plugins/babel.d.ts | 18 + .../node_modules/prettier/plugins/babel.js | 16 + .../node_modules/prettier/plugins/babel.mjs | 16 + .../node_modules/prettier/plugins/estree.d.ts | 1 + .../node_modules/prettier/plugins/estree.js | 36 + .../node_modules/prettier/plugins/estree.mjs | 36 + .../node_modules/prettier/plugins/flow.d.ts | 5 + .../node_modules/prettier/plugins/flow.js | 21 + .../node_modules/prettier/plugins/flow.mjs | 21 + .../prettier/plugins/glimmer.d.ts | 5 + .../node_modules/prettier/plugins/glimmer.js | 30 + .../node_modules/prettier/plugins/glimmer.mjs | 30 + .../prettier/plugins/graphql.d.ts | 5 + .../node_modules/prettier/plugins/graphql.js | 29 + .../node_modules/prettier/plugins/graphql.mjs | 29 + .../node_modules/prettier/plugins/html.d.ts | 8 + .../node_modules/prettier/plugins/html.js | 19 + .../node_modules/prettier/plugins/html.mjs | 19 + .../prettier/plugins/markdown.d.ts | 7 + .../node_modules/prettier/plugins/markdown.js | 59 + .../prettier/plugins/markdown.mjs | 59 + .../prettier/plugins/meriyah.d.ts | 5 + .../node_modules/prettier/plugins/meriyah.js | 5 + .../node_modules/prettier/plugins/meriyah.mjs | 5 + .../prettier/plugins/postcss.d.ts | 7 + .../node_modules/prettier/plugins/postcss.js | 49 + .../node_modules/prettier/plugins/postcss.mjs | 49 + .../prettier/plugins/typescript.d.ts | 5 + .../prettier/plugins/typescript.js | 25 + .../prettier/plugins/typescript.mjs | 25 + .../node_modules/prettier/plugins/yaml.d.ts | 5 + .../node_modules/prettier/plugins/yaml.js | 161 + .../node_modules/prettier/plugins/yaml.mjs | 161 + .../node_modules/prettier/standalone.d.ts | 33 + .../node_modules/prettier/standalone.js | 34 + .../node_modules/prettier/standalone.mjs | 34 + .../prettier-plugin-java/package.json | 42 + node_modules/prettier/LICENSE | 4380 +++ node_modules/prettier/README.md | 109 + node_modules/prettier/doc.d.ts | 254 + node_modules/prettier/doc.js | 1237 + node_modules/prettier/doc.mjs | 1209 + node_modules/prettier/index.cjs | 674 + node_modules/prettier/index.d.ts | 946 + node_modules/prettier/index.mjs | 22062 ++++++++++++++ node_modules/prettier/internal/cli.mjs | 3895 +++ node_modules/prettier/package.json | 199 + node_modules/prettier/plugins/acorn.d.ts | 6 + node_modules/prettier/plugins/acorn.js | 15 + node_modules/prettier/plugins/acorn.mjs | 15 + node_modules/prettier/plugins/angular.d.ts | 8 + node_modules/prettier/plugins/angular.js | 2 + node_modules/prettier/plugins/angular.mjs | 2 + node_modules/prettier/plugins/babel.d.ts | 18 + node_modules/prettier/plugins/babel.js | 15 + node_modules/prettier/plugins/babel.mjs | 15 + node_modules/prettier/plugins/estree.d.ts | 1 + node_modules/prettier/plugins/estree.js | 36 + node_modules/prettier/plugins/estree.mjs | 36 + node_modules/prettier/plugins/flow.d.ts | 5 + node_modules/prettier/plugins/flow.js | 19 + node_modules/prettier/plugins/flow.mjs | 19 + node_modules/prettier/plugins/glimmer.d.ts | 5 + node_modules/prettier/plugins/glimmer.js | 30 + node_modules/prettier/plugins/glimmer.mjs | 30 + node_modules/prettier/plugins/graphql.d.ts | 5 + node_modules/prettier/plugins/graphql.js | 29 + node_modules/prettier/plugins/graphql.mjs | 29 + node_modules/prettier/plugins/html.d.ts | 8 + node_modules/prettier/plugins/html.js | 22 + node_modules/prettier/plugins/html.mjs | 22 + node_modules/prettier/plugins/markdown.d.ts | 7 + node_modules/prettier/plugins/markdown.js | 63 + node_modules/prettier/plugins/markdown.mjs | 63 + node_modules/prettier/plugins/meriyah.d.ts | 5 + node_modules/prettier/plugins/meriyah.js | 4 + node_modules/prettier/plugins/meriyah.mjs | 4 + node_modules/prettier/plugins/postcss.d.ts | 7 + node_modules/prettier/plugins/postcss.js | 54 + node_modules/prettier/plugins/postcss.mjs | 54 + node_modules/prettier/plugins/typescript.d.ts | 5 + node_modules/prettier/plugins/typescript.js | 20 + node_modules/prettier/plugins/typescript.mjs | 20 + node_modules/prettier/plugins/yaml.d.ts | 5 + node_modules/prettier/plugins/yaml.js | 161 + node_modules/prettier/plugins/yaml.mjs | 161 + node_modules/prettier/standalone.d.ts | 33 + node_modules/prettier/standalone.js | 39 + node_modules/prettier/standalone.mjs | 39 + src/main/java/frc/robot/CI/CrashCheck.java | 15 +- src/main/java/frc/robot/GlobalConstants.java | 4 +- src/main/java/frc/robot/Manager/Manager.java | 4 +- src/main/java/frc/robot/Robot.java | 74 +- .../frc/robot/Subsystems/Climber/Climber.java | 4 +- .../frc/robot/Subsystems/Drive/Drive.java | 4 +- .../frc/robot/Subsystems/Intake/Intake.java | 4 +- .../Subsystems/Passthrough/Passthrough.java | 4 +- .../frc/robot/Subsystems/Shooter/Shooter.java | 66 +- .../Subsystems/Shooter/ShooterConstants.java | 72 +- .../robot/Subsystems/Shooter/ShooterSim.java | 88 +- .../Subsystems/Shooter/ShooterStates.java | 34 +- 2109 files changed, 196557 insertions(+), 198 deletions(-) create mode 120000 node_modules/.bin/prettier create mode 100644 node_modules/.package-lock.json create mode 100644 node_modules/@chevrotain/cst-dts-gen/LICENSE.txt create mode 100644 node_modules/@chevrotain/cst-dts-gen/lib/src/api.d.ts create mode 100644 node_modules/@chevrotain/cst-dts-gen/lib/src/api.js create mode 100644 node_modules/@chevrotain/cst-dts-gen/lib/src/api.js.map create mode 100644 node_modules/@chevrotain/cst-dts-gen/lib/src/generate.d.ts create mode 100644 node_modules/@chevrotain/cst-dts-gen/lib/src/generate.js create mode 100644 node_modules/@chevrotain/cst-dts-gen/lib/src/generate.js.map create mode 100644 node_modules/@chevrotain/cst-dts-gen/lib/src/model.d.ts create mode 100644 node_modules/@chevrotain/cst-dts-gen/lib/src/model.js create mode 100644 node_modules/@chevrotain/cst-dts-gen/lib/src/model.js.map create mode 100644 node_modules/@chevrotain/cst-dts-gen/package.json create mode 100644 node_modules/@chevrotain/cst-dts-gen/src/api.ts create mode 100644 node_modules/@chevrotain/cst-dts-gen/src/generate.ts create mode 100644 node_modules/@chevrotain/cst-dts-gen/src/model.ts create mode 100644 node_modules/@chevrotain/gast/LICENSE.txt create mode 100644 node_modules/@chevrotain/gast/lib/src/api.d.ts create mode 100644 node_modules/@chevrotain/gast/lib/src/api.js create mode 100644 node_modules/@chevrotain/gast/lib/src/api.js.map create mode 100644 node_modules/@chevrotain/gast/lib/src/helpers.d.ts create mode 100644 node_modules/@chevrotain/gast/lib/src/helpers.js create mode 100644 node_modules/@chevrotain/gast/lib/src/helpers.js.map create mode 100644 node_modules/@chevrotain/gast/lib/src/model.d.ts create mode 100644 node_modules/@chevrotain/gast/lib/src/model.js create mode 100644 node_modules/@chevrotain/gast/lib/src/model.js.map create mode 100644 node_modules/@chevrotain/gast/lib/src/visitor.d.ts create mode 100644 node_modules/@chevrotain/gast/lib/src/visitor.js create mode 100644 node_modules/@chevrotain/gast/lib/src/visitor.js.map create mode 100644 node_modules/@chevrotain/gast/package.json create mode 100644 node_modules/@chevrotain/gast/src/api.ts create mode 100644 node_modules/@chevrotain/gast/src/helpers.ts create mode 100644 node_modules/@chevrotain/gast/src/model.ts create mode 100644 node_modules/@chevrotain/gast/src/visitor.ts create mode 100644 node_modules/@chevrotain/regexp-to-ast/LICENSE.txt create mode 100644 node_modules/@chevrotain/regexp-to-ast/lib/src/api.js create mode 100644 node_modules/@chevrotain/regexp-to-ast/lib/src/api.js.map create mode 100644 node_modules/@chevrotain/regexp-to-ast/lib/src/base-regexp-visitor.js create mode 100644 node_modules/@chevrotain/regexp-to-ast/lib/src/base-regexp-visitor.js.map create mode 100644 node_modules/@chevrotain/regexp-to-ast/lib/src/character-classes.js create mode 100644 node_modules/@chevrotain/regexp-to-ast/lib/src/character-classes.js.map create mode 100644 node_modules/@chevrotain/regexp-to-ast/lib/src/regexp-parser.js create mode 100644 node_modules/@chevrotain/regexp-to-ast/lib/src/regexp-parser.js.map create mode 100644 node_modules/@chevrotain/regexp-to-ast/lib/src/utils.js create mode 100644 node_modules/@chevrotain/regexp-to-ast/lib/src/utils.js.map create mode 100644 node_modules/@chevrotain/regexp-to-ast/package.json create mode 100644 node_modules/@chevrotain/regexp-to-ast/src/api.ts create mode 100644 node_modules/@chevrotain/regexp-to-ast/src/base-regexp-visitor.ts create mode 100644 node_modules/@chevrotain/regexp-to-ast/src/character-classes.ts create mode 100644 node_modules/@chevrotain/regexp-to-ast/src/regexp-parser.ts create mode 100644 node_modules/@chevrotain/regexp-to-ast/src/utils.ts create mode 100644 node_modules/@chevrotain/regexp-to-ast/types.d.ts create mode 100644 node_modules/@chevrotain/types/LICENSE.txt create mode 100644 node_modules/@chevrotain/types/api.d.ts create mode 100644 node_modules/@chevrotain/types/package.json create mode 100644 node_modules/@chevrotain/utils/LICENSE.txt create mode 100644 node_modules/@chevrotain/utils/lib/src/api.d.ts create mode 100644 node_modules/@chevrotain/utils/lib/src/api.js create mode 100644 node_modules/@chevrotain/utils/lib/src/api.js.map create mode 100644 node_modules/@chevrotain/utils/lib/src/print.d.ts create mode 100644 node_modules/@chevrotain/utils/lib/src/print.js create mode 100644 node_modules/@chevrotain/utils/lib/src/print.js.map create mode 100644 node_modules/@chevrotain/utils/lib/src/timer.d.ts create mode 100644 node_modules/@chevrotain/utils/lib/src/timer.js create mode 100644 node_modules/@chevrotain/utils/lib/src/timer.js.map create mode 100644 node_modules/@chevrotain/utils/lib/src/to-fast-properties.d.ts create mode 100644 node_modules/@chevrotain/utils/lib/src/to-fast-properties.js create mode 100644 node_modules/@chevrotain/utils/lib/src/to-fast-properties.js.map create mode 100644 node_modules/@chevrotain/utils/package.json create mode 100644 node_modules/@chevrotain/utils/src/api.ts create mode 100644 node_modules/@chevrotain/utils/src/print.ts create mode 100644 node_modules/@chevrotain/utils/src/timer.ts create mode 100644 node_modules/@chevrotain/utils/src/to-fast-properties.ts create mode 100644 node_modules/chevrotain-allstar/LICENSE create mode 100644 node_modules/chevrotain-allstar/README.md create mode 100644 node_modules/chevrotain-allstar/lib/all-star-lookahead.d.ts create mode 100644 node_modules/chevrotain-allstar/lib/all-star-lookahead.d.ts.map create mode 100644 node_modules/chevrotain-allstar/lib/all-star-lookahead.js create mode 100644 node_modules/chevrotain-allstar/lib/all-star-lookahead.js.map create mode 100644 node_modules/chevrotain-allstar/lib/atn.d.ts create mode 100644 node_modules/chevrotain-allstar/lib/atn.d.ts.map create mode 100644 node_modules/chevrotain-allstar/lib/atn.js create mode 100644 node_modules/chevrotain-allstar/lib/atn.js.map create mode 100644 node_modules/chevrotain-allstar/lib/dfa.d.ts create mode 100644 node_modules/chevrotain-allstar/lib/dfa.d.ts.map create mode 100644 node_modules/chevrotain-allstar/lib/dfa.js create mode 100644 node_modules/chevrotain-allstar/lib/dfa.js.map create mode 100644 node_modules/chevrotain-allstar/lib/index.d.ts create mode 100644 node_modules/chevrotain-allstar/lib/index.d.ts.map create mode 100644 node_modules/chevrotain-allstar/lib/index.js create mode 100644 node_modules/chevrotain-allstar/lib/index.js.map create mode 100644 node_modules/chevrotain-allstar/package.json create mode 100644 node_modules/chevrotain-allstar/src/all-star-lookahead.ts create mode 100644 node_modules/chevrotain-allstar/src/atn.test.ts create mode 100644 node_modules/chevrotain-allstar/src/atn.ts create mode 100644 node_modules/chevrotain-allstar/src/dfa.ts create mode 100644 node_modules/chevrotain-allstar/src/index.ts create mode 100644 node_modules/chevrotain/BREAKING_CHANGES.md create mode 100644 node_modules/chevrotain/CHANGELOG.md create mode 100644 node_modules/chevrotain/LICENSE.txt create mode 100644 node_modules/chevrotain/README.md create mode 100644 node_modules/chevrotain/chevrotain.d.ts create mode 100644 node_modules/chevrotain/diagrams/README.md create mode 100644 node_modules/chevrotain/diagrams/diagrams.css create mode 100644 node_modules/chevrotain/diagrams/src/diagrams_behavior.js create mode 100644 node_modules/chevrotain/diagrams/src/diagrams_builder.js create mode 100644 node_modules/chevrotain/diagrams/src/diagrams_serializer.js create mode 100644 node_modules/chevrotain/diagrams/src/main.js create mode 100644 node_modules/chevrotain/diagrams/vendor/railroad-diagrams.js create mode 100644 node_modules/chevrotain/lib/chevrotain.min.mjs create mode 100644 node_modules/chevrotain/lib/chevrotain.mjs create mode 100644 node_modules/chevrotain/lib/src/api.js create mode 100644 node_modules/chevrotain/lib/src/api.js.map create mode 100644 node_modules/chevrotain/lib/src/diagrams/render_public.js create mode 100644 node_modules/chevrotain/lib/src/diagrams/render_public.js.map create mode 100644 node_modules/chevrotain/lib/src/lang/lang_extensions.js create mode 100644 node_modules/chevrotain/lib/src/lang/lang_extensions.js.map create mode 100644 node_modules/chevrotain/lib/src/parse/constants.js create mode 100644 node_modules/chevrotain/lib/src/parse/constants.js.map create mode 100644 node_modules/chevrotain/lib/src/parse/cst/cst.js create mode 100644 node_modules/chevrotain/lib/src/parse/cst/cst.js.map create mode 100644 node_modules/chevrotain/lib/src/parse/cst/cst_visitor.js create mode 100644 node_modules/chevrotain/lib/src/parse/cst/cst_visitor.js.map create mode 100644 node_modules/chevrotain/lib/src/parse/errors_public.js create mode 100644 node_modules/chevrotain/lib/src/parse/errors_public.js.map create mode 100644 node_modules/chevrotain/lib/src/parse/exceptions_public.js create mode 100644 node_modules/chevrotain/lib/src/parse/exceptions_public.js.map create mode 100644 node_modules/chevrotain/lib/src/parse/grammar/checks.js create mode 100644 node_modules/chevrotain/lib/src/parse/grammar/checks.js.map create mode 100644 node_modules/chevrotain/lib/src/parse/grammar/first.js create mode 100644 node_modules/chevrotain/lib/src/parse/grammar/first.js.map create mode 100644 node_modules/chevrotain/lib/src/parse/grammar/follow.js create mode 100644 node_modules/chevrotain/lib/src/parse/grammar/follow.js.map create mode 100644 node_modules/chevrotain/lib/src/parse/grammar/gast/gast_resolver_public.js create mode 100644 node_modules/chevrotain/lib/src/parse/grammar/gast/gast_resolver_public.js.map create mode 100644 node_modules/chevrotain/lib/src/parse/grammar/interpreter.js create mode 100644 node_modules/chevrotain/lib/src/parse/grammar/interpreter.js.map create mode 100644 node_modules/chevrotain/lib/src/parse/grammar/keys.js create mode 100644 node_modules/chevrotain/lib/src/parse/grammar/keys.js.map create mode 100644 node_modules/chevrotain/lib/src/parse/grammar/llk_lookahead.js create mode 100644 node_modules/chevrotain/lib/src/parse/grammar/llk_lookahead.js.map create mode 100644 node_modules/chevrotain/lib/src/parse/grammar/lookahead.js create mode 100644 node_modules/chevrotain/lib/src/parse/grammar/lookahead.js.map create mode 100644 node_modules/chevrotain/lib/src/parse/grammar/resolver.js create mode 100644 node_modules/chevrotain/lib/src/parse/grammar/resolver.js.map create mode 100644 node_modules/chevrotain/lib/src/parse/grammar/rest.js create mode 100644 node_modules/chevrotain/lib/src/parse/grammar/rest.js.map create mode 100644 node_modules/chevrotain/lib/src/parse/grammar/types.js create mode 100644 node_modules/chevrotain/lib/src/parse/grammar/types.js.map create mode 100644 node_modules/chevrotain/lib/src/parse/parser/parser.js create mode 100644 node_modules/chevrotain/lib/src/parse/parser/parser.js.map create mode 100644 node_modules/chevrotain/lib/src/parse/parser/traits/context_assist.js create mode 100644 node_modules/chevrotain/lib/src/parse/parser/traits/context_assist.js.map create mode 100644 node_modules/chevrotain/lib/src/parse/parser/traits/error_handler.js create mode 100644 node_modules/chevrotain/lib/src/parse/parser/traits/error_handler.js.map create mode 100644 node_modules/chevrotain/lib/src/parse/parser/traits/gast_recorder.js create mode 100644 node_modules/chevrotain/lib/src/parse/parser/traits/gast_recorder.js.map create mode 100644 node_modules/chevrotain/lib/src/parse/parser/traits/lexer_adapter.js create mode 100644 node_modules/chevrotain/lib/src/parse/parser/traits/lexer_adapter.js.map create mode 100644 node_modules/chevrotain/lib/src/parse/parser/traits/looksahead.js create mode 100644 node_modules/chevrotain/lib/src/parse/parser/traits/looksahead.js.map create mode 100644 node_modules/chevrotain/lib/src/parse/parser/traits/parser_traits.js create mode 100644 node_modules/chevrotain/lib/src/parse/parser/traits/parser_traits.js.map create mode 100644 node_modules/chevrotain/lib/src/parse/parser/traits/perf_tracer.js create mode 100644 node_modules/chevrotain/lib/src/parse/parser/traits/perf_tracer.js.map create mode 100644 node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_api.js create mode 100644 node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_api.js.map create mode 100644 node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_engine.js create mode 100644 node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_engine.js.map create mode 100644 node_modules/chevrotain/lib/src/parse/parser/traits/recoverable.js create mode 100644 node_modules/chevrotain/lib/src/parse/parser/traits/recoverable.js.map create mode 100644 node_modules/chevrotain/lib/src/parse/parser/traits/tree_builder.js create mode 100644 node_modules/chevrotain/lib/src/parse/parser/traits/tree_builder.js.map create mode 100644 node_modules/chevrotain/lib/src/parse/parser/types.js create mode 100644 node_modules/chevrotain/lib/src/parse/parser/types.js.map create mode 100644 node_modules/chevrotain/lib/src/parse/parser/utils/apply_mixins.js create mode 100644 node_modules/chevrotain/lib/src/parse/parser/utils/apply_mixins.js.map create mode 100644 node_modules/chevrotain/lib/src/scan/lexer.js create mode 100644 node_modules/chevrotain/lib/src/scan/lexer.js.map create mode 100644 node_modules/chevrotain/lib/src/scan/lexer_errors_public.js create mode 100644 node_modules/chevrotain/lib/src/scan/lexer_errors_public.js.map create mode 100644 node_modules/chevrotain/lib/src/scan/lexer_public.js create mode 100644 node_modules/chevrotain/lib/src/scan/lexer_public.js.map create mode 100644 node_modules/chevrotain/lib/src/scan/reg_exp.js create mode 100644 node_modules/chevrotain/lib/src/scan/reg_exp.js.map create mode 100644 node_modules/chevrotain/lib/src/scan/reg_exp_parser.js create mode 100644 node_modules/chevrotain/lib/src/scan/reg_exp_parser.js.map create mode 100644 node_modules/chevrotain/lib/src/scan/tokens.js create mode 100644 node_modules/chevrotain/lib/src/scan/tokens.js.map create mode 100644 node_modules/chevrotain/lib/src/scan/tokens_constants.js create mode 100644 node_modules/chevrotain/lib/src/scan/tokens_constants.js.map create mode 100644 node_modules/chevrotain/lib/src/scan/tokens_public.js create mode 100644 node_modules/chevrotain/lib/src/scan/tokens_public.js.map create mode 100644 node_modules/chevrotain/lib/src/text/range.js create mode 100644 node_modules/chevrotain/lib/src/text/range.js.map create mode 100644 node_modules/chevrotain/lib/src/version.js create mode 100644 node_modules/chevrotain/lib/src/version.js.map create mode 100644 node_modules/chevrotain/package.json create mode 100644 node_modules/chevrotain/src/api.ts create mode 100644 node_modules/chevrotain/src/diagrams/render_public.ts create mode 100644 node_modules/chevrotain/src/lang/lang_extensions.ts create mode 100644 node_modules/chevrotain/src/parse/constants.ts create mode 100644 node_modules/chevrotain/src/parse/cst/cst.ts create mode 100644 node_modules/chevrotain/src/parse/cst/cst_visitor.ts create mode 100644 node_modules/chevrotain/src/parse/errors_public.ts create mode 100644 node_modules/chevrotain/src/parse/exceptions_public.ts create mode 100644 node_modules/chevrotain/src/parse/grammar/checks.ts create mode 100644 node_modules/chevrotain/src/parse/grammar/first.ts create mode 100644 node_modules/chevrotain/src/parse/grammar/follow.ts create mode 100644 node_modules/chevrotain/src/parse/grammar/gast/gast_resolver_public.ts create mode 100644 node_modules/chevrotain/src/parse/grammar/interpreter.ts create mode 100644 node_modules/chevrotain/src/parse/grammar/keys.ts create mode 100644 node_modules/chevrotain/src/parse/grammar/llk_lookahead.ts create mode 100644 node_modules/chevrotain/src/parse/grammar/lookahead.ts create mode 100644 node_modules/chevrotain/src/parse/grammar/resolver.ts create mode 100644 node_modules/chevrotain/src/parse/grammar/rest.ts create mode 100644 node_modules/chevrotain/src/parse/grammar/types.ts create mode 100644 node_modules/chevrotain/src/parse/parser/parser.ts create mode 100644 node_modules/chevrotain/src/parse/parser/traits/context_assist.ts create mode 100644 node_modules/chevrotain/src/parse/parser/traits/error_handler.ts create mode 100644 node_modules/chevrotain/src/parse/parser/traits/gast_recorder.ts create mode 100644 node_modules/chevrotain/src/parse/parser/traits/lexer_adapter.ts create mode 100644 node_modules/chevrotain/src/parse/parser/traits/looksahead.ts create mode 100644 node_modules/chevrotain/src/parse/parser/traits/parser_traits.ts create mode 100644 node_modules/chevrotain/src/parse/parser/traits/perf_tracer.ts create mode 100644 node_modules/chevrotain/src/parse/parser/traits/recognizer_api.ts create mode 100644 node_modules/chevrotain/src/parse/parser/traits/recognizer_engine.ts create mode 100644 node_modules/chevrotain/src/parse/parser/traits/recoverable.ts create mode 100644 node_modules/chevrotain/src/parse/parser/traits/tree_builder.ts create mode 100644 node_modules/chevrotain/src/parse/parser/types.ts create mode 100644 node_modules/chevrotain/src/parse/parser/utils/apply_mixins.ts create mode 100644 node_modules/chevrotain/src/scan/lexer.ts create mode 100644 node_modules/chevrotain/src/scan/lexer_errors_public.ts create mode 100644 node_modules/chevrotain/src/scan/lexer_public.ts create mode 100644 node_modules/chevrotain/src/scan/reg_exp.ts create mode 100644 node_modules/chevrotain/src/scan/reg_exp_parser.ts create mode 100644 node_modules/chevrotain/src/scan/tokens.ts create mode 100644 node_modules/chevrotain/src/scan/tokens_constants.ts create mode 100644 node_modules/chevrotain/src/scan/tokens_public.ts create mode 100644 node_modules/chevrotain/src/text/range.ts create mode 100644 node_modules/chevrotain/src/version.ts create mode 100644 node_modules/java-parser/LICENSE create mode 100644 node_modules/java-parser/README.md create mode 100644 node_modules/java-parser/api.d.ts create mode 100644 node_modules/java-parser/package.json create mode 100644 node_modules/java-parser/src/comments.js create mode 100644 node_modules/java-parser/src/index.js create mode 100644 node_modules/java-parser/src/lexer.js create mode 100644 node_modules/java-parser/src/parser.js create mode 100644 node_modules/java-parser/src/productions/arrays.js create mode 100644 node_modules/java-parser/src/productions/blocks-and-statements.js create mode 100644 node_modules/java-parser/src/productions/classes.js create mode 100644 node_modules/java-parser/src/productions/expressions.js create mode 100644 node_modules/java-parser/src/productions/interfaces.js create mode 100644 node_modules/java-parser/src/productions/lexical-structure.js create mode 100644 node_modules/java-parser/src/productions/names.js create mode 100644 node_modules/java-parser/src/productions/packages-and-modules.js create mode 100644 node_modules/java-parser/src/productions/types-values-and-variables.js create mode 100644 node_modules/java-parser/src/tokens.js create mode 100644 node_modules/java-parser/src/unicodesets.js create mode 100644 node_modules/java-parser/src/utils.js create mode 100644 node_modules/lodash-es/LICENSE create mode 100644 node_modules/lodash-es/README.md create mode 100644 node_modules/lodash-es/_DataView.js create mode 100644 node_modules/lodash-es/_Hash.js create mode 100644 node_modules/lodash-es/_LazyWrapper.js create mode 100644 node_modules/lodash-es/_ListCache.js create mode 100644 node_modules/lodash-es/_LodashWrapper.js create mode 100644 node_modules/lodash-es/_Map.js create mode 100644 node_modules/lodash-es/_MapCache.js create mode 100644 node_modules/lodash-es/_Promise.js create mode 100644 node_modules/lodash-es/_Set.js create mode 100644 node_modules/lodash-es/_SetCache.js create mode 100644 node_modules/lodash-es/_Stack.js create mode 100644 node_modules/lodash-es/_Symbol.js create mode 100644 node_modules/lodash-es/_Uint8Array.js create mode 100644 node_modules/lodash-es/_WeakMap.js create mode 100644 node_modules/lodash-es/_addMapEntry.js create mode 100644 node_modules/lodash-es/_addSetEntry.js create mode 100644 node_modules/lodash-es/_apply.js create mode 100644 node_modules/lodash-es/_arrayAggregator.js create mode 100644 node_modules/lodash-es/_arrayEach.js create mode 100644 node_modules/lodash-es/_arrayEachRight.js create mode 100644 node_modules/lodash-es/_arrayEvery.js create mode 100644 node_modules/lodash-es/_arrayFilter.js create mode 100644 node_modules/lodash-es/_arrayIncludes.js create mode 100644 node_modules/lodash-es/_arrayIncludesWith.js create mode 100644 node_modules/lodash-es/_arrayLikeKeys.js create mode 100644 node_modules/lodash-es/_arrayMap.js create mode 100644 node_modules/lodash-es/_arrayPush.js create mode 100644 node_modules/lodash-es/_arrayReduce.js create mode 100644 node_modules/lodash-es/_arrayReduceRight.js create mode 100644 node_modules/lodash-es/_arraySample.js create mode 100644 node_modules/lodash-es/_arraySampleSize.js create mode 100644 node_modules/lodash-es/_arrayShuffle.js create mode 100644 node_modules/lodash-es/_arraySome.js create mode 100644 node_modules/lodash-es/_asciiSize.js create mode 100644 node_modules/lodash-es/_asciiToArray.js create mode 100644 node_modules/lodash-es/_asciiWords.js create mode 100644 node_modules/lodash-es/_assignMergeValue.js create mode 100644 node_modules/lodash-es/_assignValue.js create mode 100644 node_modules/lodash-es/_assocIndexOf.js create mode 100644 node_modules/lodash-es/_baseAggregator.js create mode 100644 node_modules/lodash-es/_baseAssign.js create mode 100644 node_modules/lodash-es/_baseAssignIn.js create mode 100644 node_modules/lodash-es/_baseAssignValue.js create mode 100644 node_modules/lodash-es/_baseAt.js create mode 100644 node_modules/lodash-es/_baseClamp.js create mode 100644 node_modules/lodash-es/_baseClone.js create mode 100644 node_modules/lodash-es/_baseConforms.js create mode 100644 node_modules/lodash-es/_baseConformsTo.js create mode 100644 node_modules/lodash-es/_baseCreate.js create mode 100644 node_modules/lodash-es/_baseDelay.js create mode 100644 node_modules/lodash-es/_baseDifference.js create mode 100644 node_modules/lodash-es/_baseEach.js create mode 100644 node_modules/lodash-es/_baseEachRight.js create mode 100644 node_modules/lodash-es/_baseEvery.js create mode 100644 node_modules/lodash-es/_baseExtremum.js create mode 100644 node_modules/lodash-es/_baseFill.js create mode 100644 node_modules/lodash-es/_baseFilter.js create mode 100644 node_modules/lodash-es/_baseFindIndex.js create mode 100644 node_modules/lodash-es/_baseFindKey.js create mode 100644 node_modules/lodash-es/_baseFlatten.js create mode 100644 node_modules/lodash-es/_baseFor.js create mode 100644 node_modules/lodash-es/_baseForOwn.js create mode 100644 node_modules/lodash-es/_baseForOwnRight.js create mode 100644 node_modules/lodash-es/_baseForRight.js create mode 100644 node_modules/lodash-es/_baseFunctions.js create mode 100644 node_modules/lodash-es/_baseGet.js create mode 100644 node_modules/lodash-es/_baseGetAllKeys.js create mode 100644 node_modules/lodash-es/_baseGetTag.js create mode 100644 node_modules/lodash-es/_baseGt.js create mode 100644 node_modules/lodash-es/_baseHas.js create mode 100644 node_modules/lodash-es/_baseHasIn.js create mode 100644 node_modules/lodash-es/_baseInRange.js create mode 100644 node_modules/lodash-es/_baseIndexOf.js create mode 100644 node_modules/lodash-es/_baseIndexOfWith.js create mode 100644 node_modules/lodash-es/_baseIntersection.js create mode 100644 node_modules/lodash-es/_baseInverter.js create mode 100644 node_modules/lodash-es/_baseInvoke.js create mode 100644 node_modules/lodash-es/_baseIsArguments.js create mode 100644 node_modules/lodash-es/_baseIsArrayBuffer.js create mode 100644 node_modules/lodash-es/_baseIsDate.js create mode 100644 node_modules/lodash-es/_baseIsEqual.js create mode 100644 node_modules/lodash-es/_baseIsEqualDeep.js create mode 100644 node_modules/lodash-es/_baseIsMap.js create mode 100644 node_modules/lodash-es/_baseIsMatch.js create mode 100644 node_modules/lodash-es/_baseIsNaN.js create mode 100644 node_modules/lodash-es/_baseIsNative.js create mode 100644 node_modules/lodash-es/_baseIsRegExp.js create mode 100644 node_modules/lodash-es/_baseIsSet.js create mode 100644 node_modules/lodash-es/_baseIsTypedArray.js create mode 100644 node_modules/lodash-es/_baseIteratee.js create mode 100644 node_modules/lodash-es/_baseKeys.js create mode 100644 node_modules/lodash-es/_baseKeysIn.js create mode 100644 node_modules/lodash-es/_baseLodash.js create mode 100644 node_modules/lodash-es/_baseLt.js create mode 100644 node_modules/lodash-es/_baseMap.js create mode 100644 node_modules/lodash-es/_baseMatches.js create mode 100644 node_modules/lodash-es/_baseMatchesProperty.js create mode 100644 node_modules/lodash-es/_baseMean.js create mode 100644 node_modules/lodash-es/_baseMerge.js create mode 100644 node_modules/lodash-es/_baseMergeDeep.js create mode 100644 node_modules/lodash-es/_baseNth.js create mode 100644 node_modules/lodash-es/_baseOrderBy.js create mode 100644 node_modules/lodash-es/_basePick.js create mode 100644 node_modules/lodash-es/_basePickBy.js create mode 100644 node_modules/lodash-es/_baseProperty.js create mode 100644 node_modules/lodash-es/_basePropertyDeep.js create mode 100644 node_modules/lodash-es/_basePropertyOf.js create mode 100644 node_modules/lodash-es/_basePullAll.js create mode 100644 node_modules/lodash-es/_basePullAt.js create mode 100644 node_modules/lodash-es/_baseRandom.js create mode 100644 node_modules/lodash-es/_baseRange.js create mode 100644 node_modules/lodash-es/_baseReduce.js create mode 100644 node_modules/lodash-es/_baseRepeat.js create mode 100644 node_modules/lodash-es/_baseRest.js create mode 100644 node_modules/lodash-es/_baseSample.js create mode 100644 node_modules/lodash-es/_baseSampleSize.js create mode 100644 node_modules/lodash-es/_baseSet.js create mode 100644 node_modules/lodash-es/_baseSetData.js create mode 100644 node_modules/lodash-es/_baseSetToString.js create mode 100644 node_modules/lodash-es/_baseShuffle.js create mode 100644 node_modules/lodash-es/_baseSlice.js create mode 100644 node_modules/lodash-es/_baseSome.js create mode 100644 node_modules/lodash-es/_baseSortBy.js create mode 100644 node_modules/lodash-es/_baseSortedIndex.js create mode 100644 node_modules/lodash-es/_baseSortedIndexBy.js create mode 100644 node_modules/lodash-es/_baseSortedUniq.js create mode 100644 node_modules/lodash-es/_baseSum.js create mode 100644 node_modules/lodash-es/_baseTimes.js create mode 100644 node_modules/lodash-es/_baseToNumber.js create mode 100644 node_modules/lodash-es/_baseToPairs.js create mode 100644 node_modules/lodash-es/_baseToString.js create mode 100644 node_modules/lodash-es/_baseTrim.js create mode 100644 node_modules/lodash-es/_baseUnary.js create mode 100644 node_modules/lodash-es/_baseUniq.js create mode 100644 node_modules/lodash-es/_baseUnset.js create mode 100644 node_modules/lodash-es/_baseUpdate.js create mode 100644 node_modules/lodash-es/_baseValues.js create mode 100644 node_modules/lodash-es/_baseWhile.js create mode 100644 node_modules/lodash-es/_baseWrapperValue.js create mode 100644 node_modules/lodash-es/_baseXor.js create mode 100644 node_modules/lodash-es/_baseZipObject.js create mode 100644 node_modules/lodash-es/_cacheHas.js create mode 100644 node_modules/lodash-es/_castArrayLikeObject.js create mode 100644 node_modules/lodash-es/_castFunction.js create mode 100644 node_modules/lodash-es/_castPath.js create mode 100644 node_modules/lodash-es/_castRest.js create mode 100644 node_modules/lodash-es/_castSlice.js create mode 100644 node_modules/lodash-es/_charsEndIndex.js create mode 100644 node_modules/lodash-es/_charsStartIndex.js create mode 100644 node_modules/lodash-es/_cloneArrayBuffer.js create mode 100644 node_modules/lodash-es/_cloneBuffer.js create mode 100644 node_modules/lodash-es/_cloneDataView.js create mode 100644 node_modules/lodash-es/_cloneMap.js create mode 100644 node_modules/lodash-es/_cloneRegExp.js create mode 100644 node_modules/lodash-es/_cloneSet.js create mode 100644 node_modules/lodash-es/_cloneSymbol.js create mode 100644 node_modules/lodash-es/_cloneTypedArray.js create mode 100644 node_modules/lodash-es/_compareAscending.js create mode 100644 node_modules/lodash-es/_compareMultiple.js create mode 100644 node_modules/lodash-es/_composeArgs.js create mode 100644 node_modules/lodash-es/_composeArgsRight.js create mode 100644 node_modules/lodash-es/_copyArray.js create mode 100644 node_modules/lodash-es/_copyObject.js create mode 100644 node_modules/lodash-es/_copySymbols.js create mode 100644 node_modules/lodash-es/_copySymbolsIn.js create mode 100644 node_modules/lodash-es/_coreJsData.js create mode 100644 node_modules/lodash-es/_countHolders.js create mode 100644 node_modules/lodash-es/_createAggregator.js create mode 100644 node_modules/lodash-es/_createAssigner.js create mode 100644 node_modules/lodash-es/_createBaseEach.js create mode 100644 node_modules/lodash-es/_createBaseFor.js create mode 100644 node_modules/lodash-es/_createBind.js create mode 100644 node_modules/lodash-es/_createCaseFirst.js create mode 100644 node_modules/lodash-es/_createCompounder.js create mode 100644 node_modules/lodash-es/_createCtor.js create mode 100644 node_modules/lodash-es/_createCurry.js create mode 100644 node_modules/lodash-es/_createFind.js create mode 100644 node_modules/lodash-es/_createFlow.js create mode 100644 node_modules/lodash-es/_createHybrid.js create mode 100644 node_modules/lodash-es/_createInverter.js create mode 100644 node_modules/lodash-es/_createMathOperation.js create mode 100644 node_modules/lodash-es/_createOver.js create mode 100644 node_modules/lodash-es/_createPadding.js create mode 100644 node_modules/lodash-es/_createPartial.js create mode 100644 node_modules/lodash-es/_createRange.js create mode 100644 node_modules/lodash-es/_createRecurry.js create mode 100644 node_modules/lodash-es/_createRelationalOperation.js create mode 100644 node_modules/lodash-es/_createRound.js create mode 100644 node_modules/lodash-es/_createSet.js create mode 100644 node_modules/lodash-es/_createToPairs.js create mode 100644 node_modules/lodash-es/_createWrap.js create mode 100644 node_modules/lodash-es/_customDefaultsAssignIn.js create mode 100644 node_modules/lodash-es/_customDefaultsMerge.js create mode 100644 node_modules/lodash-es/_customOmitClone.js create mode 100644 node_modules/lodash-es/_deburrLetter.js create mode 100644 node_modules/lodash-es/_defineProperty.js create mode 100644 node_modules/lodash-es/_equalArrays.js create mode 100644 node_modules/lodash-es/_equalByTag.js create mode 100644 node_modules/lodash-es/_equalObjects.js create mode 100644 node_modules/lodash-es/_escapeHtmlChar.js create mode 100644 node_modules/lodash-es/_escapeStringChar.js create mode 100644 node_modules/lodash-es/_flatRest.js create mode 100644 node_modules/lodash-es/_freeGlobal.js create mode 100644 node_modules/lodash-es/_getAllKeys.js create mode 100644 node_modules/lodash-es/_getAllKeysIn.js create mode 100644 node_modules/lodash-es/_getData.js create mode 100644 node_modules/lodash-es/_getFuncName.js create mode 100644 node_modules/lodash-es/_getHolder.js create mode 100644 node_modules/lodash-es/_getMapData.js create mode 100644 node_modules/lodash-es/_getMatchData.js create mode 100644 node_modules/lodash-es/_getNative.js create mode 100644 node_modules/lodash-es/_getPrototype.js create mode 100644 node_modules/lodash-es/_getRawTag.js create mode 100644 node_modules/lodash-es/_getSymbols.js create mode 100644 node_modules/lodash-es/_getSymbolsIn.js create mode 100644 node_modules/lodash-es/_getTag.js create mode 100644 node_modules/lodash-es/_getValue.js create mode 100644 node_modules/lodash-es/_getView.js create mode 100644 node_modules/lodash-es/_getWrapDetails.js create mode 100644 node_modules/lodash-es/_hasPath.js create mode 100644 node_modules/lodash-es/_hasUnicode.js create mode 100644 node_modules/lodash-es/_hasUnicodeWord.js create mode 100644 node_modules/lodash-es/_hashClear.js create mode 100644 node_modules/lodash-es/_hashDelete.js create mode 100644 node_modules/lodash-es/_hashGet.js create mode 100644 node_modules/lodash-es/_hashHas.js create mode 100644 node_modules/lodash-es/_hashSet.js create mode 100644 node_modules/lodash-es/_initCloneArray.js create mode 100644 node_modules/lodash-es/_initCloneByTag.js create mode 100644 node_modules/lodash-es/_initCloneObject.js create mode 100644 node_modules/lodash-es/_insertWrapDetails.js create mode 100644 node_modules/lodash-es/_isFlattenable.js create mode 100644 node_modules/lodash-es/_isIndex.js create mode 100644 node_modules/lodash-es/_isIterateeCall.js create mode 100644 node_modules/lodash-es/_isKey.js create mode 100644 node_modules/lodash-es/_isKeyable.js create mode 100644 node_modules/lodash-es/_isLaziable.js create mode 100644 node_modules/lodash-es/_isMaskable.js create mode 100644 node_modules/lodash-es/_isMasked.js create mode 100644 node_modules/lodash-es/_isPrototype.js create mode 100644 node_modules/lodash-es/_isStrictComparable.js create mode 100644 node_modules/lodash-es/_iteratorToArray.js create mode 100644 node_modules/lodash-es/_lazyClone.js create mode 100644 node_modules/lodash-es/_lazyReverse.js create mode 100644 node_modules/lodash-es/_lazyValue.js create mode 100644 node_modules/lodash-es/_listCacheClear.js create mode 100644 node_modules/lodash-es/_listCacheDelete.js create mode 100644 node_modules/lodash-es/_listCacheGet.js create mode 100644 node_modules/lodash-es/_listCacheHas.js create mode 100644 node_modules/lodash-es/_listCacheSet.js create mode 100644 node_modules/lodash-es/_mapCacheClear.js create mode 100644 node_modules/lodash-es/_mapCacheDelete.js create mode 100644 node_modules/lodash-es/_mapCacheGet.js create mode 100644 node_modules/lodash-es/_mapCacheHas.js create mode 100644 node_modules/lodash-es/_mapCacheSet.js create mode 100644 node_modules/lodash-es/_mapToArray.js create mode 100644 node_modules/lodash-es/_matchesStrictComparable.js create mode 100644 node_modules/lodash-es/_memoizeCapped.js create mode 100644 node_modules/lodash-es/_mergeData.js create mode 100644 node_modules/lodash-es/_metaMap.js create mode 100644 node_modules/lodash-es/_nativeCreate.js create mode 100644 node_modules/lodash-es/_nativeKeys.js create mode 100644 node_modules/lodash-es/_nativeKeysIn.js create mode 100644 node_modules/lodash-es/_nodeUtil.js create mode 100644 node_modules/lodash-es/_objectToString.js create mode 100644 node_modules/lodash-es/_overArg.js create mode 100644 node_modules/lodash-es/_overRest.js create mode 100644 node_modules/lodash-es/_parent.js create mode 100644 node_modules/lodash-es/_reEscape.js create mode 100644 node_modules/lodash-es/_reEvaluate.js create mode 100644 node_modules/lodash-es/_reInterpolate.js create mode 100644 node_modules/lodash-es/_realNames.js create mode 100644 node_modules/lodash-es/_reorder.js create mode 100644 node_modules/lodash-es/_replaceHolders.js create mode 100644 node_modules/lodash-es/_root.js create mode 100644 node_modules/lodash-es/_safeGet.js create mode 100644 node_modules/lodash-es/_setCacheAdd.js create mode 100644 node_modules/lodash-es/_setCacheHas.js create mode 100644 node_modules/lodash-es/_setData.js create mode 100644 node_modules/lodash-es/_setToArray.js create mode 100644 node_modules/lodash-es/_setToPairs.js create mode 100644 node_modules/lodash-es/_setToString.js create mode 100644 node_modules/lodash-es/_setWrapToString.js create mode 100644 node_modules/lodash-es/_shortOut.js create mode 100644 node_modules/lodash-es/_shuffleSelf.js create mode 100644 node_modules/lodash-es/_stackClear.js create mode 100644 node_modules/lodash-es/_stackDelete.js create mode 100644 node_modules/lodash-es/_stackGet.js create mode 100644 node_modules/lodash-es/_stackHas.js create mode 100644 node_modules/lodash-es/_stackSet.js create mode 100644 node_modules/lodash-es/_strictIndexOf.js create mode 100644 node_modules/lodash-es/_strictLastIndexOf.js create mode 100644 node_modules/lodash-es/_stringSize.js create mode 100644 node_modules/lodash-es/_stringToArray.js create mode 100644 node_modules/lodash-es/_stringToPath.js create mode 100644 node_modules/lodash-es/_toKey.js create mode 100644 node_modules/lodash-es/_toSource.js create mode 100644 node_modules/lodash-es/_trimmedEndIndex.js create mode 100644 node_modules/lodash-es/_unescapeHtmlChar.js create mode 100644 node_modules/lodash-es/_unicodeSize.js create mode 100644 node_modules/lodash-es/_unicodeToArray.js create mode 100644 node_modules/lodash-es/_unicodeWords.js create mode 100644 node_modules/lodash-es/_updateWrapDetails.js create mode 100644 node_modules/lodash-es/_wrapperClone.js create mode 100644 node_modules/lodash-es/add.js create mode 100644 node_modules/lodash-es/after.js create mode 100644 node_modules/lodash-es/array.default.js create mode 100644 node_modules/lodash-es/array.js create mode 100644 node_modules/lodash-es/ary.js create mode 100644 node_modules/lodash-es/assign.js create mode 100644 node_modules/lodash-es/assignIn.js create mode 100644 node_modules/lodash-es/assignInWith.js create mode 100644 node_modules/lodash-es/assignWith.js create mode 100644 node_modules/lodash-es/at.js create mode 100644 node_modules/lodash-es/attempt.js create mode 100644 node_modules/lodash-es/before.js create mode 100644 node_modules/lodash-es/bind.js create mode 100644 node_modules/lodash-es/bindAll.js create mode 100644 node_modules/lodash-es/bindKey.js create mode 100644 node_modules/lodash-es/camelCase.js create mode 100644 node_modules/lodash-es/capitalize.js create mode 100644 node_modules/lodash-es/castArray.js create mode 100644 node_modules/lodash-es/ceil.js create mode 100644 node_modules/lodash-es/chain.js create mode 100644 node_modules/lodash-es/chunk.js create mode 100644 node_modules/lodash-es/clamp.js create mode 100644 node_modules/lodash-es/clone.js create mode 100644 node_modules/lodash-es/cloneDeep.js create mode 100644 node_modules/lodash-es/cloneDeepWith.js create mode 100644 node_modules/lodash-es/cloneWith.js create mode 100644 node_modules/lodash-es/collection.default.js create mode 100644 node_modules/lodash-es/collection.js create mode 100644 node_modules/lodash-es/commit.js create mode 100644 node_modules/lodash-es/compact.js create mode 100644 node_modules/lodash-es/concat.js create mode 100644 node_modules/lodash-es/cond.js create mode 100644 node_modules/lodash-es/conforms.js create mode 100644 node_modules/lodash-es/conformsTo.js create mode 100644 node_modules/lodash-es/constant.js create mode 100644 node_modules/lodash-es/countBy.js create mode 100644 node_modules/lodash-es/create.js create mode 100644 node_modules/lodash-es/curry.js create mode 100644 node_modules/lodash-es/curryRight.js create mode 100644 node_modules/lodash-es/date.default.js create mode 100644 node_modules/lodash-es/date.js create mode 100644 node_modules/lodash-es/debounce.js create mode 100644 node_modules/lodash-es/deburr.js create mode 100644 node_modules/lodash-es/defaultTo.js create mode 100644 node_modules/lodash-es/defaults.js create mode 100644 node_modules/lodash-es/defaultsDeep.js create mode 100644 node_modules/lodash-es/defer.js create mode 100644 node_modules/lodash-es/delay.js create mode 100644 node_modules/lodash-es/difference.js create mode 100644 node_modules/lodash-es/differenceBy.js create mode 100644 node_modules/lodash-es/differenceWith.js create mode 100644 node_modules/lodash-es/divide.js create mode 100644 node_modules/lodash-es/drop.js create mode 100644 node_modules/lodash-es/dropRight.js create mode 100644 node_modules/lodash-es/dropRightWhile.js create mode 100644 node_modules/lodash-es/dropWhile.js create mode 100644 node_modules/lodash-es/each.js create mode 100644 node_modules/lodash-es/eachRight.js create mode 100644 node_modules/lodash-es/endsWith.js create mode 100644 node_modules/lodash-es/entries.js create mode 100644 node_modules/lodash-es/entriesIn.js create mode 100644 node_modules/lodash-es/eq.js create mode 100644 node_modules/lodash-es/escape.js create mode 100644 node_modules/lodash-es/escapeRegExp.js create mode 100644 node_modules/lodash-es/every.js create mode 100644 node_modules/lodash-es/extend.js create mode 100644 node_modules/lodash-es/extendWith.js create mode 100644 node_modules/lodash-es/fill.js create mode 100644 node_modules/lodash-es/filter.js create mode 100644 node_modules/lodash-es/find.js create mode 100644 node_modules/lodash-es/findIndex.js create mode 100644 node_modules/lodash-es/findKey.js create mode 100644 node_modules/lodash-es/findLast.js create mode 100644 node_modules/lodash-es/findLastIndex.js create mode 100644 node_modules/lodash-es/findLastKey.js create mode 100644 node_modules/lodash-es/first.js create mode 100644 node_modules/lodash-es/flake.lock create mode 100644 node_modules/lodash-es/flake.nix create mode 100644 node_modules/lodash-es/flatMap.js create mode 100644 node_modules/lodash-es/flatMapDeep.js create mode 100644 node_modules/lodash-es/flatMapDepth.js create mode 100644 node_modules/lodash-es/flatten.js create mode 100644 node_modules/lodash-es/flattenDeep.js create mode 100644 node_modules/lodash-es/flattenDepth.js create mode 100644 node_modules/lodash-es/flip.js create mode 100644 node_modules/lodash-es/floor.js create mode 100644 node_modules/lodash-es/flow.js create mode 100644 node_modules/lodash-es/flowRight.js create mode 100644 node_modules/lodash-es/forEach.js create mode 100644 node_modules/lodash-es/forEachRight.js create mode 100644 node_modules/lodash-es/forIn.js create mode 100644 node_modules/lodash-es/forInRight.js create mode 100644 node_modules/lodash-es/forOwn.js create mode 100644 node_modules/lodash-es/forOwnRight.js create mode 100644 node_modules/lodash-es/fromPairs.js create mode 100644 node_modules/lodash-es/function.default.js create mode 100644 node_modules/lodash-es/function.js create mode 100644 node_modules/lodash-es/functions.js create mode 100644 node_modules/lodash-es/functionsIn.js create mode 100644 node_modules/lodash-es/get.js create mode 100644 node_modules/lodash-es/groupBy.js create mode 100644 node_modules/lodash-es/gt.js create mode 100644 node_modules/lodash-es/gte.js create mode 100644 node_modules/lodash-es/has.js create mode 100644 node_modules/lodash-es/hasIn.js create mode 100644 node_modules/lodash-es/head.js create mode 100644 node_modules/lodash-es/identity.js create mode 100644 node_modules/lodash-es/inRange.js create mode 100644 node_modules/lodash-es/includes.js create mode 100644 node_modules/lodash-es/indexOf.js create mode 100644 node_modules/lodash-es/initial.js create mode 100644 node_modules/lodash-es/intersection.js create mode 100644 node_modules/lodash-es/intersectionBy.js create mode 100644 node_modules/lodash-es/intersectionWith.js create mode 100644 node_modules/lodash-es/invert.js create mode 100644 node_modules/lodash-es/invertBy.js create mode 100644 node_modules/lodash-es/invoke.js create mode 100644 node_modules/lodash-es/invokeMap.js create mode 100644 node_modules/lodash-es/isArguments.js create mode 100644 node_modules/lodash-es/isArray.js create mode 100644 node_modules/lodash-es/isArrayBuffer.js create mode 100644 node_modules/lodash-es/isArrayLike.js create mode 100644 node_modules/lodash-es/isArrayLikeObject.js create mode 100644 node_modules/lodash-es/isBoolean.js create mode 100644 node_modules/lodash-es/isBuffer.js create mode 100644 node_modules/lodash-es/isDate.js create mode 100644 node_modules/lodash-es/isElement.js create mode 100644 node_modules/lodash-es/isEmpty.js create mode 100644 node_modules/lodash-es/isEqual.js create mode 100644 node_modules/lodash-es/isEqualWith.js create mode 100644 node_modules/lodash-es/isError.js create mode 100644 node_modules/lodash-es/isFinite.js create mode 100644 node_modules/lodash-es/isFunction.js create mode 100644 node_modules/lodash-es/isInteger.js create mode 100644 node_modules/lodash-es/isLength.js create mode 100644 node_modules/lodash-es/isMap.js create mode 100644 node_modules/lodash-es/isMatch.js create mode 100644 node_modules/lodash-es/isMatchWith.js create mode 100644 node_modules/lodash-es/isNaN.js create mode 100644 node_modules/lodash-es/isNative.js create mode 100644 node_modules/lodash-es/isNil.js create mode 100644 node_modules/lodash-es/isNull.js create mode 100644 node_modules/lodash-es/isNumber.js create mode 100644 node_modules/lodash-es/isObject.js create mode 100644 node_modules/lodash-es/isObjectLike.js create mode 100644 node_modules/lodash-es/isPlainObject.js create mode 100644 node_modules/lodash-es/isRegExp.js create mode 100644 node_modules/lodash-es/isSafeInteger.js create mode 100644 node_modules/lodash-es/isSet.js create mode 100644 node_modules/lodash-es/isString.js create mode 100644 node_modules/lodash-es/isSymbol.js create mode 100644 node_modules/lodash-es/isTypedArray.js create mode 100644 node_modules/lodash-es/isUndefined.js create mode 100644 node_modules/lodash-es/isWeakMap.js create mode 100644 node_modules/lodash-es/isWeakSet.js create mode 100644 node_modules/lodash-es/iteratee.js create mode 100644 node_modules/lodash-es/join.js create mode 100644 node_modules/lodash-es/kebabCase.js create mode 100644 node_modules/lodash-es/keyBy.js create mode 100644 node_modules/lodash-es/keys.js create mode 100644 node_modules/lodash-es/keysIn.js create mode 100644 node_modules/lodash-es/lang.default.js create mode 100644 node_modules/lodash-es/lang.js create mode 100644 node_modules/lodash-es/last.js create mode 100644 node_modules/lodash-es/lastIndexOf.js create mode 100644 node_modules/lodash-es/lodash.default.js create mode 100644 node_modules/lodash-es/lodash.js create mode 100644 node_modules/lodash-es/lowerCase.js create mode 100644 node_modules/lodash-es/lowerFirst.js create mode 100644 node_modules/lodash-es/lt.js create mode 100644 node_modules/lodash-es/lte.js create mode 100644 node_modules/lodash-es/map.js create mode 100644 node_modules/lodash-es/mapKeys.js create mode 100644 node_modules/lodash-es/mapValues.js create mode 100644 node_modules/lodash-es/matches.js create mode 100644 node_modules/lodash-es/matchesProperty.js create mode 100644 node_modules/lodash-es/math.default.js create mode 100644 node_modules/lodash-es/math.js create mode 100644 node_modules/lodash-es/max.js create mode 100644 node_modules/lodash-es/maxBy.js create mode 100644 node_modules/lodash-es/mean.js create mode 100644 node_modules/lodash-es/meanBy.js create mode 100644 node_modules/lodash-es/memoize.js create mode 100644 node_modules/lodash-es/merge.js create mode 100644 node_modules/lodash-es/mergeWith.js create mode 100644 node_modules/lodash-es/method.js create mode 100644 node_modules/lodash-es/methodOf.js create mode 100644 node_modules/lodash-es/min.js create mode 100644 node_modules/lodash-es/minBy.js create mode 100644 node_modules/lodash-es/mixin.js create mode 100644 node_modules/lodash-es/multiply.js create mode 100644 node_modules/lodash-es/negate.js create mode 100644 node_modules/lodash-es/next.js create mode 100644 node_modules/lodash-es/noop.js create mode 100644 node_modules/lodash-es/now.js create mode 100644 node_modules/lodash-es/nth.js create mode 100644 node_modules/lodash-es/nthArg.js create mode 100644 node_modules/lodash-es/number.default.js create mode 100644 node_modules/lodash-es/number.js create mode 100644 node_modules/lodash-es/object.default.js create mode 100644 node_modules/lodash-es/object.js create mode 100644 node_modules/lodash-es/omit.js create mode 100644 node_modules/lodash-es/omitBy.js create mode 100644 node_modules/lodash-es/once.js create mode 100644 node_modules/lodash-es/orderBy.js create mode 100644 node_modules/lodash-es/over.js create mode 100644 node_modules/lodash-es/overArgs.js create mode 100644 node_modules/lodash-es/overEvery.js create mode 100644 node_modules/lodash-es/overSome.js create mode 100644 node_modules/lodash-es/package.json create mode 100644 node_modules/lodash-es/pad.js create mode 100644 node_modules/lodash-es/padEnd.js create mode 100644 node_modules/lodash-es/padStart.js create mode 100644 node_modules/lodash-es/parseInt.js create mode 100644 node_modules/lodash-es/partial.js create mode 100644 node_modules/lodash-es/partialRight.js create mode 100644 node_modules/lodash-es/partition.js create mode 100644 node_modules/lodash-es/pick.js create mode 100644 node_modules/lodash-es/pickBy.js create mode 100644 node_modules/lodash-es/plant.js create mode 100644 node_modules/lodash-es/property.js create mode 100644 node_modules/lodash-es/propertyOf.js create mode 100644 node_modules/lodash-es/pull.js create mode 100644 node_modules/lodash-es/pullAll.js create mode 100644 node_modules/lodash-es/pullAllBy.js create mode 100644 node_modules/lodash-es/pullAllWith.js create mode 100644 node_modules/lodash-es/pullAt.js create mode 100644 node_modules/lodash-es/random.js create mode 100644 node_modules/lodash-es/range.js create mode 100644 node_modules/lodash-es/rangeRight.js create mode 100644 node_modules/lodash-es/rearg.js create mode 100644 node_modules/lodash-es/reduce.js create mode 100644 node_modules/lodash-es/reduceRight.js create mode 100644 node_modules/lodash-es/reject.js create mode 100644 node_modules/lodash-es/release.md create mode 100644 node_modules/lodash-es/remove.js create mode 100644 node_modules/lodash-es/repeat.js create mode 100644 node_modules/lodash-es/replace.js create mode 100644 node_modules/lodash-es/rest.js create mode 100644 node_modules/lodash-es/result.js create mode 100644 node_modules/lodash-es/reverse.js create mode 100644 node_modules/lodash-es/round.js create mode 100644 node_modules/lodash-es/sample.js create mode 100644 node_modules/lodash-es/sampleSize.js create mode 100644 node_modules/lodash-es/seq.default.js create mode 100644 node_modules/lodash-es/seq.js create mode 100644 node_modules/lodash-es/set.js create mode 100644 node_modules/lodash-es/setWith.js create mode 100644 node_modules/lodash-es/shuffle.js create mode 100644 node_modules/lodash-es/size.js create mode 100644 node_modules/lodash-es/slice.js create mode 100644 node_modules/lodash-es/snakeCase.js create mode 100644 node_modules/lodash-es/some.js create mode 100644 node_modules/lodash-es/sortBy.js create mode 100644 node_modules/lodash-es/sortedIndex.js create mode 100644 node_modules/lodash-es/sortedIndexBy.js create mode 100644 node_modules/lodash-es/sortedIndexOf.js create mode 100644 node_modules/lodash-es/sortedLastIndex.js create mode 100644 node_modules/lodash-es/sortedLastIndexBy.js create mode 100644 node_modules/lodash-es/sortedLastIndexOf.js create mode 100644 node_modules/lodash-es/sortedUniq.js create mode 100644 node_modules/lodash-es/sortedUniqBy.js create mode 100644 node_modules/lodash-es/split.js create mode 100644 node_modules/lodash-es/spread.js create mode 100644 node_modules/lodash-es/startCase.js create mode 100644 node_modules/lodash-es/startsWith.js create mode 100644 node_modules/lodash-es/string.default.js create mode 100644 node_modules/lodash-es/string.js create mode 100644 node_modules/lodash-es/stubArray.js create mode 100644 node_modules/lodash-es/stubFalse.js create mode 100644 node_modules/lodash-es/stubObject.js create mode 100644 node_modules/lodash-es/stubString.js create mode 100644 node_modules/lodash-es/stubTrue.js create mode 100644 node_modules/lodash-es/subtract.js create mode 100644 node_modules/lodash-es/sum.js create mode 100644 node_modules/lodash-es/sumBy.js create mode 100644 node_modules/lodash-es/tail.js create mode 100644 node_modules/lodash-es/take.js create mode 100644 node_modules/lodash-es/takeRight.js create mode 100644 node_modules/lodash-es/takeRightWhile.js create mode 100644 node_modules/lodash-es/takeWhile.js create mode 100644 node_modules/lodash-es/tap.js create mode 100644 node_modules/lodash-es/template.js create mode 100644 node_modules/lodash-es/templateSettings.js create mode 100644 node_modules/lodash-es/throttle.js create mode 100644 node_modules/lodash-es/thru.js create mode 100644 node_modules/lodash-es/times.js create mode 100644 node_modules/lodash-es/toArray.js create mode 100644 node_modules/lodash-es/toFinite.js create mode 100644 node_modules/lodash-es/toInteger.js create mode 100644 node_modules/lodash-es/toIterator.js create mode 100644 node_modules/lodash-es/toJSON.js create mode 100644 node_modules/lodash-es/toLength.js create mode 100644 node_modules/lodash-es/toLower.js create mode 100644 node_modules/lodash-es/toNumber.js create mode 100644 node_modules/lodash-es/toPairs.js create mode 100644 node_modules/lodash-es/toPairsIn.js create mode 100644 node_modules/lodash-es/toPath.js create mode 100644 node_modules/lodash-es/toPlainObject.js create mode 100644 node_modules/lodash-es/toSafeInteger.js create mode 100644 node_modules/lodash-es/toString.js create mode 100644 node_modules/lodash-es/toUpper.js create mode 100644 node_modules/lodash-es/transform.js create mode 100644 node_modules/lodash-es/trim.js create mode 100644 node_modules/lodash-es/trimEnd.js create mode 100644 node_modules/lodash-es/trimStart.js create mode 100644 node_modules/lodash-es/truncate.js create mode 100644 node_modules/lodash-es/unary.js create mode 100644 node_modules/lodash-es/unescape.js create mode 100644 node_modules/lodash-es/union.js create mode 100644 node_modules/lodash-es/unionBy.js create mode 100644 node_modules/lodash-es/unionWith.js create mode 100644 node_modules/lodash-es/uniq.js create mode 100644 node_modules/lodash-es/uniqBy.js create mode 100644 node_modules/lodash-es/uniqWith.js create mode 100644 node_modules/lodash-es/uniqueId.js create mode 100644 node_modules/lodash-es/unset.js create mode 100644 node_modules/lodash-es/unzip.js create mode 100644 node_modules/lodash-es/unzipWith.js create mode 100644 node_modules/lodash-es/update.js create mode 100644 node_modules/lodash-es/updateWith.js create mode 100644 node_modules/lodash-es/upperCase.js create mode 100644 node_modules/lodash-es/upperFirst.js create mode 100644 node_modules/lodash-es/util.default.js create mode 100644 node_modules/lodash-es/util.js create mode 100644 node_modules/lodash-es/value.js create mode 100644 node_modules/lodash-es/valueOf.js create mode 100644 node_modules/lodash-es/values.js create mode 100644 node_modules/lodash-es/valuesIn.js create mode 100644 node_modules/lodash-es/without.js create mode 100644 node_modules/lodash-es/words.js create mode 100644 node_modules/lodash-es/wrap.js create mode 100644 node_modules/lodash-es/wrapperAt.js create mode 100644 node_modules/lodash-es/wrapperChain.js create mode 100644 node_modules/lodash-es/wrapperLodash.js create mode 100644 node_modules/lodash-es/wrapperReverse.js create mode 100644 node_modules/lodash-es/wrapperValue.js create mode 100644 node_modules/lodash-es/xor.js create mode 100644 node_modules/lodash-es/xorBy.js create mode 100644 node_modules/lodash-es/xorWith.js create mode 100644 node_modules/lodash-es/zip.js create mode 100644 node_modules/lodash-es/zipObject.js create mode 100644 node_modules/lodash-es/zipObjectDeep.js create mode 100644 node_modules/lodash-es/zipWith.js create mode 100644 node_modules/lodash/LICENSE create mode 100644 node_modules/lodash/README.md create mode 100644 node_modules/lodash/_DataView.js create mode 100644 node_modules/lodash/_Hash.js create mode 100644 node_modules/lodash/_LazyWrapper.js create mode 100644 node_modules/lodash/_ListCache.js create mode 100644 node_modules/lodash/_LodashWrapper.js create mode 100644 node_modules/lodash/_Map.js create mode 100644 node_modules/lodash/_MapCache.js create mode 100644 node_modules/lodash/_Promise.js create mode 100644 node_modules/lodash/_Set.js create mode 100644 node_modules/lodash/_SetCache.js create mode 100644 node_modules/lodash/_Stack.js create mode 100644 node_modules/lodash/_Symbol.js create mode 100644 node_modules/lodash/_Uint8Array.js create mode 100644 node_modules/lodash/_WeakMap.js create mode 100644 node_modules/lodash/_apply.js create mode 100644 node_modules/lodash/_arrayAggregator.js create mode 100644 node_modules/lodash/_arrayEach.js create mode 100644 node_modules/lodash/_arrayEachRight.js create mode 100644 node_modules/lodash/_arrayEvery.js create mode 100644 node_modules/lodash/_arrayFilter.js create mode 100644 node_modules/lodash/_arrayIncludes.js create mode 100644 node_modules/lodash/_arrayIncludesWith.js create mode 100644 node_modules/lodash/_arrayLikeKeys.js create mode 100644 node_modules/lodash/_arrayMap.js create mode 100644 node_modules/lodash/_arrayPush.js create mode 100644 node_modules/lodash/_arrayReduce.js create mode 100644 node_modules/lodash/_arrayReduceRight.js create mode 100644 node_modules/lodash/_arraySample.js create mode 100644 node_modules/lodash/_arraySampleSize.js create mode 100644 node_modules/lodash/_arrayShuffle.js create mode 100644 node_modules/lodash/_arraySome.js create mode 100644 node_modules/lodash/_asciiSize.js create mode 100644 node_modules/lodash/_asciiToArray.js create mode 100644 node_modules/lodash/_asciiWords.js create mode 100644 node_modules/lodash/_assignMergeValue.js create mode 100644 node_modules/lodash/_assignValue.js create mode 100644 node_modules/lodash/_assocIndexOf.js create mode 100644 node_modules/lodash/_baseAggregator.js create mode 100644 node_modules/lodash/_baseAssign.js create mode 100644 node_modules/lodash/_baseAssignIn.js create mode 100644 node_modules/lodash/_baseAssignValue.js create mode 100644 node_modules/lodash/_baseAt.js create mode 100644 node_modules/lodash/_baseClamp.js create mode 100644 node_modules/lodash/_baseClone.js create mode 100644 node_modules/lodash/_baseConforms.js create mode 100644 node_modules/lodash/_baseConformsTo.js create mode 100644 node_modules/lodash/_baseCreate.js create mode 100644 node_modules/lodash/_baseDelay.js create mode 100644 node_modules/lodash/_baseDifference.js create mode 100644 node_modules/lodash/_baseEach.js create mode 100644 node_modules/lodash/_baseEachRight.js create mode 100644 node_modules/lodash/_baseEvery.js create mode 100644 node_modules/lodash/_baseExtremum.js create mode 100644 node_modules/lodash/_baseFill.js create mode 100644 node_modules/lodash/_baseFilter.js create mode 100644 node_modules/lodash/_baseFindIndex.js create mode 100644 node_modules/lodash/_baseFindKey.js create mode 100644 node_modules/lodash/_baseFlatten.js create mode 100644 node_modules/lodash/_baseFor.js create mode 100644 node_modules/lodash/_baseForOwn.js create mode 100644 node_modules/lodash/_baseForOwnRight.js create mode 100644 node_modules/lodash/_baseForRight.js create mode 100644 node_modules/lodash/_baseFunctions.js create mode 100644 node_modules/lodash/_baseGet.js create mode 100644 node_modules/lodash/_baseGetAllKeys.js create mode 100644 node_modules/lodash/_baseGetTag.js create mode 100644 node_modules/lodash/_baseGt.js create mode 100644 node_modules/lodash/_baseHas.js create mode 100644 node_modules/lodash/_baseHasIn.js create mode 100644 node_modules/lodash/_baseInRange.js create mode 100644 node_modules/lodash/_baseIndexOf.js create mode 100644 node_modules/lodash/_baseIndexOfWith.js create mode 100644 node_modules/lodash/_baseIntersection.js create mode 100644 node_modules/lodash/_baseInverter.js create mode 100644 node_modules/lodash/_baseInvoke.js create mode 100644 node_modules/lodash/_baseIsArguments.js create mode 100644 node_modules/lodash/_baseIsArrayBuffer.js create mode 100644 node_modules/lodash/_baseIsDate.js create mode 100644 node_modules/lodash/_baseIsEqual.js create mode 100644 node_modules/lodash/_baseIsEqualDeep.js create mode 100644 node_modules/lodash/_baseIsMap.js create mode 100644 node_modules/lodash/_baseIsMatch.js create mode 100644 node_modules/lodash/_baseIsNaN.js create mode 100644 node_modules/lodash/_baseIsNative.js create mode 100644 node_modules/lodash/_baseIsRegExp.js create mode 100644 node_modules/lodash/_baseIsSet.js create mode 100644 node_modules/lodash/_baseIsTypedArray.js create mode 100644 node_modules/lodash/_baseIteratee.js create mode 100644 node_modules/lodash/_baseKeys.js create mode 100644 node_modules/lodash/_baseKeysIn.js create mode 100644 node_modules/lodash/_baseLodash.js create mode 100644 node_modules/lodash/_baseLt.js create mode 100644 node_modules/lodash/_baseMap.js create mode 100644 node_modules/lodash/_baseMatches.js create mode 100644 node_modules/lodash/_baseMatchesProperty.js create mode 100644 node_modules/lodash/_baseMean.js create mode 100644 node_modules/lodash/_baseMerge.js create mode 100644 node_modules/lodash/_baseMergeDeep.js create mode 100644 node_modules/lodash/_baseNth.js create mode 100644 node_modules/lodash/_baseOrderBy.js create mode 100644 node_modules/lodash/_basePick.js create mode 100644 node_modules/lodash/_basePickBy.js create mode 100644 node_modules/lodash/_baseProperty.js create mode 100644 node_modules/lodash/_basePropertyDeep.js create mode 100644 node_modules/lodash/_basePropertyOf.js create mode 100644 node_modules/lodash/_basePullAll.js create mode 100644 node_modules/lodash/_basePullAt.js create mode 100644 node_modules/lodash/_baseRandom.js create mode 100644 node_modules/lodash/_baseRange.js create mode 100644 node_modules/lodash/_baseReduce.js create mode 100644 node_modules/lodash/_baseRepeat.js create mode 100644 node_modules/lodash/_baseRest.js create mode 100644 node_modules/lodash/_baseSample.js create mode 100644 node_modules/lodash/_baseSampleSize.js create mode 100644 node_modules/lodash/_baseSet.js create mode 100644 node_modules/lodash/_baseSetData.js create mode 100644 node_modules/lodash/_baseSetToString.js create mode 100644 node_modules/lodash/_baseShuffle.js create mode 100644 node_modules/lodash/_baseSlice.js create mode 100644 node_modules/lodash/_baseSome.js create mode 100644 node_modules/lodash/_baseSortBy.js create mode 100644 node_modules/lodash/_baseSortedIndex.js create mode 100644 node_modules/lodash/_baseSortedIndexBy.js create mode 100644 node_modules/lodash/_baseSortedUniq.js create mode 100644 node_modules/lodash/_baseSum.js create mode 100644 node_modules/lodash/_baseTimes.js create mode 100644 node_modules/lodash/_baseToNumber.js create mode 100644 node_modules/lodash/_baseToPairs.js create mode 100644 node_modules/lodash/_baseToString.js create mode 100644 node_modules/lodash/_baseTrim.js create mode 100644 node_modules/lodash/_baseUnary.js create mode 100644 node_modules/lodash/_baseUniq.js create mode 100644 node_modules/lodash/_baseUnset.js create mode 100644 node_modules/lodash/_baseUpdate.js create mode 100644 node_modules/lodash/_baseValues.js create mode 100644 node_modules/lodash/_baseWhile.js create mode 100644 node_modules/lodash/_baseWrapperValue.js create mode 100644 node_modules/lodash/_baseXor.js create mode 100644 node_modules/lodash/_baseZipObject.js create mode 100644 node_modules/lodash/_cacheHas.js create mode 100644 node_modules/lodash/_castArrayLikeObject.js create mode 100644 node_modules/lodash/_castFunction.js create mode 100644 node_modules/lodash/_castPath.js create mode 100644 node_modules/lodash/_castRest.js create mode 100644 node_modules/lodash/_castSlice.js create mode 100644 node_modules/lodash/_charsEndIndex.js create mode 100644 node_modules/lodash/_charsStartIndex.js create mode 100644 node_modules/lodash/_cloneArrayBuffer.js create mode 100644 node_modules/lodash/_cloneBuffer.js create mode 100644 node_modules/lodash/_cloneDataView.js create mode 100644 node_modules/lodash/_cloneRegExp.js create mode 100644 node_modules/lodash/_cloneSymbol.js create mode 100644 node_modules/lodash/_cloneTypedArray.js create mode 100644 node_modules/lodash/_compareAscending.js create mode 100644 node_modules/lodash/_compareMultiple.js create mode 100644 node_modules/lodash/_composeArgs.js create mode 100644 node_modules/lodash/_composeArgsRight.js create mode 100644 node_modules/lodash/_copyArray.js create mode 100644 node_modules/lodash/_copyObject.js create mode 100644 node_modules/lodash/_copySymbols.js create mode 100644 node_modules/lodash/_copySymbolsIn.js create mode 100644 node_modules/lodash/_coreJsData.js create mode 100644 node_modules/lodash/_countHolders.js create mode 100644 node_modules/lodash/_createAggregator.js create mode 100644 node_modules/lodash/_createAssigner.js create mode 100644 node_modules/lodash/_createBaseEach.js create mode 100644 node_modules/lodash/_createBaseFor.js create mode 100644 node_modules/lodash/_createBind.js create mode 100644 node_modules/lodash/_createCaseFirst.js create mode 100644 node_modules/lodash/_createCompounder.js create mode 100644 node_modules/lodash/_createCtor.js create mode 100644 node_modules/lodash/_createCurry.js create mode 100644 node_modules/lodash/_createFind.js create mode 100644 node_modules/lodash/_createFlow.js create mode 100644 node_modules/lodash/_createHybrid.js create mode 100644 node_modules/lodash/_createInverter.js create mode 100644 node_modules/lodash/_createMathOperation.js create mode 100644 node_modules/lodash/_createOver.js create mode 100644 node_modules/lodash/_createPadding.js create mode 100644 node_modules/lodash/_createPartial.js create mode 100644 node_modules/lodash/_createRange.js create mode 100644 node_modules/lodash/_createRecurry.js create mode 100644 node_modules/lodash/_createRelationalOperation.js create mode 100644 node_modules/lodash/_createRound.js create mode 100644 node_modules/lodash/_createSet.js create mode 100644 node_modules/lodash/_createToPairs.js create mode 100644 node_modules/lodash/_createWrap.js create mode 100644 node_modules/lodash/_customDefaultsAssignIn.js create mode 100644 node_modules/lodash/_customDefaultsMerge.js create mode 100644 node_modules/lodash/_customOmitClone.js create mode 100644 node_modules/lodash/_deburrLetter.js create mode 100644 node_modules/lodash/_defineProperty.js create mode 100644 node_modules/lodash/_equalArrays.js create mode 100644 node_modules/lodash/_equalByTag.js create mode 100644 node_modules/lodash/_equalObjects.js create mode 100644 node_modules/lodash/_escapeHtmlChar.js create mode 100644 node_modules/lodash/_escapeStringChar.js create mode 100644 node_modules/lodash/_flatRest.js create mode 100644 node_modules/lodash/_freeGlobal.js create mode 100644 node_modules/lodash/_getAllKeys.js create mode 100644 node_modules/lodash/_getAllKeysIn.js create mode 100644 node_modules/lodash/_getData.js create mode 100644 node_modules/lodash/_getFuncName.js create mode 100644 node_modules/lodash/_getHolder.js create mode 100644 node_modules/lodash/_getMapData.js create mode 100644 node_modules/lodash/_getMatchData.js create mode 100644 node_modules/lodash/_getNative.js create mode 100644 node_modules/lodash/_getPrototype.js create mode 100644 node_modules/lodash/_getRawTag.js create mode 100644 node_modules/lodash/_getSymbols.js create mode 100644 node_modules/lodash/_getSymbolsIn.js create mode 100644 node_modules/lodash/_getTag.js create mode 100644 node_modules/lodash/_getValue.js create mode 100644 node_modules/lodash/_getView.js create mode 100644 node_modules/lodash/_getWrapDetails.js create mode 100644 node_modules/lodash/_hasPath.js create mode 100644 node_modules/lodash/_hasUnicode.js create mode 100644 node_modules/lodash/_hasUnicodeWord.js create mode 100644 node_modules/lodash/_hashClear.js create mode 100644 node_modules/lodash/_hashDelete.js create mode 100644 node_modules/lodash/_hashGet.js create mode 100644 node_modules/lodash/_hashHas.js create mode 100644 node_modules/lodash/_hashSet.js create mode 100644 node_modules/lodash/_initCloneArray.js create mode 100644 node_modules/lodash/_initCloneByTag.js create mode 100644 node_modules/lodash/_initCloneObject.js create mode 100644 node_modules/lodash/_insertWrapDetails.js create mode 100644 node_modules/lodash/_isFlattenable.js create mode 100644 node_modules/lodash/_isIndex.js create mode 100644 node_modules/lodash/_isIterateeCall.js create mode 100644 node_modules/lodash/_isKey.js create mode 100644 node_modules/lodash/_isKeyable.js create mode 100644 node_modules/lodash/_isLaziable.js create mode 100644 node_modules/lodash/_isMaskable.js create mode 100644 node_modules/lodash/_isMasked.js create mode 100644 node_modules/lodash/_isPrototype.js create mode 100644 node_modules/lodash/_isStrictComparable.js create mode 100644 node_modules/lodash/_iteratorToArray.js create mode 100644 node_modules/lodash/_lazyClone.js create mode 100644 node_modules/lodash/_lazyReverse.js create mode 100644 node_modules/lodash/_lazyValue.js create mode 100644 node_modules/lodash/_listCacheClear.js create mode 100644 node_modules/lodash/_listCacheDelete.js create mode 100644 node_modules/lodash/_listCacheGet.js create mode 100644 node_modules/lodash/_listCacheHas.js create mode 100644 node_modules/lodash/_listCacheSet.js create mode 100644 node_modules/lodash/_mapCacheClear.js create mode 100644 node_modules/lodash/_mapCacheDelete.js create mode 100644 node_modules/lodash/_mapCacheGet.js create mode 100644 node_modules/lodash/_mapCacheHas.js create mode 100644 node_modules/lodash/_mapCacheSet.js create mode 100644 node_modules/lodash/_mapToArray.js create mode 100644 node_modules/lodash/_matchesStrictComparable.js create mode 100644 node_modules/lodash/_memoizeCapped.js create mode 100644 node_modules/lodash/_mergeData.js create mode 100644 node_modules/lodash/_metaMap.js create mode 100644 node_modules/lodash/_nativeCreate.js create mode 100644 node_modules/lodash/_nativeKeys.js create mode 100644 node_modules/lodash/_nativeKeysIn.js create mode 100644 node_modules/lodash/_nodeUtil.js create mode 100644 node_modules/lodash/_objectToString.js create mode 100644 node_modules/lodash/_overArg.js create mode 100644 node_modules/lodash/_overRest.js create mode 100644 node_modules/lodash/_parent.js create mode 100644 node_modules/lodash/_reEscape.js create mode 100644 node_modules/lodash/_reEvaluate.js create mode 100644 node_modules/lodash/_reInterpolate.js create mode 100644 node_modules/lodash/_realNames.js create mode 100644 node_modules/lodash/_reorder.js create mode 100644 node_modules/lodash/_replaceHolders.js create mode 100644 node_modules/lodash/_root.js create mode 100644 node_modules/lodash/_safeGet.js create mode 100644 node_modules/lodash/_setCacheAdd.js create mode 100644 node_modules/lodash/_setCacheHas.js create mode 100644 node_modules/lodash/_setData.js create mode 100644 node_modules/lodash/_setToArray.js create mode 100644 node_modules/lodash/_setToPairs.js create mode 100644 node_modules/lodash/_setToString.js create mode 100644 node_modules/lodash/_setWrapToString.js create mode 100644 node_modules/lodash/_shortOut.js create mode 100644 node_modules/lodash/_shuffleSelf.js create mode 100644 node_modules/lodash/_stackClear.js create mode 100644 node_modules/lodash/_stackDelete.js create mode 100644 node_modules/lodash/_stackGet.js create mode 100644 node_modules/lodash/_stackHas.js create mode 100644 node_modules/lodash/_stackSet.js create mode 100644 node_modules/lodash/_strictIndexOf.js create mode 100644 node_modules/lodash/_strictLastIndexOf.js create mode 100644 node_modules/lodash/_stringSize.js create mode 100644 node_modules/lodash/_stringToArray.js create mode 100644 node_modules/lodash/_stringToPath.js create mode 100644 node_modules/lodash/_toKey.js create mode 100644 node_modules/lodash/_toSource.js create mode 100644 node_modules/lodash/_trimmedEndIndex.js create mode 100644 node_modules/lodash/_unescapeHtmlChar.js create mode 100644 node_modules/lodash/_unicodeSize.js create mode 100644 node_modules/lodash/_unicodeToArray.js create mode 100644 node_modules/lodash/_unicodeWords.js create mode 100644 node_modules/lodash/_updateWrapDetails.js create mode 100644 node_modules/lodash/_wrapperClone.js create mode 100644 node_modules/lodash/add.js create mode 100644 node_modules/lodash/after.js create mode 100644 node_modules/lodash/array.js create mode 100644 node_modules/lodash/ary.js create mode 100644 node_modules/lodash/assign.js create mode 100644 node_modules/lodash/assignIn.js create mode 100644 node_modules/lodash/assignInWith.js create mode 100644 node_modules/lodash/assignWith.js create mode 100644 node_modules/lodash/at.js create mode 100644 node_modules/lodash/attempt.js create mode 100644 node_modules/lodash/before.js create mode 100644 node_modules/lodash/bind.js create mode 100644 node_modules/lodash/bindAll.js create mode 100644 node_modules/lodash/bindKey.js create mode 100644 node_modules/lodash/camelCase.js create mode 100644 node_modules/lodash/capitalize.js create mode 100644 node_modules/lodash/castArray.js create mode 100644 node_modules/lodash/ceil.js create mode 100644 node_modules/lodash/chain.js create mode 100644 node_modules/lodash/chunk.js create mode 100644 node_modules/lodash/clamp.js create mode 100644 node_modules/lodash/clone.js create mode 100644 node_modules/lodash/cloneDeep.js create mode 100644 node_modules/lodash/cloneDeepWith.js create mode 100644 node_modules/lodash/cloneWith.js create mode 100644 node_modules/lodash/collection.js create mode 100644 node_modules/lodash/commit.js create mode 100644 node_modules/lodash/compact.js create mode 100644 node_modules/lodash/concat.js create mode 100644 node_modules/lodash/cond.js create mode 100644 node_modules/lodash/conforms.js create mode 100644 node_modules/lodash/conformsTo.js create mode 100644 node_modules/lodash/constant.js create mode 100644 node_modules/lodash/core.js create mode 100644 node_modules/lodash/core.min.js create mode 100644 node_modules/lodash/countBy.js create mode 100644 node_modules/lodash/create.js create mode 100644 node_modules/lodash/curry.js create mode 100644 node_modules/lodash/curryRight.js create mode 100644 node_modules/lodash/date.js create mode 100644 node_modules/lodash/debounce.js create mode 100644 node_modules/lodash/deburr.js create mode 100644 node_modules/lodash/defaultTo.js create mode 100644 node_modules/lodash/defaults.js create mode 100644 node_modules/lodash/defaultsDeep.js create mode 100644 node_modules/lodash/defer.js create mode 100644 node_modules/lodash/delay.js create mode 100644 node_modules/lodash/difference.js create mode 100644 node_modules/lodash/differenceBy.js create mode 100644 node_modules/lodash/differenceWith.js create mode 100644 node_modules/lodash/divide.js create mode 100644 node_modules/lodash/drop.js create mode 100644 node_modules/lodash/dropRight.js create mode 100644 node_modules/lodash/dropRightWhile.js create mode 100644 node_modules/lodash/dropWhile.js create mode 100644 node_modules/lodash/each.js create mode 100644 node_modules/lodash/eachRight.js create mode 100644 node_modules/lodash/endsWith.js create mode 100644 node_modules/lodash/entries.js create mode 100644 node_modules/lodash/entriesIn.js create mode 100644 node_modules/lodash/eq.js create mode 100644 node_modules/lodash/escape.js create mode 100644 node_modules/lodash/escapeRegExp.js create mode 100644 node_modules/lodash/every.js create mode 100644 node_modules/lodash/extend.js create mode 100644 node_modules/lodash/extendWith.js create mode 100644 node_modules/lodash/fill.js create mode 100644 node_modules/lodash/filter.js create mode 100644 node_modules/lodash/find.js create mode 100644 node_modules/lodash/findIndex.js create mode 100644 node_modules/lodash/findKey.js create mode 100644 node_modules/lodash/findLast.js create mode 100644 node_modules/lodash/findLastIndex.js create mode 100644 node_modules/lodash/findLastKey.js create mode 100644 node_modules/lodash/first.js create mode 100644 node_modules/lodash/flake.lock create mode 100644 node_modules/lodash/flake.nix create mode 100644 node_modules/lodash/flatMap.js create mode 100644 node_modules/lodash/flatMapDeep.js create mode 100644 node_modules/lodash/flatMapDepth.js create mode 100644 node_modules/lodash/flatten.js create mode 100644 node_modules/lodash/flattenDeep.js create mode 100644 node_modules/lodash/flattenDepth.js create mode 100644 node_modules/lodash/flip.js create mode 100644 node_modules/lodash/floor.js create mode 100644 node_modules/lodash/flow.js create mode 100644 node_modules/lodash/flowRight.js create mode 100644 node_modules/lodash/forEach.js create mode 100644 node_modules/lodash/forEachRight.js create mode 100644 node_modules/lodash/forIn.js create mode 100644 node_modules/lodash/forInRight.js create mode 100644 node_modules/lodash/forOwn.js create mode 100644 node_modules/lodash/forOwnRight.js create mode 100644 node_modules/lodash/fp.js create mode 100644 node_modules/lodash/fp/F.js create mode 100644 node_modules/lodash/fp/T.js create mode 100644 node_modules/lodash/fp/__.js create mode 100644 node_modules/lodash/fp/_baseConvert.js create mode 100644 node_modules/lodash/fp/_convertBrowser.js create mode 100644 node_modules/lodash/fp/_falseOptions.js create mode 100644 node_modules/lodash/fp/_mapping.js create mode 100644 node_modules/lodash/fp/_util.js create mode 100644 node_modules/lodash/fp/add.js create mode 100644 node_modules/lodash/fp/after.js create mode 100644 node_modules/lodash/fp/all.js create mode 100644 node_modules/lodash/fp/allPass.js create mode 100644 node_modules/lodash/fp/always.js create mode 100644 node_modules/lodash/fp/any.js create mode 100644 node_modules/lodash/fp/anyPass.js create mode 100644 node_modules/lodash/fp/apply.js create mode 100644 node_modules/lodash/fp/array.js create mode 100644 node_modules/lodash/fp/ary.js create mode 100644 node_modules/lodash/fp/assign.js create mode 100644 node_modules/lodash/fp/assignAll.js create mode 100644 node_modules/lodash/fp/assignAllWith.js create mode 100644 node_modules/lodash/fp/assignIn.js create mode 100644 node_modules/lodash/fp/assignInAll.js create mode 100644 node_modules/lodash/fp/assignInAllWith.js create mode 100644 node_modules/lodash/fp/assignInWith.js create mode 100644 node_modules/lodash/fp/assignWith.js create mode 100644 node_modules/lodash/fp/assoc.js create mode 100644 node_modules/lodash/fp/assocPath.js create mode 100644 node_modules/lodash/fp/at.js create mode 100644 node_modules/lodash/fp/attempt.js create mode 100644 node_modules/lodash/fp/before.js create mode 100644 node_modules/lodash/fp/bind.js create mode 100644 node_modules/lodash/fp/bindAll.js create mode 100644 node_modules/lodash/fp/bindKey.js create mode 100644 node_modules/lodash/fp/camelCase.js create mode 100644 node_modules/lodash/fp/capitalize.js create mode 100644 node_modules/lodash/fp/castArray.js create mode 100644 node_modules/lodash/fp/ceil.js create mode 100644 node_modules/lodash/fp/chain.js create mode 100644 node_modules/lodash/fp/chunk.js create mode 100644 node_modules/lodash/fp/clamp.js create mode 100644 node_modules/lodash/fp/clone.js create mode 100644 node_modules/lodash/fp/cloneDeep.js create mode 100644 node_modules/lodash/fp/cloneDeepWith.js create mode 100644 node_modules/lodash/fp/cloneWith.js create mode 100644 node_modules/lodash/fp/collection.js create mode 100644 node_modules/lodash/fp/commit.js create mode 100644 node_modules/lodash/fp/compact.js create mode 100644 node_modules/lodash/fp/complement.js create mode 100644 node_modules/lodash/fp/compose.js create mode 100644 node_modules/lodash/fp/concat.js create mode 100644 node_modules/lodash/fp/cond.js create mode 100644 node_modules/lodash/fp/conforms.js create mode 100644 node_modules/lodash/fp/conformsTo.js create mode 100644 node_modules/lodash/fp/constant.js create mode 100644 node_modules/lodash/fp/contains.js create mode 100644 node_modules/lodash/fp/convert.js create mode 100644 node_modules/lodash/fp/countBy.js create mode 100644 node_modules/lodash/fp/create.js create mode 100644 node_modules/lodash/fp/curry.js create mode 100644 node_modules/lodash/fp/curryN.js create mode 100644 node_modules/lodash/fp/curryRight.js create mode 100644 node_modules/lodash/fp/curryRightN.js create mode 100644 node_modules/lodash/fp/date.js create mode 100644 node_modules/lodash/fp/debounce.js create mode 100644 node_modules/lodash/fp/deburr.js create mode 100644 node_modules/lodash/fp/defaultTo.js create mode 100644 node_modules/lodash/fp/defaults.js create mode 100644 node_modules/lodash/fp/defaultsAll.js create mode 100644 node_modules/lodash/fp/defaultsDeep.js create mode 100644 node_modules/lodash/fp/defaultsDeepAll.js create mode 100644 node_modules/lodash/fp/defer.js create mode 100644 node_modules/lodash/fp/delay.js create mode 100644 node_modules/lodash/fp/difference.js create mode 100644 node_modules/lodash/fp/differenceBy.js create mode 100644 node_modules/lodash/fp/differenceWith.js create mode 100644 node_modules/lodash/fp/dissoc.js create mode 100644 node_modules/lodash/fp/dissocPath.js create mode 100644 node_modules/lodash/fp/divide.js create mode 100644 node_modules/lodash/fp/drop.js create mode 100644 node_modules/lodash/fp/dropLast.js create mode 100644 node_modules/lodash/fp/dropLastWhile.js create mode 100644 node_modules/lodash/fp/dropRight.js create mode 100644 node_modules/lodash/fp/dropRightWhile.js create mode 100644 node_modules/lodash/fp/dropWhile.js create mode 100644 node_modules/lodash/fp/each.js create mode 100644 node_modules/lodash/fp/eachRight.js create mode 100644 node_modules/lodash/fp/endsWith.js create mode 100644 node_modules/lodash/fp/entries.js create mode 100644 node_modules/lodash/fp/entriesIn.js create mode 100644 node_modules/lodash/fp/eq.js create mode 100644 node_modules/lodash/fp/equals.js create mode 100644 node_modules/lodash/fp/escape.js create mode 100644 node_modules/lodash/fp/escapeRegExp.js create mode 100644 node_modules/lodash/fp/every.js create mode 100644 node_modules/lodash/fp/extend.js create mode 100644 node_modules/lodash/fp/extendAll.js create mode 100644 node_modules/lodash/fp/extendAllWith.js create mode 100644 node_modules/lodash/fp/extendWith.js create mode 100644 node_modules/lodash/fp/fill.js create mode 100644 node_modules/lodash/fp/filter.js create mode 100644 node_modules/lodash/fp/find.js create mode 100644 node_modules/lodash/fp/findFrom.js create mode 100644 node_modules/lodash/fp/findIndex.js create mode 100644 node_modules/lodash/fp/findIndexFrom.js create mode 100644 node_modules/lodash/fp/findKey.js create mode 100644 node_modules/lodash/fp/findLast.js create mode 100644 node_modules/lodash/fp/findLastFrom.js create mode 100644 node_modules/lodash/fp/findLastIndex.js create mode 100644 node_modules/lodash/fp/findLastIndexFrom.js create mode 100644 node_modules/lodash/fp/findLastKey.js create mode 100644 node_modules/lodash/fp/first.js create mode 100644 node_modules/lodash/fp/flatMap.js create mode 100644 node_modules/lodash/fp/flatMapDeep.js create mode 100644 node_modules/lodash/fp/flatMapDepth.js create mode 100644 node_modules/lodash/fp/flatten.js create mode 100644 node_modules/lodash/fp/flattenDeep.js create mode 100644 node_modules/lodash/fp/flattenDepth.js create mode 100644 node_modules/lodash/fp/flip.js create mode 100644 node_modules/lodash/fp/floor.js create mode 100644 node_modules/lodash/fp/flow.js create mode 100644 node_modules/lodash/fp/flowRight.js create mode 100644 node_modules/lodash/fp/forEach.js create mode 100644 node_modules/lodash/fp/forEachRight.js create mode 100644 node_modules/lodash/fp/forIn.js create mode 100644 node_modules/lodash/fp/forInRight.js create mode 100644 node_modules/lodash/fp/forOwn.js create mode 100644 node_modules/lodash/fp/forOwnRight.js create mode 100644 node_modules/lodash/fp/fromPairs.js create mode 100644 node_modules/lodash/fp/function.js create mode 100644 node_modules/lodash/fp/functions.js create mode 100644 node_modules/lodash/fp/functionsIn.js create mode 100644 node_modules/lodash/fp/get.js create mode 100644 node_modules/lodash/fp/getOr.js create mode 100644 node_modules/lodash/fp/groupBy.js create mode 100644 node_modules/lodash/fp/gt.js create mode 100644 node_modules/lodash/fp/gte.js create mode 100644 node_modules/lodash/fp/has.js create mode 100644 node_modules/lodash/fp/hasIn.js create mode 100644 node_modules/lodash/fp/head.js create mode 100644 node_modules/lodash/fp/identical.js create mode 100644 node_modules/lodash/fp/identity.js create mode 100644 node_modules/lodash/fp/inRange.js create mode 100644 node_modules/lodash/fp/includes.js create mode 100644 node_modules/lodash/fp/includesFrom.js create mode 100644 node_modules/lodash/fp/indexBy.js create mode 100644 node_modules/lodash/fp/indexOf.js create mode 100644 node_modules/lodash/fp/indexOfFrom.js create mode 100644 node_modules/lodash/fp/init.js create mode 100644 node_modules/lodash/fp/initial.js create mode 100644 node_modules/lodash/fp/intersection.js create mode 100644 node_modules/lodash/fp/intersectionBy.js create mode 100644 node_modules/lodash/fp/intersectionWith.js create mode 100644 node_modules/lodash/fp/invert.js create mode 100644 node_modules/lodash/fp/invertBy.js create mode 100644 node_modules/lodash/fp/invertObj.js create mode 100644 node_modules/lodash/fp/invoke.js create mode 100644 node_modules/lodash/fp/invokeArgs.js create mode 100644 node_modules/lodash/fp/invokeArgsMap.js create mode 100644 node_modules/lodash/fp/invokeMap.js create mode 100644 node_modules/lodash/fp/isArguments.js create mode 100644 node_modules/lodash/fp/isArray.js create mode 100644 node_modules/lodash/fp/isArrayBuffer.js create mode 100644 node_modules/lodash/fp/isArrayLike.js create mode 100644 node_modules/lodash/fp/isArrayLikeObject.js create mode 100644 node_modules/lodash/fp/isBoolean.js create mode 100644 node_modules/lodash/fp/isBuffer.js create mode 100644 node_modules/lodash/fp/isDate.js create mode 100644 node_modules/lodash/fp/isElement.js create mode 100644 node_modules/lodash/fp/isEmpty.js create mode 100644 node_modules/lodash/fp/isEqual.js create mode 100644 node_modules/lodash/fp/isEqualWith.js create mode 100644 node_modules/lodash/fp/isError.js create mode 100644 node_modules/lodash/fp/isFinite.js create mode 100644 node_modules/lodash/fp/isFunction.js create mode 100644 node_modules/lodash/fp/isInteger.js create mode 100644 node_modules/lodash/fp/isLength.js create mode 100644 node_modules/lodash/fp/isMap.js create mode 100644 node_modules/lodash/fp/isMatch.js create mode 100644 node_modules/lodash/fp/isMatchWith.js create mode 100644 node_modules/lodash/fp/isNaN.js create mode 100644 node_modules/lodash/fp/isNative.js create mode 100644 node_modules/lodash/fp/isNil.js create mode 100644 node_modules/lodash/fp/isNull.js create mode 100644 node_modules/lodash/fp/isNumber.js create mode 100644 node_modules/lodash/fp/isObject.js create mode 100644 node_modules/lodash/fp/isObjectLike.js create mode 100644 node_modules/lodash/fp/isPlainObject.js create mode 100644 node_modules/lodash/fp/isRegExp.js create mode 100644 node_modules/lodash/fp/isSafeInteger.js create mode 100644 node_modules/lodash/fp/isSet.js create mode 100644 node_modules/lodash/fp/isString.js create mode 100644 node_modules/lodash/fp/isSymbol.js create mode 100644 node_modules/lodash/fp/isTypedArray.js create mode 100644 node_modules/lodash/fp/isUndefined.js create mode 100644 node_modules/lodash/fp/isWeakMap.js create mode 100644 node_modules/lodash/fp/isWeakSet.js create mode 100644 node_modules/lodash/fp/iteratee.js create mode 100644 node_modules/lodash/fp/join.js create mode 100644 node_modules/lodash/fp/juxt.js create mode 100644 node_modules/lodash/fp/kebabCase.js create mode 100644 node_modules/lodash/fp/keyBy.js create mode 100644 node_modules/lodash/fp/keys.js create mode 100644 node_modules/lodash/fp/keysIn.js create mode 100644 node_modules/lodash/fp/lang.js create mode 100644 node_modules/lodash/fp/last.js create mode 100644 node_modules/lodash/fp/lastIndexOf.js create mode 100644 node_modules/lodash/fp/lastIndexOfFrom.js create mode 100644 node_modules/lodash/fp/lowerCase.js create mode 100644 node_modules/lodash/fp/lowerFirst.js create mode 100644 node_modules/lodash/fp/lt.js create mode 100644 node_modules/lodash/fp/lte.js create mode 100644 node_modules/lodash/fp/map.js create mode 100644 node_modules/lodash/fp/mapKeys.js create mode 100644 node_modules/lodash/fp/mapValues.js create mode 100644 node_modules/lodash/fp/matches.js create mode 100644 node_modules/lodash/fp/matchesProperty.js create mode 100644 node_modules/lodash/fp/math.js create mode 100644 node_modules/lodash/fp/max.js create mode 100644 node_modules/lodash/fp/maxBy.js create mode 100644 node_modules/lodash/fp/mean.js create mode 100644 node_modules/lodash/fp/meanBy.js create mode 100644 node_modules/lodash/fp/memoize.js create mode 100644 node_modules/lodash/fp/merge.js create mode 100644 node_modules/lodash/fp/mergeAll.js create mode 100644 node_modules/lodash/fp/mergeAllWith.js create mode 100644 node_modules/lodash/fp/mergeWith.js create mode 100644 node_modules/lodash/fp/method.js create mode 100644 node_modules/lodash/fp/methodOf.js create mode 100644 node_modules/lodash/fp/min.js create mode 100644 node_modules/lodash/fp/minBy.js create mode 100644 node_modules/lodash/fp/mixin.js create mode 100644 node_modules/lodash/fp/multiply.js create mode 100644 node_modules/lodash/fp/nAry.js create mode 100644 node_modules/lodash/fp/negate.js create mode 100644 node_modules/lodash/fp/next.js create mode 100644 node_modules/lodash/fp/noop.js create mode 100644 node_modules/lodash/fp/now.js create mode 100644 node_modules/lodash/fp/nth.js create mode 100644 node_modules/lodash/fp/nthArg.js create mode 100644 node_modules/lodash/fp/number.js create mode 100644 node_modules/lodash/fp/object.js create mode 100644 node_modules/lodash/fp/omit.js create mode 100644 node_modules/lodash/fp/omitAll.js create mode 100644 node_modules/lodash/fp/omitBy.js create mode 100644 node_modules/lodash/fp/once.js create mode 100644 node_modules/lodash/fp/orderBy.js create mode 100644 node_modules/lodash/fp/over.js create mode 100644 node_modules/lodash/fp/overArgs.js create mode 100644 node_modules/lodash/fp/overEvery.js create mode 100644 node_modules/lodash/fp/overSome.js create mode 100644 node_modules/lodash/fp/pad.js create mode 100644 node_modules/lodash/fp/padChars.js create mode 100644 node_modules/lodash/fp/padCharsEnd.js create mode 100644 node_modules/lodash/fp/padCharsStart.js create mode 100644 node_modules/lodash/fp/padEnd.js create mode 100644 node_modules/lodash/fp/padStart.js create mode 100644 node_modules/lodash/fp/parseInt.js create mode 100644 node_modules/lodash/fp/partial.js create mode 100644 node_modules/lodash/fp/partialRight.js create mode 100644 node_modules/lodash/fp/partition.js create mode 100644 node_modules/lodash/fp/path.js create mode 100644 node_modules/lodash/fp/pathEq.js create mode 100644 node_modules/lodash/fp/pathOr.js create mode 100644 node_modules/lodash/fp/paths.js create mode 100644 node_modules/lodash/fp/pick.js create mode 100644 node_modules/lodash/fp/pickAll.js create mode 100644 node_modules/lodash/fp/pickBy.js create mode 100644 node_modules/lodash/fp/pipe.js create mode 100644 node_modules/lodash/fp/placeholder.js create mode 100644 node_modules/lodash/fp/plant.js create mode 100644 node_modules/lodash/fp/pluck.js create mode 100644 node_modules/lodash/fp/prop.js create mode 100644 node_modules/lodash/fp/propEq.js create mode 100644 node_modules/lodash/fp/propOr.js create mode 100644 node_modules/lodash/fp/property.js create mode 100644 node_modules/lodash/fp/propertyOf.js create mode 100644 node_modules/lodash/fp/props.js create mode 100644 node_modules/lodash/fp/pull.js create mode 100644 node_modules/lodash/fp/pullAll.js create mode 100644 node_modules/lodash/fp/pullAllBy.js create mode 100644 node_modules/lodash/fp/pullAllWith.js create mode 100644 node_modules/lodash/fp/pullAt.js create mode 100644 node_modules/lodash/fp/random.js create mode 100644 node_modules/lodash/fp/range.js create mode 100644 node_modules/lodash/fp/rangeRight.js create mode 100644 node_modules/lodash/fp/rangeStep.js create mode 100644 node_modules/lodash/fp/rangeStepRight.js create mode 100644 node_modules/lodash/fp/rearg.js create mode 100644 node_modules/lodash/fp/reduce.js create mode 100644 node_modules/lodash/fp/reduceRight.js create mode 100644 node_modules/lodash/fp/reject.js create mode 100644 node_modules/lodash/fp/remove.js create mode 100644 node_modules/lodash/fp/repeat.js create mode 100644 node_modules/lodash/fp/replace.js create mode 100644 node_modules/lodash/fp/rest.js create mode 100644 node_modules/lodash/fp/restFrom.js create mode 100644 node_modules/lodash/fp/result.js create mode 100644 node_modules/lodash/fp/reverse.js create mode 100644 node_modules/lodash/fp/round.js create mode 100644 node_modules/lodash/fp/sample.js create mode 100644 node_modules/lodash/fp/sampleSize.js create mode 100644 node_modules/lodash/fp/seq.js create mode 100644 node_modules/lodash/fp/set.js create mode 100644 node_modules/lodash/fp/setWith.js create mode 100644 node_modules/lodash/fp/shuffle.js create mode 100644 node_modules/lodash/fp/size.js create mode 100644 node_modules/lodash/fp/slice.js create mode 100644 node_modules/lodash/fp/snakeCase.js create mode 100644 node_modules/lodash/fp/some.js create mode 100644 node_modules/lodash/fp/sortBy.js create mode 100644 node_modules/lodash/fp/sortedIndex.js create mode 100644 node_modules/lodash/fp/sortedIndexBy.js create mode 100644 node_modules/lodash/fp/sortedIndexOf.js create mode 100644 node_modules/lodash/fp/sortedLastIndex.js create mode 100644 node_modules/lodash/fp/sortedLastIndexBy.js create mode 100644 node_modules/lodash/fp/sortedLastIndexOf.js create mode 100644 node_modules/lodash/fp/sortedUniq.js create mode 100644 node_modules/lodash/fp/sortedUniqBy.js create mode 100644 node_modules/lodash/fp/split.js create mode 100644 node_modules/lodash/fp/spread.js create mode 100644 node_modules/lodash/fp/spreadFrom.js create mode 100644 node_modules/lodash/fp/startCase.js create mode 100644 node_modules/lodash/fp/startsWith.js create mode 100644 node_modules/lodash/fp/string.js create mode 100644 node_modules/lodash/fp/stubArray.js create mode 100644 node_modules/lodash/fp/stubFalse.js create mode 100644 node_modules/lodash/fp/stubObject.js create mode 100644 node_modules/lodash/fp/stubString.js create mode 100644 node_modules/lodash/fp/stubTrue.js create mode 100644 node_modules/lodash/fp/subtract.js create mode 100644 node_modules/lodash/fp/sum.js create mode 100644 node_modules/lodash/fp/sumBy.js create mode 100644 node_modules/lodash/fp/symmetricDifference.js create mode 100644 node_modules/lodash/fp/symmetricDifferenceBy.js create mode 100644 node_modules/lodash/fp/symmetricDifferenceWith.js create mode 100644 node_modules/lodash/fp/tail.js create mode 100644 node_modules/lodash/fp/take.js create mode 100644 node_modules/lodash/fp/takeLast.js create mode 100644 node_modules/lodash/fp/takeLastWhile.js create mode 100644 node_modules/lodash/fp/takeRight.js create mode 100644 node_modules/lodash/fp/takeRightWhile.js create mode 100644 node_modules/lodash/fp/takeWhile.js create mode 100644 node_modules/lodash/fp/tap.js create mode 100644 node_modules/lodash/fp/template.js create mode 100644 node_modules/lodash/fp/templateSettings.js create mode 100644 node_modules/lodash/fp/throttle.js create mode 100644 node_modules/lodash/fp/thru.js create mode 100644 node_modules/lodash/fp/times.js create mode 100644 node_modules/lodash/fp/toArray.js create mode 100644 node_modules/lodash/fp/toFinite.js create mode 100644 node_modules/lodash/fp/toInteger.js create mode 100644 node_modules/lodash/fp/toIterator.js create mode 100644 node_modules/lodash/fp/toJSON.js create mode 100644 node_modules/lodash/fp/toLength.js create mode 100644 node_modules/lodash/fp/toLower.js create mode 100644 node_modules/lodash/fp/toNumber.js create mode 100644 node_modules/lodash/fp/toPairs.js create mode 100644 node_modules/lodash/fp/toPairsIn.js create mode 100644 node_modules/lodash/fp/toPath.js create mode 100644 node_modules/lodash/fp/toPlainObject.js create mode 100644 node_modules/lodash/fp/toSafeInteger.js create mode 100644 node_modules/lodash/fp/toString.js create mode 100644 node_modules/lodash/fp/toUpper.js create mode 100644 node_modules/lodash/fp/transform.js create mode 100644 node_modules/lodash/fp/trim.js create mode 100644 node_modules/lodash/fp/trimChars.js create mode 100644 node_modules/lodash/fp/trimCharsEnd.js create mode 100644 node_modules/lodash/fp/trimCharsStart.js create mode 100644 node_modules/lodash/fp/trimEnd.js create mode 100644 node_modules/lodash/fp/trimStart.js create mode 100644 node_modules/lodash/fp/truncate.js create mode 100644 node_modules/lodash/fp/unapply.js create mode 100644 node_modules/lodash/fp/unary.js create mode 100644 node_modules/lodash/fp/unescape.js create mode 100644 node_modules/lodash/fp/union.js create mode 100644 node_modules/lodash/fp/unionBy.js create mode 100644 node_modules/lodash/fp/unionWith.js create mode 100644 node_modules/lodash/fp/uniq.js create mode 100644 node_modules/lodash/fp/uniqBy.js create mode 100644 node_modules/lodash/fp/uniqWith.js create mode 100644 node_modules/lodash/fp/uniqueId.js create mode 100644 node_modules/lodash/fp/unnest.js create mode 100644 node_modules/lodash/fp/unset.js create mode 100644 node_modules/lodash/fp/unzip.js create mode 100644 node_modules/lodash/fp/unzipWith.js create mode 100644 node_modules/lodash/fp/update.js create mode 100644 node_modules/lodash/fp/updateWith.js create mode 100644 node_modules/lodash/fp/upperCase.js create mode 100644 node_modules/lodash/fp/upperFirst.js create mode 100644 node_modules/lodash/fp/useWith.js create mode 100644 node_modules/lodash/fp/util.js create mode 100644 node_modules/lodash/fp/value.js create mode 100644 node_modules/lodash/fp/valueOf.js create mode 100644 node_modules/lodash/fp/values.js create mode 100644 node_modules/lodash/fp/valuesIn.js create mode 100644 node_modules/lodash/fp/where.js create mode 100644 node_modules/lodash/fp/whereEq.js create mode 100644 node_modules/lodash/fp/without.js create mode 100644 node_modules/lodash/fp/words.js create mode 100644 node_modules/lodash/fp/wrap.js create mode 100644 node_modules/lodash/fp/wrapperAt.js create mode 100644 node_modules/lodash/fp/wrapperChain.js create mode 100644 node_modules/lodash/fp/wrapperLodash.js create mode 100644 node_modules/lodash/fp/wrapperReverse.js create mode 100644 node_modules/lodash/fp/wrapperValue.js create mode 100644 node_modules/lodash/fp/xor.js create mode 100644 node_modules/lodash/fp/xorBy.js create mode 100644 node_modules/lodash/fp/xorWith.js create mode 100644 node_modules/lodash/fp/zip.js create mode 100644 node_modules/lodash/fp/zipAll.js create mode 100644 node_modules/lodash/fp/zipObj.js create mode 100644 node_modules/lodash/fp/zipObject.js create mode 100644 node_modules/lodash/fp/zipObjectDeep.js create mode 100644 node_modules/lodash/fp/zipWith.js create mode 100644 node_modules/lodash/fromPairs.js create mode 100644 node_modules/lodash/function.js create mode 100644 node_modules/lodash/functions.js create mode 100644 node_modules/lodash/functionsIn.js create mode 100644 node_modules/lodash/get.js create mode 100644 node_modules/lodash/groupBy.js create mode 100644 node_modules/lodash/gt.js create mode 100644 node_modules/lodash/gte.js create mode 100644 node_modules/lodash/has.js create mode 100644 node_modules/lodash/hasIn.js create mode 100644 node_modules/lodash/head.js create mode 100644 node_modules/lodash/identity.js create mode 100644 node_modules/lodash/inRange.js create mode 100644 node_modules/lodash/includes.js create mode 100644 node_modules/lodash/index.js create mode 100644 node_modules/lodash/indexOf.js create mode 100644 node_modules/lodash/initial.js create mode 100644 node_modules/lodash/intersection.js create mode 100644 node_modules/lodash/intersectionBy.js create mode 100644 node_modules/lodash/intersectionWith.js create mode 100644 node_modules/lodash/invert.js create mode 100644 node_modules/lodash/invertBy.js create mode 100644 node_modules/lodash/invoke.js create mode 100644 node_modules/lodash/invokeMap.js create mode 100644 node_modules/lodash/isArguments.js create mode 100644 node_modules/lodash/isArray.js create mode 100644 node_modules/lodash/isArrayBuffer.js create mode 100644 node_modules/lodash/isArrayLike.js create mode 100644 node_modules/lodash/isArrayLikeObject.js create mode 100644 node_modules/lodash/isBoolean.js create mode 100644 node_modules/lodash/isBuffer.js create mode 100644 node_modules/lodash/isDate.js create mode 100644 node_modules/lodash/isElement.js create mode 100644 node_modules/lodash/isEmpty.js create mode 100644 node_modules/lodash/isEqual.js create mode 100644 node_modules/lodash/isEqualWith.js create mode 100644 node_modules/lodash/isError.js create mode 100644 node_modules/lodash/isFinite.js create mode 100644 node_modules/lodash/isFunction.js create mode 100644 node_modules/lodash/isInteger.js create mode 100644 node_modules/lodash/isLength.js create mode 100644 node_modules/lodash/isMap.js create mode 100644 node_modules/lodash/isMatch.js create mode 100644 node_modules/lodash/isMatchWith.js create mode 100644 node_modules/lodash/isNaN.js create mode 100644 node_modules/lodash/isNative.js create mode 100644 node_modules/lodash/isNil.js create mode 100644 node_modules/lodash/isNull.js create mode 100644 node_modules/lodash/isNumber.js create mode 100644 node_modules/lodash/isObject.js create mode 100644 node_modules/lodash/isObjectLike.js create mode 100644 node_modules/lodash/isPlainObject.js create mode 100644 node_modules/lodash/isRegExp.js create mode 100644 node_modules/lodash/isSafeInteger.js create mode 100644 node_modules/lodash/isSet.js create mode 100644 node_modules/lodash/isString.js create mode 100644 node_modules/lodash/isSymbol.js create mode 100644 node_modules/lodash/isTypedArray.js create mode 100644 node_modules/lodash/isUndefined.js create mode 100644 node_modules/lodash/isWeakMap.js create mode 100644 node_modules/lodash/isWeakSet.js create mode 100644 node_modules/lodash/iteratee.js create mode 100644 node_modules/lodash/join.js create mode 100644 node_modules/lodash/kebabCase.js create mode 100644 node_modules/lodash/keyBy.js create mode 100644 node_modules/lodash/keys.js create mode 100644 node_modules/lodash/keysIn.js create mode 100644 node_modules/lodash/lang.js create mode 100644 node_modules/lodash/last.js create mode 100644 node_modules/lodash/lastIndexOf.js create mode 100644 node_modules/lodash/lodash.js create mode 100644 node_modules/lodash/lodash.min.js create mode 100644 node_modules/lodash/lowerCase.js create mode 100644 node_modules/lodash/lowerFirst.js create mode 100644 node_modules/lodash/lt.js create mode 100644 node_modules/lodash/lte.js create mode 100644 node_modules/lodash/map.js create mode 100644 node_modules/lodash/mapKeys.js create mode 100644 node_modules/lodash/mapValues.js create mode 100644 node_modules/lodash/matches.js create mode 100644 node_modules/lodash/matchesProperty.js create mode 100644 node_modules/lodash/math.js create mode 100644 node_modules/lodash/max.js create mode 100644 node_modules/lodash/maxBy.js create mode 100644 node_modules/lodash/mean.js create mode 100644 node_modules/lodash/meanBy.js create mode 100644 node_modules/lodash/memoize.js create mode 100644 node_modules/lodash/merge.js create mode 100644 node_modules/lodash/mergeWith.js create mode 100644 node_modules/lodash/method.js create mode 100644 node_modules/lodash/methodOf.js create mode 100644 node_modules/lodash/min.js create mode 100644 node_modules/lodash/minBy.js create mode 100644 node_modules/lodash/mixin.js create mode 100644 node_modules/lodash/multiply.js create mode 100644 node_modules/lodash/negate.js create mode 100644 node_modules/lodash/next.js create mode 100644 node_modules/lodash/noop.js create mode 100644 node_modules/lodash/now.js create mode 100644 node_modules/lodash/nth.js create mode 100644 node_modules/lodash/nthArg.js create mode 100644 node_modules/lodash/number.js create mode 100644 node_modules/lodash/object.js create mode 100644 node_modules/lodash/omit.js create mode 100644 node_modules/lodash/omitBy.js create mode 100644 node_modules/lodash/once.js create mode 100644 node_modules/lodash/orderBy.js create mode 100644 node_modules/lodash/over.js create mode 100644 node_modules/lodash/overArgs.js create mode 100644 node_modules/lodash/overEvery.js create mode 100644 node_modules/lodash/overSome.js create mode 100644 node_modules/lodash/package.json create mode 100644 node_modules/lodash/pad.js create mode 100644 node_modules/lodash/padEnd.js create mode 100644 node_modules/lodash/padStart.js create mode 100644 node_modules/lodash/parseInt.js create mode 100644 node_modules/lodash/partial.js create mode 100644 node_modules/lodash/partialRight.js create mode 100644 node_modules/lodash/partition.js create mode 100644 node_modules/lodash/pick.js create mode 100644 node_modules/lodash/pickBy.js create mode 100644 node_modules/lodash/plant.js create mode 100644 node_modules/lodash/property.js create mode 100644 node_modules/lodash/propertyOf.js create mode 100644 node_modules/lodash/pull.js create mode 100644 node_modules/lodash/pullAll.js create mode 100644 node_modules/lodash/pullAllBy.js create mode 100644 node_modules/lodash/pullAllWith.js create mode 100644 node_modules/lodash/pullAt.js create mode 100644 node_modules/lodash/random.js create mode 100644 node_modules/lodash/range.js create mode 100644 node_modules/lodash/rangeRight.js create mode 100644 node_modules/lodash/rearg.js create mode 100644 node_modules/lodash/reduce.js create mode 100644 node_modules/lodash/reduceRight.js create mode 100644 node_modules/lodash/reject.js create mode 100644 node_modules/lodash/release.md create mode 100644 node_modules/lodash/remove.js create mode 100644 node_modules/lodash/repeat.js create mode 100644 node_modules/lodash/replace.js create mode 100644 node_modules/lodash/rest.js create mode 100644 node_modules/lodash/result.js create mode 100644 node_modules/lodash/reverse.js create mode 100644 node_modules/lodash/round.js create mode 100644 node_modules/lodash/sample.js create mode 100644 node_modules/lodash/sampleSize.js create mode 100644 node_modules/lodash/seq.js create mode 100644 node_modules/lodash/set.js create mode 100644 node_modules/lodash/setWith.js create mode 100644 node_modules/lodash/shuffle.js create mode 100644 node_modules/lodash/size.js create mode 100644 node_modules/lodash/slice.js create mode 100644 node_modules/lodash/snakeCase.js create mode 100644 node_modules/lodash/some.js create mode 100644 node_modules/lodash/sortBy.js create mode 100644 node_modules/lodash/sortedIndex.js create mode 100644 node_modules/lodash/sortedIndexBy.js create mode 100644 node_modules/lodash/sortedIndexOf.js create mode 100644 node_modules/lodash/sortedLastIndex.js create mode 100644 node_modules/lodash/sortedLastIndexBy.js create mode 100644 node_modules/lodash/sortedLastIndexOf.js create mode 100644 node_modules/lodash/sortedUniq.js create mode 100644 node_modules/lodash/sortedUniqBy.js create mode 100644 node_modules/lodash/split.js create mode 100644 node_modules/lodash/spread.js create mode 100644 node_modules/lodash/startCase.js create mode 100644 node_modules/lodash/startsWith.js create mode 100644 node_modules/lodash/string.js create mode 100644 node_modules/lodash/stubArray.js create mode 100644 node_modules/lodash/stubFalse.js create mode 100644 node_modules/lodash/stubObject.js create mode 100644 node_modules/lodash/stubString.js create mode 100644 node_modules/lodash/stubTrue.js create mode 100644 node_modules/lodash/subtract.js create mode 100644 node_modules/lodash/sum.js create mode 100644 node_modules/lodash/sumBy.js create mode 100644 node_modules/lodash/tail.js create mode 100644 node_modules/lodash/take.js create mode 100644 node_modules/lodash/takeRight.js create mode 100644 node_modules/lodash/takeRightWhile.js create mode 100644 node_modules/lodash/takeWhile.js create mode 100644 node_modules/lodash/tap.js create mode 100644 node_modules/lodash/template.js create mode 100644 node_modules/lodash/templateSettings.js create mode 100644 node_modules/lodash/throttle.js create mode 100644 node_modules/lodash/thru.js create mode 100644 node_modules/lodash/times.js create mode 100644 node_modules/lodash/toArray.js create mode 100644 node_modules/lodash/toFinite.js create mode 100644 node_modules/lodash/toInteger.js create mode 100644 node_modules/lodash/toIterator.js create mode 100644 node_modules/lodash/toJSON.js create mode 100644 node_modules/lodash/toLength.js create mode 100644 node_modules/lodash/toLower.js create mode 100644 node_modules/lodash/toNumber.js create mode 100644 node_modules/lodash/toPairs.js create mode 100644 node_modules/lodash/toPairsIn.js create mode 100644 node_modules/lodash/toPath.js create mode 100644 node_modules/lodash/toPlainObject.js create mode 100644 node_modules/lodash/toSafeInteger.js create mode 100644 node_modules/lodash/toString.js create mode 100644 node_modules/lodash/toUpper.js create mode 100644 node_modules/lodash/transform.js create mode 100644 node_modules/lodash/trim.js create mode 100644 node_modules/lodash/trimEnd.js create mode 100644 node_modules/lodash/trimStart.js create mode 100644 node_modules/lodash/truncate.js create mode 100644 node_modules/lodash/unary.js create mode 100644 node_modules/lodash/unescape.js create mode 100644 node_modules/lodash/union.js create mode 100644 node_modules/lodash/unionBy.js create mode 100644 node_modules/lodash/unionWith.js create mode 100644 node_modules/lodash/uniq.js create mode 100644 node_modules/lodash/uniqBy.js create mode 100644 node_modules/lodash/uniqWith.js create mode 100644 node_modules/lodash/uniqueId.js create mode 100644 node_modules/lodash/unset.js create mode 100644 node_modules/lodash/unzip.js create mode 100644 node_modules/lodash/unzipWith.js create mode 100644 node_modules/lodash/update.js create mode 100644 node_modules/lodash/updateWith.js create mode 100644 node_modules/lodash/upperCase.js create mode 100644 node_modules/lodash/upperFirst.js create mode 100644 node_modules/lodash/util.js create mode 100644 node_modules/lodash/value.js create mode 100644 node_modules/lodash/valueOf.js create mode 100644 node_modules/lodash/values.js create mode 100644 node_modules/lodash/valuesIn.js create mode 100644 node_modules/lodash/without.js create mode 100644 node_modules/lodash/words.js create mode 100644 node_modules/lodash/wrap.js create mode 100644 node_modules/lodash/wrapperAt.js create mode 100644 node_modules/lodash/wrapperChain.js create mode 100644 node_modules/lodash/wrapperLodash.js create mode 100644 node_modules/lodash/wrapperReverse.js create mode 100644 node_modules/lodash/wrapperValue.js create mode 100644 node_modules/lodash/xor.js create mode 100644 node_modules/lodash/xorBy.js create mode 100644 node_modules/lodash/xorWith.js create mode 100644 node_modules/lodash/zip.js create mode 100644 node_modules/lodash/zipObject.js create mode 100644 node_modules/lodash/zipObjectDeep.js create mode 100644 node_modules/lodash/zipWith.js create mode 100644 node_modules/prettier-plugin-java/LICENSE create mode 100644 node_modules/prettier-plugin-java/README.md create mode 100644 node_modules/prettier-plugin-java/dist/base-cst-printer.js create mode 100644 node_modules/prettier-plugin-java/dist/cst-printer.js create mode 100644 node_modules/prettier-plugin-java/dist/index.js create mode 100644 node_modules/prettier-plugin-java/dist/options.js create mode 100644 node_modules/prettier-plugin-java/dist/parser.js create mode 100644 node_modules/prettier-plugin-java/dist/printer.js create mode 100644 node_modules/prettier-plugin-java/dist/printers/arrays.js create mode 100644 node_modules/prettier-plugin-java/dist/printers/blocks-and-statements.js create mode 100644 node_modules/prettier-plugin-java/dist/printers/classes.js create mode 100644 node_modules/prettier-plugin-java/dist/printers/comments/comments-utils.js create mode 100644 node_modules/prettier-plugin-java/dist/printers/comments/format-comments.js create mode 100644 node_modules/prettier-plugin-java/dist/printers/comments/handle-comments.js create mode 100644 node_modules/prettier-plugin-java/dist/printers/expressions.js create mode 100644 node_modules/prettier-plugin-java/dist/printers/interfaces.js create mode 100644 node_modules/prettier-plugin-java/dist/printers/lexical-structure.js create mode 100644 node_modules/prettier-plugin-java/dist/printers/names.js create mode 100644 node_modules/prettier-plugin-java/dist/printers/packages-and-modules.js create mode 100644 node_modules/prettier-plugin-java/dist/printers/prettier-builder.js create mode 100644 node_modules/prettier-plugin-java/dist/printers/printer-utils.js create mode 100644 node_modules/prettier-plugin-java/dist/printers/types-values-and-variables.js create mode 100644 node_modules/prettier-plugin-java/dist/types/utils.js create mode 100644 node_modules/prettier-plugin-java/dist/utils/index.js create mode 100644 node_modules/prettier-plugin-java/dist/utils/isEmptyDoc.js create mode 100644 node_modules/prettier-plugin-java/dist/utils/printArgumentListWithBraces.js create mode 120000 node_modules/prettier-plugin-java/node_modules/.bin/prettier create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/LICENSE create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/README.md create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/doc.d.ts create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/doc.js create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/doc.mjs create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/index.cjs create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/index.d.ts create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/index.mjs create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/internal/cli.mjs create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/package.json create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/acorn.d.ts create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/acorn.js create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/acorn.mjs create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/angular.d.ts create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/angular.js create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/angular.mjs create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/babel.d.ts create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/babel.js create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/babel.mjs create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/estree.d.ts create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/estree.js create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/estree.mjs create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/flow.d.ts create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/flow.js create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/flow.mjs create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/glimmer.d.ts create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/glimmer.js create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/glimmer.mjs create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/graphql.d.ts create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/graphql.js create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/graphql.mjs create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/html.d.ts create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/html.js create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/html.mjs create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/markdown.d.ts create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/markdown.js create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/markdown.mjs create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/meriyah.d.ts create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/meriyah.js create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/meriyah.mjs create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/postcss.d.ts create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/postcss.js create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/postcss.mjs create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/typescript.d.ts create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/typescript.js create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/typescript.mjs create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/yaml.d.ts create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/yaml.js create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/plugins/yaml.mjs create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/standalone.d.ts create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/standalone.js create mode 100644 node_modules/prettier-plugin-java/node_modules/prettier/standalone.mjs create mode 100644 node_modules/prettier-plugin-java/package.json create mode 100644 node_modules/prettier/LICENSE create mode 100644 node_modules/prettier/README.md create mode 100644 node_modules/prettier/doc.d.ts create mode 100644 node_modules/prettier/doc.js create mode 100644 node_modules/prettier/doc.mjs create mode 100644 node_modules/prettier/index.cjs create mode 100644 node_modules/prettier/index.d.ts create mode 100644 node_modules/prettier/index.mjs create mode 100644 node_modules/prettier/internal/cli.mjs create mode 100644 node_modules/prettier/package.json create mode 100644 node_modules/prettier/plugins/acorn.d.ts create mode 100644 node_modules/prettier/plugins/acorn.js create mode 100644 node_modules/prettier/plugins/acorn.mjs create mode 100644 node_modules/prettier/plugins/angular.d.ts create mode 100644 node_modules/prettier/plugins/angular.js create mode 100644 node_modules/prettier/plugins/angular.mjs create mode 100644 node_modules/prettier/plugins/babel.d.ts create mode 100644 node_modules/prettier/plugins/babel.js create mode 100644 node_modules/prettier/plugins/babel.mjs create mode 100644 node_modules/prettier/plugins/estree.d.ts create mode 100644 node_modules/prettier/plugins/estree.js create mode 100644 node_modules/prettier/plugins/estree.mjs create mode 100644 node_modules/prettier/plugins/flow.d.ts create mode 100644 node_modules/prettier/plugins/flow.js create mode 100644 node_modules/prettier/plugins/flow.mjs create mode 100644 node_modules/prettier/plugins/glimmer.d.ts create mode 100644 node_modules/prettier/plugins/glimmer.js create mode 100644 node_modules/prettier/plugins/glimmer.mjs create mode 100644 node_modules/prettier/plugins/graphql.d.ts create mode 100644 node_modules/prettier/plugins/graphql.js create mode 100644 node_modules/prettier/plugins/graphql.mjs create mode 100644 node_modules/prettier/plugins/html.d.ts create mode 100644 node_modules/prettier/plugins/html.js create mode 100644 node_modules/prettier/plugins/html.mjs create mode 100644 node_modules/prettier/plugins/markdown.d.ts create mode 100644 node_modules/prettier/plugins/markdown.js create mode 100644 node_modules/prettier/plugins/markdown.mjs create mode 100644 node_modules/prettier/plugins/meriyah.d.ts create mode 100644 node_modules/prettier/plugins/meriyah.js create mode 100644 node_modules/prettier/plugins/meriyah.mjs create mode 100644 node_modules/prettier/plugins/postcss.d.ts create mode 100644 node_modules/prettier/plugins/postcss.js create mode 100644 node_modules/prettier/plugins/postcss.mjs create mode 100644 node_modules/prettier/plugins/typescript.d.ts create mode 100644 node_modules/prettier/plugins/typescript.js create mode 100644 node_modules/prettier/plugins/typescript.mjs create mode 100644 node_modules/prettier/plugins/yaml.d.ts create mode 100644 node_modules/prettier/plugins/yaml.js create mode 100644 node_modules/prettier/plugins/yaml.mjs create mode 100644 node_modules/prettier/standalone.d.ts create mode 100644 node_modules/prettier/standalone.js create mode 100644 node_modules/prettier/standalone.mjs diff --git a/node_modules/.bin/prettier b/node_modules/.bin/prettier new file mode 120000 index 0000000..92267ed --- /dev/null +++ b/node_modules/.bin/prettier @@ -0,0 +1 @@ +../prettier/bin/prettier.cjs \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 0000000..7d092c0 --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,137 @@ +{ + "name": "2024-rewrite", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "node_modules/@chevrotain/cst-dts-gen": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@chevrotain/cst-dts-gen/-/cst-dts-gen-11.0.3.tgz", + "integrity": "sha512-BvIKpRLeS/8UbfxXxgC33xOumsacaeCKAjAeLyOn7Pcp95HiRbrpl14S+9vaZLolnbssPIUuiUd8IvgkRyt6NQ==", + "dev": true, + "dependencies": { + "@chevrotain/gast": "11.0.3", + "@chevrotain/types": "11.0.3", + "lodash-es": "4.17.21" + } + }, + "node_modules/@chevrotain/gast": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@chevrotain/gast/-/gast-11.0.3.tgz", + "integrity": "sha512-+qNfcoNk70PyS/uxmj3li5NiECO+2YKZZQMbmjTqRI3Qchu8Hig/Q9vgkHpI3alNjr7M+a2St5pw5w5F6NL5/Q==", + "dev": true, + "dependencies": { + "@chevrotain/types": "11.0.3", + "lodash-es": "4.17.21" + } + }, + "node_modules/@chevrotain/regexp-to-ast": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@chevrotain/regexp-to-ast/-/regexp-to-ast-11.0.3.tgz", + "integrity": "sha512-1fMHaBZxLFvWI067AVbGJav1eRY7N8DDvYCTwGBiE/ytKBgP8azTdgyrKyWZ9Mfh09eHWb5PgTSO8wi7U824RA==", + "dev": true + }, + "node_modules/@chevrotain/types": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@chevrotain/types/-/types-11.0.3.tgz", + "integrity": "sha512-gsiM3G8b58kZC2HaWR50gu6Y1440cHiJ+i3JUvcp/35JchYejb2+5MVeJK0iKThYpAa/P2PYFV4hoi44HD+aHQ==", + "dev": true + }, + "node_modules/@chevrotain/utils": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@chevrotain/utils/-/utils-11.0.3.tgz", + "integrity": "sha512-YslZMgtJUyuMbZ+aKvfF3x1f5liK4mWNxghFRv7jqRR9C3R3fAOGTTKvxXDa2Y1s9zSbcpuO0cAxDYsc9SrXoQ==", + "dev": true + }, + "node_modules/chevrotain": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-11.0.3.tgz", + "integrity": "sha512-ci2iJH6LeIkvP9eJW6gpueU8cnZhv85ELY8w8WiFtNjMHA5ad6pQLaJo9mEly/9qUyCpvqX8/POVUTf18/HFdw==", + "dev": true, + "dependencies": { + "@chevrotain/cst-dts-gen": "11.0.3", + "@chevrotain/gast": "11.0.3", + "@chevrotain/regexp-to-ast": "11.0.3", + "@chevrotain/types": "11.0.3", + "@chevrotain/utils": "11.0.3", + "lodash-es": "4.17.21" + } + }, + "node_modules/chevrotain-allstar": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/chevrotain-allstar/-/chevrotain-allstar-0.3.1.tgz", + "integrity": "sha512-b7g+y9A0v4mxCW1qUhf3BSVPg+/NvGErk/dOkrDaHA0nQIQGAtrOjlX//9OQtRlSCy+x9rfB5N8yC71lH1nvMw==", + "dev": true, + "dependencies": { + "lodash-es": "^4.17.21" + }, + "peerDependencies": { + "chevrotain": "^11.0.0" + } + }, + "node_modules/java-parser": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/java-parser/-/java-parser-2.3.2.tgz", + "integrity": "sha512-/O42UbEHy3VVJw8W0ruHkQjW75oWvQx4QisoUDRIGir6q3/IZ4JslDMPMYEqp7LU56PYJkH5uXdQiBaCXt/Opw==", + "dev": true, + "dependencies": { + "chevrotain": "11.0.3", + "chevrotain-allstar": "0.3.1", + "lodash": "4.17.21" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lodash-es": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", + "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==", + "dev": true + }, + "node_modules/prettier": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", + "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-plugin-java": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/prettier-plugin-java/-/prettier-plugin-java-2.6.5.tgz", + "integrity": "sha512-2RkPNXyYpP5dRhr04pz45n+e5LXwYWTh1JXrztiCkZTGGokIGYrfwUuGa8csnDoGbP6CDPgVm8zZSIm/9I0SRQ==", + "dev": true, + "dependencies": { + "java-parser": "2.3.2", + "lodash": "4.17.21", + "prettier": "3.2.5" + } + }, + "node_modules/prettier-plugin-java/node_modules/prettier": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + } + } +} diff --git a/node_modules/@chevrotain/cst-dts-gen/LICENSE.txt b/node_modules/@chevrotain/cst-dts-gen/LICENSE.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/node_modules/@chevrotain/cst-dts-gen/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@chevrotain/cst-dts-gen/lib/src/api.d.ts b/node_modules/@chevrotain/cst-dts-gen/lib/src/api.d.ts new file mode 100644 index 0000000..2ff0320 --- /dev/null +++ b/node_modules/@chevrotain/cst-dts-gen/lib/src/api.d.ts @@ -0,0 +1,2 @@ +import { GenerateDtsOptions, Rule } from "@chevrotain/types"; +export declare function generateCstDts(productions: Record, options?: GenerateDtsOptions): string; diff --git a/node_modules/@chevrotain/cst-dts-gen/lib/src/api.js b/node_modules/@chevrotain/cst-dts-gen/lib/src/api.js new file mode 100644 index 0000000..9df31a6 --- /dev/null +++ b/node_modules/@chevrotain/cst-dts-gen/lib/src/api.js @@ -0,0 +1,12 @@ +import { buildModel } from "./model.js"; +import { genDts } from "./generate.js"; +const defaultOptions = { + includeVisitorInterface: true, + visitorInterfaceName: "ICstNodeVisitor", +}; +export function generateCstDts(productions, options) { + const effectiveOptions = Object.assign(Object.assign({}, defaultOptions), options); + const model = buildModel(productions); + return genDts(model, effectiveOptions); +} +//# sourceMappingURL=api.js.map \ No newline at end of file diff --git a/node_modules/@chevrotain/cst-dts-gen/lib/src/api.js.map b/node_modules/@chevrotain/cst-dts-gen/lib/src/api.js.map new file mode 100644 index 0000000..d0a2b9b --- /dev/null +++ b/node_modules/@chevrotain/cst-dts-gen/lib/src/api.js.map @@ -0,0 +1 @@ +{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/api.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,MAAM,cAAc,GAAiC;IACnD,uBAAuB,EAAE,IAAI;IAC7B,oBAAoB,EAAE,iBAAiB;CACxC,CAAC;AAEF,MAAM,UAAU,cAAc,CAC5B,WAAiC,EACjC,OAA4B;IAE5B,MAAM,gBAAgB,mCACjB,cAAc,GACd,OAAO,CACX,CAAC;IAEF,MAAM,KAAK,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IAEtC,OAAO,MAAM,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;AACzC,CAAC"} \ No newline at end of file diff --git a/node_modules/@chevrotain/cst-dts-gen/lib/src/generate.d.ts b/node_modules/@chevrotain/cst-dts-gen/lib/src/generate.d.ts new file mode 100644 index 0000000..59b01c9 --- /dev/null +++ b/node_modules/@chevrotain/cst-dts-gen/lib/src/generate.d.ts @@ -0,0 +1,3 @@ +import { GenerateDtsOptions } from "@chevrotain/types"; +import { CstNodeTypeDefinition } from "./model.js"; +export declare function genDts(model: CstNodeTypeDefinition[], options: Required): string; diff --git a/node_modules/@chevrotain/cst-dts-gen/lib/src/generate.js b/node_modules/@chevrotain/cst-dts-gen/lib/src/generate.js new file mode 100644 index 0000000..e39b23e --- /dev/null +++ b/node_modules/@chevrotain/cst-dts-gen/lib/src/generate.js @@ -0,0 +1,65 @@ +import { flatten, isArray, map, reduce, uniq, upperFirst } from "lodash-es"; +export function genDts(model, options) { + let contentParts = []; + contentParts = contentParts.concat(`import type { CstNode, ICstVisitor, IToken } from "chevrotain";`); + contentParts = contentParts.concat(flatten(map(model, (node) => genCstNodeTypes(node)))); + if (options.includeVisitorInterface) { + contentParts = contentParts.concat(genVisitor(options.visitorInterfaceName, model)); + } + return contentParts.join("\n\n") + "\n"; +} +function genCstNodeTypes(node) { + const nodeCstInterface = genNodeInterface(node); + const nodeChildrenInterface = genNodeChildrenType(node); + return [nodeCstInterface, nodeChildrenInterface]; +} +function genNodeInterface(node) { + const nodeInterfaceName = getNodeInterfaceName(node.name); + const childrenTypeName = getNodeChildrenTypeName(node.name); + return `export interface ${nodeInterfaceName} extends CstNode { + name: "${node.name}"; + children: ${childrenTypeName}; +}`; +} +function genNodeChildrenType(node) { + const typeName = getNodeChildrenTypeName(node.name); + return `export type ${typeName} = { + ${map(node.properties, (property) => genChildProperty(property)).join("\n ")} +};`; +} +function genChildProperty(prop) { + const typeName = buildTypeString(prop.type); + return `${prop.name}${prop.optional ? "?" : ""}: ${typeName}[];`; +} +function genVisitor(name, nodes) { + return `export interface ${name} extends ICstVisitor { + ${map(nodes, (node) => genVisitorFunction(node)).join("\n ")} +}`; +} +function genVisitorFunction(node) { + const childrenTypeName = getNodeChildrenTypeName(node.name); + return `${node.name}(children: ${childrenTypeName}, param?: IN): OUT;`; +} +function buildTypeString(type) { + if (isArray(type)) { + const typeNames = uniq(map(type, (t) => getTypeString(t))); + const typeString = reduce(typeNames, (sum, t) => sum + " | " + t); + return "(" + typeString + ")"; + } + else { + return getTypeString(type); + } +} +function getTypeString(type) { + if (type.kind === "token") { + return "IToken"; + } + return getNodeInterfaceName(type.name); +} +function getNodeInterfaceName(ruleName) { + return upperFirst(ruleName) + "CstNode"; +} +function getNodeChildrenTypeName(ruleName) { + return upperFirst(ruleName) + "CstChildren"; +} +//# sourceMappingURL=generate.js.map \ No newline at end of file diff --git a/node_modules/@chevrotain/cst-dts-gen/lib/src/generate.js.map b/node_modules/@chevrotain/cst-dts-gen/lib/src/generate.js.map new file mode 100644 index 0000000..8bcce3d --- /dev/null +++ b/node_modules/@chevrotain/cst-dts-gen/lib/src/generate.js.map @@ -0,0 +1 @@ +{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../src/generate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EA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,SAAS,aAAa,CAAC,IAAoC;IACzD,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE;QACzB,OAAO,QAAQ,CAAC;KACjB;IACD,OAAO,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACzC,CAAC;AAED,SAAS,oBAAoB,CAAC,QAAgB;IAC5C,OAAO,UAAU,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC;AAC1C,CAAC;AAED,SAAS,uBAAuB,CAAC,QAAgB;IAC/C,OAAO,UAAU,CAAC,QAAQ,CAAC,GAAG,aAAa,CAAC;AAC9C,CAAC"} \ No newline at end of file diff --git a/node_modules/@chevrotain/cst-dts-gen/lib/src/model.d.ts b/node_modules/@chevrotain/cst-dts-gen/lib/src/model.d.ts new file mode 100644 index 0000000..a1f3389 --- /dev/null +++ b/node_modules/@chevrotain/cst-dts-gen/lib/src/model.d.ts @@ -0,0 +1,19 @@ +import type { Rule } from "@chevrotain/types"; +export declare function buildModel(productions: Record): CstNodeTypeDefinition[]; +export type CstNodeTypeDefinition = { + name: string; + properties: PropertyTypeDefinition[]; +}; +export type PropertyTypeDefinition = { + name: string; + type: PropertyArrayType; + optional: boolean; +}; +export type PropertyArrayType = TokenArrayType | RuleArrayType | (TokenArrayType | RuleArrayType)[]; +export type TokenArrayType = { + kind: "token"; +}; +export type RuleArrayType = { + kind: "rule"; + name: string; +}; diff --git a/node_modules/@chevrotain/cst-dts-gen/lib/src/model.js b/node_modules/@chevrotain/cst-dts-gen/lib/src/model.js new file mode 100644 index 0000000..406ed50 --- /dev/null +++ b/node_modules/@chevrotain/cst-dts-gen/lib/src/model.js @@ -0,0 +1,96 @@ +import { GAstVisitor, NonTerminal } from "@chevrotain/gast"; +import { assign, flatten, groupBy, map, some, values } from "lodash-es"; +export function buildModel(productions) { + const generator = new CstNodeDefinitionGenerator(); + const allRules = values(productions); + return map(allRules, (rule) => generator.visitRule(rule)); +} +class CstNodeDefinitionGenerator extends GAstVisitor { + visitRule(node) { + const rawElements = this.visitEach(node.definition); + const grouped = groupBy(rawElements, (el) => el.propertyName); + const properties = map(grouped, (group, propertyName) => { + const allNullable = !some(group, (el) => !el.canBeNull); + // In an alternation with a label a property name can have + // multiple types. + let propertyType = group[0].type; + if (group.length > 1) { + propertyType = map(group, (g) => g.type); + } + return { + name: propertyName, + type: propertyType, + optional: allNullable, + }; + }); + return { + name: node.name, + properties: properties, + }; + } + visitAlternative(node) { + return this.visitEachAndOverrideWith(node.definition, { canBeNull: true }); + } + visitOption(node) { + return this.visitEachAndOverrideWith(node.definition, { canBeNull: true }); + } + visitRepetition(node) { + return this.visitEachAndOverrideWith(node.definition, { canBeNull: true }); + } + visitRepetitionMandatory(node) { + return this.visitEach(node.definition); + } + visitRepetitionMandatoryWithSeparator(node) { + return this.visitEach(node.definition).concat({ + propertyName: node.separator.name, + canBeNull: true, + type: getType(node.separator), + }); + } + visitRepetitionWithSeparator(node) { + return this.visitEachAndOverrideWith(node.definition, { + canBeNull: true, + }).concat({ + propertyName: node.separator.name, + canBeNull: true, + type: getType(node.separator), + }); + } + visitAlternation(node) { + return this.visitEachAndOverrideWith(node.definition, { canBeNull: true }); + } + visitTerminal(node) { + return [ + { + propertyName: node.label || node.terminalType.name, + canBeNull: false, + type: getType(node), + }, + ]; + } + visitNonTerminal(node) { + return [ + { + propertyName: node.label || node.nonTerminalName, + canBeNull: false, + type: getType(node), + }, + ]; + } + visitEachAndOverrideWith(definition, override) { + return map(this.visitEach(definition), (definition) => assign({}, definition, override)); + } + visitEach(definition) { + return flatten(map(definition, (definition) => this.visit(definition))); + } +} +function getType(production) { + if (production instanceof NonTerminal) { + return { + kind: "rule", + name: production.referencedRule.name, + }; + } + return { kind: "token" }; +} +//# sourceMappingURL=model.js.map \ No newline at end of file diff --git a/node_modules/@chevrotain/cst-dts-gen/lib/src/model.js.map b/node_modules/@chevrotain/cst-dts-gen/lib/src/model.js.map new file mode 100644 index 0000000..72886ad --- /dev/null +++ b/node_modules/@chevrotain/cst-d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AAO,EAAE,CAAC;AAC3B,CAAC"} \ No newline at end of file diff --git a/node_modules/@chevrotain/cst-dts-gen/package.json b/node_modules/@chevrotain/cst-dts-gen/package.json new file mode 100644 index 0000000..205b4e5 --- /dev/null +++ b/node_modules/@chevrotain/cst-dts-gen/package.json @@ -0,0 +1,50 @@ +{ + "name": "@chevrotain/cst-dts-gen", + "version": "11.0.3", + "description": "Generates type definitions for Chevrotain CST nodes", + "keywords": [], + "bugs": { + "url": "https://github.com/Chevrotain/chevrotain/issues" + }, + "license": "Apache-2.0", + "type": "module", + "types": "./lib/src/api.d.ts", + "exports": { + ".": { + "import": "./lib/src/api.js", + "types": "./lib/src/api.d.ts" + } + }, + "files": [ + "lib/src/**/*.js", + "lib/src/**/*.map", + "lib/src/**/*.d.ts", + "src/**/*.ts" + ], + "repository": { + "type": "git", + "url": "git://github.com/Chevrotain/chevrotain.git" + }, + "scripts": { + "---------- CI FLOWS --------": "", + "ci": "pnpm run build test", + "build": "npm-run-all clean compile", + "test": "echo \"tests are in a different package\"", + "---------- BUILD STEPS --------": "", + "clean": "shx rm -rf lib", + "compile:watch": "tsc -w", + "compile": "tsc" + }, + "dependencies": { + "@chevrotain/gast": "11.0.3", + "@chevrotain/types": "11.0.3", + "lodash-es": "4.17.21" + }, + "devDependencies": { + "@types/lodash-es": "4.17.7" + }, + "publishConfig": { + "access": "public" + }, + "gitHead": "ac5806631779035c2c1955744a47d8ed4f25a175" +} diff --git a/node_modules/@chevrotain/cst-dts-gen/src/api.ts b/node_modules/@chevrotain/cst-dts-gen/src/api.ts new file mode 100644 index 0000000..c5023cc --- /dev/null +++ b/node_modules/@chevrotain/cst-dts-gen/src/api.ts @@ -0,0 +1,22 @@ +import { GenerateDtsOptions, Rule } from "@chevrotain/types"; +import { buildModel } from "./model.js"; +import { genDts } from "./generate.js"; + +const defaultOptions: Required = { + includeVisitorInterface: true, + visitorInterfaceName: "ICstNodeVisitor", +}; + +export function generateCstDts( + productions: Record, + options?: GenerateDtsOptions, +): string { + const effectiveOptions = { + ...defaultOptions, + ...options, + }; + + const model = buildModel(productions); + + return genDts(model, effectiveOptions); +} diff --git a/node_modules/@chevrotain/cst-dts-gen/src/generate.ts b/node_modules/@chevrotain/cst-dts-gen/src/generate.ts new file mode 100644 index 0000000..f7dc206 --- /dev/null +++ b/node_modules/@chevrotain/cst-dts-gen/src/generate.ts @@ -0,0 +1,98 @@ +import { flatten, isArray, map, reduce, uniq, upperFirst } from "lodash-es"; +import { GenerateDtsOptions } from "@chevrotain/types"; +import { + CstNodeTypeDefinition, + PropertyArrayType, + PropertyTypeDefinition, + RuleArrayType, + TokenArrayType, +} from "./model.js"; + +export function genDts( + model: CstNodeTypeDefinition[], + options: Required, +): string { + let contentParts: string[] = []; + + contentParts = contentParts.concat( + `import type { CstNode, ICstVisitor, IToken } from "chevrotain";`, + ); + + contentParts = contentParts.concat( + flatten(map(model, (node) => genCstNodeTypes(node))), + ); + + if (options.includeVisitorInterface) { + contentParts = contentParts.concat( + genVisitor(options.visitorInterfaceName, model), + ); + } + + return contentParts.join("\n\n") + "\n"; +} + +function genCstNodeTypes(node: CstNodeTypeDefinition) { + const nodeCstInterface = genNodeInterface(node); + const nodeChildrenInterface = genNodeChildrenType(node); + + return [nodeCstInterface, nodeChildrenInterface]; +} + +function genNodeInterface(node: CstNodeTypeDefinition) { + const nodeInterfaceName = getNodeInterfaceName(node.name); + const childrenTypeName = getNodeChildrenTypeName(node.name); + + return `export interface ${nodeInterfaceName} extends CstNode { + name: "${node.name}"; + children: ${childrenTypeName}; +}`; +} + +function genNodeChildrenType(node: CstNodeTypeDefinition) { + const typeName = getNodeChildrenTypeName(node.name); + + return `export type ${typeName} = { + ${map(node.properties, (property) => genChildProperty(property)).join("\n ")} +};`; +} + +function genChildProperty(prop: PropertyTypeDefinition) { + const typeName = buildTypeString(prop.type); + return `${prop.name}${prop.optional ? "?" : ""}: ${typeName}[];`; +} + +function genVisitor(name: string, nodes: CstNodeTypeDefinition[]) { + return `export interface ${name} extends ICstVisitor { + ${map(nodes, (node) => genVisitorFunction(node)).join("\n ")} +}`; +} + +function genVisitorFunction(node: CstNodeTypeDefinition) { + const childrenTypeName = getNodeChildrenTypeName(node.name); + return `${node.name}(children: ${childrenTypeName}, param?: IN): OUT;`; +} + +function buildTypeString(type: PropertyArrayType) { + if (isArray(type)) { + const typeNames = uniq(map(type, (t) => getTypeString(t))); + const typeString = reduce(typeNames, (sum, t) => sum + " | " + t); + return "(" + typeString + ")"; + } else { + return getTypeString(type); + } +} + +function getTypeString(type: TokenArrayType | RuleArrayType) { + if (type.kind === "token") { + return "IToken"; + } + return getNodeInterfaceName(type.name); +} + +function getNodeInterfaceName(ruleName: string) { + return upperFirst(ruleName) + "CstNode"; +} + +function getNodeChildrenTypeName(ruleName: string) { + return upperFirst(ruleName) + "CstChildren"; +} diff --git a/node_modules/@chevrotain/cst-dts-gen/src/model.ts b/node_modules/@chevrotain/cst-dts-gen/src/model.ts new file mode 100644 index 0000000..47f48e9 --- /dev/null +++ b/node_modules/@chevrotain/cst-dts-gen/src/model.ts @@ -0,0 +1,172 @@ +import type { + Alternation, + Alternative, + IProduction, + Option, + Repetition, + RepetitionMandatory, + RepetitionMandatoryWithSeparator, + RepetitionWithSeparator, + Rule, + Terminal, + TokenType, +} from "@chevrotain/types"; +import { GAstVisitor, NonTerminal } from "@chevrotain/gast"; +import { assign, flatten, groupBy, map, some, values } from "lodash-es"; + +export function buildModel( + productions: Record, +): CstNodeTypeDefinition[] { + const generator = new CstNodeDefinitionGenerator(); + const allRules = values(productions); + return map(allRules, (rule) => generator.visitRule(rule)); +} + +export type CstNodeTypeDefinition = { + name: string; + properties: PropertyTypeDefinition[]; +}; + +export type PropertyTypeDefinition = { + name: string; + type: PropertyArrayType; + optional: boolean; +}; + +export type PropertyArrayType = + | TokenArrayType + | RuleArrayType + | (TokenArrayType | RuleArrayType)[]; + +export type TokenArrayType = { kind: "token" }; +export type RuleArrayType = { + kind: "rule"; + name: string; +}; + +class CstNodeDefinitionGenerator extends GAstVisitor { + visitRule(node: Rule): CstNodeTypeDefinition { + const rawElements = this.visitEach(node.definition); + + const grouped = groupBy(rawElements, (el) => el.propertyName); + const properties = map(grouped, (group, propertyName) => { + const allNullable = !some(group, (el) => !el.canBeNull); + + // In an alternation with a label a property name can have + // multiple types. + let propertyType: PropertyArrayType = group[0].type; + if (group.length > 1) { + propertyType = map(group, (g) => g.type); + } + + return { + name: propertyName, + type: propertyType, + optional: allNullable, + } as PropertyTypeDefinition; + }); + + return { + name: node.name, + properties: properties, + }; + } + + visitAlternative(node: Alternative) { + return this.visitEachAndOverrideWith(node.definition, { canBeNull: true }); + } + + visitOption(node: Option) { + return this.visitEachAndOverrideWith(node.definition, { canBeNull: true }); + } + + visitRepetition(node: Repetition) { + return this.visitEachAndOverrideWith(node.definition, { canBeNull: true }); + } + + visitRepetitionMandatory(node: RepetitionMandatory) { + return this.visitEach(node.definition); + } + + visitRepetitionMandatoryWithSeparator( + node: RepetitionMandatoryWithSeparator, + ) { + return this.visitEach(node.definition).concat({ + propertyName: node.separator.name, + canBeNull: true, + type: getType(node.separator), + }); + } + + visitRepetitionWithSeparator(node: RepetitionWithSeparator) { + return this.visitEachAndOverrideWith(node.definition, { + canBeNull: true, + }).concat({ + propertyName: node.separator.name, + canBeNull: true, + type: getType(node.separator), + }); + } + + visitAlternation(node: Alternation) { + return this.visitEachAndOverrideWith(node.definition, { canBeNull: true }); + } + + visitTerminal(node: Terminal): PropertyTupleElement[] { + return [ + { + propertyName: node.label || node.terminalType.name, + canBeNull: false, + type: getType(node), + }, + ]; + } + + visitNonTerminal(node: NonTerminal): PropertyTupleElement[] { + return [ + { + propertyName: node.label || node.nonTerminalName, + canBeNull: false, + type: getType(node), + }, + ]; + } + + private visitEachAndOverrideWith( + definition: IProduction[], + override: Partial, + ) { + return map( + this.visitEach(definition), + (definition) => assign({}, definition, override) as PropertyTupleElement, + ); + } + + private visitEach(definition: IProduction[]) { + return flatten( + map( + definition, + (definition) => this.visit(definition) as PropertyTupleElement[], + ), + ); + } +} + +type PropertyTupleElement = { + propertyName: string; + canBeNull: boolean; + type: TokenArrayType | RuleArrayType; +}; + +function getType( + production: Terminal | NonTerminal | TokenType, +): TokenArrayType | RuleArrayType { + if (production instanceof NonTerminal) { + return { + kind: "rule", + name: production.referencedRule.name, + }; + } + + return { kind: "token" }; +} diff --git a/node_modules/@chevrotain/gast/LICENSE.txt b/node_modules/@chevrotain/gast/LICENSE.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/node_modules/@chevrotain/gast/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@chevrotain/gast/lib/src/api.d.ts b/node_modules/@chevrotain/gast/lib/src/api.d.ts new file mode 100644 index 0000000..7b6631f --- /dev/null +++ b/node_modules/@chevrotain/gast/lib/src/api.d.ts @@ -0,0 +1,3 @@ +export { Rule, Terminal, NonTerminal, Option, Repetition, RepetitionMandatory, RepetitionMandatoryWithSeparator, RepetitionWithSeparator, Alternation, Alternative, serializeGrammar, serializeProduction, } from "./model.js"; +export { GAstVisitor } from "./visitor.js"; +export { getProductionDslName, isOptionalProd, isBranchingProd, isSequenceProd, } from "./helpers.js"; diff --git a/node_modules/@chevrotain/gast/lib/src/api.js b/node_modules/@chevrotain/gast/lib/src/api.js new file mode 100644 index 0000000..ef6232b --- /dev/null +++ b/node_modules/@chevrotain/gast/lib/src/api.js @@ -0,0 +1,4 @@ +export { Rule, Terminal, NonTerminal, Option, Repetition, RepetitionMandatory, RepetitionMandatoryWithSeparator, RepetitionWithSeparator, Alternation, Alternative, serializeGrammar, serializeProduction, } from "./model.js"; +export { GAstVisitor } from "./visitor.js"; +export { getProductionDslName, isOptionalProd, isBranchingProd, isSequenceProd, } from "./helpers.js"; +//# sourceMappingURL=api.js.map \ No newline at end of file diff --git a/node_modules/@chevrotain/gast/lib/src/api.js.map b/node_modules/@chevrotain/gast/lib/src/api.js.map new file mode 100644 index 0000000..d2187ae --- /dev/null +++ b/node_modules/@chevrotain/gast/lib/src/api.js.map @@ -0,0 +1 @@ +{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,MAAM,EACN,UAAU,EACV,mBAAmB,EACnB,gCAAgC,EAChC,uBAAuB,EACvB,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,cAAc,GACf,MAAM,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/@chevrotain/gast/lib/src/helpers.d.ts b/node_modules/@chevrotain/gast/lib/src/helpers.d.ts new file mode 100644 index 0000000..f0e70ed --- /dev/null +++ b/node_modules/@chevrotain/gast/lib/src/helpers.d.ts @@ -0,0 +1,10 @@ +import { NonTerminal } from "./model.js"; +import type { IProduction, IProductionWithOccurrence } from "@chevrotain/types"; +export declare function isSequenceProd(prod: IProduction): prod is { + definition: IProduction[]; +} & IProduction; +export declare function isOptionalProd(prod: IProduction, alreadyVisited?: NonTerminal[]): boolean; +export declare function isBranchingProd(prod: IProduction): prod is { + definition: IProduction[]; +} & IProduction; +export declare function getProductionDslName(prod: IProductionWithOccurrence): string; diff --git a/node_modules/@chevrotain/gast/lib/src/helpers.js b/node_modules/@chevrotain/gast/lib/src/helpers.js new file mode 100644 index 0000000..62d1e4d --- /dev/null +++ b/node_modules/@chevrotain/gast/lib/src/helpers.js @@ -0,0 +1,79 @@ +import { every, includes, some } from "lodash-es"; +import { AbstractProduction, Alternation, Alternative, NonTerminal, Option, Repetition, RepetitionMandatory, RepetitionMandatoryWithSeparator, RepetitionWithSeparator, Rule, Terminal, } from "./model.js"; +export function isSequenceProd(prod) { + return (prod instanceof Alternative || + prod instanceof Option || + prod instanceof Repetition || + prod instanceof RepetitionMandatory || + prod instanceof RepetitionMandatoryWithSeparator || + prod instanceof RepetitionWithSeparator || + prod instanceof Terminal || + prod instanceof Rule); +} +export function isOptionalProd(prod, alreadyVisited = []) { + const isDirectlyOptional = prod instanceof Option || + prod instanceof Repetition || + prod instanceof RepetitionWithSeparator; + if (isDirectlyOptional) { + return true; + } + // note that this can cause infinite loop if one optional empty TOP production has a cyclic dependency with another + // empty optional top rule + // may be indirectly optional ((A?B?C?) | (D?E?F?)) + if (prod instanceof Alternation) { + // for OR its enough for just one of the alternatives to be optional + return some(prod.definition, (subProd) => { + return isOptionalProd(subProd, alreadyVisited); + }); + } + else if (prod instanceof NonTerminal && includes(alreadyVisited, prod)) { + // avoiding stack overflow due to infinite recursion + return false; + } + else if (prod instanceof AbstractProduction) { + if (prod instanceof NonTerminal) { + alreadyVisited.push(prod); + } + return every(prod.definition, (subProd) => { + return isOptionalProd(subProd, alreadyVisited); + }); + } + else { + return false; + } +} +export function isBranchingProd(prod) { + return prod instanceof Alternation; +} +export function getProductionDslName(prod) { + /* istanbul ignore else */ + if (prod instanceof NonTerminal) { + return "SUBRULE"; + } + else if (prod instanceof Option) { + return "OPTION"; + } + else if (prod instanceof Alternation) { + return "OR"; + } + else if (prod instanceof RepetitionMandatory) { + return "AT_LEAST_ONE"; + } + else if (prod instanceof RepetitionMandatoryWithSeparator) { + return "AT_LEAST_ONE_SEP"; + } + else if (prod instanceof RepetitionWithSeparator) { + return "MANY_SEP"; + } + else if (prod instanceof Repetition) { + return "MANY"; + } + else if (prod instanceof Terminal) { + return "CONSUME"; + /* c8 ignore next 3 */ + } + else { + throw Error("non exhaustive match"); + } +} +//# sourceMappingURL=helpers.js.map \ No newline at end of file diff --git a/node_modules/@chevrotain/gast/lib/src/helpers.js.map b/node_modules/@chevrotain/gast/lib/src/helpers.js.map new file mode 100644 index 0000000..c270325 --- /dev/null +++ b/node_modules/@chevrotain/gast/lib/src/helpers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,WAAW,EACX,WAAW,EACX,MAAM,EACN,UAAU,EACV,mBAAmB,EACnB,gCAAgC,EAChC,uBAAuB,EACvB,IAAI,EACJ,QAAQ,GACT,MAAM,YAAY,CAAC;AAGpB,MAAM,UAAU,cAAc,CAC5B,IAAiB;IAEjB,OAAO,CACL,IAAI,YAAY,WAAW;QAC3B,IAAI,YAAY,MAAM;QACtB,IAAI,YAAY,UAAU;QAC1B,IAAI,YAAY,mBAAmB;QACnC,IAAI,YAAY,gCAAgC;QAChD,IAAI,YAAY,uBAAuB;QACvC,IAAI,YAAY,QAAQ;QACxB,IAAI,YAAY,IAAI,CACrB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,cAAc,CAC5B,IAAiB,EACjB,iBAAgC,EAAE;IAElC,MAAM,kBAAkB,GACtB,IAAI,YAAY,MAAM;QACtB,IAAI,YAAY,UAAU;QAC1B,IAAI,YAAY,uBAAuB,CAAC;IAC1C,IAAI,kBAAkB,EAAE;QACtB,OAAO,IAAI,CAAC;KACb;IAED,mHAAmH;IACnH,0BAA0B;IAC1B,mDAAmD;IACnD,IAAI,IAAI,YAAY,WAAW,EAAE;QAC/B,oEAAoE;QACpE,OA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AAI,YAAY,QAAQ,EAAE;QACnC,OAAO,SAAS,CAAC;QACjB,sBAAsB;KACvB;SAAM;QACL,MAAM,KAAK,CAAC,sBAAsB,CAAC,CAAC;KACrC;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/@chevrotain/gast/lib/src/model.d.ts b/node_modules/@chevrotain/gast/lib/src/model.d.ts new file mode 100644 index 0000000..80cd068 --- /dev/null +++ b/node_modules/@chevrotain/gast/lib/src/model.d.ts @@ -0,0 +1,144 @@ +import type { IGASTVisitor, IProduction, IProductionWithOccurrence, ISerializedGast, TokenType } from "@chevrotain/types"; +export declare abstract class AbstractProduction implements IProduction { + protected _definition: T[]; + get definition(): T[]; + set definition(value: T[]); + constructor(_definition: T[]); + accept(visitor: IGASTVisitor): void; +} +export declare class NonTerminal extends AbstractProduction implements IProductionWithOccurrence { + nonTerminalName: string; + label?: string; + referencedRule: Rule; + idx: number; + constructor(options: { + nonTerminalName: string; + label?: string; + referencedRule?: Rule; + idx?: number; + }); + set definition(definition: IProduction[]); + get definition(): IProduction[]; + accept(visitor: IGASTVisitor): void; +} +export declare class Rule extends AbstractProduction { + name: string; + orgText: string; + constructor(options: { + name: string; + definition: IProduction[]; + orgText?: string; + }); +} +export declare class Alternative extends AbstractProduction { + ignoreAmbiguities: boolean; + constructor(options: { + definition: IProduction[]; + ignoreAmbiguities?: boolean; + }); +} +export declare class Option extends AbstractProduction implements IProductionWithOccurrence { + idx: number; + maxLookahead?: number; + constructor(options: { + definition: IProduction[]; + idx?: number; + maxLookahead?: number; + }); +} +export declare class RepetitionMandatory extends AbstractProduction implements IProductionWithOccurrence { + idx: number; + maxLookahead?: number; + constructor(options: { + definition: IProduction[]; + idx?: number; + maxLookahead?: number; + }); +} +export declare class RepetitionMandatoryWithSeparator extends AbstractProduction implements IProductionWithOccurrence { + separator: TokenType; + idx: number; + maxLookahead?: number; + constructor(options: { + definition: IProduction[]; + separator: TokenType; + idx?: number; + }); +} +export declare class Repetition extends AbstractProduction implements IProductionWithOccurrence { + separator: TokenType; + idx: number; + maxLookahead?: number; + constructor(options: { + definition: IProduction[]; + idx?: number; + maxLookahead?: number; + }); +} +export declare class RepetitionWithSeparator extends AbstractProduction implements IProductionWithOccurrence { + separator: TokenType; + idx: number; + maxLookahead?: number; + constructor(options: { + definition: IProduction[]; + separator: TokenType; + idx?: number; + }); +} +export declare class Alternation extends AbstractProduction implements IProductionWithOccurrence { + idx: number; + ignoreAmbiguities: boolean; + hasPredicates: boolean; + maxLookahead?: number; + get definition(): Alternative[]; + set definition(value: Alternative[]); + constructor(options: { + definition: Alternative[]; + idx?: number; + ignoreAmbiguities?: boolean; + hasPredicates?: boolean; + maxLookahead?: number; + }); +} +export declare class Terminal implements IProductionWithOccurrence { + terminalType: TokenType; + label?: string; + idx: number; + constructor(options: { + terminalType: TokenType; + label?: string; + idx?: number; + }); + accept(visitor: IGASTVisitor): void; +} +export interface ISerializedBasic extends ISerializedGast { + type: "Alternative" | "Option" | "RepetitionMandatory" | "Repetition" | "Alternation"; + idx?: number; +} +export interface ISerializedGastRule extends ISerializedGast { + type: "Rule"; + name: string; + orgText: string; +} +export interface ISerializedNonTerminal extends ISerializedGast { + type: "NonTerminal"; + name: string; + label?: string; + idx: number; +} +export interface ISerializedTerminal extends ISerializedGast { + type: "Terminal"; + name: string; + terminalLabel?: string; + label?: string; + pattern?: string; + idx: number; +} +export interface ISerializedTerminalWithSeparator extends ISerializedGast { + type: "RepetitionMandatoryWithSeparator" | "RepetitionWithSeparator"; + idx: number; + separator: ISerializedTerminal; +} +export type ISerializedGastAny = ISerializedBasic | ISerializedGastRule | ISerializedNonTerminal | ISerializedTerminal | ISerializedTerminalWithSeparator; +export declare function serializeGrammar(topRules: Rule[]): ISerializedGast[]; +export declare function serializeProduction(node: IProduction): ISerializedGast; diff --git a/node_modules/@chevrotain/gast/lib/src/model.js b/node_modules/@chevrotain/gast/lib/src/model.js new file mode 100644 index 0000000..856c42a --- /dev/null +++ b/node_modules/@chevrotain/gast/lib/src/model.js @@ -0,0 +1,225 @@ +import { assign, forEach, isRegExp, isString, map, pickBy } from "lodash-es"; +// TODO: duplicated code to avoid extracting another sub-package -- how to avoid? +function tokenLabel(tokType) { + if (hasTokenLabel(tokType)) { + return tokType.LABEL; + } + else { + return tokType.name; + } +} +// TODO: duplicated code to avoid extracting another sub-package -- how to avoid? +function hasTokenLabel(obj) { + return isString(obj.LABEL) && obj.LABEL !== ""; +} +export class AbstractProduction { + get definition() { + return this._definition; + } + set definition(value) { + this._definition = value; + } + constructor(_definition) { + this._definition = _definition; + } + accept(visitor) { + visitor.visit(this); + forEach(this.definition, (prod) => { + prod.accept(visitor); + }); + } +} +export class NonTerminal extends AbstractProduction { + constructor(options) { + super([]); + this.idx = 1; + assign(this, pickBy(options, (v) => v !== undefined)); + } + set definition(definition) { + // immutable + } + get definition() { + if (this.referencedRule !== undefined) { + return this.referencedRule.definition; + } + return []; + } + accept(visitor) { + visitor.visit(this); + // don't visit children of a reference, we will get cyclic infinite loops if we do so + } +} +export class Rule extends AbstractProduction { + constructor(options) { + super(options.definition); + this.orgText = ""; + assign(this, pickBy(options, (v) => v !== undefined)); + } +} +export class Alternative extends AbstractProduction { + constructor(options) { + super(options.definition); + this.ignoreAmbiguities = false; + assign(this, pickBy(options, (v) => v !== undefined)); + } +} +export class Option extends AbstractProduction { + constructor(options) { + super(options.definition); + this.idx = 1; + assign(this, pickBy(options, (v) => v !== undefined)); + } +} +export class RepetitionMandatory extends AbstractProduction { + constructor(options) { + super(options.definition); + this.idx = 1; + assign(this, pickBy(options, (v) => v !== undefined)); + } +} +export class RepetitionMandatoryWithSeparator extends AbstractProduction { + constructor(options) { + super(options.definition); + this.idx = 1; + assign(this, pickBy(options, (v) => v !== undefined)); + } +} +export class Repetition extends AbstractProduction { + constructor(options) { + super(options.definition); + this.idx = 1; + assign(this, pickBy(options, (v) => v !== undefined)); + } +} +export class RepetitionWithSeparator extends AbstractProduction { + constructor(options) { + super(options.definition); + this.idx = 1; + assign(this, pickBy(options, (v) => v !== undefined)); + } +} +export class Alternation extends AbstractProduction { + get definition() { + return this._definition; + } + set definition(value) { + this._definition = value; + } + constructor(options) { + super(options.definition); + this.idx = 1; + this.ignoreAmbiguities = false; + this.hasPredicates = false; + assign(this, pickBy(options, (v) => v !== undefined)); + } +} +export class Terminal { + constructor(options) { + this.idx = 1; + assign(this, pickBy(options, (v) => v !== undefined)); + } + accept(visitor) { + visitor.visit(this); + } +} +export function serializeGrammar(topRules) { + return map(topRules, serializeProduction); +} +export function serializeProduction(node) { + function convertDefinition(definition) { + return map(definition, serializeProduction); + } + /* istanbul ignore else */ + if (node instanceof NonTerminal) { + const serializedNonTerminal = { + type: "NonTerminal", + name: node.nonTerminalName, + idx: node.idx, + }; + if (isString(node.label)) { + serializedNonTerminal.label = node.label; + } + return serializedNonTerminal; + } + else if (node instanceof Alternative) { + return { + type: "Alternative", + definition: convertDefinition(node.definition), + }; + } + else if (node instanceof Option) { + return { + type: "Option", + idx: node.idx, + definition: convertDefinition(node.definition), + }; + } + else if (node instanceof RepetitionMandatory) { + return { + type: "RepetitionMandatory", + idx: node.idx, + definition: convertDefinition(node.definition), + }; + } + else if (node instanceof RepetitionMandatoryWithSeparator) { + return { + type: "RepetitionMandatoryWithSeparator", + idx: node.idx, + separator: (serializeProduction(new Terminal({ terminalType: node.separator }))), + definition: convertDefinition(node.definition), + }; + } + else if (node instanceof RepetitionWithSeparator) { + return { + type: "RepetitionWithSeparator", + idx: node.idx, + separator: (serializeProduction(new Terminal({ terminalType: node.separator }))), + definition: convertDefinition(node.definition), + }; + } + else if (node instanceof Repetition) { + return { + type: "Repetition", + idx: node.idx, + definition: convertDefinition(node.definition), + }; + } + else if (node instanceof Alternation) { + return { + type: "Alternation", + idx: node.idx, + definition: convertDefinition(node.definition), + }; + } + else if (node instanceof Terminal) { + const serializedTerminal = { + type: "Terminal", + name: node.terminalType.name, + label: tokenLabel(node.terminalType), + idx: node.idx, + }; + if (isString(node.label)) { + serializedTerminal.terminalLabel = node.label; + } + const pattern = node.terminalType.PATTERN; + if (node.terminalType.PATTERN) { + serializedTerminal.pattern = isRegExp(pattern) + ? pattern.source + : pattern; + } + return serializedTerminal; + } + else if (node instanceof Rule) { + return { + type: "Rule", + name: node.name, + orgText: node.orgText, + definition: convertDefinition(node.definition), + }; + /* c8 ignore next 3 */ + } + else { + throw Error("non exhaustive match"); + } +} +//# sourceMappingURL=model.js.map \ No newline at end of file diff --git a/node_modules/@chevrotain/gast/lib/src/model.js.map b/node_modules/@chevrotain/gast/lib/src/model.js.map new file mode 100644 index 0000000..47e6fee --- /dev/null +++ b/node_modules/@chevrotain/gast/lib/src/model.js.map @@ -0,0 +1 @@ +{"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAS7E,iFAAiF;AACjF,SAAS,UAAU,CAAC,OAAkB;IACpC,IAAI,aAAa,CAAC,OAAO,CAAC,EAAE;QAC1B,OAAO,OAAO,CAAC,KAAK,CAAC;KACtB;SAAM;QACL,OAAO,OAAO,CAAC,IAAI,CAAC;KACrB;AACH,CAAC;AAED,iFAAiF;AACjF,SAAS,aAAa,CACpB,GAAc;IAEd,OAAO,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,KAAK,KAAK,EAAE,CAAC;AACjD,CAAC;AAED,MAAM,OAAgB,kBAAkB;IAGtC,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IACD,IAAW,UAAU,CAAC,KAAU;QAC9B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IAC3B,CAAC;IAED,YAAsB,WAAgB;QAAhB,gBAAW,GAAX,WAAW,CAAK;IAAG,CAAC;IAE1C,MAAM,CAAC,OAAqB;QAC1B,OAAO,CAAC,KAAK,CAAC,IAA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;SAAM,IAAI,IAAI,YAAY,IAAI,EAAE;QAC/B,OAA4B;YAC1B,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,UAAU,EAAE,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC;SAC/C,CAAC;QACF,sBAAsB;KACvB;SAAM;QACL,MAAM,KAAK,CAAC,sBAAsB,CAAC,CAAC;KACrC;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/@chevrotain/gast/lib/src/visitor.d.ts b/node_modules/@chevrotain/gast/lib/src/visitor.d.ts new file mode 100644 index 0000000..41ec7d4 --- /dev/null +++ b/node_modules/@chevrotain/gast/lib/src/visitor.d.ts @@ -0,0 +1,15 @@ +import { Alternation, Alternative, NonTerminal, Option, Repetition, RepetitionMandatory, RepetitionMandatoryWithSeparator, RepetitionWithSeparator, Rule, Terminal } from "./model.js"; +import type { IProduction } from "@chevrotain/types"; +export declare abstract class GAstVisitor { + visit(node: IProduction): any; + visitNonTerminal(node: NonTerminal): any; + visitAlternative(node: Alternative): any; + visitOption(node: Option): any; + visitRepetition(node: Repetition): any; + visitRepetitionMandatory(node: RepetitionMandatory): any; + visitRepetitionMandatoryWithSeparator(node: RepetitionMandatoryWithSeparator): any; + visitRepetitionWithSeparator(node: RepetitionWithSeparator): any; + visitAlternation(node: Alternation): any; + visitTerminal(node: Terminal): any; + visitRule(node: Rule): any; +} diff --git a/node_modules/@chevrotain/gast/lib/src/visitor.js b/node_modules/@chevrotain/gast/lib/src/visitor.js new file mode 100644 index 0000000..1e95d89 --- /dev/null +++ b/node_modules/@chevrotain/gast/lib/src/visitor.js @@ -0,0 +1,52 @@ +import { Alternation, Alternative, NonTerminal, Option, Repetition, RepetitionMandatory, RepetitionMandatoryWithSeparator, RepetitionWithSeparator, Rule, Terminal, } from "./model.js"; +export class GAstVisitor { + visit(node) { + const nodeAny = node; + switch (nodeAny.constructor) { + case NonTerminal: + return this.visitNonTerminal(nodeAny); + case Alternative: + return this.visitAlternative(nodeAny); + case Option: + return this.visitOption(nodeAny); + case RepetitionMandatory: + return this.visitRepetitionMandatory(nodeAny); + case RepetitionMandatoryWithSeparator: + return this.visitRepetitionMandatoryWithSeparator(nodeAny); + case RepetitionWithSeparator: + return this.visitRepetitionWithSeparator(nodeAny); + case Repetition: + return this.visitRepetition(nodeAny); + case Alternation: + return this.visitAlternation(nodeAny); + case Terminal: + return this.visitTerminal(nodeAny); + case Rule: + return this.visitRule(nodeAny); + /* c8 ignore next 2 */ + default: + throw Error("non exhaustive match"); + } + } + /* c8 ignore next */ + visitNonTerminal(node) { } + /* c8 ignore next */ + visitAlternative(node) { } + /* c8 ignore next */ + visitOption(node) { } + /* c8 ignore next */ + visitRepetition(node) { } + /* c8 ignore next */ + visitRepetitionMandatory(node) { } + /* c8 ignore next 3 */ + visitRepetitionMandatoryWithSeparator(node) { } + /* c8 ignore next */ + visitRepetitionWithSeparator(node) { } + /* c8 ignore next */ + visitAlternation(node) { } + /* c8 ignore next */ + visitTerminal(node) { } + /* c8 ignore next */ + visitRule(node) { } +} +//# sourceMappingURL=visitor.js.map \ No newline at end of file diff --git a/node_modules/@chevrotain/gast/lib/src/visitor.js.map b/node_modules/@chevrotain/gast/lib/src/visitor.js.map new file mode 100644 index 0000000..3256517 --- /dev/null +++ b/node_modules/@chevrotain/gast/lib/src/visitor.js.map @@ -0,0 +1 @@ +{"version":3,"file":"visitor.js","sourceRoot":"","sources":["../../src/visitor.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,WAAW,EACX,WAAW,EACX,MAAM,EACN,UAAU,EACV,mBAAmB,EACnB,gCAAgC,EAChC,uBAAuB,EACvB,IAAI,EACJ,QAAQ,GACT,MAAM,YAAY,CAAC;AAGpB,MAAM,OAAgB,WAAW;IACxB,KAAK,CAAC,IAAiB;QAC5B,MAAM,OAAO,GAAQ,IAAI,CAAC;QAC1B,QAAQ,OAAO,CAAC,WAAW,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gBAAgB,CAAC,IAAiB,IAAQ,CAAC;IAElD,oBAAoB;IACb,aAAa,CAAC,IAAc,IAAQ,CAAC;IAE5C,oBAAoB;IACb,SAAS,CAAC,IAAU,IAAQ,CAAC;CACrC"} \ No newline at end of file diff --git a/node_modules/@chevrotain/gast/package.json b/node_modules/@chevrotain/gast/package.json new file mode 100644 index 0000000..fe5c1cd --- /dev/null +++ b/node_modules/@chevrotain/gast/package.json @@ -0,0 +1,52 @@ +{ + "name": "@chevrotain/gast", + "version": "11.0.3", + "description": "Grammar AST structure for Chevrotain Parsers", + "keywords": [], + "bugs": { + "url": "https://github.com/Chevrotain/chevrotain/issues" + }, + "license": "Apache-2.0", + "type": "module", + "types": "./lib/src/api.d.ts", + "exports": { + ".": { + "import": "./lib/src/api.js", + "types": "./lib/src/api.d.ts" + } + }, + "files": [ + "lib/src/**/*.js", + "lib/src/**/*.map", + "lib/src/**/*.d.ts", + "src/**/*.ts" + ], + "repository": { + "type": "git", + "url": "git://github.com/Chevrotain/chevrotain.git" + }, + "scripts": { + "---------- CI FLOWS --------": "", + "ci": "pnpm run build test", + "build": "npm-run-all clean compile", + "test": "npm-run-all coverage", + "---------- DEV FLOWS --------": "", + "update-snapshots": "node ./scripts/update-snapshots.js", + "---------- BUILD STEPS --------": "", + "clean": "shx rm -rf lib coverage", + "compile:watch": "tsc -w", + "compile": "tsc", + "coverage": "c8 mocha --enable-source-maps" + }, + "dependencies": { + "@chevrotain/types": "11.0.3", + "lodash-es": "4.17.21" + }, + "devDependencies": { + "@types/lodash-es": "4.17.7" + }, + "publishConfig": { + "access": "public" + }, + "gitHead": "ac5806631779035c2c1955744a47d8ed4f25a175" +} diff --git a/node_modules/@chevrotain/gast/src/api.ts b/node_modules/@chevrotain/gast/src/api.ts new file mode 100644 index 0000000..1ca9f36 --- /dev/null +++ b/node_modules/@chevrotain/gast/src/api.ts @@ -0,0 +1,23 @@ +export { + Rule, + Terminal, + NonTerminal, + Option, + Repetition, + RepetitionMandatory, + RepetitionMandatoryWithSeparator, + RepetitionWithSeparator, + Alternation, + Alternative, + serializeGrammar, + serializeProduction, +} from "./model.js"; + +export { GAstVisitor } from "./visitor.js"; + +export { + getProductionDslName, + isOptionalProd, + isBranchingProd, + isSequenceProd, +} from "./helpers.js"; diff --git a/node_modules/@chevrotain/gast/src/helpers.ts b/node_modules/@chevrotain/gast/src/helpers.ts new file mode 100644 index 0000000..f395aee --- /dev/null +++ b/node_modules/@chevrotain/gast/src/helpers.ts @@ -0,0 +1,98 @@ +import { every, includes, some } from "lodash-es"; +import { + AbstractProduction, + Alternation, + Alternative, + NonTerminal, + Option, + Repetition, + RepetitionMandatory, + RepetitionMandatoryWithSeparator, + RepetitionWithSeparator, + Rule, + Terminal, +} from "./model.js"; +import type { IProduction, IProductionWithOccurrence } from "@chevrotain/types"; + +export function isSequenceProd( + prod: IProduction, +): prod is { definition: IProduction[] } & IProduction { + return ( + prod instanceof Alternative || + prod instanceof Option || + prod instanceof Repetition || + prod instanceof RepetitionMandatory || + prod instanceof RepetitionMandatoryWithSeparator || + prod instanceof RepetitionWithSeparator || + prod instanceof Terminal || + prod instanceof Rule + ); +} + +export function isOptionalProd( + prod: IProduction, + alreadyVisited: NonTerminal[] = [], +): boolean { + const isDirectlyOptional = + prod instanceof Option || + prod instanceof Repetition || + prod instanceof RepetitionWithSeparator; + if (isDirectlyOptional) { + return true; + } + + // note that this can cause infinite loop if one optional empty TOP production has a cyclic dependency with another + // empty optional top rule + // may be indirectly optional ((A?B?C?) | (D?E?F?)) + if (prod instanceof Alternation) { + // for OR its enough for just one of the alternatives to be optional + return some((prod).definition, (subProd: IProduction) => { + return isOptionalProd(subProd, alreadyVisited); + }); + } else if (prod instanceof NonTerminal && includes(alreadyVisited, prod)) { + // avoiding stack overflow due to infinite recursion + return false; + } else if (prod instanceof AbstractProduction) { + if (prod instanceof NonTerminal) { + alreadyVisited.push(prod); + } + return every( + (prod).definition, + (subProd: IProduction) => { + return isOptionalProd(subProd, alreadyVisited); + }, + ); + } else { + return false; + } +} + +export function isBranchingProd( + prod: IProduction, +): prod is { definition: IProduction[] } & IProduction { + return prod instanceof Alternation; +} + +export function getProductionDslName(prod: IProductionWithOccurrence): string { + /* istanbul ignore else */ + if (prod instanceof NonTerminal) { + return "SUBRULE"; + } else if (prod instanceof Option) { + return "OPTION"; + } else if (prod instanceof Alternation) { + return "OR"; + } else if (prod instanceof RepetitionMandatory) { + return "AT_LEAST_ONE"; + } else if (prod instanceof RepetitionMandatoryWithSeparator) { + return "AT_LEAST_ONE_SEP"; + } else if (prod instanceof RepetitionWithSeparator) { + return "MANY_SEP"; + } else if (prod instanceof Repetition) { + return "MANY"; + } else if (prod instanceof Terminal) { + return "CONSUME"; + /* c8 ignore next 3 */ + } else { + throw Error("non exhaustive match"); + } +} diff --git a/node_modules/@chevrotain/gast/src/model.ts b/node_modules/@chevrotain/gast/src/model.ts new file mode 100644 index 0000000..fc0cb0f --- /dev/null +++ b/node_modules/@chevrotain/gast/src/model.ts @@ -0,0 +1,416 @@ +import { assign, forEach, isRegExp, isString, map, pickBy } from "lodash-es"; +import type { + IGASTVisitor, + IProduction, + IProductionWithOccurrence, + ISerializedGast, + TokenType, +} from "@chevrotain/types"; + +// TODO: duplicated code to avoid extracting another sub-package -- how to avoid? +function tokenLabel(tokType: TokenType): string { + if (hasTokenLabel(tokType)) { + return tokType.LABEL; + } else { + return tokType.name; + } +} + +// TODO: duplicated code to avoid extracting another sub-package -- how to avoid? +function hasTokenLabel( + obj: TokenType, +): obj is TokenType & Pick, "LABEL"> { + return isString(obj.LABEL) && obj.LABEL !== ""; +} + +export abstract class AbstractProduction + implements IProduction +{ + public get definition(): T[] { + return this._definition; + } + public set definition(value: T[]) { + this._definition = value; + } + + constructor(protected _definition: T[]) {} + + accept(visitor: IGASTVisitor): void { + visitor.visit(this); + forEach(this.definition, (prod) => { + prod.accept(visitor); + }); + } +} + +export class NonTerminal + extends AbstractProduction + implements IProductionWithOccurrence +{ + public nonTerminalName!: string; + public label?: string; + public referencedRule!: Rule; + public idx: number = 1; + + constructor(options: { + nonTerminalName: string; + label?: string; + referencedRule?: Rule; + idx?: number; + }) { + super([]); + assign( + this, + pickBy(options, (v) => v !== undefined), + ); + } + + set definition(definition: IProduction[]) { + // immutable + } + + get definition(): IProduction[] { + if (this.referencedRule !== undefined) { + return this.referencedRule.definition; + } + return []; + } + + accept(visitor: IGASTVisitor): void { + visitor.visit(this); + // don't visit children of a reference, we will get cyclic infinite loops if we do so + } +} + +export class Rule extends AbstractProduction { + public name!: string; + public orgText: string = ""; + + constructor(options: { + name: string; + definition: IProduction[]; + orgText?: string; + }) { + super(options.definition); + assign( + this, + pickBy(options, (v) => v !== undefined), + ); + } +} + +export class Alternative extends AbstractProduction { + public ignoreAmbiguities: boolean = false; + + constructor(options: { + definition: IProduction[]; + ignoreAmbiguities?: boolean; + }) { + super(options.definition); + assign( + this, + pickBy(options, (v) => v !== undefined), + ); + } +} + +export class Option + extends AbstractProduction + implements IProductionWithOccurrence +{ + public idx: number = 1; + public maxLookahead?: number; + + constructor(options: { + definition: IProduction[]; + idx?: number; + maxLookahead?: number; + }) { + super(options.definition); + assign( + this, + pickBy(options, (v) => v !== undefined), + ); + } +} + +export class RepetitionMandatory + extends AbstractProduction + implements IProductionWithOccurrence +{ + public idx: number = 1; + public maxLookahead?: number; + + constructor(options: { + definition: IProduction[]; + idx?: number; + maxLookahead?: number; + }) { + super(options.definition); + assign( + this, + pickBy(options, (v) => v !== undefined), + ); + } +} + +export class RepetitionMandatoryWithSeparator + extends AbstractProduction + implements IProductionWithOccurrence +{ + public separator!: TokenType; + public idx: number = 1; + public maxLookahead?: number; + + constructor(options: { + definition: IProduction[]; + separator: TokenType; + idx?: number; + }) { + super(options.definition); + assign( + this, + pickBy(options, (v) => v !== undefined), + ); + } +} + +export class Repetition + extends AbstractProduction + implements IProductionWithOccurrence +{ + public separator!: TokenType; + public idx: number = 1; + public maxLookahead?: number; + + constructor(options: { + definition: IProduction[]; + idx?: number; + maxLookahead?: number; + }) { + super(options.definition); + assign( + this, + pickBy(options, (v) => v !== undefined), + ); + } +} + +export class RepetitionWithSeparator + extends AbstractProduction + implements IProductionWithOccurrence +{ + public separator!: TokenType; + public idx: number = 1; + public maxLookahead?: number; + + constructor(options: { + definition: IProduction[]; + separator: TokenType; + idx?: number; + }) { + super(options.definition); + assign( + this, + pickBy(options, (v) => v !== undefined), + ); + } +} + +export class Alternation + extends AbstractProduction + implements IProductionWithOccurrence +{ + public idx: number = 1; + public ignoreAmbiguities: boolean = false; + public hasPredicates: boolean = false; + public maxLookahead?: number; + + public get definition(): Alternative[] { + return this._definition; + } + public set definition(value: Alternative[]) { + this._definition = value; + } + + constructor(options: { + definition: Alternative[]; + idx?: number; + ignoreAmbiguities?: boolean; + hasPredicates?: boolean; + maxLookahead?: number; + }) { + super(options.definition); + assign( + this, + pickBy(options, (v) => v !== undefined), + ); + } +} + +export class Terminal implements IProductionWithOccurrence { + public terminalType!: TokenType; + public label?: string; + public idx: number = 1; + + constructor(options: { + terminalType: TokenType; + label?: string; + idx?: number; + }) { + assign( + this, + pickBy(options, (v) => v !== undefined), + ); + } + + accept(visitor: IGASTVisitor): void { + visitor.visit(this); + } +} + +export interface ISerializedBasic extends ISerializedGast { + type: + | "Alternative" + | "Option" + | "RepetitionMandatory" + | "Repetition" + | "Alternation"; + idx?: number; +} + +export interface ISerializedGastRule extends ISerializedGast { + type: "Rule"; + name: string; + orgText: string; +} + +export interface ISerializedNonTerminal extends ISerializedGast { + type: "NonTerminal"; + name: string; + label?: string; + idx: number; +} + +export interface ISerializedTerminal extends ISerializedGast { + type: "Terminal"; + name: string; + terminalLabel?: string; + label?: string; + pattern?: string; + idx: number; +} + +export interface ISerializedTerminalWithSeparator extends ISerializedGast { + type: "RepetitionMandatoryWithSeparator" | "RepetitionWithSeparator"; + idx: number; + separator: ISerializedTerminal; +} + +export type ISerializedGastAny = + | ISerializedBasic + | ISerializedGastRule + | ISerializedNonTerminal + | ISerializedTerminal + | ISerializedTerminalWithSeparator; + +export function serializeGrammar(topRules: Rule[]): ISerializedGast[] { + return map(topRules, serializeProduction); +} + +export function serializeProduction(node: IProduction): ISerializedGast { + function convertDefinition(definition: IProduction[]): ISerializedGast[] { + return map(definition, serializeProduction); + } + /* istanbul ignore else */ + if (node instanceof NonTerminal) { + const serializedNonTerminal: ISerializedNonTerminal = { + type: "NonTerminal", + name: node.nonTerminalName, + idx: node.idx, + }; + + if (isString(node.label)) { + serializedNonTerminal.label = node.label; + } + + return serializedNonTerminal; + } else if (node instanceof Alternative) { + return { + type: "Alternative", + definition: convertDefinition(node.definition), + }; + } else if (node instanceof Option) { + return { + type: "Option", + idx: node.idx, + definition: convertDefinition(node.definition), + }; + } else if (node instanceof RepetitionMandatory) { + return { + type: "RepetitionMandatory", + idx: node.idx, + definition: convertDefinition(node.definition), + }; + } else if (node instanceof RepetitionMandatoryWithSeparator) { + return { + type: "RepetitionMandatoryWithSeparator", + idx: node.idx, + separator: ( + serializeProduction(new Terminal({ terminalType: node.separator })) + ), + definition: convertDefinition(node.definition), + }; + } else if (node instanceof RepetitionWithSeparator) { + return { + type: "RepetitionWithSeparator", + idx: node.idx, + separator: ( + serializeProduction(new Terminal({ terminalType: node.separator })) + ), + definition: convertDefinition(node.definition), + }; + } else if (node instanceof Repetition) { + return { + type: "Repetition", + idx: node.idx, + definition: convertDefinition(node.definition), + }; + } else if (node instanceof Alternation) { + return { + type: "Alternation", + idx: node.idx, + definition: convertDefinition(node.definition), + }; + } else if (node instanceof Terminal) { + const serializedTerminal = { + type: "Terminal", + name: node.terminalType.name, + label: tokenLabel(node.terminalType), + idx: node.idx, + }; + + if (isString(node.label)) { + serializedTerminal.terminalLabel = node.label; + } + + const pattern = node.terminalType.PATTERN; + if (node.terminalType.PATTERN) { + serializedTerminal.pattern = isRegExp(pattern) + ? (pattern).source + : pattern; + } + + return serializedTerminal; + } else if (node instanceof Rule) { + return { + type: "Rule", + name: node.name, + orgText: node.orgText, + definition: convertDefinition(node.definition), + }; + /* c8 ignore next 3 */ + } else { + throw Error("non exhaustive match"); + } +} diff --git a/node_modules/@chevrotain/gast/src/visitor.ts b/node_modules/@chevrotain/gast/src/visitor.ts new file mode 100644 index 0000000..bf54d22 --- /dev/null +++ b/node_modules/@chevrotain/gast/src/visitor.ts @@ -0,0 +1,76 @@ +import { + Alternation, + Alternative, + NonTerminal, + Option, + Repetition, + RepetitionMandatory, + RepetitionMandatoryWithSeparator, + RepetitionWithSeparator, + Rule, + Terminal, +} from "./model.js"; +import type { IProduction } from "@chevrotain/types"; + +export abstract class GAstVisitor { + public visit(node: IProduction): any { + const nodeAny: any = node; + switch (nodeAny.constructor) { + case NonTerminal: + return this.visitNonTerminal(nodeAny); + case Alternative: + return this.visitAlternative(nodeAny); + case Option: + return this.visitOption(nodeAny); + case RepetitionMandatory: + return this.visitRepetitionMandatory(nodeAny); + case RepetitionMandatoryWithSeparator: + return this.visitRepetitionMandatoryWithSeparator(nodeAny); + case RepetitionWithSeparator: + return this.visitRepetitionWithSeparator(nodeAny); + case Repetition: + return this.visitRepetition(nodeAny); + case Alternation: + return this.visitAlternation(nodeAny); + case Terminal: + return this.visitTerminal(nodeAny); + case Rule: + return this.visitRule(nodeAny); + /* c8 ignore next 2 */ + default: + throw Error("non exhaustive match"); + } + } + + /* c8 ignore next */ + public visitNonTerminal(node: NonTerminal): any {} + + /* c8 ignore next */ + public visitAlternative(node: Alternative): any {} + + /* c8 ignore next */ + public visitOption(node: Option): any {} + + /* c8 ignore next */ + public visitRepetition(node: Repetition): any {} + + /* c8 ignore next */ + public visitRepetitionMandatory(node: RepetitionMandatory): any {} + + /* c8 ignore next 3 */ + public visitRepetitionMandatoryWithSeparator( + node: RepetitionMandatoryWithSeparator, + ): any {} + + /* c8 ignore next */ + public visitRepetitionWithSeparator(node: RepetitionWithSeparator): any {} + + /* c8 ignore next */ + public visitAlternation(node: Alternation): any {} + + /* c8 ignore next */ + public visitTerminal(node: Terminal): any {} + + /* c8 ignore next */ + public visitRule(node: Rule): any {} +} diff --git a/node_modules/@chevrotain/regexp-to-ast/LICENSE.txt b/node_modules/@chevrotain/regexp-to-ast/LICENSE.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/node_modules/@chevrotain/regexp-to-ast/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@chevrotain/regexp-to-ast/lib/src/api.js b/node_modules/@chevrotain/regexp-to-ast/lib/src/api.js new file mode 100644 index 0000000..121891b --- /dev/null +++ b/node_modules/@chevrotain/regexp-to-ast/lib/src/api.js @@ -0,0 +1,3 @@ +export { RegExpParser } from "./regexp-parser.js"; +export { BaseRegExpVisitor } from "./base-regexp-visitor.js"; +//# sourceMappingURL=api.js.map \ No newline at end of file diff --git a/node_modules/@chevrotain/regexp-to-ast/lib/src/api.js.map b/node_modules/@chevrotain/regexp-to-ast/lib/src/api.js.map new file mode 100644 index 0000000..93c8992 --- /dev/null +++ b/node_modules/@chevrotain/regexp-to-ast/lib/src/api.js.map @@ -0,0 +1 @@ +{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC"} \ No newline at end of file diff --git a/node_modules/@chevrotain/regexp-to-ast/lib/src/base-regexp-visitor.js b/node_modules/@chevrotain/regexp-to-ast/lib/src/base-regexp-visitor.js new file mode 100644 index 0000000..a678c89 --- /dev/null +++ b/node_modules/@chevrotain/regexp-to-ast/lib/src/base-regexp-visitor.js @@ -0,0 +1,86 @@ +export class BaseRegExpVisitor { + visitChildren(node) { + for (const key in node) { + const child = node[key]; + /* istanbul ignore else */ + if (node.hasOwnProperty(key)) { + if (child.type !== undefined) { + this.visit(child); + } + else if (Array.isArray(child)) { + child.forEach((subChild) => { + this.visit(subChild); + }, this); + } + } + } + } + visit(node) { + switch (node.type) { + case "Pattern": + this.visitPattern(node); + break; + case "Flags": + this.visitFlags(node); + break; + case "Disjunction": + this.visitDisjunction(node); + break; + case "Alternative": + this.visitAlternative(node); + break; + case "StartAnchor": + this.visitStartAnchor(node); + break; + case "EndAnchor": + this.visitEndAnchor(node); + break; + case "WordBoundary": + this.visitWordBoundary(node); + break; + case "NonWordBoundary": + this.visitNonWordBoundary(node); + break; + case "Lookahead": + this.visitLookahead(node); + break; + case "NegativeLookahead": + this.visitNegativeLookahead(node); + break; + case "Character": + this.visitCharacter(node); + break; + case "Set": + this.visitSet(node); + break; + case "Group": + this.visitGroup(node); + break; + case "GroupBackReference": + this.visitGroupBackReference(node); + break; + case "Quantifier": + this.visitQuantifier(node); + break; + } + this.visitChildren(node); + } + visitPattern(node) { } + visitFlags(node) { } + visitDisjunction(node) { } + visitAlternative(node) { } + // Assertion + visitStartAnchor(node) { } + visitEndAnchor(node) { } + visitWordBoundary(node) { } + visitNonWordBoundary(node) { } + visitLookahead(node) { } + visitNegativeLookahead(node) { } + // atoms + visitCharacter(node) { } + visitSet(node) { } + visitGroup(node) { } + visitGroupBackReference(node) { } + visitQuantifier(node) { } +} +//# sourceMappingURL=base-regexp-visitor.js.map \ No newline at end of file diff --git a/node_modules/@chevrotain/regexp-to-ast/lib/src/base-regexp-visitor.js.map b/node_modules/@chevrotain/regexp-to-ast/lib/src/base-regexp-visitor.js.map new file mode 100644 index 0000000..e455c97 --- /dev/null +++ b/node_modules/@chevrotain/regexp-to-ast/lib/src/base-regexp-visitor.js.map @@ -0,0 +1 @@ +{"version":3,"file":"base-regexp-visitor.js","sourceRoot":"","sources":["../../src/base-regexp-visitor.ts"],"names":[],"mappings":"AAeA,MAAM,OAAO,iBAAiB;IACrB,aAAa,CAAC,IAAgB;QACnC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;YACtB,MAAM,KAAK,GAAI,IAAY,CAAC,GAAG,CAAC,CAAC;YACjC,0BAA0B;YAC1B,IAAI,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;gBAC5B,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,EAAE;oBAC5B,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;iBACnB;qBAAM,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;oBAC/B,KAAK,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;wBACzB,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;oBACvB,CAAC,EAAE,IAAI,CAAC,CAAC;iBACV;aACF;SACF;IACH,CAAC;IAEM,KAAK,CAAC,IAAmB;QAC9B,QAAQ,IAAI,CAAC,IAAI,EAAE;YACjB,KAAK,SAAS;gBACZ,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;gBACxB,MAAM;YACR,KAAK,OAAO;gBACV,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;gBACtB,MAAM;YACR,KAAK,aAAa;gBAChB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;gBAC5B,MAAM;YACR,KAAK,aAAa;gBAChB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;gBAC5B,MAAM;YACR,KAAK,aAAa;gBAChB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;gBAC5B,MAAM;YACR,KAAK,WAAW;gBACd,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;gB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,CAAC,IAAe,IAAS,CAAC;IAExC,QAAQ,CAAC,IAAS,IAAS,CAAC;IAE5B,UAAU,CAAC,IAAW,IAAS,CAAC;IAEhC,uBAAuB,CAAC,IAAwB,IAAS,CAAC;IAE1D,eAAe,CAAC,IAAgB,IAAS,CAAC;CAClD"} \ No newline at end of file diff --git a/node_modules/@chevrotain/regexp-to-ast/lib/src/character-classes.js b/node_modules/@chevrotain/regexp-to-ast/lib/src/character-classes.js new file mode 100644 index 0000000..a589ec4 --- /dev/null +++ b/node_modules/@chevrotain/regexp-to-ast/lib/src/character-classes.js @@ -0,0 +1,42 @@ +import { cc } from "./utils.js"; +export const digitsCharCodes = []; +for (let i = cc("0"); i <= cc("9"); i++) { + digitsCharCodes.push(i); +} +export const wordCharCodes = [cc("_")].concat(digitsCharCodes); +for (let i = cc("a"); i <= cc("z"); i++) { + wordCharCodes.push(i); +} +for (let i = cc("A"); i <= cc("Z"); i++) { + wordCharCodes.push(i); +} +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#character-classes +export const whitespaceCodes = [ + cc(" "), + cc("\f"), + cc("\n"), + cc("\r"), + cc("\t"), + cc("\v"), + cc("\t"), + cc("\u00a0"), + cc("\u1680"), + cc("\u2000"), + cc("\u2001"), + cc("\u2002"), + cc("\u2003"), + cc("\u2004"), + cc("\u2005"), + cc("\u2006"), + cc("\u2007"), + cc("\u2008"), + cc("\u2009"), + cc("\u200a"), + cc("\u2028"), + cc("\u2029"), + cc("\u202f"), + cc("\u205f"), + cc("\u3000"), + cc("\ufeff"), +]; +//# sourceMappingURL=character-classes.js.map \ No newline at end of file diff --git a/node_modules/@chevrotain/regexp-to-ast/lib/src/character-classes.js.map b/node_modules/@chevrotain/regexp-to-ast/lib/src/character-classes.js.map new file mode 100644 index 0000000..4ca48c9 --- /dev/null +++ b/node_modules/@chevrotain/regexp-to-ast/lib/src/character-classes.js.map @@ -0,0 +1 @@ +{"version":3,"file":"character-classes.js","sourceRoot":"","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;IACZ,EAAE,CAAC,QAAQ,CAAC;IACZ,EAAE,CAAC,QAAQ,CAAC;IACZ,EAAE,CAAC,QAAQ,CAAC;IACZ,EAAE,CAAC,QAAQ,CAAC;IACZ,EAAE,CAAC,QAAQ,CAAC;IACZ,EAAE,CAAC,QAAQ,CAAC;IACZ,EAAE,CAAC,QAAQ,CAAC;IACZ,EAAE,CAAC,QAAQ,CAAC;IACZ,EAAE,CAAC,QAAQ,CAAC;IACZ,EAAE,CAAC,QAAQ,CAAC;IACZ,EAAE,CAAC,QAAQ,CAAC;IACZ,EAAE,CAAC,QAAQ,CAAC;CACb,CAAC"} \ No newline at end of file diff --git a/node_modules/@chevrotain/regexp-to-ast/lib/src/regexp-parser.js b/node_modules/@chevrotain/regexp-to-ast/lib/src/regexp-parser.js new file mode 100644 index 0000000..70165dd --- /dev/null +++ b/node_modules/@chevrotain/regexp-to-ast/lib/src/regexp-parser.js @@ -0,0 +1,731 @@ +import { addFlag, ASSERT_EXISTS, ASSERT_NEVER_REACH_HERE, cc, insertToSet, isCharacter, } from "./utils.js"; +import { digitsCharCodes, whitespaceCodes, wordCharCodes, } from "./character-classes.js"; +// consts and utilities +const hexDigitPattern = /[0-9a-fA-F]/; +const decimalPattern = /[0-9]/; +const decimalPatternNoZero = /[1-9]/; +// https://hackernoon.com/the-madness-of-parsing-real-world-javascript-regexps-d9ee336df983 +// https://www.ecma-international.org/ecma-262/8.0/index.html#prod-Pattern +export class RegExpParser { + constructor() { + this.idx = 0; + this.input = ""; + this.groupIdx = 0; + } + saveState() { + return { + idx: this.idx, + input: this.input, + groupIdx: this.groupIdx, + }; + } + restoreState(newState) { + this.idx = newState.idx; + this.input = newState.input; + this.groupIdx = newState.groupIdx; + } + pattern(input) { + // parser state + this.idx = 0; + this.input = input; + this.groupIdx = 0; + this.consumeChar("/"); + const value = this.disjunction(); + this.consumeChar("/"); + const flags = { + type: "Flags", + loc: { begin: this.idx, end: input.length }, + global: false, + ignoreCase: false, + multiLine: false, + unicode: false, + sticky: false, + }; + while (this.isRegExpFlag()) { + switch (this.popChar()) { + case "g": + addFlag(flags, "global"); + break; + case "i": + addFlag(flags, "ignoreCase"); + break; + case "m": + addFlag(flags, "multiLine"); + break; + case "u": + addFlag(flags, "unicode"); + break; + case "y": + addFlag(flags, "sticky"); + break; + } + } + if (this.idx !== this.input.length) { + throw Error("Redundant input: " + this.input.substring(this.idx)); + } + return { + type: "Pattern", + flags: flags, + value: value, + loc: this.loc(0), + }; + } + disjunction() { + const alts = []; + const begin = this.idx; + alts.push(this.alternative()); + while (this.peekChar() === "|") { + this.consumeChar("|"); + alts.push(this.alternative()); + } + return { type: "Disjunction", value: alts, loc: this.loc(begin) }; + } + alternative() { + const terms = []; + const begin = this.idx; + while (this.isTerm()) { + terms.push(this.term()); + } + return { type: "Alternative", value: terms, loc: this.loc(begin) }; + } + term() { + if (this.isAssertion()) { + return this.assertion(); + } + else { + return this.atom(); + } + } + assertion() { + const begin = this.idx; + switch (this.popChar()) { + case "^": + return { + type: "StartAnchor", + loc: this.loc(begin), + }; + case "$": + return { type: "EndAnchor", loc: this.loc(begin) }; + // '\b' or '\B' + case "\\": + switch (this.popChar()) { + case "b": + return { + type: "WordBoundary", + loc: this.loc(begin), + }; + case "B": + return { + type: "NonWordBoundary", + loc: this.loc(begin), + }; + } + // istanbul ignore next + throw Error("Invalid Assertion Escape"); + // '(?=' or '(?!' + case "(": + this.consumeChar("?"); + let type; + switch (this.popChar()) { + case "=": + type = "Lookahead"; + break; + case "!": + type = "NegativeLookahead"; + break; + } + ASSERT_EXISTS(type); + const disjunction = this.disjunction(); + this.consumeChar(")"); + return { + type: type, + value: disjunction, + loc: this.loc(begin), + }; + } + // istanbul ignore next + return ASSERT_NEVER_REACH_HERE(); + } + quantifier(isBacktracking = false) { + let range = undefined; + const begin = this.idx; + switch (this.popChar()) { + case "*": + range = { + atLeast: 0, + atMost: Infinity, + }; + break; + case "+": + range = { + atLeast: 1, + atMost: Infinity, + }; + break; + case "?": + range = { + atLeast: 0, + atMost: 1, + }; + break; + case "{": + const atLeast = this.integerIncludingZero(); + switch (this.popChar()) { + case "}": + range = { + atLeast: atLeast, + atMost: atLeast, + }; + break; + case ",": + let atMost; + if (this.isDigit()) { + atMost = this.integerIncludingZero(); + range = { + atLeast: atLeast, + atMost: atMost, + }; + } + else { + range = { + atLeast: atLeast, + atMost: Infinity, + }; + } + this.consumeChar("}"); + break; + } + // throwing exceptions from "ASSERT_EXISTS" during backtracking + // causes severe performance degradations + if (isBacktracking === true && range === undefined) { + return undefined; + } + ASSERT_EXISTS(range); + break; + } + // throwing exceptions from "ASSERT_EXISTS" during backtracking + // causes severe performance degradations + if (isBacktracking === true && range === undefined) { + return undefined; + } + // istanbul ignore else + if (ASSERT_EXISTS(range)) { + if (this.peekChar(0) === "?") { + this.consumeChar("?"); + range.greedy = false; + } + else { + range.greedy = true; + } + range.type = "Quantifier"; + range.loc = this.loc(begin); + return range; + } + } + atom() { + let atom; + const begin = this.idx; + switch (this.peekChar()) { + case ".": + atom = this.dotAll(); + break; + case "\\": + atom = this.atomEscape(); + break; + case "[": + atom = this.characterClass(); + break; + case "(": + atom = this.group(); + break; + } + if (atom === undefined && this.isPatternCharacter()) { + atom = this.patternCharacter(); + } + // istanbul ignore else + if (ASSERT_EXISTS(atom)) { + atom.loc = this.loc(begin); + if (this.isQuantifier()) { + atom.quantifier = this.quantifier(); + } + return atom; + } + // istanbul ignore next + return ASSERT_NEVER_REACH_HERE(); + } + dotAll() { + this.consumeChar("."); + return { + type: "Set", + complement: true, + value: [cc("\n"), cc("\r"), cc("\u2028"), cc("\u2029")], + }; + } + atomEscape() { + this.consumeChar("\\"); + switch (this.peekChar()) { + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + return this.decimalEscapeAtom(); + case "d": + case "D": + case "s": + case "S": + case "w": + case "W": + return this.characterClassEscape(); + case "f": + case "n": + case "r": + case "t": + case "v": + return this.controlEscapeAtom(); + case "c": + return this.controlLetterEscapeAtom(); + case "0": + return this.nulCharacterAtom(); + case "x": + return this.hexEscapeSequenceAtom(); + case "u": + return this.regExpUnicodeEscapeSequenceAtom(); + default: + return this.identityEscapeAtom(); + } + } + decimalEscapeAtom() { + const value = this.positiveInteger(); + return { type: "GroupBackReference", value: value }; + } + characterClassEscape() { + let set; + let complement = false; + switch (this.popChar()) { + case "d": + set = digitsCharCodes; + break; + case "D": + set = digitsCharCodes; + complement = true; + break; + case "s": + set = whitespaceCodes; + break; + case "S": + set = whitespaceCodes; + complement = true; + break; + case "w": + set = wordCharCodes; + break; + case "W": + set = wordCharCodes; + complement = true; + break; + } + // istanbul ignore else + if (ASSERT_EXISTS(set)) { + return { type: "Set", value: set, complement: complement }; + } + // istanbul ignore next + return ASSERT_NEVER_REACH_HERE(); + } + controlEscapeAtom() { + let escapeCode; + switch (this.popChar()) { + case "f": + escapeCode = cc("\f"); + break; + case "n": + escapeCode = cc("\n"); + break; + case "r": + escapeCode = cc("\r"); + break; + case "t": + escapeCode = cc("\t"); + break; + case "v": + escapeCode = cc("\v"); + break; + } + // istanbul ignore else + if (ASSERT_EXISTS(escapeCode)) { + return { type: "Character", value: escapeCode }; + } + // istanbul ignore next + return ASSERT_NEVER_REACH_HERE(); + } + controlLetterEscapeAtom() { + this.consumeChar("c"); + const letter = this.popChar(); + if (/[a-zA-Z]/.test(letter) === false) { + throw Error("Invalid "); + } + const letterCode = letter.toUpperCase().charCodeAt(0) - 64; + return { type: "Character", value: letterCode }; + } + nulCharacterAtom() { + // TODO implement '[lookahead ∉ DecimalDigit]' + // TODO: for the deprecated octal escape sequence + this.consumeChar("0"); + return { type: "Character", value: cc("\0") }; + } + hexEscapeSequenceAtom() { + this.consumeChar("x"); + return this.parseHexDigits(2); + } + regExpUnicodeEscapeSequenceAtom() { + this.consumeChar("u"); + return this.parseHexDigits(4); + } + identityEscapeAtom() { + // TODO: implement "SourceCharacter but not UnicodeIDContinue" + // // http://unicode.org/reports/tr31/#Specific_Character_Adjustments + const escapedChar = this.popChar(); + return { type: "Character", value: cc(escapedChar) }; + } + classPatternCharacterAtom() { + switch (this.peekChar()) { + // istanbul ignore next + case "\n": + // istanbul ignore next + case "\r": + // istanbul ignore next + case "\u2028": + // istanbul ignore next + case "\u2029": + // istanbul ignore next + case "\\": + // istanbul ignore next + case "]": + throw Error("TBD"); + default: + const nextChar = this.popChar(); + return { type: "Character", value: cc(nextChar) }; + } + } + characterClass() { + const set = []; + let complement = false; + this.consumeChar("["); + if (this.peekChar(0) === "^") { + this.consumeChar("^"); + complement = true; + } + while (this.isClassAtom()) { + const from = this.classAtom(); + const isFromSingleChar = from.type === "Character"; + if (isCharacter(from) && this.isRangeDash()) { + this.consumeChar("-"); + const to = this.classAtom(); + const isToSingleChar = to.type === "Character"; + // a range can only be used when both sides are single characters + if (isCharacter(to)) { + if (to.value < from.value) { + throw Error("Range out of order in character class"); + } + set.push({ from: from.value, to: to.value }); + } + else { + // literal dash + insertToSet(from.value, set); + set.push(cc("-")); + insertToSet(to.value, set); + } + } + else { + insertToSet(from.value, set); + } + } + this.consumeChar("]"); + return { type: "Set", complement: complement, value: set }; + } + classAtom() { + switch (this.peekChar()) { + // istanbul ignore next + case "]": + // istanbul ignore next + case "\n": + // istanbul ignore next + case "\r": + // istanbul ignore next + case "\u2028": + // istanbul ignore next + case "\u2029": + throw Error("TBD"); + case "\\": + return this.classEscape(); + default: + return this.classPatternCharacterAtom(); + } + } + classEscape() { + this.consumeChar("\\"); + switch (this.peekChar()) { + // Matches a backspace. + // (Not to be confused with \b word boundary outside characterClass) + case "b": + this.consumeChar("b"); + return { type: "Character", value: cc("\u0008") }; + case "d": + case "D": + case "s": + case "S": + case "w": + case "W": + return this.characterClassEscape(); + case "f": + case "n": + case "r": + case "t": + case "v": + return this.controlEscapeAtom(); + case "c": + return this.controlLetterEscapeAtom(); + case "0": + return this.nulCharacterAtom(); + case "x": + return this.hexEscapeSequenceAtom(); + case "u": + return this.regExpUnicodeEscapeSequenceAtom(); + default: + return this.identityEscapeAtom(); + } + } + group() { + let capturing = true; + this.consumeChar("("); + switch (this.peekChar(0)) { + case "?": + this.consumeChar("?"); + this.consumeChar(":"); + capturing = false; + break; + default: + this.groupIdx++; + break; + } + const value = this.disjunction(); + this.consumeChar(")"); + const groupAst = { + type: "Group", + capturing: capturing, + value: value, + }; + if (capturing) { + groupAst["idx"] = this.groupIdx; + } + return groupAst; + } + positiveInteger() { + let number = this.popChar(); + // istanbul ignore next - can't ever get here due to previous lookahead checks + // still implementing this error checking in case this ever changes. + if (decimalPatternNoZero.test(number) === false) { + throw Error("Expecting a positive integer"); + } + while (decimalPattern.test(this.peekChar(0))) { + number += this.popChar(); + } + return parseInt(number, 10); + } + integerIncludingZero() { + let number = this.popChar(); + if (decimalPattern.test(number) === false) { + throw Error("Expecting an integer"); + } + while (decimalPattern.test(this.peekChar(0))) { + number += this.popChar(); + } + return parseInt(number, 10); + } + patternCharacter() { + const nextChar = this.popChar(); + switch (nextChar) { + // istanbul ignore next + case "\n": + // istanbul ignore next + case "\r": + // istanbul ignore next + case "\u2028": + // istanbul ignore next + case "\u2029": + // istanbul ignore next + case "^": + // istanbul ignore next + case "$": + // istanbul ignore next + case "\\": + // istanbul ignore next + case ".": + // istanbul ignore next + case "*": + // istanbul ignore next + case "+": + // istanbul ignore next + case "?": + // istanbul ignore next + case "(": + // istanbul ignore next + case ")": + // istanbul ignore next + case "[": + // istanbul ignore next + case "|": + // istanbul ignore next + throw Error("TBD"); + default: + return { type: "Character", value: cc(nextChar) }; + } + } + isRegExpFlag() { + switch (this.peekChar(0)) { + case "g": + case "i": + case "m": + case "u": + case "y": + return true; + default: + return false; + } + } + isRangeDash() { + return this.peekChar() === "-" && this.isClassAtom(1); + } + isDigit() { + return decimalPattern.test(this.peekChar(0)); + } + isClassAtom(howMuch = 0) { + switch (this.peekChar(howMuch)) { + case "]": + case "\n": + case "\r": + case "\u2028": + case "\u2029": + return false; + default: + return true; + } + } + isTerm() { + return this.isAtom() || this.isAssertion(); + } + isAtom() { + if (this.isPatternCharacter()) { + return true; + } + switch (this.peekChar(0)) { + case ".": + case "\\": // atomEscape + case "[": // characterClass + // TODO: isAtom must be called before isAssertion - disambiguate + case "(": // group + return true; + default: + return false; + } + } + isAssertion() { + switch (this.peekChar(0)) { + case "^": + case "$": + return true; + // '\b' or '\B' + case "\\": + switch (this.peekChar(1)) { + case "b": + case "B": + return true; + default: + return false; + } + // '(?=' or '(?!' + case "(": + return (this.peekChar(1) === "?" && + (this.peekChar(2) === "=" || this.peekChar(2) === "!")); + default: + return false; + } + } + isQuantifier() { + const prevState = this.saveState(); + try { + return this.quantifier(true) !== undefined; + } + catch (e) { + return false; + } + finally { + this.restoreState(prevState); + } + } + isPatternCharacter() { + switch (this.peekChar()) { + case "^": + case "$": + case "\\": + case ".": + case "*": + case "+": + case "?": + case "(": + case ")": + case "[": + case "|": + case "/": + case "\n": + case "\r": + case "\u2028": + case "\u2029": + return false; + default: + return true; + } + } + parseHexDigits(howMany) { + let hexString = ""; + for (let i = 0; i < howMany; i++) { + const hexChar = this.popChar(); + if (hexDigitPattern.test(hexChar) === false) { + throw Error("Expecting a HexDecimal digits"); + } + hexString += hexChar; + } + const charCode = parseInt(hexString, 16); + return { type: "Character", value: charCode }; + } + peekChar(howMuch = 0) { + return this.input[this.idx + howMuch]; + } + popChar() { + const nextChar = this.peekChar(0); + this.consumeChar(undefined); + return nextChar; + } + consumeChar(char) { + if (char !== undefined && this.input[this.idx] !== char) { + throw Error("Expected: '" + + char + + "' but found: '" + + this.input[this.idx] + + "' at offset: " + + this.idx); + } + if (this.idx >= this.input.length) { + throw Error("Unexpected end of input"); + } + this.idx++; + } + loc(begin) { + return { begin: begin, end: this.idx }; + } +} +//# sourceMappingURL=regexp-parser.js.map \ No newline at end of file diff --git a/node_modules/@chevrotain/regexp-to-ast/lib/src/regexp-parser.js.map b/node_modules/@chevrotain/regexp-to-ast/lib/src/regexp-parser.js.map new file mode 100644 index 0000000..150760b --- /dev/null +++ b/node_modules/@chevrotain/regexp-to-ast/lib/src/regexp-parser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"regexp-parser.js","sourceRoot":"","sources":["../../src/regexp-parser.ts"],"names":[],"mappings":"AAgBA,OAAO,EACL,OAAO,EACP,aAAa,EACb,uBAAuB,EACvB,EAAE,EACF,WAAW,EACX,WAAW,GACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,eAAe,EACf,eAAe,EACf,aAAa,GACd,MAAM,wBAAwB,CAAC;AAEhC,uBAAuB;AACvB,MAAM,eAAe,GAAG,aAAa,CAAC;AACtC,MAAM,cAAc,GAAG,OAAO,CAAC;AAC/B,MAAM,oBAAoB,GAAG,OAAO,CAAC;AAErC,2FAA2F;AAC3F,0EAA0E;AAC1E,MAAM,OAAO,YAAY;IAAzB;QACY,QAAG,GAAW,CAAC,CAAC;QAChB,UAAK,GAAW,EAAE,CAAC;QACnB,aAAQ,GAAW,CAAC,CAAC;IA+xBjC,CAAC;IA7xBW,SAAS;QACjB,OAAO;YACL,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC;IACJ,CAAC;IAES,YAAY,CAAC,QAItB;QACC,IAAI,CAAC,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC;QACxB,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;IACpC,CAAC;IAEM,OAAO,CAAC,KAAa;QAC1B,eAAe;QACf,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;QAElB,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACtB,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QACjC,IAA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OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC;IACzC,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/@chevrotain/regexp-to-ast/lib/src/utils.js b/node_modules/@chevrotain/regexp-to-ast/lib/src/utils.js new file mode 100644 index 0000000..7a35e28 --- /dev/null +++ b/node_modules/@chevrotain/regexp-to-ast/lib/src/utils.js @@ -0,0 +1,35 @@ +export function cc(char) { + return char.charCodeAt(0); +} +export function insertToSet(item, set) { + if (Array.isArray(item)) { + item.forEach(function (subItem) { + set.push(subItem); + }); + } + else { + set.push(item); + } +} +export function addFlag(flagObj, flagKey) { + if (flagObj[flagKey] === true) { + throw "duplicate flag " + flagKey; + } + const x = flagObj[flagKey]; + flagObj[flagKey] = true; +} +export function ASSERT_EXISTS(obj) { + // istanbul ignore next + if (obj === undefined) { + throw Error("Internal Error - Should never get here!"); + } + return true; +} +// istanbul ignore next +export function ASSERT_NEVER_REACH_HERE() { + throw Error("Internal Error - Should never get here!"); +} +export function isCharacter(obj) { + return obj["type"] === "Character"; +} +//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/node_modules/@chevrotain/regexp-to-ast/lib/src/utils.js.map b/node_modules/@chevrotain/regexp-to-ast/lib/src/utils.js.map new file mode 100644 index 0000000..103962e --- /dev/null +++ b/node_modules/@chevrotain/regexp-to-ast/lib/src/utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,EAAE,CAAC,IAAY;IAC7B,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,WAAW,CAAI,IAAa,EAAE,GAAQ;IACpD,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACvB,IAAI,CAAC,OAAO,CAAC,UAAU,OAAO;YAC5B,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpB,CAAC,CAAC,CAAC;KACJ;SAAM;QACL,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAChB;AACH,CAAC;AAED,MAAM,UAAU,OAAO,CACrB,OAAoB,EACpB,OAAkD;IAElD,IAAI,OAAO,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE;QAC7B,MAAM,iBAAiB,GAAG,OAAO,CAAC;KACnC;IAED,MAAM,CAAC,GAAY,OAAO,CAAC,OAAO,CAAC,CAAC;IACpC,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;AAC1B,CAAC;AAED,MAAM,UAAU,aAAa,CAAa,GAAQ;IAChD,uBAAuB;IACvB,IAAI,GAAG,KAAK,SAAS,EAAE;QACrB,MAAM,KAAK,CAAC,yCAAyC,CAAC,CAAC;KACxD;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,uBAAuB;AACvB,MAAM,UAAU,uBAAuB;IACrC,MAAM,KAAK,CAAC,yCAAyC,CAAC,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,GAAqB;IAC/C,OAAO,GAAG,CAAC,MAAM,CAAC,KAAK,WAAW,CAAC;AACrC,CAAC"} \ No newline at end of file diff --git a/node_modules/@chevrotain/regexp-to-ast/package.json b/node_modules/@chevrotain/regexp-to-ast/package.json new file mode 100644 index 0000000..f8f2896 --- /dev/null +++ b/node_modules/@chevrotain/regexp-to-ast/package.json @@ -0,0 +1,47 @@ +{ + "name": "@chevrotain/regexp-to-ast", + "version": "11.0.3", + "description": "Parses a Regular Expression and outputs an AST", + "keywords": [ + "regExp", + "parser", + "regular expression" + ], + "bugs": { + "url": "https://github.com/Chevrotain/chevrotain/issues" + }, + "license": "Apache-2.0", + "type": "module", + "types": "./types.d.ts", + "exports": { + ".": { + "import": "./lib/src/api.js", + "types": "./types.d.ts" + } + }, + "files": [ + "lib/src/**/*.js", + "lib/src/**/*.map", + "src/**/*.ts", + "types.d.ts" + ], + "repository": { + "type": "git", + "url": "git://github.com/Chevrotain/chevrotain.git" + }, + "scripts": { + "---------- CI FLOWS --------": "", + "ci": "pnpm run build test", + "build": "npm-run-all clean compile", + "test": "npm-run-all coverage", + "---------- BUILD STEPS --------": "", + "clean": "shx rm -rf lib coverage", + "compile:watch": "tsc -w", + "compile": "tsc", + "coverage": "c8 mocha" + }, + "publishConfig": { + "access": "public" + }, + "gitHead": "ac5806631779035c2c1955744a47d8ed4f25a175" +} diff --git a/node_modules/@chevrotain/regexp-to-ast/src/api.ts b/node_modules/@chevrotain/regexp-to-ast/src/api.ts new file mode 100644 index 0000000..926bb0b --- /dev/null +++ b/node_modules/@chevrotain/regexp-to-ast/src/api.ts @@ -0,0 +1,2 @@ +export { RegExpParser } from "./regexp-parser.js"; +export { BaseRegExpVisitor } from "./base-regexp-visitor.js"; diff --git a/node_modules/@chevrotain/regexp-to-ast/src/base-regexp-visitor.ts b/node_modules/@chevrotain/regexp-to-ast/src/base-regexp-visitor.ts new file mode 100644 index 0000000..2da3118 --- /dev/null +++ b/node_modules/@chevrotain/regexp-to-ast/src/base-regexp-visitor.ts @@ -0,0 +1,116 @@ +import type { + Alternative, + Assertion, + Character, + Disjunction, + Group, + GroupBackReference, + IRegExpAST, + Quantifier, + RegExpAstPart, + RegExpFlags, + RegExpPattern, + Set, +} from "../types"; + +export class BaseRegExpVisitor { + public visitChildren(node: IRegExpAST) { + for (const key in node) { + const child = (node as any)[key]; + /* istanbul ignore else */ + if (node.hasOwnProperty(key)) { + if (child.type !== undefined) { + this.visit(child); + } else if (Array.isArray(child)) { + child.forEach((subChild) => { + this.visit(subChild); + }, this); + } + } + } + } + + public visit(node: RegExpAstPart): void { + switch (node.type) { + case "Pattern": + this.visitPattern(node); + break; + case "Flags": + this.visitFlags(node); + break; + case "Disjunction": + this.visitDisjunction(node); + break; + case "Alternative": + this.visitAlternative(node); + break; + case "StartAnchor": + this.visitStartAnchor(node); + break; + case "EndAnchor": + this.visitEndAnchor(node); + break; + case "WordBoundary": + this.visitWordBoundary(node); + break; + case "NonWordBoundary": + this.visitNonWordBoundary(node); + break; + case "Lookahead": + this.visitLookahead(node); + break; + case "NegativeLookahead": + this.visitNegativeLookahead(node); + break; + case "Character": + this.visitCharacter(node); + break; + case "Set": + this.visitSet(node); + break; + case "Group": + this.visitGroup(node); + break; + case "GroupBackReference": + this.visitGroupBackReference(node); + break; + case "Quantifier": + this.visitQuantifier(node); + break; + } + + this.visitChildren(node); + } + + public visitPattern(node: RegExpPattern): void {} + + public visitFlags(node: RegExpFlags): void {} + + public visitDisjunction(node: Disjunction): void {} + + public visitAlternative(node: Alternative): void {} + + // Assertion + public visitStartAnchor(node: Assertion): void {} + + public visitEndAnchor(node: Assertion): void {} + + public visitWordBoundary(node: Assertion): void {} + + public visitNonWordBoundary(node: Assertion): void {} + + public visitLookahead(node: Assertion): void {} + + public visitNegativeLookahead(node: Assertion): void {} + + // atoms + public visitCharacter(node: Character): void {} + + public visitSet(node: Set): void {} + + public visitGroup(node: Group): void {} + + public visitGroupBackReference(node: GroupBackReference): void {} + + public visitQuantifier(node: Quantifier): void {} +} diff --git a/node_modules/@chevrotain/regexp-to-ast/src/character-classes.ts b/node_modules/@chevrotain/regexp-to-ast/src/character-classes.ts new file mode 100644 index 0000000..05fc148 --- /dev/null +++ b/node_modules/@chevrotain/regexp-to-ast/src/character-classes.ts @@ -0,0 +1,45 @@ +import { cc } from "./utils.js"; + +export const digitsCharCodes: number[] = []; +for (let i = cc("0"); i <= cc("9"); i++) { + digitsCharCodes.push(i); +} + +export const wordCharCodes: number[] = [cc("_")].concat(digitsCharCodes); +for (let i = cc("a"); i <= cc("z"); i++) { + wordCharCodes.push(i); +} + +for (let i = cc("A"); i <= cc("Z"); i++) { + wordCharCodes.push(i); +} + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#character-classes +export const whitespaceCodes: number[] = [ + cc(" "), + cc("\f"), + cc("\n"), + cc("\r"), + cc("\t"), + cc("\v"), + cc("\t"), + cc("\u00a0"), + cc("\u1680"), + cc("\u2000"), + cc("\u2001"), + cc("\u2002"), + cc("\u2003"), + cc("\u2004"), + cc("\u2005"), + cc("\u2006"), + cc("\u2007"), + cc("\u2008"), + cc("\u2009"), + cc("\u200a"), + cc("\u2028"), + cc("\u2029"), + cc("\u202f"), + cc("\u205f"), + cc("\u3000"), + cc("\ufeff"), +]; diff --git a/node_modules/@chevrotain/regexp-to-ast/src/regexp-parser.ts b/node_modules/@chevrotain/regexp-to-ast/src/regexp-parser.ts new file mode 100644 index 0000000..3250a96 --- /dev/null +++ b/node_modules/@chevrotain/regexp-to-ast/src/regexp-parser.ts @@ -0,0 +1,840 @@ +import type { + Alternative, + Assertion, + Atom, + Character, + Disjunction, + Group, + GroupBackReference, + Location, + Quantifier, + Range, + RegExpFlags, + RegExpPattern, + Set, + Term, +} from "../types"; +import { + addFlag, + ASSERT_EXISTS, + ASSERT_NEVER_REACH_HERE, + cc, + insertToSet, + isCharacter, +} from "./utils.js"; +import { + digitsCharCodes, + whitespaceCodes, + wordCharCodes, +} from "./character-classes.js"; + +// consts and utilities +const hexDigitPattern = /[0-9a-fA-F]/; +const decimalPattern = /[0-9]/; +const decimalPatternNoZero = /[1-9]/; + +// https://hackernoon.com/the-madness-of-parsing-real-world-javascript-regexps-d9ee336df983 +// https://www.ecma-international.org/ecma-262/8.0/index.html#prod-Pattern +export class RegExpParser { + protected idx: number = 0; + protected input: string = ""; + protected groupIdx: number = 0; + + protected saveState() { + return { + idx: this.idx, + input: this.input, + groupIdx: this.groupIdx, + }; + } + + protected restoreState(newState: { + idx: number; + input: string; + groupIdx: number; + }) { + this.idx = newState.idx; + this.input = newState.input; + this.groupIdx = newState.groupIdx; + } + + public pattern(input: string): RegExpPattern { + // parser state + this.idx = 0; + this.input = input; + this.groupIdx = 0; + + this.consumeChar("/"); + const value = this.disjunction(); + this.consumeChar("/"); + + const flags: RegExpFlags = { + type: "Flags", + loc: { begin: this.idx, end: input.length }, + global: false, + ignoreCase: false, + multiLine: false, + unicode: false, + sticky: false, + }; + + while (this.isRegExpFlag()) { + switch (this.popChar()) { + case "g": + addFlag(flags, "global"); + break; + case "i": + addFlag(flags, "ignoreCase"); + break; + case "m": + addFlag(flags, "multiLine"); + break; + case "u": + addFlag(flags, "unicode"); + break; + case "y": + addFlag(flags, "sticky"); + break; + } + } + + if (this.idx !== this.input.length) { + throw Error("Redundant input: " + this.input.substring(this.idx)); + } + return { + type: "Pattern", + flags: flags, + value: value, + loc: this.loc(0), + }; + } + + protected disjunction(): Disjunction { + const alts = []; + const begin = this.idx; + + alts.push(this.alternative()); + + while (this.peekChar() === "|") { + this.consumeChar("|"); + alts.push(this.alternative()); + } + + return { type: "Disjunction", value: alts, loc: this.loc(begin) }; + } + + protected alternative(): Alternative { + const terms = []; + const begin = this.idx; + + while (this.isTerm()) { + terms.push(this.term()); + } + + return { type: "Alternative", value: terms, loc: this.loc(begin) }; + } + + protected term(): Term { + if (this.isAssertion()) { + return this.assertion(); + } else { + return this.atom(); + } + } + + protected assertion(): Assertion { + const begin = this.idx; + switch (this.popChar()) { + case "^": + return { + type: "StartAnchor", + loc: this.loc(begin), + }; + case "$": + return { type: "EndAnchor", loc: this.loc(begin) }; + // '\b' or '\B' + case "\\": + switch (this.popChar()) { + case "b": + return { + type: "WordBoundary", + loc: this.loc(begin), + }; + case "B": + return { + type: "NonWordBoundary", + loc: this.loc(begin), + }; + } + // istanbul ignore next + throw Error("Invalid Assertion Escape"); + // '(?=' or '(?!' + case "(": + this.consumeChar("?"); + + let type: "Lookahead" | "NegativeLookahead" | undefined; + switch (this.popChar()) { + case "=": + type = "Lookahead"; + break; + case "!": + type = "NegativeLookahead"; + break; + } + ASSERT_EXISTS(type); + + const disjunction = this.disjunction(); + + this.consumeChar(")"); + + return { + type: type!, + value: disjunction, + loc: this.loc(begin), + }; + } + // istanbul ignore next + return ASSERT_NEVER_REACH_HERE(); + } + + protected quantifier( + isBacktracking: boolean = false, + ): Quantifier | undefined { + let range: Partial | undefined = undefined; + const begin = this.idx; + switch (this.popChar()) { + case "*": + range = { + atLeast: 0, + atMost: Infinity, + }; + break; + case "+": + range = { + atLeast: 1, + atMost: Infinity, + }; + break; + case "?": + range = { + atLeast: 0, + atMost: 1, + }; + break; + case "{": + const atLeast = this.integerIncludingZero(); + switch (this.popChar()) { + case "}": + range = { + atLeast: atLeast, + atMost: atLeast, + }; + break; + case ",": + let atMost; + if (this.isDigit()) { + atMost = this.integerIncludingZero(); + range = { + atLeast: atLeast, + atMost: atMost, + }; + } else { + range = { + atLeast: atLeast, + atMost: Infinity, + }; + } + this.consumeChar("}"); + break; + } + // throwing exceptions from "ASSERT_EXISTS" during backtracking + // causes severe performance degradations + if (isBacktracking === true && range === undefined) { + return undefined; + } + ASSERT_EXISTS(range); + break; + } + + // throwing exceptions from "ASSERT_EXISTS" during backtracking + // causes severe performance degradations + if (isBacktracking === true && range === undefined) { + return undefined; + } + + // istanbul ignore else + if (ASSERT_EXISTS(range)) { + if (this.peekChar(0) === "?") { + this.consumeChar("?"); + range.greedy = false; + } else { + range.greedy = true; + } + + range.type = "Quantifier"; + range.loc = this.loc(begin); + return range as Quantifier; + } + } + + protected atom(): Atom { + let atom: Omit | undefined; + const begin = this.idx; + switch (this.peekChar()) { + case ".": + atom = this.dotAll(); + break; + case "\\": + atom = this.atomEscape(); + break; + case "[": + atom = this.characterClass(); + break; + case "(": + atom = this.group(); + break; + } + + if (atom === undefined && this.isPatternCharacter()) { + atom = this.patternCharacter(); + } + + // istanbul ignore else + if (ASSERT_EXISTS(atom)) { + atom.loc = this.loc(begin); + + if (this.isQuantifier()) { + atom.quantifier = this.quantifier(); + } + + return atom; + } + + // istanbul ignore next + return ASSERT_NEVER_REACH_HERE(); + } + + protected dotAll(): Omit { + this.consumeChar("."); + return { + type: "Set", + complement: true, + value: [cc("\n"), cc("\r"), cc("\u2028"), cc("\u2029")], + }; + } + + protected atomEscape(): Omit { + this.consumeChar("\\"); + + switch (this.peekChar()) { + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + return this.decimalEscapeAtom(); + case "d": + case "D": + case "s": + case "S": + case "w": + case "W": + return this.characterClassEscape(); + case "f": + case "n": + case "r": + case "t": + case "v": + return this.controlEscapeAtom(); + case "c": + return this.controlLetterEscapeAtom(); + case "0": + return this.nulCharacterAtom(); + case "x": + return this.hexEscapeSequenceAtom(); + case "u": + return this.regExpUnicodeEscapeSequenceAtom(); + default: + return this.identityEscapeAtom(); + } + } + + protected decimalEscapeAtom(): Omit { + const value = this.positiveInteger(); + + return { type: "GroupBackReference", value: value }; + } + + protected characterClassEscape(): Omit { + let set: (number | Range)[] | undefined; + let complement = false; + switch (this.popChar()) { + case "d": + set = digitsCharCodes; + break; + case "D": + set = digitsCharCodes; + complement = true; + break; + case "s": + set = whitespaceCodes; + break; + case "S": + set = whitespaceCodes; + complement = true; + break; + case "w": + set = wordCharCodes; + break; + case "W": + set = wordCharCodes; + complement = true; + break; + } + + // istanbul ignore else + if (ASSERT_EXISTS(set)) { + return { type: "Set", value: set, complement: complement }; + } + // istanbul ignore next + return ASSERT_NEVER_REACH_HERE(); + } + + protected controlEscapeAtom(): Omit { + let escapeCode; + switch (this.popChar()) { + case "f": + escapeCode = cc("\f"); + break; + case "n": + escapeCode = cc("\n"); + break; + case "r": + escapeCode = cc("\r"); + break; + case "t": + escapeCode = cc("\t"); + break; + case "v": + escapeCode = cc("\v"); + break; + } + + // istanbul ignore else + if (ASSERT_EXISTS(escapeCode)) { + return { type: "Character", value: escapeCode }; + } + // istanbul ignore next + return ASSERT_NEVER_REACH_HERE(); + } + + protected controlLetterEscapeAtom(): Omit { + this.consumeChar("c"); + const letter = this.popChar(); + if (/[a-zA-Z]/.test(letter) === false) { + throw Error("Invalid "); + } + + const letterCode = letter.toUpperCase().charCodeAt(0) - 64; + return { type: "Character", value: letterCode }; + } + + protected nulCharacterAtom(): Omit { + // TODO implement '[lookahead ∉ DecimalDigit]' + // TODO: for the deprecated octal escape sequence + this.consumeChar("0"); + return { type: "Character", value: cc("\0") }; + } + + protected hexEscapeSequenceAtom(): Omit { + this.consumeChar("x"); + return this.parseHexDigits(2); + } + + protected regExpUnicodeEscapeSequenceAtom(): Omit { + this.consumeChar("u"); + return this.parseHexDigits(4); + } + + protected identityEscapeAtom(): Omit { + // TODO: implement "SourceCharacter but not UnicodeIDContinue" + // // http://unicode.org/reports/tr31/#Specific_Character_Adjustments + const escapedChar = this.popChar(); + return { type: "Character", value: cc(escapedChar) }; + } + + protected classPatternCharacterAtom(): Omit { + switch (this.peekChar()) { + // istanbul ignore next + case "\n": + // istanbul ignore next + case "\r": + // istanbul ignore next + case "\u2028": + // istanbul ignore next + case "\u2029": + // istanbul ignore next + case "\\": + // istanbul ignore next + case "]": + throw Error("TBD"); + default: + const nextChar = this.popChar(); + return { type: "Character", value: cc(nextChar) }; + } + } + + protected characterClass(): Omit { + const set: (number | Range)[] = []; + let complement = false; + this.consumeChar("["); + if (this.peekChar(0) === "^") { + this.consumeChar("^"); + complement = true; + } + + while (this.isClassAtom()) { + const from = this.classAtom(); + const isFromSingleChar = from.type === "Character"; + if (isCharacter(from) && this.isRangeDash()) { + this.consumeChar("-"); + const to = this.classAtom(); + const isToSingleChar = to.type === "Character"; + + // a range can only be used when both sides are single characters + if (isCharacter(to)) { + if (to.value < from.value) { + throw Error("Range out of order in character class"); + } + set.push({ from: from.value, to: to.value }); + } else { + // literal dash + insertToSet(from.value, set); + set.push(cc("-")); + insertToSet(to.value, set); + } + } else { + insertToSet(from.value, set); + } + } + + this.consumeChar("]"); + + return { type: "Set", complement: complement, value: set }; + } + + protected classAtom(): Omit { + switch (this.peekChar()) { + // istanbul ignore next + case "]": + // istanbul ignore next + case "\n": + // istanbul ignore next + case "\r": + // istanbul ignore next + case "\u2028": + // istanbul ignore next + case "\u2029": + throw Error("TBD"); + case "\\": + return this.classEscape(); + default: + return this.classPatternCharacterAtom(); + } + } + + protected classEscape(): Omit { + this.consumeChar("\\"); + switch (this.peekChar()) { + // Matches a backspace. + // (Not to be confused with \b word boundary outside characterClass) + case "b": + this.consumeChar("b"); + return { type: "Character", value: cc("\u0008") }; + case "d": + case "D": + case "s": + case "S": + case "w": + case "W": + return this.characterClassEscape(); + case "f": + case "n": + case "r": + case "t": + case "v": + return this.controlEscapeAtom(); + case "c": + return this.controlLetterEscapeAtom(); + case "0": + return this.nulCharacterAtom(); + case "x": + return this.hexEscapeSequenceAtom(); + case "u": + return this.regExpUnicodeEscapeSequenceAtom(); + default: + return this.identityEscapeAtom(); + } + } + + protected group(): Omit { + let capturing = true; + this.consumeChar("("); + switch (this.peekChar(0)) { + case "?": + this.consumeChar("?"); + this.consumeChar(":"); + capturing = false; + break; + default: + this.groupIdx++; + break; + } + const value = this.disjunction(); + this.consumeChar(")"); + + const groupAst: Omit = { + type: "Group", + capturing: capturing, + value: value, + }; + + if (capturing) { + groupAst["idx"] = this.groupIdx; + } + + return groupAst; + } + + protected positiveInteger(): number { + let number = this.popChar(); + + // istanbul ignore next - can't ever get here due to previous lookahead checks + // still implementing this error checking in case this ever changes. + if (decimalPatternNoZero.test(number) === false) { + throw Error("Expecting a positive integer"); + } + + while (decimalPattern.test(this.peekChar(0))) { + number += this.popChar(); + } + + return parseInt(number, 10); + } + + protected integerIncludingZero(): number { + let number = this.popChar(); + if (decimalPattern.test(number) === false) { + throw Error("Expecting an integer"); + } + + while (decimalPattern.test(this.peekChar(0))) { + number += this.popChar(); + } + + return parseInt(number, 10); + } + + protected patternCharacter(): Omit { + const nextChar = this.popChar(); + switch (nextChar) { + // istanbul ignore next + case "\n": + // istanbul ignore next + case "\r": + // istanbul ignore next + case "\u2028": + // istanbul ignore next + case "\u2029": + // istanbul ignore next + case "^": + // istanbul ignore next + case "$": + // istanbul ignore next + case "\\": + // istanbul ignore next + case ".": + // istanbul ignore next + case "*": + // istanbul ignore next + case "+": + // istanbul ignore next + case "?": + // istanbul ignore next + case "(": + // istanbul ignore next + case ")": + // istanbul ignore next + case "[": + // istanbul ignore next + case "|": + // istanbul ignore next + throw Error("TBD"); + default: + return { type: "Character", value: cc(nextChar) }; + } + } + protected isRegExpFlag(): boolean { + switch (this.peekChar(0)) { + case "g": + case "i": + case "m": + case "u": + case "y": + return true; + default: + return false; + } + } + + protected isRangeDash(): boolean { + return this.peekChar() === "-" && this.isClassAtom(1); + } + + protected isDigit(): boolean { + return decimalPattern.test(this.peekChar(0)); + } + + protected isClassAtom(howMuch = 0): boolean { + switch (this.peekChar(howMuch)) { + case "]": + case "\n": + case "\r": + case "\u2028": + case "\u2029": + return false; + default: + return true; + } + } + + protected isTerm() { + return this.isAtom() || this.isAssertion(); + } + + protected isAtom(): boolean { + if (this.isPatternCharacter()) { + return true; + } + + switch (this.peekChar(0)) { + case ".": + case "\\": // atomEscape + case "[": // characterClass + // TODO: isAtom must be called before isAssertion - disambiguate + case "(": // group + return true; + default: + return false; + } + } + + protected isAssertion(): boolean { + switch (this.peekChar(0)) { + case "^": + case "$": + return true; + // '\b' or '\B' + case "\\": + switch (this.peekChar(1)) { + case "b": + case "B": + return true; + default: + return false; + } + // '(?=' or '(?!' + case "(": + return ( + this.peekChar(1) === "?" && + (this.peekChar(2) === "=" || this.peekChar(2) === "!") + ); + default: + return false; + } + } + + protected isQuantifier(): boolean { + const prevState = this.saveState(); + try { + return this.quantifier(true) !== undefined; + } catch (e) { + return false; + } finally { + this.restoreState(prevState); + } + } + + protected isPatternCharacter(): boolean { + switch (this.peekChar()) { + case "^": + case "$": + case "\\": + case ".": + case "*": + case "+": + case "?": + case "(": + case ")": + case "[": + case "|": + case "/": + case "\n": + case "\r": + case "\u2028": + case "\u2029": + return false; + default: + return true; + } + } + + protected parseHexDigits(howMany: number): Omit { + let hexString = ""; + for (let i = 0; i < howMany; i++) { + const hexChar = this.popChar(); + if (hexDigitPattern.test(hexChar) === false) { + throw Error("Expecting a HexDecimal digits"); + } + hexString += hexChar; + } + const charCode = parseInt(hexString, 16); + return { type: "Character", value: charCode }; + } + + protected peekChar(howMuch = 0): string { + return this.input[this.idx + howMuch]; + } + + protected popChar(): string { + const nextChar = this.peekChar(0); + this.consumeChar(undefined); + return nextChar; + } + + protected consumeChar(char: string | undefined): void { + if (char !== undefined && this.input[this.idx] !== char) { + throw Error( + "Expected: '" + + char + + "' but found: '" + + this.input[this.idx] + + "' at offset: " + + this.idx, + ); + } + + if (this.idx >= this.input.length) { + throw Error("Unexpected end of input"); + } + this.idx++; + } + + protected loc(begin: number): Location { + return { begin: begin, end: this.idx }; + } +} diff --git a/node_modules/@chevrotain/regexp-to-ast/src/utils.ts b/node_modules/@chevrotain/regexp-to-ast/src/utils.ts new file mode 100644 index 0000000..d59d22b --- /dev/null +++ b/node_modules/@chevrotain/regexp-to-ast/src/utils.ts @@ -0,0 +1,44 @@ +import type { Character, IRegExpAST, RegExpFlags } from "../types"; + +export function cc(char: string): number { + return char.charCodeAt(0); +} + +export function insertToSet(item: T | T[], set: T[]) { + if (Array.isArray(item)) { + item.forEach(function (subItem) { + set.push(subItem); + }); + } else { + set.push(item); + } +} + +export function addFlag( + flagObj: RegExpFlags, + flagKey: keyof Omit, +) { + if (flagObj[flagKey] === true) { + throw "duplicate flag " + flagKey; + } + + const x: boolean = flagObj[flagKey]; + flagObj[flagKey] = true; +} + +export function ASSERT_EXISTS(obj: any): obj is T { + // istanbul ignore next + if (obj === undefined) { + throw Error("Internal Error - Should never get here!"); + } + return true; +} + +// istanbul ignore next +export function ASSERT_NEVER_REACH_HERE(): any { + throw Error("Internal Error - Should never get here!"); +} + +export function isCharacter(obj: { type: string }): obj is Character { + return obj["type"] === "Character"; +} diff --git a/node_modules/@chevrotain/regexp-to-ast/types.d.ts b/node_modules/@chevrotain/regexp-to-ast/types.d.ts new file mode 100644 index 0000000..7432450 --- /dev/null +++ b/node_modules/@chevrotain/regexp-to-ast/types.d.ts @@ -0,0 +1,134 @@ +export class RegExpParser { + pattern: (input: string) => RegExpPattern; +} + +export interface IRegExpAST { + type: string; + loc: Location; +} + +export interface Location { + begin: number; + end: number; +} + +export type RegExpAstPart = + | RegExpPattern + | RegExpFlags + | Disjunction + | Alternative + | Atom + | Assertion + | Quantifier; + +export interface RegExpPattern extends IRegExpAST { + type: "Pattern"; + flags: RegExpFlags; + value: Disjunction; +} + +export interface RegExpFlags extends IRegExpAST { + type: "Flags"; + global: boolean; + ignoreCase: boolean; + multiLine: boolean; + unicode: boolean; + sticky: boolean; +} + +export interface Disjunction extends IRegExpAST { + type: "Disjunction"; + value: Alternative[]; +} + +export interface Alternative extends IRegExpAST { + type: "Alternative"; + value: Term[]; +} + +export type Term = Atom | Assertion; + +export interface Assertion extends IRegExpAST { + type: + | "StartAnchor" + | "EndAnchor" + | "WordBoundary" + | "NonWordBoundary" + | "Lookahead" + | "NegativeLookahead"; + + value?: Disjunction; +} + +export type Atom = Character | Set | Group | GroupBackReference; + +export interface Character extends IRegExpAST { + type: "Character"; + value: number; + quantifier?: Quantifier; +} + +export type Range = { from: number; to: number }; + +export interface Set extends IRegExpAST { + type: "Set"; + complement: boolean; + value: (number | Range)[]; + quantifier?: Quantifier; +} + +export interface Group extends IRegExpAST { + type: "Group"; + value: Disjunction; + capturing: boolean; + idx?: number; + quantifier?: Quantifier; +} + +export interface GroupBackReference extends IRegExpAST { + type: "GroupBackReference"; + value: number; + quantifier?: Quantifier; +} + +export interface Quantifier extends IRegExpAST { + type: "Quantifier"; + atLeast: number; + atMost: number; + greedy: boolean; +} + +export class BaseRegExpVisitor { + /** + * The entry point visitor method. + * This will dispatch to the specific visitor method. + */ + visit(node: IRegExpAST): void; + + /** + * The entry point for visiting the children of a node. + * Override this to filter the types of children visited + * or to support new types of children in extended ASTs. + */ + visitChildren(node: IRegExpAST): void; + + /** + * The specific visitor methods + * Override some of these of create custom visitors. + */ + visitPattern(node: RegExpPattern): void; + visitFlags(node: RegExpFlags): void; + visitDisjunction(node: Disjunction): void; + visitAlternative(node: Alternative): void; + visitStartAnchor(node: Assertion): void; + visitEndAnchor(node: Assertion): void; + visitWordBoundary(node: Assertion): void; + visitNonWordBoundary(node: Assertion): void; + visitLookahead(node: Assertion): void; + visitNegativeLookahead(node: Assertion): void; + visitCharacter(node: Character): void; + visitSet(node: Set): void; + visitGroup(Node: Group): void; + visitGroupBackReference(Node: GroupBackReference): void; + visitQuantifier(Node: Quantifier): void; +} diff --git a/node_modules/@chevrotain/types/LICENSE.txt b/node_modules/@chevrotain/types/LICENSE.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/node_modules/@chevrotain/types/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@chevrotain/types/api.d.ts b/node_modules/@chevrotain/types/api.d.ts new file mode 100644 index 0000000..20e11dc --- /dev/null +++ b/node_modules/@chevrotain/types/api.d.ts @@ -0,0 +1,2790 @@ +export declare const VERSION: string; + +export type ParserMethod = (...args: ARGS) => R; + +/** + * This class does not actually exist nor is exposed at runtime. + * This is just a helper to avoid duplications in the Type Definitions + * Of `CstParser` and `EmbeddedActionsParser` + */ +declare abstract class BaseParser { + /** + * This must be called at the end of a Parser constructor. + * See: http://chevrotain.io/docs/tutorial/step2_parsing.html#under-the-hood + */ + protected performSelfAnalysis(): void; + + /** + * It is recommended to reuse the same Parser instance + * by passing an empty array to the input argument + * and only later setting the input by using the input property. + * See: http://chevrotain.io/docs/FAQ.html#major-performance-benefits + * + * @param tokenVocabulary - A data structure containing all the Tokens used by the Parser. + * @param config - The Parser's configuration. + */ + constructor(tokenVocabulary: TokenVocabulary, config?: IParserConfig); + + errors: IRecognitionException[]; + + /** + * Flag indicating the Parser is at the recording phase. + * Can be used to implement methods similar to {@link BaseParser.ACTION} + * Or any other logic to requires knowledge of the recording phase. + * See: + * - https://chevrotain.io/docs/guide/internals.html#grammar-recording + * to learn more on the recording phase and how Chevrotain works. + */ + RECORDING_PHASE: boolean; + + /** + * Resets the parser state, should be overridden for custom parsers which "carry" additional state. + * When overriding, remember to also invoke the super implementation! + */ + reset(): void; + + getBaseCstVisitorConstructor(): { + new (...args: any[]): ICstVisitor; + }; + + getBaseCstVisitorConstructorWithDefaults(): { + new (...args: any[]): ICstVisitor; + }; + + getGAstProductions(): Record; + + getSerializedGastProductions(): ISerializedGast[]; + + /** + * @param startRuleName + * @param precedingInput - The token vector up to (not including) the content assist point + */ + computeContentAssist( + startRuleName: string, + precedingInput: IToken[], + ): ISyntacticContentAssistPath[]; + + /** + * @param grammarRule - The rule to try and parse in backtracking mode. + * @param args - argument to be passed to the grammar rule execution + * + * @return a lookahead function that will try to parse the given grammarRule and will return true if succeed. + */ + protected BACKTRACK( + grammarRule: (...args: any[]) => T, + args?: any[], + ): () => boolean; + + /** + * The Semantic Actions wrapper. + * Should be used to wrap semantic actions that either: + * - May fail when executing in "recording phase". + * - Have global side effects that should be avoided during "recording phase". + * + * For more information see: + * - https://chevrotain.io/docs/guide/internals.html#grammar-recording + */ + protected ACTION(impl: () => T): T; + + /** + * Like `CONSUME` with the numerical suffix as a parameter, e.g: + * consume(0, X) === CONSUME(X) + * consume(1, X) === CONSUME1(X) + * consume(2, X) === CONSUME2(X) + * ... + * @see CONSUME + */ + protected consume( + idx: number, + tokType: TokenType, + options?: ConsumeMethodOpts, + ): IToken; + + /** + * Like `OPTION` with the numerical suffix as a parameter, e.g: + * option(0, X) === OPTION(X) + * option(1, X) === OPTION1(X) + * option(2, X) === OPTION2(X) + * ... + * @see OPTION + */ + protected option( + idx: number, + actionORMethodDef: GrammarAction | DSLMethodOpts, + ): OUT | undefined; + + /** + * Like `OR` with the numerical suffix as a parameter, e.g: + * or(0, X) === OR(X) + * or(1, X) === OR1(X) + * or(2, X) === OR2(X) + * ... + * @see OR + */ + protected or(idx: number, altsOrOpts: IOrAlt[] | OrMethodOpts): any; + protected or(idx: number, altsOrOpts: IOrAlt[] | OrMethodOpts): T; + + /** + * Like `MANY` with the numerical suffix as a parameter, e.g: + * many(0, X) === MANY(X) + * many(1, X) === MANY1(X) + * many(2, X) === MANY2(X) + * ... + * @see MANY + */ + protected many( + idx: number, + actionORMethodDef: GrammarAction | DSLMethodOpts, + ): void; + + /** + * Like `AT_LEAST_ONE` with the numerical suffix as a parameter, e.g: + * atLeastOne(0, X) === AT_LEAST_ONE(X) + * atLeastOne(1, X) === AT_LEAST_ONE1(X) + * atLeastOne(2, X) === AT_LEAST_ONE2(X) + * ... + * @see AT_LEAST_ONE + */ + protected atLeastOne( + idx: number, + actionORMethodDef: GrammarAction | DSLMethodOptsWithErr, + ): void; + + /** + * + * A Parsing DSL method use to consume a single Token. + * In EBNF terms this is equivalent to a Terminal. + * + * A Token will be consumed, IFF the next token in the token vector matches `tokType`. + * otherwise the parser may attempt to perform error recovery (if enabled). + * + * The index in the method name indicates the unique occurrence of a terminal consumption + * inside a the top level rule. What this means is that if a terminal appears + * more than once in a single rule, each appearance must have a **different** index. + * + * For example: + * ``` + * this.RULE("qualifiedName", () => { + * this.CONSUME1(Identifier); + * this.MANY(() => { + * this.CONSUME1(Dot); + * // here we use CONSUME2 because the terminal + * // 'Identifier' has already appeared previously in the + * // the rule 'parseQualifiedName' + * this.CONSUME2(Identifier); + * }); + * }) + * ``` + * + * - See more details on the [unique suffixes requirement](http://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES). + * + * @param tokType - The Type of the token to be consumed. + * @param options - optional properties to modify the behavior of CONSUME. + */ + protected CONSUME(tokType: TokenType, options?: ConsumeMethodOpts): IToken; + + /** + * @see CONSUME + * @hidden + */ + protected CONSUME1(tokType: TokenType, options?: ConsumeMethodOpts): IToken; + + /** + * @see CONSUME + * @hidden + */ + protected CONSUME2(tokType: TokenType, options?: ConsumeMethodOpts): IToken; + + /** + * @see CONSUME + * @hidden + */ + protected CONSUME3(tokType: TokenType, options?: ConsumeMethodOpts): IToken; + + /** + * @see CONSUME + * @hidden + */ + protected CONSUME4(tokType: TokenType, options?: ConsumeMethodOpts): IToken; + + /** + * @see CONSUME + * @hidden + */ + protected CONSUME5(tokType: TokenType, options?: ConsumeMethodOpts): IToken; + + /** + * @see CONSUME + * @hidden + */ + protected CONSUME6(tokType: TokenType, options?: ConsumeMethodOpts): IToken; + + /** + * @see CONSUME + * @hidden + */ + protected CONSUME7(tokType: TokenType, options?: ConsumeMethodOpts): IToken; + + /** + * @see CONSUME + * @hidden + */ + protected CONSUME8(tokType: TokenType, options?: ConsumeMethodOpts): IToken; + + /** + * @see CONSUME + * @hidden + */ + protected CONSUME9(tokType: TokenType, options?: ConsumeMethodOpts): IToken; + + /** + * Parsing DSL Method that Indicates an Optional production. + * in EBNF notation this is equivalent to: "[...]". + * + * Note that there are two syntax forms: + * - Passing the grammar action directly: + * ``` + * this.OPTION(() => { + * this.CONSUME(Digit)} + * ); + * ``` + * + * - using an "options" object: + * ``` + * this.OPTION({ + * GATE:predicateFunc, + * DEF: () => { + * this.CONSUME(Digit) + * }}); + * ``` + * + * The optional 'GATE' property in "options" object form can be used to add constraints + * to invoking the grammar action. + * + * As in CONSUME the index in the method name indicates the occurrence + * of the optional production in it's top rule. + * + * @param actionORMethodDef - The grammar action to optionally invoke once + * or an "OPTIONS" object describing the grammar action and optional properties. + * + * @returns The `GrammarAction` return value (OUT) if the optional syntax is encountered + * or `undefined` if not. + */ + protected OPTION( + actionORMethodDef: GrammarAction | DSLMethodOpts, + ): OUT | undefined; + + /** + * @see OPTION + * @hidden + */ + protected OPTION1( + actionORMethodDef: GrammarAction | DSLMethodOpts, + ): OUT | undefined; + + /** + * @see OPTION + * @hidden + */ + protected OPTION2( + actionORMethodDef: GrammarAction | DSLMethodOpts, + ): OUT | undefined; + + /** + * @see OPTION + * @hidden + */ + protected OPTION3( + actionORMethodDef: GrammarAction | DSLMethodOpts, + ): OUT | undefined; + + /** + * @see OPTION + * @hidden + */ + protected OPTION4( + actionORMethodDef: GrammarAction | DSLMethodOpts, + ): OUT | undefined; + + /** + * @see OPTION + * @hidden + */ + protected OPTION5( + actionORMethodDef: GrammarAction | DSLMethodOpts, + ): OUT | undefined; + + /** + * @see OPTION + * @hidden + */ + protected OPTION6( + actionORMethodDef: GrammarAction | DSLMethodOpts, + ): OUT | undefined; + + /** + * @see OPTION + * @hidden + */ + protected OPTION7( + actionORMethodDef: GrammarAction | DSLMethodOpts, + ): OUT | undefined; + + /** + * @see OPTION + * @hidden + */ + protected OPTION8( + actionORMethodDef: GrammarAction | DSLMethodOpts, + ): OUT | undefined; + + /** + * @see OPTION + * @hidden + */ + protected OPTION9( + actionORMethodDef: GrammarAction | DSLMethodOpts, + ): OUT | undefined; + + /** + * Parsing DSL method that indicates a choice between a set of alternatives must be made. + * This is equivalent to an EBNF alternation (A | B | C | D ...), except + * that the alternatives are ordered like in a PEG grammar. + * This means that the **first** matching alternative is always chosen. + * + * There are several forms for the inner alternatives array: + * + * - Passing alternatives array directly: + * ``` + * this.OR([ + * { ALT:() => { this.CONSUME(One) }}, + * { ALT:() => { this.CONSUME(Two) }}, + * { ALT:() => { this.CONSUME(Three) }} + * ]) + * ``` + * + * - Passing alternative array directly with predicates (GATE): + * ``` + * this.OR([ + * { GATE: predicateFunc1, ALT:() => { this.CONSUME(One) }}, + * { GATE: predicateFuncX, ALT:() => { this.CONSUME(Two) }}, + * { GATE: predicateFuncX, ALT:() => { this.CONSUME(Three) }} + * ]) + * ``` + * + * - These syntax forms can also be mixed: + * ``` + * this.OR([ + * { + * GATE: predicateFunc1, + * ALT:() => { this.CONSUME(One) } + * }, + * { ALT:() => { this.CONSUME(Two) }}, + * { ALT:() => { this.CONSUME(Three) }} + * ]) + * ``` + * + * - Additionally an "options" object may be used: + * ``` + * this.OR({ + * DEF:[ + * { ALT:() => { this.CONSUME(One) }}, + * { ALT:() => { this.CONSUME(Two) }}, + * { ALT:() => { this.CONSUME(Three) }} + * ], + * // OPTIONAL property + * ERR_MSG: "A Number" + * }) + * ``` + * + * The 'predicateFuncX' in the long form can be used to add constraints to choosing the alternative. + * + * As in CONSUME the index in the method name indicates the occurrence + * of the alternation production in it's top rule. + * + * @param altsOrOpts - A set of alternatives or an "OPTIONS" object describing the alternatives and optional properties. + * + * @returns The result of invoking the chosen alternative. + */ + protected OR(altsOrOpts: IOrAlt[] | OrMethodOpts): T; + protected OR(altsOrOpts: IOrAlt[] | OrMethodOpts): any; + + /** + * @see OR + * @hidden + */ + protected OR1(altsOrOpts: IOrAlt[] | OrMethodOpts): T; + protected OR1(altsOrOpts: IOrAlt[] | OrMethodOpts): any; + + /** + * @see OR + * @hidden + */ + protected OR2(altsOrOpts: IOrAlt[] | OrMethodOpts): T; + protected OR2(altsOrOpts: IOrAlt[] | OrMethodOpts): any; + + /** + * @see OR + * @hidden + */ + protected OR3(altsOrOpts: IOrAlt[] | OrMethodOpts): T; + protected OR3(altsOrOpts: IOrAlt[] | OrMethodOpts): any; + + /** + * @see OR + * @hidden + */ + protected OR4(altsOrOpts: IOrAlt[] | OrMethodOpts): T; + protected OR4(altsOrOpts: IOrAlt[] | OrMethodOpts): any; + + /** + * @see OR + * @hidden + */ + protected OR5(altsOrOpts: IOrAlt[] | OrMethodOpts): T; + protected OR5(altsOrOpts: IOrAlt[] | OrMethodOpts): any; + + /** + * @see OR + * @hidden + */ + protected OR6(altsOrOpts: IOrAlt[] | OrMethodOpts): T; + protected OR6(altsOrOpts: IOrAlt[] | OrMethodOpts): any; + + /** + * @see OR + * @hidden + */ + protected OR7(altsOrOpts: IOrAlt[] | OrMethodOpts): T; + protected OR7(altsOrOpts: IOrAlt[] | OrMethodOpts): any; + + /** + * @see OR + * @hidden + */ + protected OR8(altsOrOpts: IOrAlt[] | OrMethodOpts): T; + protected OR8(altsOrOpts: IOrAlt[] | OrMethodOpts): any; + + /** + * @see OR + * @hidden + */ + protected OR9(altsOrOpts: IOrAlt[] | OrMethodOpts): T; + protected OR9(altsOrOpts: IOrAlt[] | OrMethodOpts): any; + + /** + * Parsing DSL method, that indicates a repetition of zero or more. + * This is equivalent to EBNF repetition \{...\}. + * + * Note that there are two syntax forms: + * - Passing the grammar action directly: + * ``` + * this.MANY(() => { + * this.CONSUME(Comma) + * this.CONSUME(Digit) + * }) + * ``` + * + * - using an "options" object: + * ``` + * this.MANY({ + * GATE: predicateFunc, + * DEF: () => { + * this.CONSUME(Comma) + * this.CONSUME(Digit) + * } + * }); + * ``` + * + * The optional 'GATE' property in "options" object form can be used to add constraints + * to invoking the grammar action. + * + * As in CONSUME the index in the method name indicates the occurrence + * of the repetition production in it's top rule. + * + * @param actionORMethodDef - The grammar action to optionally invoke multiple times + * or an "OPTIONS" object describing the grammar action and optional properties. + * + */ + protected MANY( + actionORMethodDef: GrammarAction | DSLMethodOpts, + ): void; + + /** + * @see MANY + * @hidden + */ + protected MANY1( + actionORMethodDef: GrammarAction | DSLMethodOpts, + ): void; + + /** + * @see MANY + * @hidden + */ + protected MANY2( + actionORMethodDef: GrammarAction | DSLMethodOpts, + ): void; + + /** + * @see MANY + * @hidden + */ + protected MANY3( + actionORMethodDef: GrammarAction | DSLMethodOpts, + ): void; + + /** + * @see MANY + * @hidden + */ + protected MANY4( + actionORMethodDef: GrammarAction | DSLMethodOpts, + ): void; + + /** + * @see MANY + * @hidden + */ + protected MANY5( + actionORMethodDef: GrammarAction | DSLMethodOpts, + ): void; + + /** + * @see MANY + * @hidden + */ + protected MANY6( + actionORMethodDef: GrammarAction | DSLMethodOpts, + ): void; + + /** + * @see MANY + * @hidden + */ + protected MANY7( + actionORMethodDef: GrammarAction | DSLMethodOpts, + ): void; + + /** + * @see MANY + * @hidden + */ + protected MANY8( + actionORMethodDef: GrammarAction | DSLMethodOpts, + ): void; + + /** + * @see MANY + * @hidden + */ + protected MANY9( + actionORMethodDef: GrammarAction | DSLMethodOpts, + ): void; + + /** + * Parsing DSL method, that indicates a repetition of zero or more with a separator + * Token between the repetitions. + * + * Example: + * + * ``` + * this.MANY_SEP({ + * SEP:Comma, + * DEF: () => { + * this.CONSUME(Number}; + * // ... + * }) + * ``` + * + * Note that because this DSL method always requires more than one argument the options object is always required + * and it is not possible to use a shorter form like in the MANY DSL method. + * + * Note that for the purposes of deciding on whether or not another iteration exists + * Only a single Token is examined (The separator). Therefore if the grammar being implemented is + * so "crazy" to require multiple tokens to identify an item separator please use the more basic DSL methods + * to implement it. + * + * As in CONSUME the index in the method name indicates the occurrence + * of the repetition production in it's top rule. + * + * @param options - An object defining the grammar of each iteration and the separator between iterations + * + */ + protected MANY_SEP(options: ManySepMethodOpts): void; + + /** + * @see MANY_SEP + * @hidden + */ + protected MANY_SEP1(options: ManySepMethodOpts): void; + + /** + * @see MANY_SEP + * @hidden + */ + protected MANY_SEP2(options: ManySepMethodOpts): void; + + /** + * @see MANY_SEP + * @hidden + */ + protected MANY_SEP3(options: ManySepMethodOpts): void; + + /** + * @see MANY_SEP + * @hidden + */ + protected MANY_SEP4(options: ManySepMethodOpts): void; + + /** + * @see MANY_SEP + * @hidden + */ + protected MANY_SEP5(options: ManySepMethodOpts): void; + + /** + * @see MANY_SEP + * @hidden + */ + protected MANY_SEP6(options: ManySepMethodOpts): void; + + /** + * @see MANY_SEP + * @hidden + */ + protected MANY_SEP7(options: ManySepMethodOpts): void; + + /** + * @see MANY_SEP + * @hidden + */ + protected MANY_SEP8(options: ManySepMethodOpts): void; + + /** + * @see MANY_SEP + * @hidden + */ + protected MANY_SEP9(options: ManySepMethodOpts): void; + + /** + * Convenience method, same as MANY but the repetition is of one or more. + * failing to match at least one repetition will result in a parsing error and + * cause a parsing error. + * + * @see MANY + * + * @param actionORMethodDef - The grammar action to optionally invoke multiple times + * or an "OPTIONS" object describing the grammar action and optional properties. + * + */ + protected AT_LEAST_ONE( + actionORMethodDef: GrammarAction | DSLMethodOptsWithErr, + ): void; + + /** + * @see AT_LEAST_ONE + * @hidden + */ + protected AT_LEAST_ONE1( + actionORMethodDef: GrammarAction | DSLMethodOptsWithErr, + ): void; + + /** + * @see AT_LEAST_ONE + * @hidden + */ + protected AT_LEAST_ONE2( + actionORMethodDef: GrammarAction | DSLMethodOptsWithErr, + ): void; + + /** + * @see AT_LEAST_ONE + * @hidden + */ + protected AT_LEAST_ONE3( + actionORMethodDef: GrammarAction | DSLMethodOptsWithErr, + ): void; + + /** + * @see AT_LEAST_ONE + * @hidden + */ + protected AT_LEAST_ONE4( + actionORMethodDef: GrammarAction | DSLMethodOptsWithErr, + ): void; + + /** + * @see AT_LEAST_ONE + * @hidden + */ + protected AT_LEAST_ONE5( + actionORMethodDef: GrammarAction | DSLMethodOptsWithErr, + ): void; + + /** + * @see AT_LEAST_ONE + * @hidden + */ + protected AT_LEAST_ONE6( + actionORMethodDef: GrammarAction | DSLMethodOptsWithErr, + ): void; + + /** + * @see AT_LEAST_ONE + * @hidden + */ + protected AT_LEAST_ONE7( + actionORMethodDef: GrammarAction | DSLMethodOptsWithErr, + ): void; + + /** + * @see AT_LEAST_ONE + * @hidden + */ + protected AT_LEAST_ONE8( + actionORMethodDef: GrammarAction | DSLMethodOptsWithErr, + ): void; + + /** + * @see AT_LEAST_ONE + * @hidden + */ + protected AT_LEAST_ONE9( + actionORMethodDef: GrammarAction | DSLMethodOptsWithErr, + ): void; + + /** + * Convenience method, same as MANY_SEP but the repetition is of one or more. + * failing to match at least one repetition will result in a parsing error and + * cause the parser to attempt error recovery. + * + * Note that an additional optional property ERR_MSG can be used to provide custom error messages. + * + * @see MANY_SEP + * + * @param options - An object defining the grammar of each iteration and the separator between iterations + * + * @return {ISeparatedIterationResult} + */ + protected AT_LEAST_ONE_SEP(options: AtLeastOneSepMethodOpts): void; + + /** + * @see AT_LEAST_ONE_SEP + * @hidden + */ + protected AT_LEAST_ONE_SEP1(options: AtLeastOneSepMethodOpts): void; + + /** + * @see AT_LEAST_ONE_SEP + * @hidden + */ + protected AT_LEAST_ONE_SEP2(options: AtLeastOneSepMethodOpts): void; + + /** + * @see AT_LEAST_ONE_SEP + * @hidden + */ + protected AT_LEAST_ONE_SEP3(options: AtLeastOneSepMethodOpts): void; + + /** + * @see AT_LEAST_ONE_SEP + * @hidden + */ + protected AT_LEAST_ONE_SEP4(options: AtLeastOneSepMethodOpts): void; + + /** + * @see AT_LEAST_ONE_SEP + * @hidden + */ + protected AT_LEAST_ONE_SEP5(options: AtLeastOneSepMethodOpts): void; + + /** + * @see AT_LEAST_ONE_SEP + * @hidden + */ + protected AT_LEAST_ONE_SEP6(options: AtLeastOneSepMethodOpts): void; + + /** + * @see AT_LEAST_ONE_SEP + * @hidden + */ + protected AT_LEAST_ONE_SEP7(options: AtLeastOneSepMethodOpts): void; + + /** + * @see AT_LEAST_ONE_SEP + * @hidden + */ + protected AT_LEAST_ONE_SEP8(options: AtLeastOneSepMethodOpts): void; + + /** + * @see AT_LEAST_ONE_SEP + * @hidden + */ + protected AT_LEAST_ONE_SEP9(options: AtLeastOneSepMethodOpts): void; + + /** + * Returns an "imaginary" Token to insert when Single Token Insertion is done + * Override this if you require special behavior in your grammar. + * For example if an IntegerToken is required provide one with the image '0' so it would be valid syntactically. + */ + protected getTokenToInsert(tokType: TokenType): IToken; + + /** + * By default, all tokens type may be inserted. This behavior may be overridden in inheriting Recognizers + * for example: One may decide that only punctuation tokens may be inserted automatically as they have no additional + * semantic value. (A mandatory semicolon has no additional semantic meaning, but an Integer may have additional meaning + * depending on its int value and context (Inserting an integer 0 in cardinality: "[1..]" will cause semantic issues + * as the max of the cardinality will be greater than the min value (and this is a false error!). + */ + protected canTokenTypeBeInsertedInRecovery(tokType: TokenType): boolean; + + /** + * By default, all token types may be deleted. This behavior may be overridden in inheriting parsers. + * The method receives the expected token type. The token that would be deleted can be received with {@link LA}. + */ + protected canTokenTypeBeDeletedInRecovery(tokType: TokenType): boolean; + + /** + * @deprecated - will be removed in the future + */ + protected getNextPossibleTokenTypes( + grammarPath: ITokenGrammarPath, + ): TokenType[]; + + input: IToken[]; + + /** + * Will consume a single token and return the **next** token, meaning + * the token **after** the skipped token. + */ + protected SKIP_TOKEN(): IToken; + + /** + * Look-Ahead for the Token Vector + * LA(1) is the next Token ahead. + * LA(n) is the nth Token ahead. + * LA(0) is the previously consumed Token. + * + * Looking beyond the end of the Token Vector or before its begining + * will return in an IToken of type EOF {@link EOF}. + * This behavior can be used to avoid infinite loops. + * + * This is often used to implement custom lookahead logic for GATES. + * https://chevrotain.io/docs/features/gates.html + */ + protected LA(howMuch: number): IToken; +} + +/** + * A Parser that outputs a Concrete Syntax Tree. + * See: + * - https://chevrotain.io/docs/tutorial/step3_adding_actions_root.html#alternatives + * - https://chevrotain.io/docs/guide/concrete_syntax_tree.html + * For in depth docs. + */ +export declare class CstParser extends BaseParser { + /** + * Creates a Grammar Rule + * + * Note that any parameters of your implementation must be optional as it will + * be called without parameters during the grammar recording phase. + */ + protected RULE void>( + name: string, + implementation: F, + config?: IRuleConfig, + ): ParserMethod, CstNode>; + + /** + * Overrides a Grammar Rule + * See usage example in: https://github.com/chevrotain/chevrotain/blob/master/examples/parser/versioning/versioning.js + */ + protected OVERRIDE_RULE void>( + name: string, + implementation: F, + config?: IRuleConfig, + ): ParserMethod, CstNode>; + + /** + * Like `SUBRULE` with the numerical suffix as a parameter, e.g: + * subrule(0, X) === SUBRULE(X) + * subrule(1, X) === SUBRULE1(X) + * subrule(2, X) === SUBRULE2(X) + * ... + * @see SUBRULE + */ + protected subrule( + idx: number, + ruleToCall: ParserMethod, + options?: SubruleMethodOpts, + ): CstNode; + + /** + * The Parsing DSL Method is used by one rule to call another. + * It is equivalent to a non-Terminal in EBNF notation. + * + * This may seem redundant as it does not actually do much. + * However using it is **mandatory** for all sub rule invocations. + * + * Calling another rule without wrapping in SUBRULE(...) + * will cause errors/mistakes in the Parser's self analysis phase, + * which will lead to errors in error recovery/automatic lookahead calculation + * and any other functionality relying on the Parser's self analysis + * output. + * + * As in CONSUME the index in the method name indicates the occurrence + * of the sub rule invocation in its rule. + * + */ + protected SUBRULE( + ruleToCall: ParserMethod, + options?: SubruleMethodOpts, + ): CstNode; + + /** + * @see SUBRULE + * @hidden + */ + protected SUBRULE1( + ruleToCall: ParserMethod, + options?: SubruleMethodOpts, + ): CstNode; + + /** + * @see SUBRULE + * @hidden + */ + protected SUBRULE2( + ruleToCall: ParserMethod, + options?: SubruleMethodOpts, + ): CstNode; + + /** + * @see SUBRULE + * @hidden + */ + protected SUBRULE3( + ruleToCall: ParserMethod, + options?: SubruleMethodOpts, + ): CstNode; + + /** + * @see SUBRULE + * @hidden + */ + protected SUBRULE4( + ruleToCall: ParserMethod, + options?: SubruleMethodOpts, + ): CstNode; + + /** + * @see SUBRULE + * @hidden + */ + protected SUBRULE5( + ruleToCall: ParserMethod, + options?: SubruleMethodOpts, + ): CstNode; + + /** + * @see SUBRULE + * @hidden + */ + protected SUBRULE6( + ruleToCall: ParserMethod, + options?: SubruleMethodOpts, + ): CstNode; + + /** + * @see SUBRULE + * @hidden + */ + protected SUBRULE7( + ruleToCall: ParserMethod, + options?: SubruleMethodOpts, + ): CstNode; + + /** + * @see SUBRULE + * @hidden + */ + protected SUBRULE8( + ruleToCall: ParserMethod, + options?: SubruleMethodOpts, + ): CstNode; + + /** + * @see SUBRULE + * @hidden + */ + protected SUBRULE9( + ruleToCall: ParserMethod, + options?: SubruleMethodOpts, + ): CstNode; +} + +/** + * A Parser that relies on end user's embedded actions to control its output. + * For more details see: + * - https://chevrotain.io/docs/tutorial/step3_adding_actions_root.html#alternatives + * - https://chevrotain.io/docs/tutorial/step3b_adding_actions_embedded.html#simple-example + */ +export declare class EmbeddedActionsParser extends BaseParser { + /** + * Creates a Grammar Rule + * + * Note that any parameters of your implementation must be optional as it will + * be called without parameters during the grammar recording phase. + */ + protected RULE any>( + name: string, + implementation: F, + config?: IRuleConfig>, + ): ParserMethod, ReturnType>; + + /** + * Overrides a Grammar Rule + * See usage example in: https://github.com/chevrotain/chevrotain/blob/master/examples/parser/versioning/versioning.js + */ + protected OVERRIDE_RULE any>( + name: string, + implementation: F, + config?: IRuleConfig>, + ): ParserMethod, ReturnType>; + + /** + * Like `SUBRULE` with the numerical suffix as a parameter, e.g: + * subrule(0, X) === SUBRULE(X) + * subrule(1, X) === SUBRULE1(X) + * subrule(2, X) === SUBRULE2(X) + * ... + * @see SUBRULE + */ + protected subrule( + idx: number, + ruleToCall: ParserMethod, + options?: SubruleMethodOpts, + ): R; + + /** + * The Parsing DSL Method is used by one rule to call another. + * It is equivalent to a non-Terminal in EBNF notation. + * + * This may seem redundant as it does not actually do much. + * However using it is **mandatory** for all sub rule invocations. + * + * Calling another rule without wrapping in SUBRULE(...) + * will cause errors/mistakes in the Parser's self analysis phase, + * which will lead to errors in error recovery/automatic lookahead calculation + * and any other functionality relying on the Parser's self analysis + * output. + * + * As in CONSUME the index in the method name indicates the occurrence + * of the sub rule invocation in its rule. + * + */ + protected SUBRULE( + ruleToCall: ParserMethod, + options?: SubruleMethodOpts, + ): R; + + /** + * @see SUBRULE + * @hidden + */ + protected SUBRULE1( + ruleToCall: ParserMethod, + options?: SubruleMethodOpts, + ): R; + + /** + * @see SUBRULE + * @hidden + */ + protected SUBRULE2( + ruleToCall: ParserMethod, + options?: SubruleMethodOpts, + ): R; + + /** + * @see SUBRULE + * @hidden + */ + protected SUBRULE3( + ruleToCall: ParserMethod, + options?: SubruleMethodOpts, + ): R; + + /** + * @see SUBRULE + * @hidden + */ + protected SUBRULE4( + ruleToCall: ParserMethod, + options?: SubruleMethodOpts, + ): R; + + /** + * @see SUBRULE + * @hidden + */ + protected SUBRULE5( + ruleToCall: ParserMethod, + options?: SubruleMethodOpts, + ): R; + + /** + * @see SUBRULE + * @hidden + */ + protected SUBRULE6( + ruleToCall: ParserMethod, + options?: SubruleMethodOpts, + ): R; + + /** + * @see SUBRULE + * @hidden + */ + protected SUBRULE7( + ruleToCall: ParserMethod, + options?: SubruleMethodOpts, + ): R; + + /** + * @see SUBRULE + * @hidden + */ + protected SUBRULE8( + ruleToCall: ParserMethod, + options?: SubruleMethodOpts, + ): R; + + /** + * @see SUBRULE + * @hidden + */ + protected SUBRULE9( + ruleToCall: ParserMethod, + options?: SubruleMethodOpts, + ): R; +} + +export interface ILexerDefinitionError { + message: string; + type: LexerDefinitionErrorType; + tokenTypes?: TokenType[]; +} + +export declare class Lexer { + static SKIPPED: string; + + /** + * A Constant to mark "abstract" TokenTypes that are used + * purely as token categories. + * See: {@link ITokenConfig.categories} + */ + static NA: RegExp; + lexerDefinitionErrors: ILexerDefinitionError[]; + + /** + * @param lexerDefinition - + * Structure composed of Tokens Types this lexer will identify. + * + * In the simple case the structure is an array of TokenTypes. + * In the case of {@link IMultiModeLexerDefinition} the structure is an object with two properties: + * 1. a "modes" property where each value is an array of TokenTypes. + * 2. a "defaultMode" property specifying the initial lexer mode. + * + * for example: + * + * ``` + * { + * modes : { + * modeX : [Token1, Token2], + * modeY : [Token3, Token4] + * }, + * + * defaultMode : "modeY" + * } + * ``` + * + * A lexer with {@link MultiModesDefinition} is simply multiple Lexers where only one Lexer(mode) can be active at the same time. + * This is useful for lexing languages where there are different lexing rules depending on context. + * + * The current lexing mode is selected via a "mode stack". + * The last (peek) value in the stack will be the current mode of the lexer. + * Defining entering and exiting lexer modes is done using the "push_mode" and "pop_mode" properties + * of the {@link ITokenConfig} config properties. + * + * - The Lexer will match the **first** pattern that matches, Therefor the order of Token Types is significant. + * For example when one pattern may match a prefix of another pattern. + * + * Note that there are situations in which we may wish to order the longer pattern after the shorter one. + * For example: [keywords vs Identifiers](https://github.com/chevrotain/chevrotain/tree/master/examples/lexer/keywords_vs_identifiers). + */ + constructor( + lexerDefinition: TokenType[] | IMultiModeLexerDefinition, + config?: ILexerConfig, + ); + + /** + * Will lex(Tokenize) a string. + * Note that this can be called repeatedly on different strings as this method + * does not modify the state of the Lexer. + * + * @param text - The string to lex + * @param [initialMode] - The initial Lexer Mode to start with, by default this will be the first mode in the lexer's + * definition. If the lexer has no explicit modes it will be the implicit single 'default_mode' mode. + */ + tokenize(text: string, initialMode?: string): ILexingResult; +} + +export interface ILexingResult { + tokens: IToken[]; + groups: { + [groupName: string]: IToken[]; + }; + errors: ILexingError[]; +} + +export interface ILexingError { + offset: number; + line: number | undefined; + column: number | undefined; + length: number; + message: string; +} + +export interface ILexerConfig { + /** + * An optional flag indicating that lexer definition errors + * should not automatically cause an error to be raised. + * This can be useful when wishing to indicate lexer errors in another manner + * than simply throwing an error (for example in an online playground). + */ + deferDefinitionErrorsHandling?: boolean; + + /** + * "full" location information means all six combinations of /(end|start)(Line|Column|Offset)/ properties. + * "onlyStart" means that only startLine, startColumn and startOffset will be tracked + * "onlyOffset" means that only the startOffset will be tracked. + * + * The less position tracking the faster the Lexer will be and the less memory used. + * However the difference is not large (~10% On V8), thus reduced location tracking options should only be used + * in edge cases where every last ounce of performance is needed. + */ + // TODO: consider renaming this to LocationTracking to align with NodeLocationTracking option on the ParserConfig. + positionTracking?: "full" | "onlyStart" | "onlyOffset"; + + /** + * A regExp defining custom line terminators. + * This will be used to calculate the line and column information. + * + * Note that the regExp should use the global flag, for example: /\n/g + * + * The default is: /\n|\r\n?/g + * + * But some grammars have a different definition, for example in ECMAScript: + * https://www.ecma-international.org/ecma-262/8.0/index.html#sec-line-terminators + * U+2028 and U+2029 are also treated as line terminators. + * + * In that case we would use /\n|\r|\u2028|\u2029/g + * + * Note that it is also possible to supply an optimized RegExp like implementation + * as only a subset of the RegExp APIs is needed, {@link ILineTerminatorsTester} + * for details. + * + * keep in mind that for the default pattern: /\n|\r\n?/g an optimized implementation is already built-in. + * This means the optimization is only relevant for lexers overriding the default pattern. + */ + lineTerminatorsPattern?: RegExp | ILineTerminatorsTester; + + /** + * Characters or CharCodes that represent line terminators for this lexer. + * This always needs to be provided when using a custom {@link ILexerConfig.lineTerminatorsPattern}. + * In the future this duplication may be removed or reduced. + */ + lineTerminatorCharacters?: (number | string)[]; + + /** + * When true this flag will cause the Lexer to throw an Error + * When it is unable to perform all of its performance optimizations. + * + * In addition error messages will be printed to the console with details + * how to resolve the optimizations issues. + * + * Use this flag to guarantee higher lexer performance. + * The optimizations can boost the lexer's performance anywhere from 30% + * to 100%+ depending on the number of TokenTypes used. + */ + ensureOptimizations?: boolean; + + /** + * Can be used to disable lexer optimizations + * If there is a suspicion they are causing incorrect behavior. + * Note that this would have negative performance implications. + */ + safeMode?: boolean; + + /** + * A custom error message provider. + * Can be used to override the default error messages. + * For example: + * - Translating the error messages to a different languages. + * - Changing the formatting. + */ + errorMessageProvider?: ILexerErrorMessageProvider; + + /** + * Enabling this flag will print performance tracing logs during lexer + * Initialization (constructor invocation), this is useful to narrow down the cause + * of the initialization performance problem. + * + * You can also pass a numerical value which affects the verbosity + * of the traces, this number is the maximum nesting level of the traces, e.g: + * 0: Traces disabled === 'false' + * 1: Top Level traces only. + * 2: One level of nested inner traces. + * ... + * + * Note that passing the boolean `true` is identical to passing the numerical value `infinity` + */ + traceInitPerf?: boolean | number; + + /** + * This flag will avoid running the Lexer validations during Lexer initialization. + * + * This can substantially improve the Lexer's initialization (constructor) time. + * @see ILexerConfig.traceInitPerf to measure the Lexer validations cost for your Lexer. + * + * Note that the Lexer validations are **extremely useful** during development time, + * e.g: Detecting empty/invalid regExp Patterns. + * So they should not be skipped during development flows. + * - For example: via a conditional that checks an env variable. + */ + skipValidations?: boolean; + + /** + * Should the lexer halt on the **first** error, or continue attempting to tokenize by dropping characters + * until a match is found or the end of input is reached. + * + * Setting `recoveryEnabled` to `false` is useful when you want to **halt quickly** on faulty inputs, + * particularly when dealing with **large** faulty inputs. + * + * By default, `recoveryEnabled` is `true` + */ + recoveryEnabled?: boolean; +} + +export interface ILexerErrorMessageProvider { + /** + * An Unexpected Character Error occurs when the lexer is unable to match a range of one or more + * characters in the input text against any of the Token Types in it's Lexer definition + * + * @param fullText - Full original input text. + * + * @param startOffset - Offset in input text where error starts. + * + * @param length - Error length. + * + * @param line - Line number where the error occurred. (optional) + * Will not be provided when lexer is not defined to track lines/columns + * + * @param column - Column number where the error occurred. (optional) + * Will not be provided when lexer is not defined to track lines/columns + */ + buildUnexpectedCharactersMessage( + fullText: string, + startOffset: number, + length: number, + line?: number, + column?: number, + ): string; + + /** + * Unable To Pop Lexer Mode Error happens when lexer tries to pop the last remaining mode from the mode stack + * so that there is no longer any active lexer mode + * This error only relevant for multi-mode lexers + * + * @param token - The Token that requested pop mode. + */ + buildUnableToPopLexerModeMessage(token: IToken): string; +} + +/** + * This is the default logic Chevrotain uses to construct lexing error messages. + * It can be used as a reference or as a starting point customize a lexer's + * error messages. + * + * - See: {@link ILexerConfig.errorMessageProvider} + */ +export declare const defaultLexerErrorProvider: ILexerErrorMessageProvider; + +/** + * A subset of the regExp interface. + * Needed to compute line/column info by a chevrotain lexer. + */ +export interface ILineTerminatorsTester { + /** + * Just like regExp.test + */ + test: (text: string) => boolean; + + /** + * Just like the regExp lastIndex with the global flag enabled + * It should be updated after every match to point to the offset where the next + * match attempt starts. + */ + lastIndex: number; +} + +export type TokenPattern = + | RegExp + | string + | CustomPatternMatcherFunc + | ICustomPattern; + +export interface ITokenConfig { + name: string; + + /** + * Categories enable polymorphism on Token Types. + * A TokenType X with categories C1, C2, ... ,Cn can + * be matched by the parser against any of those categories. + * In practical terms this means that: + * CONSUME(C1) can match a Token of type X. + */ + categories?: TokenType | TokenType[]; + + /** + * The Label is a human readable name to be used + * in error messages and syntax diagrams. + * + * For example a TokenType may be called LCurly, which is + * short for "left curly brace". The much easier to understand + * label could simply be "\{". + */ + label?: string; + + /** + * This defines what sequence of characters would be matched + * To this TokenType when Lexing. + * + * For Custom Patterns see: http://chevrotain.io/docs/guide/custom_token_patterns.html + */ + pattern?: TokenPattern; + + /** + * The group property will cause the lexer to collect + * Tokens of this type separately from the other Tokens. + * + * For example this could be used to collect comments for + * post processing. + * + * See: https://github.com/chevrotain/chevrotain/tree/master/examples/lexer/token_groups + */ + group?: string; + + /** + * A name of a Lexer mode to "enter" once this Token Type has been matched. + * Lexer modes can be used to support different sets of possible Tokens Types + * + * Lexer Modes work as a stack of Lexers, so "entering" a mode means pushing it to the top of the stack. + * + * See: https://github.com/chevrotain/chevrotain/tree/master/examples/lexer/multi_mode_lexer + */ + push_mode?: string; + + /** + * If "pop_mode" is true the Lexer will pop the last mode of the modes stack and + * continue lexing using the new mode at the top of the stack. + * + * See: https://github.com/chevrotain/chevrotain/tree/master/examples/lexer/multi_mode_lexer + */ + pop_mode?: boolean; + + /** + * The "longer_alt" property will cause the Lexer to attempt matching against other Token Types + * every time this Token Type has been matched. + * + * This feature can be useful when two or more Token Types have common prefixes which + * cannot be resolved (only) by the ordering of the Tokens in the lexer definition. + * + * - Note that the `longer_alt` capability **cannot be chained**. + * - Note that the **first** matched `longer_alt` takes precendence. + * + * For example see: https://github.com/chevrotain/chevrotain/tree/master/examples/lexer/keywords_vs_identifiers + * For resolving the keywords vs Identifier ambiguity. + */ + longer_alt?: TokenType | TokenType[]; + + /** + * Can a String matching this Token Type's pattern possibly contain a line terminator? + * If true and the line_breaks property is not also true this will cause inaccuracies in the Lexer's line / column tracking. + */ + line_breaks?: boolean; + + /** + * Possible starting characters or charCodes of the pattern. + * These will be used to optimize the Lexer's performance. + * + * These are normally **automatically** computed, however the option to explicitly + * specify those can enable optimizations even when the automatic analysis fails. + * + * e.g: + * * strings hints should be one character long. + * ``` + * { start_chars_hint: ["a", "b"] } + * ``` + * + * * number hints are the result of running ".charCodeAt(0)" on the strings. + * ``` + * { start_chars_hint: [97, 98] } + * ``` + * + * * For unicode characters outside the BMP use the first of their surrogate pairs. + * for example: The '💩' character is represented by surrogate pairs: '\uD83D\uDCA9' + * and D83D is 55357 in decimal. + * * Note that "💩".charCodeAt(0) === 55357 + */ + start_chars_hint?: (string | number)[]; +} + +/** + * Creates a new TokenType which can then be used + * to define a Lexer and Parser + */ +export declare function createToken(config: ITokenConfig): TokenType; + +/** + * Utility to create Chevrotain IToken "instances" + * Note that Chevrotain tokens are not real TokenTypes instances + * and thus the instanceOf cannot be used with them. + */ +export declare function createTokenInstance( + tokType: TokenType, + image: string, + startOffset: number, + endOffset: number, + startLine: number, + endLine: number, + startColumn: number, + endColumn: number, +): IToken; + +/** + * API #1 [Custom Token Patterns](http://chevrotain.io/docs/guide/custom_token_patterns.html). + */ +export declare type CustomPatternMatcherFunc = ( + /** + * The full input string. + */ + text: string, + /** + * The offset at which to attempt a match + */ + offset: number, + /** + * Previously scanned Tokens + */ + tokens: IToken[], + /** + * Token Groups + */ + groups: { + [groupName: string]: IToken[]; + }, +) => CustomPatternMatcherReturn | RegExpExecArray | null; // RegExpExecArray included for legacy reasons + +export type CustomPatternMatcherReturn = [string] & { payload?: any }; + +export interface TokenType { + name: string; + GROUP?: string; + PATTERN?: TokenPattern; + LABEL?: string; + LONGER_ALT?: TokenType | TokenType[]; + POP_MODE?: boolean; + PUSH_MODE?: string; + LINE_BREAKS?: boolean; + CATEGORIES?: TokenType[]; + tokenTypeIdx?: number; + categoryMatches?: number[]; + categoryMatchesMap?: { + [tokType: number]: boolean; + }; + isParent?: boolean; + START_CHARS_HINT?: (string | number)[]; +} + +/** + * API #2 for [Custom Token Patterns](http://chevrotain.io/docs/guide/custom_token_patterns.html). + */ +interface ICustomPattern { + exec: CustomPatternMatcherFunc; +} + +/** + * Things to note: + * - The offset range is inclusive to exclusive. + * + * - A lineTerminator as the last character does not effect the Token's line numbering. + * In other words a new line only starts **after** a line terminator. + * + * - A Token's image is it's **literal** text. + * e.g unicode escaping is untouched. + */ +export interface IToken { + /** The textual representation of the Token as it appeared in the text. */ + image: string; + /** Offset of the first character of the Token. 0-indexed. */ + startOffset: number; + /** Line of the first character of the Token. 1-indexed. */ + startLine?: number; + /** + * Column of the first character of the Token. 1-indexed. + * + * For token foo in the following line, startColumn will be 3 and endColumn will be 5. + * ``` + * a foo + * 123456 + * ``` + */ + startColumn?: number; + /** + * Offset of the last character of the Token. 0-indexed. + * Note that this points at the last character, not the end of the token, so the original image would be + * `input.substring(token.startOffset, token.endOffset + 1)`. + */ + endOffset?: number; + /** Line of the last character of the Token. 1-indexed. Will be the same as startLine for single-line tokens.*/ + endLine?: number; + /** Column of the last character of the Token. 1-indexed. See also startColumn. */ + endColumn?: number; + /** this marks if a Token does not really exist and has been inserted "artificially" during parsing in rule error recovery. */ + isInsertedInRecovery?: boolean; + /** An number index representing the type of the Token use to get the Token Type from a token "instance" */ + tokenTypeIdx: number; + /** + * The actual Token Type of this Token "instance" + * This is the same Object returned by the "createToken" API. + * This property is very useful for debugging the Lexing and Parsing phases. + */ + tokenType: TokenType; + + /** + * Custom Payload value, this is an optional feature of Custom Token Patterns + * For additional details see the docs: + * https://chevrotain.io/docs/guide/custom_token_patterns.html#custom-payloads + */ + payload?: any; +} + +export declare function tokenName(tokType: TokenType): string; + +/** + * Returns a human readable label for a TokenType if such exists, + * otherwise will return the TokenType's name. + * + * Labels are useful in improving the readability of error messages and syntax diagrams. + * To define labels provide the label property in the {@link createToken} config parameter. + */ +export declare function tokenLabel(tokType: TokenType): string; + +/** + * A Utility method to check if a token is of the type of the argument Token class. + * This utility is needed because Chevrotain tokens support "categories" which means + * A TokenType may have multiple categories. + * + * This means a simple comparison using the {@link IToken.tokenType} property may not suffice. + * For example: + * + * ``` + * import { createToken, tokenMatcher, Lexer } from "chevrotain" + * + * // An "abstract" Token used only for categorization purposes. + * const NumberTokType = createToken({ name: "NumberTokType", pattern: Lexer.NA }) + * + * const IntegerTokType = createToken({ + * name: "IntegerTokType", + * pattern: /\d+/, + * // Integer "Is A" Number + * categories: [NumberTokType] + * }) + * + * const DecimalTokType = createToken({ + * name: "DecimalTokType", + * pattern: /\d+\.\d+/, + * // Double "Is A" Number + * categories: [NumberTokType] + * }) + * + * // Will always be false as the tokenType property can only + * // be Integer or Double Token Types as the Number TokenType is "abstract". + * if (myToken.tokenType === NumberTokType) { /* ... *\/ } + * + * // Will be true when myToken is of Type Integer or Double. + * // Because the hierarchy defined by the categories is taken into account. + * if (tokenMatcher(myToken, NumberTokType) { /* ... *\/ } + * ``` + * + * @returns true iff the token matches the TokenType. + */ +export function tokenMatcher(token: IToken, tokType: TokenType): boolean; + +export declare type MultiModesDefinition = { + [modeName: string]: TokenType[]; +}; + +export interface IMultiModeLexerDefinition { + modes: MultiModesDefinition; + defaultMode: string; +} + +export type TokenTypeDictionary = { [tokenName: string]: TokenType }; + +export declare type TokenVocabulary = + | TokenTypeDictionary + | TokenType[] + | IMultiModeLexerDefinition; + +export interface IRuleConfig { + /** + * The function which will be invoked to produce the returned value for a production that have not been + * successfully executed and the parser recovered from. + */ + recoveryValueFunc?: (e: IRecognitionException) => T; + /** + * Enable/Disable re-sync error recovery for this specific production. + */ + resyncEnabled?: boolean; +} + +export interface DSLMethodOpts { + /** + * The Grammar to process in this method. + */ + DEF: GrammarAction; + /** + * A semantic constraint on this DSL method + * @see https://github.com/chevrotain/chevrotain/blob/master/examples/parser/predicate_lookahead/predicate_lookahead.js + * For farther details. + */ + GATE?: () => boolean; + + /** + * Maximum number of "following tokens" which would be used to + * Choose between the alternatives. + * + * By default this value is determined by the {@link IParserConfig.maxLookahead} value. + * A Higher value may be used for a specific DSL method to resolve ambiguities + * And a lower value may be used to resolve slow initialization times issues. + * + * TODO: create full docs and link + */ + MAX_LOOKAHEAD?: number; +} + +export interface DSLMethodOptsWithErr extends DSLMethodOpts { + /** + * Short title/classification to what is being matched. + * Will be used in the error message,. + * If none is provided, the error message will include the names of the expected + * Tokens sequences which start the method's inner grammar + */ + ERR_MSG?: string; +} + +export interface OrMethodOpts { + /** + * The set of alternatives, + * See detailed description in {@link BaseParser.OR} + */ + DEF: IOrAlt[]; + /** + * A description for the alternatives used in error messages + * If none is provided, the error message will include the names of the expected + * Tokens sequences which may start each alternative. + */ + ERR_MSG?: string; + + /** + * A Flag indicating that **all** ambiguities in this alternation should + * be ignored. + * + * This flag should only be used in rare circumstances, + * As normally alternation ambiguities should be resolved in other ways: + * - Re-ordering the alternatives. + * - Re-factoring the grammar to extract common prefixes before alternation. + * - Using gates {@link IOrAlt.GATE} to implement custom lookahead logic. + * - Using the more granular {@link IOrAlt.IGNORE_AMBIGUITIES} on a **specific** alternative. + */ + IGNORE_AMBIGUITIES?: boolean; + + /** + * Maximum number of "following tokens" which would be used to + * Choose between the alternatives. + * + * By default this value is determined by the {@link IParserConfig.maxLookahead} value. + * A Higher value may be used for a specific DSL method to resolve ambiguities + * And a lower value may be used to resolve slow initialization times issues. + * + * TODO: create full docs and link + */ + MAX_LOOKAHEAD?: number; +} + +export interface ManySepMethodOpts { + /** + * The grammar to process in each iteration. + */ + DEF: GrammarAction; + /** + * The separator between each iteration. + */ + SEP: TokenType; + + /** + * @see DSLMethodOpts.MAX_LOOKAHEAD + */ + MAX_LOOKAHEAD?: number; +} + +export interface AtLeastOneSepMethodOpts extends ManySepMethodOpts { + /** + * Short title/classification to what is being matched. + * Will be used in the error message,. + * If none is provided, the error message will include the names of the expected + * Tokens sequences which start the method's inner grammar. + */ + ERR_MSG?: string; +} + +export interface ConsumeMethodOpts { + /** + * A custom Error message if the Token could not be consumed. + * This will override any error message provided by the parser's "errorMessageProvider" + */ + ERR_MSG?: string; + /** + * A label to be used instead of the TokenType name in the created CST. + */ + LABEL?: string; +} + +export interface SubruleMethodOpts { + /** + * The arguments to parameterized rules, see: + * https://github.com/chevrotain/chevrotain/blob/master/examples/parser/parametrized_rules/parametrized.js + */ + ARGS?: ARGS; + /** + * A label to be used instead of the subrule's name in the created CST. + */ + LABEL?: string; +} + +export declare type GrammarAction = () => OUT; + +export interface IOrAlt { + GATE?: () => boolean; + ALT: () => T; + /** + * A Flag indicating that any ambiguities involving this + * specific alternative Should be ignored. + * + * This flag will be **implicitly** enabled if a GATE is used + * as the assumption is that the GATE is used to resolve an ambiguity. + */ + IGNORE_AMBIGUITIES?: boolean; +} + +export interface IOrAltWithGate extends IOrAlt { + // TODO: deprecate this interface +} + +export interface ICstVisitor { + visit(cstNode: CstNode | CstNode[], param?: IN): OUT; + + /** + * Will throw an error if the visitor is missing any required methods + * - `visitXYZ` for each `XYZ` grammar rule. + */ + validateVisitor(): void; +} + +/** + * A [Concrete Syntax Tree](http://chevrotain.io/docs/guide/concrete_syntax_tree.html) Node. + * This structure represents the whole parse tree of the grammar + * This means that information on each and every Token is present. + * This is unlike an AST (Abstract Syntax Tree) where some of the syntactic information is missing. + * + * For example given an ECMAScript grammar, an AST would normally not contain information on the location + * of Commas, Semi colons, redundant parenthesis ect, however a CST would have that information. + */ +export interface CstNode { + readonly name: string; + readonly children: CstChildrenDictionary; + /** + * A flag indicating the whole CSTNode has been recovered during **re-sync** error recovery. + * This means that some of the node's children may be missing. + * - Note that single token insertion/deletion recovery would not activate this flag. + * This flag would only be activated in **re-sync** recovery when the rule's + * grammar cannot be fully parsed. + * - See: https://chevrotain.io/docs/tutorial/step4_fault_tolerance.html + * for more info on error recovery and fault tolerance. + */ + readonly recoveredNode?: boolean; + + /** + * Will only be present if the {@link IParserConfig.nodeLocationTracking} is + * **not** set to "none". + * See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location + * For more details. + */ + readonly location?: CstNodeLocation; +} + +/** + * The Column/Line properties will only be present when + * The {@link IParserConfig.nodeLocationTracking} is set to "full". + */ +export interface CstNodeLocation { + startOffset: number; + startLine?: number; + startColumn?: number; + endOffset?: number; + endLine?: number; + endColumn?: number; +} + +export declare type CstChildrenDictionary = { + [identifier: string]: CstElement[]; +}; + +export declare type CstElement = IToken | CstNode; + +export declare type nodeLocationTrackingOptions = + | "full" + | "onlyOffset" + | "none"; + +export interface IParserConfig { + /** + * Is the error recovery / fault tolerance of the Chevrotain Parser enabled. + */ + recoveryEnabled?: boolean; + /** + * Maximum number of tokens the parser will use to choose between alternatives. + * By default this value is `4`. + * In the future it may be reduced to `3` due to performance considerations. + */ + maxLookahead?: number; + /** + * Enable This Flag to to support Dynamically defined Tokens. + * This will disable performance optimizations which cannot work if the whole Token vocabulary is not known + * During Parser initialization. + * + * See [runnable example](https://github.com/chevrotain/chevrotain/tree/master/examples/parser/dynamic_tokens) + */ + dynamicTokensEnabled?: boolean; + /** + * Enable computation of CST nodes location. + * By default this is set to "none", meaning this feature is disabled. + * See: http://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnode-location + * For more details. + */ + nodeLocationTracking?: nodeLocationTrackingOptions; + /** + * A custom error message provider. + * Can be used to override the default error messages. + * For example: + * - Translating the error messages to a different languages. + * - Changing the formatting. + * - Providing special error messages under certain conditions, e.g: missing semicolons. + */ + errorMessageProvider?: IParserErrorMessageProvider; + /** + * Enabling this flag will print performance tracing logs during parser + * Initialization (constructor invocation), this is useful to narrow down the cause + * of the initialization performance problem. + * + * You can also pass a numerical value which affects the verbosity + * of the traces, this number is the maximum nesting level of the traces, e.g: + * 0: Traces disabled === 'false' + * 1: Top Level traces only. + * 2: One level of nested inner traces. + * ... + * + * Note that passing the boolean `true` is identical to passing the numerical value `infinity` + */ + traceInitPerf?: boolean | number; + /** + * This flag will avoid running the grammar validations during Parser initialization. + * + * This can substantially improve the Parser's initialization (constructor) time. + * @see IParserConfig.traceInitPerf to measure the grammar validations cost for your parser. + * + * Note that the grammar validations are **extremely useful** during development time, + * e.g: detecting ambiguities / left recursion. + * So they should not be skipped during development flows. + * - For example: via a conditional that checks an env variable. + */ + skipValidations?: boolean; + /** + * @experimental + * + * A custom lookahead strategy. + * Can be used to override the default LL(*k*) lookahead behavior. + * + * Note that the default lookahead strategy is very well optimized and using a custom lookahead + * strategy might lead to massively reduced performance. + */ + lookaheadStrategy?: ILookaheadStrategy; +} + +/** + * A set of methods used to customize parsing error messages. + * Call {@link defaultParserErrorProvider} to implement the default behavior + */ +export interface IParserErrorMessageProvider { + /** + * Mismatched Token Error happens when the parser attempted to consume a terminal and failed. + * It corresponds to a failed {@link BaseParser.CONSUME} in Chevrotain DSL terms. + * + * @param options.expected - The expected Token Type. + * + * @param options.actual - The actual Token "instance". + * + * @param options.previous - The previous Token "instance". + * This is useful if options.actual[0] is of type chevrotain.EOF and you need to know the last token parsed. + * + * @param options.ruleName - The rule in which the error occurred. + */ + buildMismatchTokenMessage(options: { + expected: TokenType; + actual: IToken; + previous: IToken; + ruleName: string; + }): string; + /** + * A Redundant Input Error happens when the parser has completed parsing but there + * is still unprocessed input remaining. + * + * @param options.firstRedundant - The first unprocessed token "instance". + * + * @param options.ruleName - The rule in which the error occurred. + */ + buildNotAllInputParsedMessage(options: { + firstRedundant: IToken; + ruleName: string; + }): string; + /** + * A No Viable Alternative Error happens when the parser cannot detect any valid alternative in an alternation. + * It corresponds to a failed {@link BaseParser.OR} in Chevrotain DSL terms. + * + * @param options.expectedPathsPerAlt - First level of the array represents each alternative + * The next two levels represent valid (expected) paths in each alternative. + * + * @param options.actual - The actual sequence of tokens encountered. + * + * @param options.previous - The previous Token "instance". + * This is useful if options.actual[0] is of type chevrotain.EOF and you need to know the last token parsed. + * + * @param options.customUserDescription - A user may provide custom error message descriptor in the {@link BaseParser.AT_LEAST_ONE_SEP} DSL method + * options parameter, this is that custom message. + * + * @param options.ruleName - The rule in which the error occurred. + */ + buildNoViableAltMessage(options: { + expectedPathsPerAlt: TokenType[][][]; + actual: IToken[]; + previous: IToken; + customUserDescription?: string; + ruleName: string; + }): string; + /** + * An Early Exit Error happens when the parser cannot detect the first mandatory iteration of a repetition. + * It corresponds to a failed {@link BaseParser.AT_LEAST_ONE_SEP} or {@link BaseParser.AT_LEAST_ONE_SEP} in Chevrotain DSL terms. + * + * @param options.expectedIterationPaths - The valid (expected) paths in the first iteration. + * + * @param options.actual - The actual sequence of tokens encountered. + * + * @param options.previous - The previous Token "instance". + * This is useful if options.actual[0] is of type chevrotain.EOF and you need to know the last token parsed. + * + * @param options.customUserDescription - A user may provide custom error message descriptor in the {@link BaseParser.AT_LEAST_ONE_SEP} DSL method + * options parameter, this is that custom message. + * + * @param options.ruleName - The rule in which the error occurred. + */ + buildEarlyExitMessage(options: { + expectedIterationPaths: TokenType[][]; + actual: IToken[]; + previous: IToken; + customUserDescription?: string; + ruleName: string; + }): string; +} + +/** + * @experimental + */ +export interface ILLkLookaheadValidator { + validateNoLeftRecursion(rules: Rule[]): ILookaheadValidationError[]; + + validateEmptyOrAlternatives(rules: Rule[]): ILookaheadValidationError[]; + + validateAmbiguousAlternationAlternatives( + rules: Rule[], + maxLookahead: number, + ): ILookaheadValidationError[]; + + validateSomeNonEmptyLookaheadPath( + rules: Rule[], + maxLookahead: number, + ): ILookaheadValidationError[]; +} + +/** + * @experimental + */ +export interface ILLkLookaheadStrategyConstructor { + new (options?: { + maxLookahead?: number; + }): ILookaheadStrategy & ILLkLookaheadValidator; +} + +/** + * @experimental + */ +export const LLkLookaheadStrategy: ILLkLookaheadStrategyConstructor; + +/** + * @experimental + */ +export interface ILookaheadStrategy { + /** + * Performs validations on the grammar specific to this lookahead strategy. + * This method is not called if parser validations are disabled. + * + * @param options.rules All parser rules of the grammar. + * + * @param options.tokenTypes All token types of the grammar. + * + * @param options.grammarName The name of the grammar. + */ + validate(options: { + rules: Rule[]; + tokenTypes: TokenType[]; + grammarName: string; + }): ILookaheadValidationError[]; + + /** + * Initializes the lookahead for a grammar. + * + * Note that this method does not build the lookahead functions. + * It only initializes the internal state of the strategy based on all grammar rules. + * + * @param options.rules All parser rules of the grammar. + */ + initialize?(options: { rules: Rule[] }): void; + + /** + * Builds a lookahead function for alternations/`OR` parser methods. + * + * @param options.prodOccurrence The occurrence number of this `OR` within its rule. + * + * @param options.rule The rule that contains this `OR`. + * + * @param options.maxLookahead The maximum amount of lookahead for this `OR`. + * + * @param options.hasPredicates Whether any of the alternatives contain a predicate. + * + * @param options.dynamicTokensEnabled Whether dynamic tokens are enabled for this parser. + * + * @returns A function that is able to compute which of the alternatives to choose while parsing. + */ + buildLookaheadForAlternation(options: { + prodOccurrence: number; + rule: Rule; + maxLookahead: number; + hasPredicates: boolean; + dynamicTokensEnabled: boolean; + }): (orAlts?: IOrAlt[] | undefined) => number | undefined; + + /** + * Builds a lookahead function for optional productions. + * + * @param options.prodOccurrence The occurrence number of this production within its rule. + * + * @param options.prodType The type of this production. + * + * @param options.rule The rule that contains this production. + * + * @param options.maxLookahead The maximum amount of lookahead for this production. + * + * @param options.dynamicTokensEnabled Whether dynamic tokens are enabled for this parser. + * + * @returns A function is able to compute whether to parse the production or to continue with the rest of the parser rule. + */ + buildLookaheadForOptional(options: { + prodOccurrence: number; + prodType: OptionalProductionType; + rule: Rule; + maxLookahead: number; + dynamicTokensEnabled: boolean; + }): () => boolean; +} + +export interface ILookaheadValidationError { + message: string; + ruleName?: string; +} + +export type LookaheadSequence = TokenType[][]; + +export type OptionalProductionType = + | "Option" + | "RepetitionMandatory" + | "RepetitionMandatoryWithSeparator" + | "Repetition" + | "RepetitionWithSeparator"; + +export type LookaheadProductionType = OptionalProductionType | "Alternation"; + +/** + * Computes all lookahead paths for a given production. + * + * The result is a three-dimensional array of token types. + * Accessing this array with the index of an alternative of the given production returns a two-dimensional array. + * Each entry of this array represents a list of the token types which can occur in this alternative. + * + * @param options.occurrence The occurrence number of this production within its rule. + * + * @param options.rule The rule which contains this production. + * + * @param options.prodType The type of this production. + * + * @param options.maxLookahead The maximum amount of lookahead for this production. + */ +export declare function getLookaheadPaths(options: { + occurrence: number; + rule: Rule; + prodType: LookaheadProductionType; + maxLookahead: number; +}): LookaheadSequence[]; + +export interface IRecognizerContext { + /** + * A copy of the parser's rule stack at the "time" the RecognitionException occurred. + * This can be used to help debug parsing errors (How did we get here?). + */ + ruleStack: string[]; + /** + * A copy of the parser's rule occurrence stack at the "time" the RecognitionException occurred. + * This can be used to help debug parsing errors (How did we get here?). + */ + ruleOccurrenceStack: number[]; +} + +export declare type ISeparatedIterationResult = { + values: OUT[]; + separators: IToken[]; +}; + +export interface ISerializedGast { + type: ProductionType; + definition?: ISerializedGast[]; +} + +export type ProductionType = + | LookaheadProductionType + | "NonTerminal" + | "Alternative" + | "Terminal" + | "Rule"; + +/** + * Structure for the path the parser "took" to reach a certain position + * in the grammar. + */ +export interface IGrammarPath { + /** + * The Grammar rules invoked and still unterminated to reach this Grammar Path. + */ + ruleStack: string[]; + /** + * The occurrence index (SUBRULE1/2/3/5/...) of each Grammar rule invoked and still unterminated. + * Used to distinguish between **different** invocations of the same subrule at the same top level rule. + */ + occurrenceStack: number[]; +} + +export interface ISyntacticContentAssistPath extends IGrammarPath { + nextTokenType: TokenType; + nextTokenOccurrence: number; +} + +export interface ITokenGrammarPath extends IGrammarPath { + lastTok: TokenType; + lastTokOccurrence: number; +} + +export declare enum LexerDefinitionErrorType { + MISSING_PATTERN = 0, + INVALID_PATTERN = 1, + EOI_ANCHOR_FOUND = 2, + UNSUPPORTED_FLAGS_FOUND = 3, + DUPLICATE_PATTERNS_FOUND = 4, + INVALID_GROUP_TYPE_FOUND = 5, + PUSH_MODE_DOES_NOT_EXIST = 6, + MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE = 7, + MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY = 8, + MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST = 9, + LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED = 10, + SOI_ANCHOR_FOUND = 11, + EMPTY_MATCH_PATTERN = 12, + NO_LINE_BREAKS_FLAGS = 13, + UNREACHABLE_PATTERN = 14, + IDENTIFY_TERMINATOR = 15, + CUSTOM_LINE_BREAK = 16, + MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE = 17, +} + +/** + * Type of End Of File Token. + */ +export declare const EOF: TokenType; + +/** + * Convenience used to express an **empty** alternative in an OR (alternation). + * can be used to more clearly describe the intent in a case of empty alternation. + * + * For example: + * + * 1. without using EMPTY_ALT: + * ``` + * this.OR([ + * {ALT: () => { + * this.CONSUME1(OneTok) + * return "1" + * }}, + * {ALT: () => { + * this.CONSUME1(TwoTok) + * return "2" + * }}, + * // implicitly empty because there are no invoked grammar + * // rules (OR/MANY/CONSUME...) inside this alternative. + * {ALT: () => { + * return "666" + * }}, + * ]) + * ``` + * + * 2. using EMPTY_ALT: + * ``` + * this.OR([ + * {ALT: () => { + * this.CONSUME1(OneTok) + * return "1" + * }}, + * {ALT: () => { + * this.CONSUME1(TwoTok) + * return "2" + * }}, + * // explicitly empty, clearer intent + * {ALT: EMPTY_ALT("666")}, + * ]) + * ``` + */ +export declare function EMPTY_ALT(): () => undefined; +export declare function EMPTY_ALT(value: T): () => T; + +/** + * This is the default logic Chevrotain uses to construct error messages. + * It can be used as a reference or as a starting point customize a parser's + * error messages. + * + * - See: {@link IParserConfig.errorMessageProvider} + */ +export declare const defaultParserErrorProvider: IParserErrorMessageProvider; + +/** + * A Chevrotain Parser runtime exception. + */ +export interface IRecognitionException extends Error { + name: string; + message: string; + /** + * The token which caused the parser error. + */ + token: IToken; + /** + * Additional tokens which have been re-synced in error recovery due to the original error. + * This information can be used the calculate the whole text area which has been skipped due to an error. + * For example for displaying with a red underline in a text editor. + */ + resyncedTokens: IToken[]; + context: IRecognizerContext; +} + +/** + * A utility to detect if an Error is a Chevrotain Parser's runtime exception. + */ +export declare function isRecognitionException(error: Error): boolean; + +/** + * An exception of this type will be saved in {@link BaseParser.errors} when {@link BaseParser.CONSUME} + * was called but failed to match the expected Token Type. + */ +export declare class MismatchedTokenException + extends Error + implements IRecognitionException +{ + context: IRecognizerContext; + resyncedTokens: IToken[]; + token: IToken; + previousToken: IToken; + + constructor(message: string, token: IToken, previousToken: IToken); +} + +/** + * An exception of this type will be saved in {@link BaseParser.errors} when {@link BaseParser.OR} + * was called yet none of the possible alternatives could be matched. + */ +export declare class NoViableAltException + extends Error + implements IRecognitionException +{ + context: IRecognizerContext; + resyncedTokens: IToken[]; + token: IToken; + previousToken: IToken; + + constructor(message: string, token: IToken, previousToken: IToken); +} + +/** + * An exception of this type will be saved in {@link BaseParser.errors} when + * the parser has finished yet there exists remaining input (tokens) that has not processed. + */ +export declare class NotAllInputParsedException + extends Error + implements IRecognitionException +{ + context: IRecognizerContext; + resyncedTokens: IToken[]; + token: IToken; + + constructor(message: string, token: IToken); +} + +/** + * An exception of this type will be saved in {@link BaseParser.errors} when {@link BaseParser.AT_LEAST_ONE_SEP} + * or {@link BaseParser.AT_LEAST_ONE_SEP} was called but failed to match even a single iteration. + */ +export declare class EarlyExitException + extends Error + implements IRecognitionException +{ + context: IRecognizerContext; + resyncedTokens: IToken[]; + token: IToken; + previousToken: IToken; + + constructor(message: string, token: IToken, previousToken: IToken); +} + +export interface IProduction { + accept(visitor: IGASTVisitor): void; +} + +export interface IProductionWithOccurrence extends IProduction { + idx: number; +} + +/** + * A very basic implementation of a Visitor Pattern + * For the Grammar AST structure. + * + * This may be useful for advanced users who create custom logic on the grammar AST. + * For example, custom validations or introspection. + */ +export abstract class GAstVisitor { + visit(node: IProduction): any; + + abstract visitNonTerminal(node: NonTerminal): any; + + abstract visitAlternative(node: Alternative): any; + + abstract visitOption(node: Option): any; + + abstract visitRepetition(node: Repetition): any; + + abstract visitRepetitionMandatory(node: RepetitionMandatory): any; + + abstract visitRepetitionMandatoryWithSeparator( + node: RepetitionMandatoryWithSeparator, + ): any; + + abstract visitRepetitionWithSeparator(node: RepetitionWithSeparator): any; + + abstract visitAlternation(node: Alternation): any; + + abstract visitTerminal(node: Terminal): any; + + abstract visitRule(node: Rule): any; +} + +/** + * The Grammar AST class representing a top level {@link CstParser.RULE} or {@link EmbeddedActionsParser.RULE} call. + */ +export declare class Rule { + name: string; + orgText: string; + definition: IProduction[]; + + constructor(options: { + name: string; + definition: IProduction[]; + orgText?: string; + }); + + accept(visitor: IGASTVisitor): void; +} + +/** + * The Grammar AST class representing a top level {@link CstParser.SUBRULE} or {@link EmbeddedActionsParser.SUBRULE} call. + */ +export declare class NonTerminal implements IProductionWithOccurrence { + nonTerminalName: string; + label?: string; + referencedRule: Rule; + idx: number; + constructor(options: { + nonTerminalName: string; + label?: string; + referencedRule?: Rule; + idx?: number; + }); + definition: IProduction[]; + accept(visitor: IGASTVisitor): void; +} + +/** + * The Grammar AST class used to represent a single alternative in an {@link Alternation}. + */ +export declare class Alternative { + definition: IProduction[]; + ignoreAmbiguities: boolean; + + constructor(options: { + definition: IProduction[]; + ignoreAmbiguities?: boolean; + }); + + accept(visitor: IGASTVisitor): void; +} + +/** + * The Grammar AST class representing a {@link BaseParser.OPTION} call. + */ +export declare class Option implements IProductionWithOccurrence { + idx: number; + definition: IProduction[]; + + constructor(options: { + definition: IProduction[]; + idx?: number; + name?: string; + }); + + accept(visitor: IGASTVisitor): void; +} + +/** + * The Grammar AST class representing a {@link BaseParser.AT_LEAST_ONE_SEP} call. + */ +export declare class RepetitionMandatory implements IProductionWithOccurrence { + idx: number; + definition: IProduction[]; + + constructor(options: { + definition: IProduction[]; + idx?: number; + name?: string; + }); + + accept(visitor: IGASTVisitor): void; +} + +/** + * The Grammar AST class representing a {@link BaseParser.AT_LEAST_ONE_SEP} call. + */ +export declare class RepetitionMandatoryWithSeparator + implements IProductionWithOccurrence +{ + separator: TokenType; + idx: number; + definition: IProduction[]; + + constructor(options: { + definition: IProduction[]; + separator: TokenType; + idx?: number; + name?: string; + }); + + accept(visitor: IGASTVisitor): void; +} + +/** + * The Grammar AST class representing a {@link BaseParser.MANY} call. + */ +export declare class Repetition implements IProductionWithOccurrence { + separator: TokenType; + idx: number; + definition: IProduction[]; + + constructor(options: { + definition: IProduction[]; + idx?: number; + name?: string; + }); + + accept(visitor: IGASTVisitor): void; +} + +/** + * The Grammar AST class representing a {@link BaseParser.MANY_SEP} call. + */ +export declare class RepetitionWithSeparator + implements IProductionWithOccurrence +{ + separator: TokenType; + idx: number; + definition: IProduction[]; + + constructor(options: { + definition: IProduction[]; + separator: TokenType; + idx?: number; + name?: string; + }); + + accept(visitor: IGASTVisitor): void; +} + +/** + * The Grammar AST class representing a {@link BaseParser.OR} call. + */ +export declare class Alternation implements IProductionWithOccurrence { + idx: number; + definition: IProduction[]; + + constructor(options: { definition: IProduction[]; idx?: number }); + + accept(visitor: IGASTVisitor): void; +} + +/** + * The Grammar AST class representing a {@link BaseParser.CONSUME} call. + */ +export declare class Terminal implements IProductionWithOccurrence { + terminalType: TokenType; + label?: string; + idx: number; + constructor(options: { + terminalType: TokenType; + label?: string; + idx?: number; + }); + accept(visitor: IGASTVisitor): void; +} + +export interface IGASTVisitor { + visit(prod: IProduction): any; +} + +/** + * Serialize a Grammar to a JSON Object. + * + * This can be useful for scenarios requiring exporting the grammar structure + * for example drawing syntax diagrams. + */ +export declare function serializeGrammar(topRules: Rule[]): ISerializedGast[]; + +/** + * Like {@link serializeGrammar} but for a single GAST Production instead of a set of Rules. + */ +export declare function serializeProduction(node: IProduction): ISerializedGast; + +/** + * @deprecated + * This function no longer does anything, Avoid using this function + * As it will be removed in future versions. + */ +export declare function clearCache(): void; + +/** + * Structure of configuration object for {@link createSyntaxDiagramsCode} + */ +export interface ICreateSyntaxDiagramsConfig { + /** + * Base Url to load the runtime resources for rendering the diagrams + */ + resourceBase?: string; + /** + * Url to load the styleSheet, replace with your own for styling customization. + */ + css?: string; +} + +/** + * Will generate an html source code (text). + * This html text will render syntax diagrams for the provided grammar. + * + * - See detailed docs for [Syntax Diagrams](http://chevrotain.io/docs/guide/generating_syntax_diagrams.html). + */ +export declare function createSyntaxDiagramsCode( + grammar: ISerializedGast[], + config?: ICreateSyntaxDiagramsConfig, +): string; + +/** + * Will generate TypeScript definitions source code (text). + * For a set of {@link Rule}. + * + * This set of Rules can be obtained from a Parser **instance** via the + * {@link BaseParser.getGAstProductions} method. + * + * Note that this function produces a **string** the output. + * It is the responsibility of the end-user to create the signatures files. + * - e.g: via `fs.writeFileSync()` + * + * See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cst-typescript-signatures + */ +export declare function generateCstDts( + productions: Record, + options?: GenerateDtsOptions, +): string; + +export declare type GenerateDtsOptions = { + /** + * `true` by default. + * Disable this to prevent the generation of the CSTVisitor interface. + * For example, if a different traversal method on the CST has been implemented + * by the end-user and the Chevrotain CST Visitor apis are not used. + */ + includeVisitorInterface?: boolean; + /** + * The generated visitor interface will be called `ICstNodeVisitor` by default + * This parameter enables giving it a more specific name, for example: `MyCstVisitor` or `JohnDoe` + */ + visitorInterfaceName?: string; +}; diff --git a/node_modules/@chevrotain/types/package.json b/node_modules/@chevrotain/types/package.json new file mode 100644 index 0000000..8019eac --- /dev/null +++ b/node_modules/@chevrotain/types/package.json @@ -0,0 +1,50 @@ +{ + "name": "@chevrotain/types", + "version": "11.0.3", + "description": "Type Signatures and API Website for Chevrotain", + "keywords": [], + "bugs": { + "url": "https://github.com/Chevrotain/chevrotain/issues" + }, + "license": "Apache-2.0", + "author": { + "name": "Shahar Soel" + }, + "files": [ + "api.d.ts", + "README.md", + "LICENSE.TXT" + ], + "type": "module", + "types": "./api.d.ts", + "exports": { + ".": { + "types": "./api.d.ts" + } + }, + "repository": { + "type": "git", + "url": "git://github.com/Chevrotain/chevrotain.git" + }, + "homepage": "https://chevrotain.io/documentation/", + "scripts": { + "---------- CI FLOWS --------": "", + "ci": "pnpm run build", + "build": "npm-run-all clean compile api-site:build", + "postversion": "npm-run-all api-site:build api-site:upload", + "---------- BUILD STEPS --------": "", + "clean": "shx rm -rf dev lib", + "compile:watch": "tsc -w", + "compile": "tsc", + "api-site:build": "typedoc api.d.ts --out dev/docs --excludeExternals --excludePrivate", + "api-site:upload": "./scripts/api-site-upload.sh" + }, + "devDependencies": { + "typedoc": "0.24.8", + "typescript": "5.1.6" + }, + "publishConfig": { + "access": "public" + }, + "gitHead": "ac5806631779035c2c1955744a47d8ed4f25a175" +} diff --git a/node_modules/@chevrotain/utils/LICENSE.txt b/node_modules/@chevrotain/utils/LICENSE.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/node_modules/@chevrotain/utils/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@chevrotain/utils/lib/src/api.d.ts b/node_modules/@chevrotain/utils/lib/src/api.d.ts new file mode 100644 index 0000000..ce7ef20 --- /dev/null +++ b/node_modules/@chevrotain/utils/lib/src/api.d.ts @@ -0,0 +1,3 @@ +export { PRINT_WARNING, PRINT_ERROR } from "./print.js"; +export { timer } from "./timer.js"; +export { toFastProperties } from "./to-fast-properties.js"; diff --git a/node_modules/@chevrotain/utils/lib/src/api.js b/node_modules/@chevrotain/utils/lib/src/api.js new file mode 100644 index 0000000..4d58ae4 --- /dev/null +++ b/node_modules/@chevrotain/utils/lib/src/api.js @@ -0,0 +1,4 @@ +export { PRINT_WARNING, PRINT_ERROR } from "./print.js"; +export { timer } from "./timer.js"; +export { toFastProperties } from "./to-fast-properties.js"; +//# sourceMappingURL=api.js.map \ No newline at end of file diff --git a/node_modules/@chevrotain/utils/lib/src/api.js.map b/node_modules/@chevrotain/utils/lib/src/api.js.map new file mode 100644 index 0000000..a42c6c4 --- /dev/null +++ b/node_modules/@chevrotain/utils/lib/src/api.js.map @@ -0,0 +1 @@ +{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC"} \ No newline at end of file diff --git a/node_modules/@chevrotain/utils/lib/src/print.d.ts b/node_modules/@chevrotain/utils/lib/src/print.d.ts new file mode 100644 index 0000000..68d0e71 --- /dev/null +++ b/node_modules/@chevrotain/utils/lib/src/print.d.ts @@ -0,0 +1,2 @@ +export declare function PRINT_ERROR(msg: string): void; +export declare function PRINT_WARNING(msg: string): void; diff --git a/node_modules/@chevrotain/utils/lib/src/print.js b/node_modules/@chevrotain/utils/lib/src/print.js new file mode 100644 index 0000000..e927691 --- /dev/null +++ b/node_modules/@chevrotain/utils/lib/src/print.js @@ -0,0 +1,14 @@ +export function PRINT_ERROR(msg) { + /* istanbul ignore else - can't override global.console in node.js */ + if (console && console.error) { + console.error(`Error: ${msg}`); + } +} +export function PRINT_WARNING(msg) { + /* istanbul ignore else - can't override global.console in node.js*/ + if (console && console.warn) { + // TODO: modify docs accordingly + console.warn(`Warning: ${msg}`); + } +} +//# sourceMappingURL=print.js.map \ No newline at end of file diff --git a/node_modules/@chevrotain/utils/lib/src/print.js.map b/node_modules/@chevrotain/utils/lib/src/print.js.map new file mode 100644 index 0000000..bf3522d --- /dev/null +++ b/node_modules/@chevrotain/utils/lib/src/print.js.map @@ -0,0 +1 @@ +{"version":3,"file":"print.js","sourceRoot":"","sources":["../../src/print.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,WAAW,CAAC,GAAW;IACrC,qEAAqE;IACrE,IAAI,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE;QAC5B,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,EAAE,CAAC,CAAC;KAChC;AACH,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,oEAAoE;IACpE,IAAI,OAAO,IAAI,OAAO,CAAC,IAAI,EAAE;QAC3B,gCAAgC;QAChC,OAAO,CAAC,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC,CAAC;KACjC;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/@chevrotain/utils/lib/src/timer.d.ts b/node_modules/@chevrotain/utils/lib/src/timer.d.ts new file mode 100644 index 0000000..4b744f1 --- /dev/null +++ b/node_modules/@chevrotain/utils/lib/src/timer.d.ts @@ -0,0 +1,4 @@ +export declare function timer(func: () => T): { + time: number; + value: T; +}; diff --git a/node_modules/@chevrotain/utils/lib/src/timer.js b/node_modules/@chevrotain/utils/lib/src/timer.js new file mode 100644 index 0000000..bccd478 --- /dev/null +++ b/node_modules/@chevrotain/utils/lib/src/timer.js @@ -0,0 +1,8 @@ +export function timer(func) { + const start = new Date().getTime(); + const val = func(); + const end = new Date().getTime(); + const total = end - start; + return { time: total, value: val }; +} +//# sourceMappingURL=timer.js.map \ No newline at end of file diff --git a/node_modules/@chevrotain/utils/lib/src/timer.js.map b/node_modules/@chevrotain/utils/lib/src/timer.js.map new file mode 100644 index 0000000..b0b3b9c --- /dev/null +++ b/node_modules/@chevrotain/utils/lib/src/timer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"timer.js","sourceRoot":"","sources":["../../src/timer.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,KAAK,CAAI,IAAa;IACpC,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;IACnC,MAAM,GAAG,GAAG,IAAI,EAAE,CAAC;IACnB,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;IACjC,MAAM,KAAK,GAAG,GAAG,GAAG,KAAK,CAAC;IAC1B,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;AACrC,CAAC"} \ No newline at end of file diff --git a/node_modules/@chevrotain/utils/lib/src/to-fast-properties.d.ts b/node_modules/@chevrotain/utils/lib/src/to-fast-properties.d.ts new file mode 100644 index 0000000..2800bb7 --- /dev/null +++ b/node_modules/@chevrotain/utils/lib/src/to-fast-properties.d.ts @@ -0,0 +1 @@ +export declare function toFastProperties(toBecomeFast: any): any; diff --git a/node_modules/@chevrotain/utils/lib/src/to-fast-properties.js b/node_modules/@chevrotain/utils/lib/src/to-fast-properties.js new file mode 100644 index 0000000..cb04dfd --- /dev/null +++ b/node_modules/@chevrotain/utils/lib/src/to-fast-properties.js @@ -0,0 +1,24 @@ +// based on: https://github.com/petkaantonov/bluebird/blob/b97c0d2d487e8c5076e8bd897e0dcd4622d31846/src/util.js#L201-L216 +export function toFastProperties(toBecomeFast) { + function FakeConstructor() { } + // If our object is used as a constructor, it would receive + FakeConstructor.prototype = toBecomeFast; + const fakeInstance = new FakeConstructor(); + function fakeAccess() { + return typeof fakeInstance.bar; + } + // help V8 understand this is a "real" prototype by actually using + // the fake instance. + fakeAccess(); + fakeAccess(); + // Always true condition to suppress the Firefox warning of unreachable + // code after a return statement. + if (1) + return toBecomeFast; + // Eval prevents optimization of this method (even though this is dead code) + // - https://esbuild.github.io/content-types/#direct-eval + /* istanbul ignore next */ + // tslint:disable-next-line + (0, eval)(toBecomeFast); +} +//# sourceMappingURL=to-fast-properties.js.map \ No newline at end of file diff --git a/node_modules/@chevrotain/utils/lib/src/to-fast-properties.js.map b/node_modules/@chevrotain/utils/lib/src/to-fast-properties.js.map new file mode 100644 index 0000000..95bec3c --- /dev/null +++ b/node_modules/@chevrotain/utils/lib/src/to-fast-properties.js.map @@ -0,0 +1 @@ +{"version":3,"file":"to-fast-properties.js","sourceRoot":"","sources":["../../src/to-fast-properties.ts"],"names":[],"mappings":"AAAA,yHAAyH;AACzH,MAAM,UAAU,gBAAgB,CAAC,YAAiB;IAChD,SAAS,eAAe,KAAI,CAAC;IAE7B,2DAA2D;IAC3D,eAAe,CAAC,SAAS,GAAG,YAAY,CAAC;IACzC,MAAM,YAAY,GAAG,IAAK,eAAuB,EAAE,CAAC;IAEpD,SAAS,UAAU;QACjB,OAAO,OAAO,YAAY,CAAC,GAAG,CAAC;IACjC,CAAC;IAED,kEAAkE;IAClE,qBAAqB;IACrB,UAAU,EAAE,CAAC;IACb,UAAU,EAAE,CAAC;IAEb,uEAAuE;IACvE,iCAAiC;IACjC,IAAI,CAAC;QAAE,OAAO,YAAY,CAAC;IAE3B,4EAA4E;IAC5E,yDAAyD;IACzD,0BAA0B;IAC1B,2BAA2B;IAC3B,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,YAAY,CAAC,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/node_modules/@chevrotain/utils/package.json b/node_modules/@chevrotain/utils/package.json new file mode 100644 index 0000000..1d5384d --- /dev/null +++ b/node_modules/@chevrotain/utils/package.json @@ -0,0 +1,46 @@ +{ + "name": "@chevrotain/utils", + "version": "11.0.3", + "description": "common utilities", + "keywords": [], + "bugs": { + "url": "https://github.com/Chevrotain/chevrotain/issues" + }, + "license": "Apache-2.0", + "author": { + "name": "Shahar Soel" + }, + "type": "module", + "types": "./lib/src/api.d.ts", + "exports": { + ".": { + "import": "./lib/src/api.js", + "types": "./lib/src/api.d.ts" + } + }, + "files": [ + "lib/src/**/*.js", + "lib/src/**/*.map", + "lib/src/**/*.d.ts", + "src/**/*.ts" + ], + "repository": { + "type": "git", + "url": "git://github.com/Chevrotain/chevrotain.git" + }, + "scripts": { + "---------- CI FLOWS --------": "", + "ci": "npm-run-all build test", + "build": "npm-run-all clean compile", + "test": "npm-run-all coverage", + "---------- BUILD STEPS --------": "", + "clean": "shx rm -rf lib coverage", + "compile:watch": "tsc -w", + "compile": "tsc", + "coverage": "c8 mocha --enable-source-maps" + }, + "publishConfig": { + "access": "public" + }, + "gitHead": "ac5806631779035c2c1955744a47d8ed4f25a175" +} diff --git a/node_modules/@chevrotain/utils/src/api.ts b/node_modules/@chevrotain/utils/src/api.ts new file mode 100644 index 0000000..ce7ef20 --- /dev/null +++ b/node_modules/@chevrotain/utils/src/api.ts @@ -0,0 +1,3 @@ +export { PRINT_WARNING, PRINT_ERROR } from "./print.js"; +export { timer } from "./timer.js"; +export { toFastProperties } from "./to-fast-properties.js"; diff --git a/node_modules/@chevrotain/utils/src/print.ts b/node_modules/@chevrotain/utils/src/print.ts new file mode 100644 index 0000000..db74134 --- /dev/null +++ b/node_modules/@chevrotain/utils/src/print.ts @@ -0,0 +1,14 @@ +export function PRINT_ERROR(msg: string) { + /* istanbul ignore else - can't override global.console in node.js */ + if (console && console.error) { + console.error(`Error: ${msg}`); + } +} + +export function PRINT_WARNING(msg: string) { + /* istanbul ignore else - can't override global.console in node.js*/ + if (console && console.warn) { + // TODO: modify docs accordingly + console.warn(`Warning: ${msg}`); + } +} diff --git a/node_modules/@chevrotain/utils/src/timer.ts b/node_modules/@chevrotain/utils/src/timer.ts new file mode 100644 index 0000000..f41a47f --- /dev/null +++ b/node_modules/@chevrotain/utils/src/timer.ts @@ -0,0 +1,7 @@ +export function timer(func: () => T): { time: number; value: T } { + const start = new Date().getTime(); + const val = func(); + const end = new Date().getTime(); + const total = end - start; + return { time: total, value: val }; +} diff --git a/node_modules/@chevrotain/utils/src/to-fast-properties.ts b/node_modules/@chevrotain/utils/src/to-fast-properties.ts new file mode 100644 index 0000000..4275ad7 --- /dev/null +++ b/node_modules/@chevrotain/utils/src/to-fast-properties.ts @@ -0,0 +1,27 @@ +// based on: https://github.com/petkaantonov/bluebird/blob/b97c0d2d487e8c5076e8bd897e0dcd4622d31846/src/util.js#L201-L216 +export function toFastProperties(toBecomeFast: any) { + function FakeConstructor() {} + + // If our object is used as a constructor, it would receive + FakeConstructor.prototype = toBecomeFast; + const fakeInstance = new (FakeConstructor as any)(); + + function fakeAccess() { + return typeof fakeInstance.bar; + } + + // help V8 understand this is a "real" prototype by actually using + // the fake instance. + fakeAccess(); + fakeAccess(); + + // Always true condition to suppress the Firefox warning of unreachable + // code after a return statement. + if (1) return toBecomeFast; + + // Eval prevents optimization of this method (even though this is dead code) + // - https://esbuild.github.io/content-types/#direct-eval + /* istanbul ignore next */ + // tslint:disable-next-line + (0, eval)(toBecomeFast); +} diff --git a/node_modules/chevrotain-allstar/LICENSE b/node_modules/chevrotain-allstar/LICENSE new file mode 100644 index 0000000..01e35be --- /dev/null +++ b/node_modules/chevrotain-allstar/LICENSE @@ -0,0 +1,16 @@ +Copyright 2022 TypeFox GmbH + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and +associated documentation files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, +sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/chevrotain-allstar/README.md b/node_modules/chevrotain-allstar/README.md new file mode 100644 index 0000000..55fdc51 --- /dev/null +++ b/node_modules/chevrotain-allstar/README.md @@ -0,0 +1,22 @@ +# Chevrotain Allstar + +This is a lookahead plugin package for the [Chevrotain parser library](https://chevrotain.io/). +It implements the [ALL(*) lookahead algorithm](https://www.antlr.org/papers/allstar-techreport.pdf) introduced for ANTLR4. +The algorithm features unbounded lookahead, compared to the normal LL(*k*) behavior of Chevrotain. + +## Usage + +When creating your parser, pass an instance of the `LLStarLookaheadStrategy` to the `lookaheadStrategy` property of the base parser constructor options. + +```ts +import { LLStarLookaheadStrategy } from "chevrotain-allstar"; + +class Parser extends EmbeddedActionsParser { + constructor() { + super(tokens, { + lookaheadStrategy: new LLStarLookaheadStrategy() + }); + this.performSelfAnalysis() + } +} +``` diff --git a/node_modules/chevrotain-allstar/lib/all-star-lookahead.d.ts b/node_modules/chevrotain-allstar/lib/all-star-lookahead.d.ts new file mode 100644 index 0000000..2f8758a --- /dev/null +++ b/node_modules/chevrotain-allstar/lib/all-star-lookahead.d.ts @@ -0,0 +1,36 @@ +/****************************************************************************** + * Copyright 2022 TypeFox GmbH + * This program and the accompanying materials are made available under the + * terms of the MIT License, which is available in the project root. + ******************************************************************************/ +import { Rule, BaseParser, LLkLookaheadStrategy, ILookaheadValidationError, IOrAlt, OptionalProductionType } from "chevrotain"; +export type AmbiguityReport = (message: string) => void; +export interface LLStarLookaheadOptions { + logging?: AmbiguityReport; +} +export declare class LLStarLookaheadStrategy extends LLkLookaheadStrategy { + private atn; + private dfas; + private logging; + constructor(options?: LLStarLookaheadOptions); + initialize(options: { + rules: Rule[]; + }): void; + validateAmbiguousAlternationAlternatives(): ILookaheadValidationError[]; + validateEmptyOrAlternatives(): ILookaheadValidationError[]; + buildLookaheadForAlternation(options: { + prodOccurrence: number; + rule: Rule; + maxLookahead: number; + hasPredicates: boolean; + dynamicTokensEnabled: boolean; + }): (this: BaseParser, orAlts?: IOrAlt[] | undefined) => number | undefined; + buildLookaheadForOptional(options: { + prodOccurrence: number; + prodType: OptionalProductionType; + rule: Rule; + maxLookahead: number; + dynamicTokensEnabled: boolean; + }): (this: BaseParser) => boolean; +} +//# sourceMappingURL=all-star-lookahead.d.ts.map \ No newline at end of file diff --git a/node_modules/chevrotain-allstar/lib/all-star-lookahead.d.ts.map b/node_modules/chevrotain-allstar/lib/all-star-lookahead.d.ts.map new file mode 100644 index 0000000..5ff119c --- /dev/null +++ b/node_modules/chevrotain-allstar/lib/all-star-lookahead.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"all-star-lookahead.d.ts","sourceRoot":"","sources":["../src/all-star-lookahead.ts"],"names":[],"mappings":"AAAA;;;;gFAIgF;AAEhF,OAAO,EAKH,IAAI,EAUJ,UAAU,EACV,oBAAoB,EACpB,yBAAyB,EACzB,MAAM,EAEN,sBAAsB,EACzB,MAAM,YAAY,CAAC;AAgCpB,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;AAkDxD,MAAM,WAAW,sBAAsB;IACnC,OAAO,CAAC,EAAE,eAAe,CAAA;CAC5B;AAED,qBAAa,uBAAwB,SAAQ,oBAAoB;IAE7D,OAAO,CAAC,GAAG,CAAM;IACjB,OAAO,CAAC,IAAI,CAAa;IACzB,OAAO,CAAC,OAAO,CAAkB;gBAErB,OAAO,CAAC,EAAE,sBAAsB;IAKnC,UAAU,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,IAAI,EAAE,CAAA;KAAE,GAAG,IAAI;IAK5C,wCAAwC,IAAI,yBAAyB,EAAE;IAIvE,2BAA2B,IAAI,yBAAyB,EAAE;IAI1D,4BAA4B,CAAC,OAAO,EAAE;QAC3C,cAAc,EAAE,MAAM,CAAC;QACvB,IAAI,EAAE,IAAI,CAAC;QACX,YAAY,EAAE,MAAM,CAAC;QACrB,aAAa,EAAE,OAAO,CAAC;QACvB,oBAAoB,EAAE,OAAO,CAAA;KAChC,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC,EAAE,GAAG,SAAS,KAAK,MAAM,GAAG,SAAS;IAuEvE,yBAAyB,CAAC,OAAO,EAAE;QACxC,cAAc,EAAE,MAAM,CAAC;QACvB,QAAQ,EAAE,sBAAsB,CAAC;QACjC,IAAI,EAAE,IAAI,CAAC;QACX,YAAY,EAAE,MAAM,CAAC;QACrB,oBAAoB,EAAE,OAAO,CAAA;KAChC,GAAG,CAAC,IAAI,EAAE,UAAU,KAAK,OAAO;CA4DpC"} \ No newline at end of file diff --git a/node_modules/chevrotain-allstar/lib/all-star-lookahead.js b/node_modules/chevrotain-allstar/lib/all-star-lookahead.js new file mode 100644 index 0000000..2adc731 --- /dev/null +++ b/node_modules/chevrotain-allstar/lib/all-star-lookahead.js @@ -0,0 +1,556 @@ +/****************************************************************************** + * Copyright 2022 TypeFox GmbH + * This program and the accompanying materials are made available under the + * terms of the MIT License, which is available in the project root. + ******************************************************************************/ +import { tokenMatcher, tokenLabel, NonTerminal, Alternation, Option, RepetitionMandatory, RepetitionMandatoryWithSeparator, RepetitionWithSeparator, Repetition, Terminal, LLkLookaheadStrategy, getLookaheadPaths } from "chevrotain"; +import { ATN_RULE_STOP, AtomTransition, buildATNKey, createATN, EpsilonTransition, RuleTransition } from "./atn.js"; +import { ATNConfigSet, DFA_ERROR, getATNConfigKey } from "./dfa.js"; +import min from "lodash-es/min.js"; +import flatMap from "lodash-es/flatMap.js"; +import uniqBy from "lodash-es/uniqBy.js"; +import map from "lodash-es/map.js"; +import flatten from "lodash-es/flatten.js"; +import forEach from "lodash-es/forEach.js"; +import isEmpty from "lodash-es/isEmpty.js"; +import reduce from "lodash-es/reduce.js"; +function createDFACache(startState, decision) { + const map = {}; + return (predicateSet) => { + const key = predicateSet.toString(); + let existing = map[key]; + if (existing !== undefined) { + return existing; + } + else { + existing = { + atnStartState: startState, + decision, + states: {} + }; + map[key] = existing; + return existing; + } + }; +} +class PredicateSet { + constructor() { + this.predicates = []; + } + is(index) { + return index >= this.predicates.length || this.predicates[index]; + } + set(index, value) { + this.predicates[index] = value; + } + toString() { + let value = ""; + const size = this.predicates.length; + for (let i = 0; i < size; i++) { + value += this.predicates[i] === true ? "1" : "0"; + } + return value; + } +} +const EMPTY_PREDICATES = new PredicateSet(); +export class LLStarLookaheadStrategy extends LLkLookaheadStrategy { + constructor(options) { + var _a; + super(); + this.logging = (_a = options === null || options === void 0 ? void 0 : options.logging) !== null && _a !== void 0 ? _a : ((message) => console.log(message)); + } + initialize(options) { + this.atn = createATN(options.rules); + this.dfas = initATNSimulator(this.atn); + } + validateAmbiguousAlternationAlternatives() { + return []; + } + validateEmptyOrAlternatives() { + return []; + } + buildLookaheadForAlternation(options) { + const { prodOccurrence, rule, hasPredicates, dynamicTokensEnabled } = options; + const dfas = this.dfas; + const logging = this.logging; + const key = buildATNKey(rule, 'Alternation', prodOccurrence); + const decisionState = this.atn.decisionMap[key]; + const decisionIndex = decisionState.decision; + const partialAlts = map(getLookaheadPaths({ + maxLookahead: 1, + occurrence: prodOccurrence, + prodType: "Alternation", + rule: rule + }), (currAlt) => map(currAlt, (path) => path[0])); + if (isLL1Sequence(partialAlts, false) && !dynamicTokensEnabled) { + const choiceToAlt = reduce(partialAlts, (result, currAlt, idx) => { + forEach(currAlt, (currTokType) => { + if (currTokType) { + result[currTokType.tokenTypeIdx] = idx; + forEach(currTokType.categoryMatches, (currExtendingType) => { + result[currExtendingType] = idx; + }); + } + }); + return result; + }, {}); + if (hasPredicates) { + return function (orAlts) { + var _a; + const nextToken = this.LA(1); + const prediction = choiceToAlt[nextToken.tokenTypeIdx]; + if (orAlts !== undefined && prediction !== undefined) { + const gate = (_a = orAlts[prediction]) === null || _a === void 0 ? void 0 : _a.GATE; + if (gate !== undefined && gate.call(this) === false) { + return undefined; + } + } + return prediction; + }; + } + else { + return function () { + const nextToken = this.LA(1); + return choiceToAlt[nextToken.tokenTypeIdx]; + }; + } + } + else if (hasPredicates) { + return function (orAlts) { + const predicates = new PredicateSet(); + const length = orAlts === undefined ? 0 : orAlts.length; + for (let i = 0; i < length; i++) { + const gate = orAlts === null || orAlts === void 0 ? void 0 : orAlts[i].GATE; + predicates.set(i, gate === undefined || gate.call(this)); + } + const result = adaptivePredict.call(this, dfas, decisionIndex, predicates, logging); + return typeof result === 'number' ? result : undefined; + }; + } + else { + return function () { + const result = adaptivePredict.call(this, dfas, decisionIndex, EMPTY_PREDICATES, logging); + return typeof result === 'number' ? result : undefined; + }; + } + } + buildLookaheadForOptional(options) { + const { prodOccurrence, rule, prodType, dynamicTokensEnabled } = options; + const dfas = this.dfas; + const logging = this.logging; + const key = buildATNKey(rule, prodType, prodOccurrence); + const decisionState = this.atn.decisionMap[key]; + const decisionIndex = decisionState.decision; + const alts = map(getLookaheadPaths({ + maxLookahead: 1, + occurrence: prodOccurrence, + prodType, + rule + }), (e) => { + return map(e, (g) => g[0]); + }); + if (isLL1Sequence(alts) && alts[0][0] && !dynamicTokensEnabled) { + const alt = alts[0]; + const singleTokensTypes = flatten(alt); + if (singleTokensTypes.length === 1 && + isEmpty(singleTokensTypes[0].categoryMatches)) { + const expectedTokenType = singleTokensTypes[0]; + const expectedTokenUniqueKey = expectedTokenType.tokenTypeIdx; + return function () { + return this.LA(1).tokenTypeIdx === expectedTokenUniqueKey; + }; + } + else { + const choiceToAlt = reduce(singleTokensTypes, (result, currTokType) => { + if (currTokType !== undefined) { + result[currTokType.tokenTypeIdx] = true; + forEach(currTokType.categoryMatches, (currExtendingType) => { + result[currExtendingType] = true; + }); + } + return result; + }, {}); + return function () { + const nextToken = this.LA(1); + return choiceToAlt[nextToken.tokenTypeIdx] === true; + }; + } + } + return function () { + const result = adaptivePredict.call(this, dfas, decisionIndex, EMPTY_PREDICATES, logging); + return typeof result === "object" ? false : result === 0; + }; + } +} +function isLL1Sequence(sequences, allowEmpty = true) { + const fullSet = new Set(); + for (const alt of sequences) { + const altSet = new Set(); + for (const tokType of alt) { + if (tokType === undefined) { + if (allowEmpty) { + // Epsilon production encountered + break; + } + else { + return false; + } + } + const indices = [tokType.tokenTypeIdx].concat(tokType.categoryMatches); + for (const index of indices) { + if (fullSet.has(index)) { + if (!altSet.has(index)) { + return false; + } + } + else { + fullSet.add(index); + altSet.add(index); + } + } + } + } + return true; +} +function initATNSimulator(atn) { + const decisionLength = atn.decisionStates.length; + const decisionToDFA = Array(decisionLength); + for (let i = 0; i < decisionLength; i++) { + decisionToDFA[i] = createDFACache(atn.decisionStates[i], i); + } + return decisionToDFA; +} +function adaptivePredict(dfaCaches, decision, predicateSet, logging) { + const dfa = dfaCaches[decision](predicateSet); + let start = dfa.start; + if (start === undefined) { + const closure = computeStartState(dfa.atnStartState); + start = addDFAState(dfa, newDFAState(closure)); + dfa.start = start; + } + const alt = performLookahead.apply(this, [dfa, start, predicateSet, logging]); + return alt; +} +function performLookahead(dfa, s0, predicateSet, logging) { + let previousD = s0; + let i = 1; + const path = []; + let t = this.LA(i++); + while (true) { + let d = getExistingTargetState(previousD, t); + if (d === undefined) { + d = computeLookaheadTarget.apply(this, [dfa, previousD, t, i, predicateSet, logging]); + } + if (d === DFA_ERROR) { + return buildAdaptivePredictError(path, previousD, t); + } + if (d.isAcceptState === true) { + return d.prediction; + } + previousD = d; + path.push(t); + t = this.LA(i++); + } +} +function computeLookaheadTarget(dfa, previousD, token, lookahead, predicateSet, logging) { + const reach = computeReachSet(previousD.configs, token, predicateSet); + if (reach.size === 0) { + addDFAEdge(dfa, previousD, token, DFA_ERROR); + return DFA_ERROR; + } + let newState = newDFAState(reach); + const predictedAlt = getUniqueAlt(reach, predicateSet); + if (predictedAlt !== undefined) { + newState.isAcceptState = true; + newState.prediction = predictedAlt; + newState.configs.uniqueAlt = predictedAlt; + } + else if (hasConflictTerminatingPrediction(reach)) { + const prediction = min(reach.alts); + newState.isAcceptState = true; + newState.prediction = prediction; + newState.configs.uniqueAlt = prediction; + reportLookaheadAmbiguity.apply(this, [dfa, lookahead, reach.alts, logging]); + } + newState = addDFAEdge(dfa, previousD, token, newState); + return newState; +} +function reportLookaheadAmbiguity(dfa, lookahead, ambiguityIndices, logging) { + const prefixPath = []; + for (let i = 1; i <= lookahead; i++) { + prefixPath.push(this.LA(i).tokenType); + } + const atnState = dfa.atnStartState; + const topLevelRule = atnState.rule; + const production = atnState.production; + const message = buildAmbiguityError({ + topLevelRule, + ambiguityIndices, + production, + prefixPath + }); + logging(message); +} +function buildAmbiguityError(options) { + const pathMsg = map(options.prefixPath, (currtok) => tokenLabel(currtok)).join(", "); + const occurrence = options.production.idx === 0 ? "" : options.production.idx; + let currMessage = `Ambiguous Alternatives Detected: <${options.ambiguityIndices.join(", ")}> in <${getProductionDslName(options.production)}${occurrence}>` + + ` inside <${options.topLevelRule.name}> Rule,\n` + + `<${pathMsg}> may appears as a prefix path in all these alternatives.\n`; + currMessage = + currMessage + + `See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\n` + + `For Further details.`; + return currMessage; +} +function getProductionDslName(prod) { + if (prod instanceof NonTerminal) { + return "SUBRULE"; + } + else if (prod instanceof Option) { + return "OPTION"; + } + else if (prod instanceof Alternation) { + return "OR"; + } + else if (prod instanceof RepetitionMandatory) { + return "AT_LEAST_ONE"; + } + else if (prod instanceof RepetitionMandatoryWithSeparator) { + return "AT_LEAST_ONE_SEP"; + } + else if (prod instanceof RepetitionWithSeparator) { + return "MANY_SEP"; + } + else if (prod instanceof Repetition) { + return "MANY"; + } + else if (prod instanceof Terminal) { + return "CONSUME"; + } + else { + throw Error("non exhaustive match"); + } +} +function buildAdaptivePredictError(path, previous, current) { + const nextTransitions = flatMap(previous.configs.elements, (e) => e.state.transitions); + const nextTokenTypes = uniqBy(nextTransitions + .filter((e) => e instanceof AtomTransition) + .map((e) => e.tokenType), (e) => e.tokenTypeIdx); + return { + actualToken: current, + possibleTokenTypes: nextTokenTypes, + tokenPath: path + }; +} +function getExistingTargetState(state, token) { + return state.edges[token.tokenTypeIdx]; +} +function computeReachSet(configs, token, predicateSet) { + const intermediate = new ATNConfigSet(); + const skippedStopStates = []; + for (const c of configs.elements) { + if (predicateSet.is(c.alt) === false) { + continue; + } + if (c.state.type === ATN_RULE_STOP) { + skippedStopStates.push(c); + continue; + } + const transitionLength = c.state.transitions.length; + for (let i = 0; i < transitionLength; i++) { + const transition = c.state.transitions[i]; + const target = getReachableTarget(transition, token); + if (target !== undefined) { + intermediate.add({ + state: target, + alt: c.alt, + stack: c.stack + }); + } + } + } + let reach; + if (skippedStopStates.length === 0 && intermediate.size === 1) { + reach = intermediate; + } + if (reach === undefined) { + reach = new ATNConfigSet(); + for (const c of intermediate.elements) { + closure(c, reach); + } + } + if (skippedStopStates.length > 0 && !hasConfigInRuleStopState(reach)) { + for (const c of skippedStopStates) { + reach.add(c); + } + } + return reach; +} +function getReachableTarget(transition, token) { + if (transition instanceof AtomTransition && + tokenMatcher(token, transition.tokenType)) { + return transition.target; + } + return undefined; +} +function getUniqueAlt(configs, predicateSet) { + let alt; + for (const c of configs.elements) { + if (predicateSet.is(c.alt) === true) { + if (alt === undefined) { + alt = c.alt; + } + else if (alt !== c.alt) { + return undefined; + } + } + } + return alt; +} +function newDFAState(closure) { + return { + configs: closure, + edges: {}, + isAcceptState: false, + prediction: -1 + }; +} +function addDFAEdge(dfa, from, token, to) { + to = addDFAState(dfa, to); + from.edges[token.tokenTypeIdx] = to; + return to; +} +function addDFAState(dfa, state) { + if (state === DFA_ERROR) { + return state; + } + // Repetitions have the same config set + // Therefore, storing the key of the config in a map allows us to create a loop in our DFA + const mapKey = state.configs.key; + const existing = dfa.states[mapKey]; + if (existing !== undefined) { + return existing; + } + state.configs.finalize(); + dfa.states[mapKey] = state; + return state; +} +function computeStartState(atnState) { + const configs = new ATNConfigSet(); + const numberOfTransitions = atnState.transitions.length; + for (let i = 0; i < numberOfTransitions; i++) { + const target = atnState.transitions[i].target; + const config = { + state: target, + alt: i, + stack: [] + }; + closure(config, configs); + } + return configs; +} +function closure(config, configs) { + const p = config.state; + if (p.type === ATN_RULE_STOP) { + if (config.stack.length > 0) { + const atnStack = [...config.stack]; + const followState = atnStack.pop(); + const followConfig = { + state: followState, + alt: config.alt, + stack: atnStack + }; + closure(followConfig, configs); + } + else { + // Dipping into outer context, simply add the config + // This will stop computation once every config is at the rule stop state + configs.add(config); + } + return; + } + if (!p.epsilonOnlyTransitions) { + configs.add(config); + } + const transitionLength = p.transitions.length; + for (let i = 0; i < transitionLength; i++) { + const transition = p.transitions[i]; + const c = getEpsilonTarget(config, transition); + if (c !== undefined) { + closure(c, configs); + } + } +} +function getEpsilonTarget(config, transition) { + if (transition instanceof EpsilonTransition) { + return { + state: transition.target, + alt: config.alt, + stack: config.stack + }; + } + else if (transition instanceof RuleTransition) { + const stack = [...config.stack, transition.followState]; + return { + state: transition.target, + alt: config.alt, + stack + }; + } + return undefined; +} +function hasConfigInRuleStopState(configs) { + for (const c of configs.elements) { + if (c.state.type === ATN_RULE_STOP) { + return true; + } + } + return false; +} +function allConfigsInRuleStopStates(configs) { + for (const c of configs.elements) { + if (c.state.type !== ATN_RULE_STOP) { + return false; + } + } + return true; +} +function hasConflictTerminatingPrediction(configs) { + if (allConfigsInRuleStopStates(configs)) { + return true; + } + const altSets = getConflictingAltSets(configs.elements); + const heuristic = hasConflictingAltSet(altSets) && !hasStateAssociatedWithOneAlt(altSets); + return heuristic; +} +function getConflictingAltSets(configs) { + const configToAlts = new Map(); + for (const c of configs) { + const key = getATNConfigKey(c, false); + let alts = configToAlts.get(key); + if (alts === undefined) { + alts = {}; + configToAlts.set(key, alts); + } + alts[c.alt] = true; + } + return configToAlts; +} +function hasConflictingAltSet(altSets) { + for (const value of Array.from(altSets.values())) { + if (Object.keys(value).length > 1) { + return true; + } + } + return false; +} +function hasStateAssociatedWithOneAlt(altSets) { + for (const value of Array.from(altSets.values())) { + if (Object.keys(value).length === 1) { + return true; + } + } + return false; +} +//# sourceMappingURL=all-star-lookahead.js.map \ No newline at end of file diff --git a/node_modules/chevrotain-allstar/lib/all-star-lookahead.js.map b/node_modules/chevrotain-allstar/lib/all-star-lookahead.js.map new file mode 100644 index 0000000..ff59031 --- /dev/null +++ b/node_modules/chevrotain-allstar/lib/all-star-lookahead.js.map @@ -0,0 +1 @@ +{"version":3,"file":"all-star-lookahead.js","sourceRoot":"","sources":["../src/all-star-lookahead.ts"],"names":[],"mappings":"AAAA;;;;gFAIgF;AAEhF,OAAO,EAGH,YAAY,EACZ,UAAU,EAGV,WAAW,EACX,WAAW,EACX,MAAM,EACN,mBAAmB,EACnB,gCAAgC,EAChC,uBAAuB,EACvB,UAAU,EACV,QAAQ,EAER,oBAAoB,EAGpB,iBAAiB,EAEpB,MAAM,YAAY,CAAC;AACpB,OAAO,EAGH,aAAa,EACb,cAAc,EACd,WAAW,EACX,SAAS,EAET,iBAAiB,EACjB,cAAc,EAEjB,MAAM,UAAU,CAAC;AAClB,OAAO,EAEH,YAAY,EAGZ,SAAS,EACT,eAAe,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,GAAG,MAAM,kBAAkB,CAAC;AACnC,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,MA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CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;SAC9B;QACD,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;KACrB;IACD,OAAO,YAAY,CAAA;AACvB,CAAC;AAED,SAAS,oBAAoB,CACzB,OAA6C;IAE7C,KAAK,MAAM,KAAK,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE;QAC9C,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;YAC/B,OAAO,IAAI,CAAA;SACd;KACJ;IACD,OAAO,KAAK,CAAA;AAChB,CAAC;AAED,SAAS,4BAA4B,CACjC,OAA6C;IAE7C,KAAK,MAAM,KAAK,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE;QAC9C,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;YACjC,OAAO,IAAI,CAAA;SACd;KACJ;IACD,OAAO,KAAK,CAAA;AAChB,CAAC"} \ No newline at end of file diff --git a/node_modules/chevrotain-allstar/lib/atn.d.ts b/node_modules/chevrotain-allstar/lib/atn.d.ts new file mode 100644 index 0000000..c23702b --- /dev/null +++ b/node_modules/chevrotain-allstar/lib/atn.d.ts @@ -0,0 +1,105 @@ +/****************************************************************************** + * Copyright 2022 TypeFox GmbH + * This program and the accompanying materials are made available under the + * terms of the MIT License, which is available in the project root. + ******************************************************************************/ +import { IProductionWithOccurrence, TokenType, Rule, LookaheadProductionType } from "chevrotain"; +export declare function buildATNKey(rule: Rule, type: LookaheadProductionType, occurrence: number): string; +export interface ATN { + decisionMap: Record; + states: ATNState[]; + decisionStates: DecisionState[]; + ruleToStartState: Map; + ruleToStopState: Map; +} +export declare const ATN_INVALID_TYPE = 0; +export declare const ATN_BASIC = 1; +export declare const ATN_RULE_START = 2; +export declare const ATN_PLUS_BLOCK_START = 4; +export declare const ATN_STAR_BLOCK_START = 5; +export declare const ATN_TOKEN_START = 6; +export declare const ATN_RULE_STOP = 7; +export declare const ATN_BLOCK_END = 8; +export declare const ATN_STAR_LOOP_BACK = 9; +export declare const ATN_STAR_LOOP_ENTRY = 10; +export declare const ATN_PLUS_LOOP_BACK = 11; +export declare const ATN_LOOP_END = 12; +export type ATNState = BasicState | BasicBlockStartState | PlusBlockStartState | PlusLoopbackState | StarBlockStartState | StarLoopbackState | StarLoopEntryState | BlockEndState | RuleStartState | RuleStopState | LoopEndState; +export interface ATNBaseState { + atn: ATN; + production: IProductionWithOccurrence; + stateNumber: number; + rule: Rule; + epsilonOnlyTransitions: boolean; + transitions: Transition[]; + nextTokenWithinRule: number[]; +} +export interface BasicState extends ATNBaseState { + type: typeof ATN_BASIC; +} +export interface BlockStartState extends DecisionState { + end: BlockEndState; +} +export interface BasicBlockStartState extends BlockStartState { + type: typeof ATN_BASIC; +} +export interface PlusBlockStartState extends BlockStartState { + loopback: PlusLoopbackState; + type: typeof ATN_PLUS_BLOCK_START; +} +export interface PlusLoopbackState extends DecisionState { + type: typeof ATN_PLUS_LOOP_BACK; +} +export interface StarBlockStartState extends BlockStartState { + type: typeof ATN_STAR_BLOCK_START; +} +export interface StarLoopbackState extends ATNBaseState { + type: typeof ATN_STAR_LOOP_BACK; +} +export interface StarLoopEntryState extends DecisionState { + loopback: StarLoopbackState; + type: typeof ATN_STAR_LOOP_ENTRY; +} +export interface BlockEndState extends ATNBaseState { + start: BlockStartState; + type: typeof ATN_BLOCK_END; +} +export interface DecisionState extends ATNBaseState { + decision: number; +} +export interface LoopEndState extends ATNBaseState { + loopback: ATNState; + type: typeof ATN_LOOP_END; +} +export interface RuleStartState extends ATNBaseState { + stop: RuleStopState; + type: typeof ATN_RULE_START; +} +export interface RuleStopState extends ATNBaseState { + type: typeof ATN_RULE_STOP; +} +export interface Transition { + target: ATNState; + isEpsilon(): boolean; +} +export declare abstract class AbstractTransition implements Transition { + target: ATNState; + constructor(target: ATNState); + isEpsilon(): boolean; +} +export declare class AtomTransition extends AbstractTransition { + tokenType: TokenType; + constructor(target: ATNState, tokenType: TokenType); +} +export declare class EpsilonTransition extends AbstractTransition { + constructor(target: ATNState); + isEpsilon(): boolean; +} +export declare class RuleTransition extends AbstractTransition { + rule: Rule; + followState: ATNState; + constructor(ruleStart: RuleStartState, rule: Rule, followState: ATNState); + isEpsilon(): boolean; +} +export declare function createATN(rules: Rule[]): ATN; +//# sourceMappingURL=atn.d.ts.map \ No newline at end of file diff --git a/node_modules/chevrotain-allstar/lib/atn.d.ts.map b/node_modules/chevrotain-allstar/lib/atn.d.ts.map new file mode 100644 index 0000000..f62c525 --- /dev/null +++ b/node_modules/chevrotain-allstar/lib/atn.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"atn.d.ts","sourceRoot":"","sources":["../src/atn.ts"],"names":[],"mappings":"AAAA;;;;gFAIgF;AAIhF,OAAO,EAEH,yBAAyB,EACzB,SAAS,EAGT,IAAI,EAQJ,uBAAuB,EAC1B,MAAM,YAAY,CAAA;AAEnB,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAEjG;AAED,MAAM,WAAW,GAAG;IAChB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IAC1C,MAAM,EAAE,QAAQ,EAAE,CAAA;IAClB,cAAc,EAAE,aAAa,EAAE,CAAA;IAC/B,gBAAgB,EAAE,GAAG,CAAC,IAAI,EAAE,cAAc,CAAC,CAAA;IAC3C,eAAe,EAAE,GAAG,CAAC,IAAI,EAAE,aAAa,CAAC,CAAA;CAC5C;AAED,eAAO,MAAM,gBAAgB,IAAI,CAAA;AACjC,eAAO,MAAM,SAAS,IAAI,CAAA;AAC1B,eAAO,MAAM,cAAc,IAAI,CAAA;AAC/B,eAAO,MAAM,oBAAoB,IAAI,CAAA;AACrC,e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IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ;IAMxE,SAAS;CAGZ;AAOD,wBAAgB,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,GAAG,CAmB5C"} \ No newline at end of file diff --git a/node_modules/chevrotain-allstar/lib/atn.js b/node_modules/chevrotain-allstar/lib/atn.js new file mode 100644 index 0000000..9b68084 --- /dev/null +++ b/node_modules/chevrotain-allstar/lib/atn.js @@ -0,0 +1,404 @@ +/****************************************************************************** + * Copyright 2022 TypeFox GmbH + * This program and the accompanying materials are made available under the + * terms of the MIT License, which is available in the project root. + ******************************************************************************/ +import map from "lodash-es/map.js"; +import filter from "lodash-es/filter.js"; +import { Alternation, NonTerminal, Option, RepetitionMandatory, Repetition, Terminal, RepetitionWithSeparator, RepetitionMandatoryWithSeparator } from "chevrotain"; +export function buildATNKey(rule, type, occurrence) { + return `${rule.name}_${type}_${occurrence}`; +} +export const ATN_INVALID_TYPE = 0; +export const ATN_BASIC = 1; +export const ATN_RULE_START = 2; +export const ATN_PLUS_BLOCK_START = 4; +export const ATN_STAR_BLOCK_START = 5; +// Currently unused as the ATN is not used for lexing +export const ATN_TOKEN_START = 6; +export const ATN_RULE_STOP = 7; +export const ATN_BLOCK_END = 8; +export const ATN_STAR_LOOP_BACK = 9; +export const ATN_STAR_LOOP_ENTRY = 10; +export const ATN_PLUS_LOOP_BACK = 11; +export const ATN_LOOP_END = 12; +export class AbstractTransition { + constructor(target) { + this.target = target; + } + isEpsilon() { + return false; + } +} +export class AtomTransition extends AbstractTransition { + constructor(target, tokenType) { + super(target); + this.tokenType = tokenType; + } +} +export class EpsilonTransition extends AbstractTransition { + constructor(target) { + super(target); + } + isEpsilon() { + return true; + } +} +export class RuleTransition extends AbstractTransition { + constructor(ruleStart, rule, followState) { + super(ruleStart); + this.rule = rule; + this.followState = followState; + } + isEpsilon() { + return true; + } +} +export function createATN(rules) { + const atn = { + decisionMap: {}, + decisionStates: [], + ruleToStartState: new Map(), + ruleToStopState: new Map(), + states: [] + }; + createRuleStartAndStopATNStates(atn, rules); + const ruleLength = rules.length; + for (let i = 0; i < ruleLength; i++) { + const rule = rules[i]; + const ruleBlock = block(atn, rule, rule); + if (ruleBlock === undefined) { + continue; + } + buildRuleHandle(atn, rule, ruleBlock); + } + return atn; +} +function createRuleStartAndStopATNStates(atn, rules) { + const ruleLength = rules.length; + for (let i = 0; i < ruleLength; i++) { + const rule = rules[i]; + const start = newState(atn, rule, undefined, { + type: ATN_RULE_START + }); + const stop = newState(atn, rule, undefined, { + type: ATN_RULE_STOP + }); + start.stop = stop; + atn.ruleToStartState.set(rule, start); + atn.ruleToStopState.set(rule, stop); + } +} +function atom(atn, rule, production) { + if (production instanceof Terminal) { + return tokenRef(atn, rule, production.terminalType, production); + } + else if (production instanceof NonTerminal) { + return ruleRef(atn, rule, production); + } + else if (production instanceof Alternation) { + return alternation(atn, rule, production); + } + else if (production instanceof Option) { + return option(atn, rule, production); + } + else if (production instanceof Repetition) { + return repetition(atn, rule, production); + } + else if (production instanceof RepetitionWithSeparator) { + return repetitionSep(atn, rule, production); + } + else if (production instanceof RepetitionMandatory) { + return repetitionMandatory(atn, rule, production); + } + else if (production instanceof RepetitionMandatoryWithSeparator) { + return repetitionMandatorySep(atn, rule, production); + } + else { + return block(atn, rule, production); + } +} +function repetition(atn, rule, repetition) { + const starState = newState(atn, rule, repetition, { + type: ATN_STAR_BLOCK_START + }); + defineDecisionState(atn, starState); + const handle = makeAlts(atn, rule, starState, repetition, block(atn, rule, repetition)); + return star(atn, rule, repetition, handle); +} +function repetitionSep(atn, rule, repetition) { + const starState = newState(atn, rule, repetition, { + type: ATN_STAR_BLOCK_START + }); + defineDecisionState(atn, starState); + const handle = makeAlts(atn, rule, starState, repetition, block(atn, rule, repetition)); + const sep = tokenRef(atn, rule, repetition.separator, repetition); + return star(atn, rule, repetition, handle, sep); +} +function repetitionMandatory(atn, rule, repetition) { + const plusState = newState(atn, rule, repetition, { + type: ATN_PLUS_BLOCK_START + }); + defineDecisionState(atn, plusState); + const handle = makeAlts(atn, rule, plusState, repetition, block(atn, rule, repetition)); + return plus(atn, rule, repetition, handle); +} +function repetitionMandatorySep(atn, rule, repetition) { + const plusState = newState(atn, rule, repetition, { + type: ATN_PLUS_BLOCK_START + }); + defineDecisionState(atn, plusState); + const handle = makeAlts(atn, rule, plusState, repetition, block(atn, rule, repetition)); + const sep = tokenRef(atn, rule, repetition.separator, repetition); + return plus(atn, rule, repetition, handle, sep); +} +function alternation(atn, rule, alternation) { + const start = newState(atn, rule, alternation, { + type: ATN_BASIC + }); + defineDecisionState(atn, start); + const alts = map(alternation.definition, (e) => atom(atn, rule, e)); + const handle = makeAlts(atn, rule, start, alternation, ...alts); + return handle; +} +function option(atn, rule, option) { + const start = newState(atn, rule, option, { + type: ATN_BASIC + }); + defineDecisionState(atn, start); + const handle = makeAlts(atn, rule, start, option, block(atn, rule, option)); + return optional(atn, rule, option, handle); +} +function block(atn, rule, block) { + const handles = filter(map(block.definition, (e) => atom(atn, rule, e)), (e) => e !== undefined); + if (handles.length === 1) { + return handles[0]; + } + else if (handles.length === 0) { + return undefined; + } + else { + return makeBlock(atn, handles); + } +} +function plus(atn, rule, plus, handle, sep) { + const blkStart = handle.left; + const blkEnd = handle.right; + const loop = newState(atn, rule, plus, { + type: ATN_PLUS_LOOP_BACK + }); + defineDecisionState(atn, loop); + const end = newState(atn, rule, plus, { + type: ATN_LOOP_END + }); + blkStart.loopback = loop; + end.loopback = loop; + atn.decisionMap[buildATNKey(rule, sep ? 'RepetitionMandatoryWithSeparator' : 'RepetitionMandatory', plus.idx)] = loop; + epsilon(blkEnd, loop); // block can see loop back + // Depending on whether we have a separator we put the exit transition at index 1 or 0 + // This influences the chosen option in the lookahead DFA + if (sep === undefined) { + epsilon(loop, blkStart); // loop back to start + epsilon(loop, end); // exit + } + else { + epsilon(loop, end); // exit + // loop back to start with separator + epsilon(loop, sep.left); + epsilon(sep.right, blkStart); + } + return { + left: blkStart, + right: end + }; +} +function star(atn, rule, star, handle, sep) { + const start = handle.left; + const end = handle.right; + const entry = newState(atn, rule, star, { + type: ATN_STAR_LOOP_ENTRY + }); + defineDecisionState(atn, entry); + const loopEnd = newState(atn, rule, star, { + type: ATN_LOOP_END + }); + const loop = newState(atn, rule, star, { + type: ATN_STAR_LOOP_BACK + }); + entry.loopback = loop; + loopEnd.loopback = loop; + epsilon(entry, start); // loop enter edge (alt 2) + epsilon(entry, loopEnd); // bypass loop edge (alt 1) + epsilon(end, loop); // block end hits loop back + if (sep !== undefined) { + epsilon(loop, loopEnd); // end loop + // loop back to start of handle using separator + epsilon(loop, sep.left); + epsilon(sep.right, start); + } + else { + epsilon(loop, entry); // loop back to entry/exit decision + } + atn.decisionMap[buildATNKey(rule, sep ? 'RepetitionWithSeparator' : 'Repetition', star.idx)] = entry; + return { + left: entry, + right: loopEnd + }; +} +function optional(atn, rule, optional, handle) { + const start = handle.left; + const end = handle.right; + epsilon(start, end); + atn.decisionMap[buildATNKey(rule, 'Option', optional.idx)] = start; + return handle; +} +function defineDecisionState(atn, state) { + atn.decisionStates.push(state); + state.decision = atn.decisionStates.length - 1; + return state.decision; +} +function makeAlts(atn, rule, start, production, ...alts) { + const end = newState(atn, rule, production, { + type: ATN_BLOCK_END, + start + }); + start.end = end; + for (const alt of alts) { + if (alt !== undefined) { + // hook alts up to decision block + epsilon(start, alt.left); + epsilon(alt.right, end); + } + else { + epsilon(start, end); + } + } + const handle = { + left: start, + right: end + }; + atn.decisionMap[buildATNKey(rule, getProdType(production), production.idx)] = start; + return handle; +} +function getProdType(production) { + if (production instanceof Alternation) { + return 'Alternation'; + } + else if (production instanceof Option) { + return 'Option'; + } + else if (production instanceof Repetition) { + return 'Repetition'; + } + else if (production instanceof RepetitionWithSeparator) { + return 'RepetitionWithSeparator'; + } + else if (production instanceof RepetitionMandatory) { + return 'RepetitionMandatory'; + } + else if (production instanceof RepetitionMandatoryWithSeparator) { + return 'RepetitionMandatoryWithSeparator'; + } + else { + throw new Error('Invalid production type encountered'); + } +} +function makeBlock(atn, alts) { + const altsLength = alts.length; + for (let i = 0; i < altsLength - 1; i++) { + const handle = alts[i]; + let transition; + if (handle.left.transitions.length === 1) { + transition = handle.left.transitions[0]; + } + const isRuleTransition = transition instanceof RuleTransition; + const ruleTransition = transition; + const next = alts[i + 1].left; + if (handle.left.type === ATN_BASIC && + handle.right.type === ATN_BASIC && + transition !== undefined && + ((isRuleTransition && ruleTransition.followState === handle.right) || + transition.target === handle.right)) { + // we can avoid epsilon edge to next element + if (isRuleTransition) { + ruleTransition.followState = next; + } + else { + transition.target = next; + } + removeState(atn, handle.right); // we skipped over this state + } + else { + // need epsilon if previous block's right end node is complex + epsilon(handle.right, next); + } + } + const first = alts[0]; + const last = alts[altsLength - 1]; + return { + left: first.left, + right: last.right + }; +} +function tokenRef(atn, rule, tokenType, production) { + const left = newState(atn, rule, production, { + type: ATN_BASIC + }); + const right = newState(atn, rule, production, { + type: ATN_BASIC + }); + addTransition(left, new AtomTransition(right, tokenType)); + return { + left, + right + }; +} +function ruleRef(atn, currentRule, nonTerminal) { + const rule = nonTerminal.referencedRule; + const start = atn.ruleToStartState.get(rule); + const left = newState(atn, currentRule, nonTerminal, { + type: ATN_BASIC + }); + const right = newState(atn, currentRule, nonTerminal, { + type: ATN_BASIC + }); + const call = new RuleTransition(start, rule, right); + addTransition(left, call); + return { + left, + right + }; +} +function buildRuleHandle(atn, rule, block) { + const start = atn.ruleToStartState.get(rule); + epsilon(start, block.left); + const stop = atn.ruleToStopState.get(rule); + epsilon(block.right, stop); + const handle = { + left: start, + right: stop + }; + return handle; +} +function epsilon(a, b) { + const transition = new EpsilonTransition(b); + addTransition(a, transition); +} +function newState(atn, rule, production, partial) { + const t = Object.assign({ atn, + production, epsilonOnlyTransitions: false, rule, transitions: [], nextTokenWithinRule: [], stateNumber: atn.states.length }, partial); + atn.states.push(t); + return t; +} +function addTransition(state, transition) { + // A single ATN state can only contain epsilon transitions or non-epsilon transitions + // Because they are never mixed, only setting the property for the first transition is fine + if (state.transitions.length === 0) { + state.epsilonOnlyTransitions = transition.isEpsilon(); + } + state.transitions.push(transition); +} +function removeState(atn, state) { + atn.states.splice(atn.states.indexOf(state), 1); +} +//# sourceMappingURL=atn.js.map \ No newline at end of file diff --git a/node_modules/chevrotain-allstar/lib/atn.js.map b/node_modules/chevrotain-allstar/lib/atn.js.map new file mode 100644 index 0000000..bd6ec3b --- /dev/null +++ b/node_modules/chevrotain-allstar/lib/atn.js.map @@ -0,0 +1 @@ +{"version":3,"file":"atn.js","sourceRoot":"","sources":["../src/atn.ts"],"names":[],"mappings":"AAAA;;;;gFAIgF;AAEhF,OAAO,GAAG,MAAM,kBAAkB,CAAA;AAClC,OAAO,MAAM,MAAM,qBAAqB,CAAA;AACxC,OAAO,EAIH,WAAW,EACX,WAAW,EAEX,MAAM,EACN,mBAAmB,EACnB,UAAU,EACV,QAAQ,EAER,uBAAuB,EACvB,gCAAgC,EAEnC,MAAM,YAAY,CAAA;AAEnB,MAAM,UAAU,WAAW,CAAC,IAAU,EAAE,IAA6B,EAAE,UAAkB;IACrF,OAAO,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,IAAI,UAAU,EAAE,CAAC;AAChD,CAAC;AAUD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAA;AACjC,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAA;AAC1B,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAA;AAC/B,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAA;AACrC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAA;AACrC,qDAAqD;AACrD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAA;AAChC,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAA;AAC9B,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAA;AAC9B,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAA;AACnC,MAAM,CA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M,IAC3B,OAAO,CACG,CAAA;IACjB,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IAClB,OAAO,CAAC,CAAA;AACZ,CAAC;AAED,SAAS,aAAa,CAAC,KAAmB,EAAE,UAAsB;IAC9D,qFAAqF;IACrF,2FAA2F;IAC3F,IAAI,KAAK,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;QAChC,KAAK,CAAC,sBAAsB,GAAG,UAAU,CAAC,SAAS,EAAE,CAAA;KACxD;IACD,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;AACtC,CAAC;AAED,SAAS,WAAW,CAAC,GAAQ,EAAE,KAAe;IAC1C,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAA;AACnD,CAAC"} \ No newline at end of file diff --git a/node_modules/chevrotain-allstar/lib/dfa.d.ts b/node_modules/chevrotain-allstar/lib/dfa.d.ts new file mode 100644 index 0000000..a084f98 --- /dev/null +++ b/node_modules/chevrotain-allstar/lib/dfa.d.ts @@ -0,0 +1,37 @@ +/****************************************************************************** + * Copyright 2022 TypeFox GmbH + * This program and the accompanying materials are made available under the + * terms of the MIT License, which is available in the project root. + ******************************************************************************/ +import { ATNState, DecisionState } from "./atn.js"; +export interface DFA { + start?: DFAState; + states: Record; + decision: number; + atnStartState: DecisionState; +} +export interface DFAState { + configs: ATNConfigSet; + edges: Record; + isAcceptState: boolean; + prediction: number; +} +export declare const DFA_ERROR: DFAState; +export interface ATNConfig { + state: ATNState; + alt: number; + stack: ATNState[]; +} +export declare class ATNConfigSet { + private map; + private configs; + uniqueAlt: number | undefined; + get size(): number; + finalize(): void; + add(config: ATNConfig): void; + get elements(): readonly ATNConfig[]; + get alts(): number[]; + get key(): string; +} +export declare function getATNConfigKey(config: ATNConfig, alt?: boolean): string; +//# sourceMappingURL=dfa.d.ts.map \ No newline at end of file diff --git a/node_modules/chevrotain-allstar/lib/dfa.d.ts.map b/node_modules/chevrotain-allstar/lib/dfa.d.ts.map new file mode 100644 index 0000000..6d8c0c9 --- /dev/null +++ b/node_modules/chevrotain-allstar/lib/dfa.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"dfa.d.ts","sourceRoot":"","sources":["../src/dfa.ts"],"names":[],"mappings":"AAAA;;;;gFAIgF;AAGhF,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAElD,MAAM,WAAW,GAAG;IAClB,KAAK,CAAC,EAAE,QAAQ,CAAA;IAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa,EAAE,aAAa,CAAA;CAC7B;AAED,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,YAAY,CAAA;IACrB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IAC/B,aAAa,EAAE,OAAO,CAAA;IACtB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,SAAS,UAAiB,CAAA;AAEvC,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,QAAQ,CAAA;IACf,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,QAAQ,EAAE,CAAA;CAClB;AAED,qBAAa,YAAY;IACvB,OAAO,CAAC,GAAG,CAA6B;IACxC,OAAO,CAAC,OAAO,CAAkB;IAEjC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;IAE7B,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,QAAQ,IAAI,IAAI;IAKhB,GAAG,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI;IAU5B,IAAI,QAAQ,IAAI,SAAS,SAAS,EAAE,CAEnC;IAED,IAAI,IAAI,IAAI,MAAM,EAAE,CAEnB;IAED,IAAI,GAAG,IAAI,MAAM,CAMhB;CACF;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,UAAO,UAI5D"} \ No newline at end of file diff --git a/node_modules/chevrotain-allstar/lib/dfa.js b/node_modules/chevrotain-allstar/lib/dfa.js new file mode 100644 index 0000000..d5c03ff --- /dev/null +++ b/node_modules/chevrotain-allstar/lib/dfa.js @@ -0,0 +1,46 @@ +/****************************************************************************** + * Copyright 2022 TypeFox GmbH + * This program and the accompanying materials are made available under the + * terms of the MIT License, which is available in the project root. + ******************************************************************************/ +import map from "lodash-es/map.js"; +export const DFA_ERROR = {}; +export class ATNConfigSet { + constructor() { + this.map = {}; + this.configs = []; + } + get size() { + return this.configs.length; + } + finalize() { + // Empties the map to free up memory + this.map = {}; + } + add(config) { + const key = getATNConfigKey(config); + // Only add configs which don't exist in our map already + // While this does not influence the actual algorithm, adding them anyway would massively increase memory consumption + if (!(key in this.map)) { + this.map[key] = this.configs.length; + this.configs.push(config); + } + } + get elements() { + return this.configs; + } + get alts() { + return map(this.configs, (e) => e.alt); + } + get key() { + let value = ""; + for (const k in this.map) { + value += k + ":"; + } + return value; + } +} +export function getATNConfigKey(config, alt = true) { + return `${alt ? `a${config.alt}` : ""}s${config.state.stateNumber}:${config.stack.map((e) => e.stateNumber.toString()).join("_")}`; +} +//# sourceMappingURL=dfa.js.map \ No newline at end of file diff --git a/node_modules/chevrotain-allstar/lib/dfa.js.map b/node_modules/chevrotain-allstar/lib/dfa.js.map new file mode 100644 index 0000000..88e2f79 --- /dev/null +++ b/node_modules/chevrotain-allstar/lib/dfa.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dfa.js","sourceRoot":"","sources":["../src/dfa.ts"],"names":[],"mappings":"AAAA;;;;gFAIgF;AAEhF,OAAO,GAAG,MAAM,kBAAkB,CAAA;AAiBlC,MAAM,CAAC,MAAM,SAAS,GAAG,EAAc,CAAA;AAQvC,MAAM,OAAO,YAAY;IAAzB;QACU,QAAG,GAA2B,EAAE,CAAA;QAChC,YAAO,GAA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AI,CAAC,GAAG,CAAC,EAAE,CAAA;AACnE,CAAC"} \ No newline at end of file diff --git a/node_modules/chevrotain-allstar/lib/index.d.ts b/node_modules/chevrotain-allstar/lib/index.d.ts new file mode 100644 index 0000000..e250c5e --- /dev/null +++ b/node_modules/chevrotain-allstar/lib/index.d.ts @@ -0,0 +1,7 @@ +/****************************************************************************** + * Copyright 2022 TypeFox GmbH + * This program and the accompanying materials are made available under the + * terms of the MIT License, which is available in the project root. + ******************************************************************************/ +export { AmbiguityReport, LLStarLookaheadOptions, LLStarLookaheadStrategy } from './all-star-lookahead.js'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/chevrotain-allstar/lib/index.d.ts.map b/node_modules/chevrotain-allstar/lib/index.d.ts.map new file mode 100644 index 0000000..1656582 --- /dev/null +++ b/node_modules/chevrotain-allstar/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;gFAIgF;AAEhF,OAAO,EACH,eAAe,EACf,sBAAsB,EACtB,uBAAuB,EAC1B,MAAM,yBAAyB,CAAC"} \ No newline at end of file diff --git a/node_modules/chevrotain-allstar/lib/index.js b/node_modules/chevrotain-allstar/lib/index.js new file mode 100644 index 0000000..3305ead --- /dev/null +++ b/node_modules/chevrotain-allstar/lib/index.js @@ -0,0 +1,7 @@ +/****************************************************************************** + * Copyright 2022 TypeFox GmbH + * This program and the accompanying materials are made available under the + * terms of the MIT License, which is available in the project root. + ******************************************************************************/ +export { LLStarLookaheadStrategy } from './all-star-lookahead.js'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/chevrotain-allstar/lib/index.js.map b/node_modules/chevrotain-allstar/lib/index.js.map new file mode 100644 index 0000000..af53151 --- /dev/null +++ b/node_modules/chevrotain-allstar/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;gFAIgF;AAEhF,OAAO,EAGH,uBAAuB,EAC1B,MAAM,yBAAyB,CAAC"} \ No newline at end of file diff --git a/node_modules/chevrotain-allstar/package.json b/node_modules/chevrotain-allstar/package.json new file mode 100644 index 0000000..fef3e8e --- /dev/null +++ b/node_modules/chevrotain-allstar/package.json @@ -0,0 +1,52 @@ +{ + "name": "chevrotain-allstar", + "version": "0.3.1", + "description": "LL(*) lookahead strategy for the Chevrotain parser library", + "keywords": [ + "parser", + "lookahead", + "chevrotain", + "langium" + ], + "license": "MIT", + "type": "module", + "types": "./lib/index.d.ts", + "exports": { + ".": { + "types": "./lib/index.d.ts", + "default": "./lib/index.js" + } + }, + "scripts": { + "test": "vitest", + "build": "tsc", + "watch": "tsc -w", + "clean": "shx rm -rf lib tsconfig.tsbuildinfo" + }, + "files": [ + "src", + "lib" + ], + "dependencies": { + "lodash-es": "^4.17.21" + }, + "peerDependencies": { + "chevrotain": "^11.0.0" + }, + "devDependencies": { + "@types/jest": "^29.2.1", + "@types/lodash-es": "^4.17.8", + "shx": "^0.3.4", + "typescript": "^5.1.6", + "vitest": "^0.33.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/langium/chevrotain-allstar" + }, + "bugs": "https://github.com/langium/chevrotain-allstar/issues", + "author": { + "name": "TypeFox", + "url": "https://www.typefox.io" + } +} diff --git a/node_modules/chevrotain-allstar/src/all-star-lookahead.ts b/node_modules/chevrotain-allstar/src/all-star-lookahead.ts new file mode 100644 index 0000000..000edea --- /dev/null +++ b/node_modules/chevrotain-allstar/src/all-star-lookahead.ts @@ -0,0 +1,763 @@ +/****************************************************************************** + * Copyright 2022 TypeFox GmbH + * This program and the accompanying materials are made available under the + * terms of the MIT License, which is available in the project root. + ******************************************************************************/ + +import { + IToken, + TokenType, + tokenMatcher, + tokenLabel, + Rule, + IProductionWithOccurrence, + NonTerminal, + Alternation, + Option, + RepetitionMandatory, + RepetitionMandatoryWithSeparator, + RepetitionWithSeparator, + Repetition, + Terminal, + BaseParser, + LLkLookaheadStrategy, + ILookaheadValidationError, + IOrAlt, + getLookaheadPaths, + OptionalProductionType +} from "chevrotain"; +import { + ATN, + ATNState, + ATN_RULE_STOP, + AtomTransition, + buildATNKey, + createATN, + DecisionState, + EpsilonTransition, + RuleTransition, + Transition +} from "./atn.js"; +import { + ATNConfig, + ATNConfigSet, + DFA, + DFAState, + DFA_ERROR, + getATNConfigKey +} from "./dfa.js"; +import min from "lodash-es/min.js"; +import flatMap from "lodash-es/flatMap.js"; +import uniqBy from "lodash-es/uniqBy.js"; +import map from "lodash-es/map.js"; +import flatten from "lodash-es/flatten.js"; +import forEach from "lodash-es/forEach.js"; +import isEmpty from "lodash-es/isEmpty.js"; +import reduce from "lodash-es/reduce.js"; + +type DFACache = (predicateSet: PredicateSet) => DFA + +export type AmbiguityReport = (message: string) => void; + +function createDFACache(startState: DecisionState, decision: number): DFACache { + const map: Record = {} + return (predicateSet) => { + const key = predicateSet.toString() + let existing = map[key] + if (existing !== undefined) { + return existing + } else { + existing = { + atnStartState: startState, + decision, + states: {} + } + map[key] = existing + return existing + } + } +} + +class PredicateSet { + private predicates: boolean[] = [] + + is(index: number): boolean { + return index >= this.predicates.length || this.predicates[index] + } + + set(index: number, value: boolean) { + this.predicates[index] = value + } + + toString(): string { + let value = "" + const size = this.predicates.length + for (let i = 0; i < size; i++) { + value += this.predicates[i] === true ? "1" : "0" + } + return value + } +} + +interface AdaptivePredictError { + tokenPath: IToken[] + possibleTokenTypes: TokenType[] + actualToken: IToken +} + +const EMPTY_PREDICATES = new PredicateSet() + +export interface LLStarLookaheadOptions { + logging?: AmbiguityReport +} + +export class LLStarLookaheadStrategy extends LLkLookaheadStrategy { + + private atn: ATN; + private dfas: DFACache[]; + private logging: AmbiguityReport; + + constructor(options?: LLStarLookaheadOptions) { + super(); + this.logging = options?.logging ?? ((message) => console.log(message)); + } + + override initialize(options: { rules: Rule[] }): void { + this.atn = createATN(options.rules); + this.dfas = initATNSimulator(this.atn); + } + + override validateAmbiguousAlternationAlternatives(): ILookaheadValidationError[] { + return []; + } + + override validateEmptyOrAlternatives(): ILookaheadValidationError[] { + return []; + } + + override buildLookaheadForAlternation(options: { + prodOccurrence: number; + rule: Rule; + maxLookahead: number; + hasPredicates: boolean; + dynamicTokensEnabled: boolean + }): (this: BaseParser, orAlts?: IOrAlt[] | undefined) => number | undefined { + const { prodOccurrence, rule, hasPredicates, dynamicTokensEnabled } = options; + const dfas = this.dfas; + const logging = this.logging; + const key = buildATNKey(rule, 'Alternation', prodOccurrence); + const decisionState = this.atn.decisionMap[key]; + const decisionIndex = decisionState.decision; + const partialAlts: (TokenType | undefined)[][] = map( + getLookaheadPaths({ + maxLookahead: 1, + occurrence: prodOccurrence, + prodType: "Alternation", + rule: rule + }), + (currAlt) => map(currAlt, (path) => path[0]) + ) + + if (isLL1Sequence(partialAlts, false) && !dynamicTokensEnabled) { + const choiceToAlt = reduce( + partialAlts, + (result, currAlt, idx) => { + forEach(currAlt, (currTokType) => { + if (currTokType) { + result[currTokType.tokenTypeIdx!] = idx + forEach(currTokType.categoryMatches!, (currExtendingType) => { + result[currExtendingType] = idx + }) + } + }) + return result + }, + {} as Record + ) + + if (hasPredicates) { + return function (this: BaseParser, orAlts) { + const nextToken = this.LA(1) + const prediction: number | undefined = choiceToAlt[nextToken.tokenTypeIdx] + if (orAlts !== undefined && prediction !== undefined) { + const gate = orAlts[prediction]?.GATE + if (gate !== undefined && gate.call(this) === false) { + return undefined; + } + } + return prediction + } + } else { + return function (this: BaseParser): number | undefined { + const nextToken = this.LA(1) + return choiceToAlt[nextToken.tokenTypeIdx]; + } + } + } else if (hasPredicates) { + return function (this: BaseParser, orAlts) { + const predicates = new PredicateSet() + const length = orAlts === undefined ? 0 : orAlts.length + for (let i = 0; i < length; i++) { + const gate = orAlts?.[i].GATE + predicates.set(i, gate === undefined || gate.call(this)) + } + const result = adaptivePredict.call(this, dfas, decisionIndex, predicates, logging); + return typeof result === 'number' ? result : undefined; + } + } else { + return function (this: BaseParser) { + const result = adaptivePredict.call(this, dfas, decisionIndex, EMPTY_PREDICATES, logging); + return typeof result === 'number' ? result : undefined; + } + } + } + + override buildLookaheadForOptional(options: { + prodOccurrence: number; + prodType: OptionalProductionType; + rule: Rule; + maxLookahead: number; + dynamicTokensEnabled: boolean + }): (this: BaseParser) => boolean { + const { prodOccurrence, rule, prodType, dynamicTokensEnabled } = options; + const dfas = this.dfas; + const logging = this.logging; + const key = buildATNKey(rule, prodType, prodOccurrence); + const decisionState = this.atn.decisionMap[key]; + const decisionIndex = decisionState.decision; + const alts = map( + getLookaheadPaths({ + maxLookahead: 1, + occurrence: prodOccurrence, + prodType, + rule + }), + (e) => { + return map(e, (g) => g[0]) + } + ) + + if (isLL1Sequence(alts) && alts[0][0] && !dynamicTokensEnabled) { + const alt = alts[0] + const singleTokensTypes = flatten(alt) + + if ( + singleTokensTypes.length === 1 && + isEmpty(singleTokensTypes[0].categoryMatches) + ) { + const expectedTokenType = singleTokensTypes[0] + const expectedTokenUniqueKey = expectedTokenType.tokenTypeIdx + + return function (this: BaseParser): boolean { + return this.LA(1).tokenTypeIdx === expectedTokenUniqueKey + } + } else { + const choiceToAlt = reduce( + singleTokensTypes, + (result, currTokType) => { + if (currTokType !== undefined) { + result[currTokType.tokenTypeIdx!] = true + forEach(currTokType.categoryMatches, (currExtendingType) => { + result[currExtendingType] = true + }) + } + return result + }, + {} as Record + ) + + return function (this: BaseParser): boolean { + const nextToken = this.LA(1) + return choiceToAlt[nextToken.tokenTypeIdx] === true + } + } + } + return function (this: BaseParser) { + const result = adaptivePredict.call(this, dfas, decisionIndex, EMPTY_PREDICATES, logging) + return typeof result === "object" ? false : result === 0; + } + } + +} + +function isLL1Sequence(sequences: (TokenType | undefined)[][], allowEmpty = true): boolean { + const fullSet = new Set() + + for (const alt of sequences) { + const altSet = new Set() + for (const tokType of alt) { + if (tokType === undefined) { + if (allowEmpty) { + // Epsilon production encountered + break + } else { + return false; + } + } + const indices = [tokType.tokenTypeIdx!].concat(tokType.categoryMatches!) + for (const index of indices) { + if (fullSet.has(index)) { + if (!altSet.has(index)) { + return false + } + } else { + fullSet.add(index) + altSet.add(index) + } + } + } + } + return true +} + +function initATNSimulator(atn: ATN): DFACache[] { + const decisionLength = atn.decisionStates.length + const decisionToDFA: DFACache[] = Array(decisionLength) + for (let i = 0; i < decisionLength; i++) { + decisionToDFA[i] = createDFACache(atn.decisionStates[i], i) + } + return decisionToDFA; +} + +function adaptivePredict( + this: BaseParser, + dfaCaches: DFACache[], + decision: number, + predicateSet: PredicateSet, + logging: AmbiguityReport +): number | AdaptivePredictError { + const dfa = dfaCaches[decision](predicateSet) + let start = dfa.start + if (start === undefined) { + const closure = computeStartState(dfa.atnStartState as ATNState) + start = addDFAState(dfa, newDFAState(closure)) + dfa.start = start + } + + const alt = performLookahead.apply(this, [dfa, start, predicateSet, logging]) + return alt +} + +function performLookahead( + this: BaseParser, + dfa: DFA, + s0: DFAState, + predicateSet: PredicateSet, + logging: AmbiguityReport +): number | AdaptivePredictError { + let previousD = s0 + + let i = 1 + const path: IToken[] = [] + let t = this.LA(i++) + + while (true) { + let d = getExistingTargetState(previousD, t) + if (d === undefined) { + d = computeLookaheadTarget.apply(this, [dfa, previousD, t, i, predicateSet, logging]) + } + + if (d === DFA_ERROR) { + return buildAdaptivePredictError(path, previousD, t) + } + + if (d.isAcceptState === true) { + return d.prediction + } + + previousD = d + path.push(t) + t = this.LA(i++) + } +} + +function computeLookaheadTarget( + this: BaseParser, + dfa: DFA, + previousD: DFAState, + token: IToken, + lookahead: number, + predicateSet: PredicateSet, + logging: AmbiguityReport +): DFAState { + const reach = computeReachSet(previousD.configs, token, predicateSet) + if (reach.size === 0) { + addDFAEdge(dfa, previousD, token, DFA_ERROR) + return DFA_ERROR + } + + let newState = newDFAState(reach) + const predictedAlt = getUniqueAlt(reach, predicateSet) + + if (predictedAlt !== undefined) { + newState.isAcceptState = true + newState.prediction = predictedAlt + newState.configs.uniqueAlt = predictedAlt + } else if (hasConflictTerminatingPrediction(reach)) { + const prediction = min(reach.alts)! + newState.isAcceptState = true + newState.prediction = prediction + newState.configs.uniqueAlt = prediction + reportLookaheadAmbiguity.apply(this, [dfa, lookahead, reach.alts, logging]) + } + + newState = addDFAEdge(dfa, previousD, token, newState) + return newState +} + +function reportLookaheadAmbiguity( + this: BaseParser, + dfa: DFA, + lookahead: number, + ambiguityIndices: number[], + logging: AmbiguityReport +) { + const prefixPath: TokenType[] = [] + for (let i = 1; i <= lookahead; i++) { + prefixPath.push(this.LA(i).tokenType) + } + const atnState = dfa.atnStartState + const topLevelRule = atnState.rule + const production = atnState.production + const message = buildAmbiguityError({ + topLevelRule, + ambiguityIndices, + production, + prefixPath + }) + logging(message) +} + +function buildAmbiguityError(options: { + topLevelRule: Rule + prefixPath: TokenType[] + ambiguityIndices: number[] + production: IProductionWithOccurrence +}): string { + const pathMsg = map(options.prefixPath, (currtok) => + tokenLabel(currtok) + ).join(", ") + const occurrence = + options.production.idx === 0 ? "" : options.production.idx + let currMessage = + `Ambiguous Alternatives Detected: <${options.ambiguityIndices.join( + ", " + )}> in <${getProductionDslName(options.production)}${occurrence}>` + + ` inside <${options.topLevelRule.name}> Rule,\n` + + `<${pathMsg}> may appears as a prefix path in all these alternatives.\n` + + currMessage = + currMessage + + `See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\n` + + `For Further details.` + return currMessage +} + +function getProductionDslName(prod: IProductionWithOccurrence): string { + if (prod instanceof NonTerminal) { + return "SUBRULE" + } else if (prod instanceof Option) { + return "OPTION" + } else if (prod instanceof Alternation) { + return "OR" + } else if (prod instanceof RepetitionMandatory) { + return "AT_LEAST_ONE" + } else if (prod instanceof RepetitionMandatoryWithSeparator) { + return "AT_LEAST_ONE_SEP" + } else if (prod instanceof RepetitionWithSeparator) { + return "MANY_SEP" + } else if (prod instanceof Repetition) { + return "MANY" + } else if (prod instanceof Terminal) { + return "CONSUME" + } else { + throw Error("non exhaustive match") + } +} + +function buildAdaptivePredictError( + path: IToken[], + previous: DFAState, + current: IToken +): AdaptivePredictError { + const nextTransitions = flatMap( + previous.configs.elements, + (e) => e.state.transitions + ) + const nextTokenTypes = uniqBy( + nextTransitions + .filter((e): e is AtomTransition => e instanceof AtomTransition) + .map((e) => e.tokenType), + (e) => e.tokenTypeIdx + ) + return { + actualToken: current, + possibleTokenTypes: nextTokenTypes, + tokenPath: path + } +} + +function getExistingTargetState( + state: DFAState, + token: IToken +): DFAState | undefined { + return state.edges[token.tokenTypeIdx] +} + +function computeReachSet( + configs: ATNConfigSet, + token: IToken, + predicateSet: PredicateSet +): ATNConfigSet { + const intermediate = new ATNConfigSet() + const skippedStopStates: ATNConfig[] = [] + + for (const c of configs.elements) { + if (predicateSet.is(c.alt) === false) { + continue + } + if (c.state.type === ATN_RULE_STOP) { + skippedStopStates.push(c) + continue + } + const transitionLength = c.state.transitions.length + for (let i = 0; i < transitionLength; i++) { + const transition = c.state.transitions[i] + const target = getReachableTarget(transition, token) + if (target !== undefined) { + intermediate.add({ + state: target, + alt: c.alt, + stack: c.stack + }) + } + } + } + + let reach: ATNConfigSet | undefined + + if (skippedStopStates.length === 0 && intermediate.size === 1) { + reach = intermediate + } + + if (reach === undefined) { + reach = new ATNConfigSet() + for (const c of intermediate.elements) { + closure(c, reach) + } + } + + if (skippedStopStates.length > 0 && !hasConfigInRuleStopState(reach)) { + for (const c of skippedStopStates) { + reach.add(c) + } + } + + return reach +} + +function getReachableTarget( + transition: Transition, + token: IToken +): ATNState | undefined { + if ( + transition instanceof AtomTransition && + tokenMatcher(token, transition.tokenType) + ) { + return transition.target + } + return undefined +} + +function getUniqueAlt( + configs: ATNConfigSet, + predicateSet: PredicateSet +): number | undefined { + let alt: number | undefined + for (const c of configs.elements) { + if (predicateSet.is(c.alt) === true) { + if (alt === undefined) { + alt = c.alt + } else if (alt !== c.alt) { + return undefined + } + } + } + return alt +} + +function newDFAState(closure: ATNConfigSet): DFAState { + return { + configs: closure, + edges: {}, + isAcceptState: false, + prediction: -1 + } +} + +function addDFAEdge( + dfa: DFA, + from: DFAState, + token: IToken, + to: DFAState +): DFAState { + to = addDFAState(dfa, to) + from.edges[token.tokenTypeIdx] = to + return to +} + +function addDFAState(dfa: DFA, state: DFAState): DFAState { + if (state === DFA_ERROR) { + return state + } + // Repetitions have the same config set + // Therefore, storing the key of the config in a map allows us to create a loop in our DFA + const mapKey = state.configs.key + const existing = dfa.states[mapKey] + if (existing !== undefined) { + return existing + } + state.configs.finalize() + dfa.states[mapKey] = state + return state +} + +function computeStartState(atnState: ATNState): ATNConfigSet { + const configs = new ATNConfigSet() + + const numberOfTransitions = atnState.transitions.length + for (let i = 0; i < numberOfTransitions; i++) { + const target = atnState.transitions[i].target + const config: ATNConfig = { + state: target, + alt: i, + stack: [] + } + closure(config, configs) + } + + return configs +} + +function closure(config: ATNConfig, configs: ATNConfigSet): void { + const p = config.state + + if (p.type === ATN_RULE_STOP) { + if (config.stack.length > 0) { + const atnStack = [...config.stack] + const followState = atnStack.pop()! + const followConfig: ATNConfig = { + state: followState, + alt: config.alt, + stack: atnStack + } + closure(followConfig, configs) + } else { + // Dipping into outer context, simply add the config + // This will stop computation once every config is at the rule stop state + configs.add(config) + } + return + } + + if (!p.epsilonOnlyTransitions) { + configs.add(config) + } + + const transitionLength = p.transitions.length + for (let i = 0; i < transitionLength; i++) { + const transition = p.transitions[i] + const c = getEpsilonTarget(config, transition) + + if (c !== undefined) { + closure(c, configs) + } + } +} + +function getEpsilonTarget( + config: ATNConfig, + transition: Transition +): ATNConfig | undefined { + if (transition instanceof EpsilonTransition) { + return { + state: transition.target, + alt: config.alt, + stack: config.stack + } + } else if (transition instanceof RuleTransition) { + const stack = [...config.stack, transition.followState] + return { + state: transition.target, + alt: config.alt, + stack + } + } + return undefined +} + +function hasConfigInRuleStopState(configs: ATNConfigSet): boolean { + for (const c of configs.elements) { + if (c.state.type === ATN_RULE_STOP) { + return true + } + } + return false +} + +function allConfigsInRuleStopStates(configs: ATNConfigSet): boolean { + for (const c of configs.elements) { + if (c.state.type !== ATN_RULE_STOP) { + return false + } + } + return true +} + +function hasConflictTerminatingPrediction(configs: ATNConfigSet): boolean { + if (allConfigsInRuleStopStates(configs)) { + return true + } + const altSets = getConflictingAltSets(configs.elements) + const heuristic = + hasConflictingAltSet(altSets) && !hasStateAssociatedWithOneAlt(altSets) + return heuristic +} + +function getConflictingAltSets( + configs: readonly ATNConfig[] +): Map> { + const configToAlts = new Map>() + for (const c of configs) { + const key = getATNConfigKey(c, false) + let alts = configToAlts.get(key) + if (alts === undefined) { + alts = {} + configToAlts.set(key, alts) + } + alts[c.alt] = true + } + return configToAlts +} + +function hasConflictingAltSet( + altSets: Map> +): boolean { + for (const value of Array.from(altSets.values())) { + if (Object.keys(value).length > 1) { + return true + } + } + return false +} + +function hasStateAssociatedWithOneAlt( + altSets: Map> +): boolean { + for (const value of Array.from(altSets.values())) { + if (Object.keys(value).length === 1) { + return true + } + } + return false +} diff --git a/node_modules/chevrotain-allstar/src/atn.test.ts b/node_modules/chevrotain-allstar/src/atn.test.ts new file mode 100644 index 0000000..f8ce64c --- /dev/null +++ b/node_modules/chevrotain-allstar/src/atn.test.ts @@ -0,0 +1,302 @@ +/****************************************************************************** + * Copyright 2022 TypeFox GmbH + * This program and the accompanying materials are made available under the + * terms of the MIT License, which is available in the project root. + ******************************************************************************/ + +import { createToken, EmbeddedActionsParser, EOF, IToken, TokenType } from "chevrotain" +import { LLStarLookaheadStrategy } from "./all-star-lookahead" + +describe("ATN Simulator", () => { + describe("LL(*) lookahead", () => { + const A = createToken({ name: "A", pattern: "a" }) + const B = createToken({ name: "B", pattern: "b" }) + + class UnboundedLookaheadParser extends EmbeddedActionsParser { + constructor() { + super([A, B], { + lookaheadStrategy: new LLStarLookaheadStrategy() + }) + this.performSelfAnalysis() + } + + LongRule = this.RULE("LongRule", () => { + return this.OR([ + { + ALT: () => { + return 0 + } + }, + { + ALT: () => { + this.AT_LEAST_ONE1(() => this.CONSUME1(A)) + return 1 + } + }, + { + ALT: () => { + this.AT_LEAST_ONE2(() => this.CONSUME2(A)) + this.CONSUME(B) + return 2 + } + } + ]) + }) + } + + it("Should pick longest alternative instead of first #1", () => { + const parser = new UnboundedLookaheadParser() + parser.input = [ + createRegularToken(A), + createRegularToken(A), + createRegularToken(A) + ] + const result = parser.LongRule() + expect(result).toBe(1); + }) + + it("Should pick longest alternative instead of first #2", () => { + const parser = new UnboundedLookaheadParser() + parser.input = [ + createRegularToken(A), + createRegularToken(A), + createRegularToken(B) + ] + const result = parser.LongRule() + expect(result).toBe(2); + }) + + it("Should pick shortest fitting alternative", () => { + const parser = new UnboundedLookaheadParser() + parser.input = [] + const result = parser.LongRule() + expect(result).toBe(0); + }) + }) + + describe("Ambiguity Detection", () => { + const A = createToken({ name: "A" }) + const B = createToken({ name: "B" }) + + class AmbigiousParser extends EmbeddedActionsParser { + ambiguityReports: string[] = [] + + constructor() { + super([A, B], { + lookaheadStrategy: new LLStarLookaheadStrategy({ + logging: (message) => this.ambiguityReports.push(message) + }) + }); + this.performSelfAnalysis() + } + + OptionRule = this.RULE("OptionRule", () => { + let usedOption = false + this.OPTION(() => { + this.AT_LEAST_ONE1(() => this.CONSUME1(A)) + usedOption = true + }) + this.AT_LEAST_ONE2(() => this.CONSUME2(A)) + return usedOption + }) + + AltRule = this.RULE("AltRule", () => { + return this.OR([ + { + ALT: () => { + this.SUBRULE(this.RuleB) + return 0 + } + }, + { + ALT: () => { + this.SUBRULE(this.RuleC) + return 1 + } + } + ]) + }) + + RuleB = this.RULE("RuleB", () => { + this.MANY(() => this.CONSUME(A)) + }) + + RuleC = this.RULE("RuleC", () => { + this.MANY(() => this.CONSUME(A)) + this.OPTION(() => this.CONSUME(B)) + }) + + AltRuleWithEOF = this.RULE("AltRuleWithEOF", () => { + return this.OR([ + { + ALT: () => { + this.SUBRULE1(this.RuleEOF) + return 0 + } + }, + { + ALT: () => { + this.SUBRULE2(this.RuleEOF) + return 1 + } + } + ]) + }) + + RuleEOF = this.RULE("RuleEOF", () => { + this.MANY1(() => this.CONSUME(A)) + this.CONSUME(EOF) + }) + + AltRuleWithPred = this.RULE("AltRuleWithPred", (pred?: boolean) => { + return this.OR([ + { + ALT: () => { + this.CONSUME1(A) + return 0 + }, + GATE: () => (pred === undefined ? true : pred) + }, + { + ALT: () => { + this.CONSUME2(A) + return 1 + }, + GATE: () => (pred === undefined ? true : !pred) + }, + { + ALT: () => { + this.CONSUME(B) + return 2 + } + } + ]) + }) + + AltWithOption = this.RULE("AltWithOption", () => { + const intermediate = this.OR([ + { + ALT: () => { + this.CONSUME1(A) + return 2 + } + }, + { + ALT: () => { + this.CONSUME2(B) + return 4 + } + } + ]) + const option = this.OPTION(() => { + this.CONSUME3(A); + return 1; + }) + return (option ?? 0) + intermediate; + }) + } + + it("Should pick option on ambiguity", () => { + const parser = new AmbigiousParser() + parser.input = [ + createRegularToken(A), + createRegularToken(A), + createRegularToken(A) + ] + const result = parser.OptionRule() + expect(result).toBeTruthy(); + // The rule nests a `AT_LEAST_ONE` inside and outside the OPTION + // Both productions produce lookahead ambiguities + expect(parser.ambiguityReports[0]).toMatch("<0, 1> in