├── .gitignore ├── JavaCC input ├── AsnParser.jj ├── Makefile ├── asn1.asn └── runjavacc.bat ├── LICENSE ├── README.txt ├── pom.xml └── src ├── main ├── java │ ├── com │ │ ├── chaosinmotion │ │ │ └── asn1 │ │ │ │ ├── AsnEncodingException.java │ │ │ │ ├── AsnFatalException.java │ │ │ │ ├── BerAbstractString.java │ │ │ │ ├── BerBitString.java │ │ │ │ ├── BerBoolean.java │ │ │ │ ├── BerConstruct.java │ │ │ │ ├── BerEnumerated.java │ │ │ │ ├── BerGeneralString.java │ │ │ │ ├── BerGeneralTime.java │ │ │ │ ├── BerGraphicsString.java │ │ │ │ ├── BerIA5String.java │ │ │ │ ├── BerInputStream.java │ │ │ │ ├── BerInteger.java │ │ │ │ ├── BerNode.java │ │ │ │ ├── BerNull.java │ │ │ │ ├── BerNumericString.java │ │ │ │ ├── BerOID.java │ │ │ │ ├── BerOctetString.java │ │ │ │ ├── BerOutputStream.java │ │ │ │ ├── BerParser.java │ │ │ │ ├── BerPrimitive.java │ │ │ │ ├── BerPrintableString.java │ │ │ │ ├── BerReal.java │ │ │ │ ├── BerSequence.java │ │ │ │ ├── BerSet.java │ │ │ │ ├── BerTag.java │ │ │ │ ├── BerTeletexString.java │ │ │ │ ├── BerUTCTime.java │ │ │ │ ├── BerUtf8String.java │ │ │ │ ├── BerVideoTextString.java │ │ │ │ ├── BerVisibleString.java │ │ │ │ ├── JacNode.java │ │ │ │ ├── LengthInputStream.java │ │ │ │ ├── ReadSequence.java │ │ │ │ ├── Tag.java │ │ │ │ ├── TestParser.java │ │ │ │ ├── TestUtil.java │ │ │ │ └── package.html │ │ └── turkcelltech │ │ │ └── jac │ │ │ ├── ASN1Boolean.java │ │ │ ├── ASN1Integer.java │ │ │ ├── Any.java │ │ │ ├── AutoParser.java │ │ │ ├── BitString.java │ │ │ ├── Choice.java │ │ │ ├── Enumerated.java │ │ │ ├── IA5String.java │ │ │ ├── JacConstruct.java │ │ │ ├── Null.java │ │ │ ├── ObjectID.java │ │ │ ├── OctetString.java │ │ │ ├── PrintableString.java │ │ │ ├── Sequence.java │ │ │ ├── SequenceOf.java │ │ │ ├── Set.java │ │ │ ├── SetOf.java │ │ │ ├── UTCTime.java │ │ │ └── UTF8String.java │ └── javacc │ │ ├── ASTAnyType.java │ │ ├── ASTAssignedIdentifier.java │ │ ├── ASTAssignmentList.java │ │ ├── ASTBinaryString.java │ │ ├── ASTBitStringType.java │ │ ├── ASTBooleanType.java │ │ ├── ASTBooleanValue.java │ │ ├── ASTBuiltinType.java │ │ ├── ASTBuiltinValue.java │ │ ├── ASTCharString.java │ │ ├── ASTChoiceType.java │ │ ├── ASTClass.java │ │ ├── ASTClassNumber.java │ │ ├── ASTComponentsType.java │ │ ├── ASTCompoundValue.java │ │ ├── ASTConstraint.java │ │ ├── ASTContainedSubtype.java │ │ ├── ASTDefinedMacroName.java │ │ ├── ASTDefinedMacroType.java │ │ ├── ASTDefinedType.java │ │ ├── ASTDefinedValue.java │ │ ├── ASTDisplayHint.java │ │ ├── ASTElementType.java │ │ ├── ASTEnumeratedType.java │ │ ├── ASTEnumerationItem.java │ │ ├── ASTEnumerationList.java │ │ ├── ASTExportSymbolList.java │ │ ├── ASTExports.java │ │ ├── ASTHexString.java │ │ ├── ASTImports.java │ │ ├── ASTInnerTypeConstraints.java │ │ ├── ASTInput.java │ │ ├── ASTIntegerType.java │ │ ├── ASTMacroBody.java │ │ ├── ASTMacroDefinition.java │ │ ├── ASTMacroReference.java │ │ ├── ASTModuleBody.java │ │ ├── ASTModuleDefinition.java │ │ ├── ASTModuleIdentifier.java │ │ ├── ASTMultipleTypeConstraints.java │ │ ├── ASTNameAndNumberForm.java │ │ ├── ASTNamedConstraint.java │ │ ├── ASTNamedNumber.java │ │ ├── ASTNamedNumberList.java │ │ ├── ASTNamedValue.java │ │ ├── ASTNullType.java │ │ ├── ASTNullValue.java │ │ ├── ASTNumberForm.java │ │ ├── ASTObjIdComponent.java │ │ ├── ASTObjIdComponentList.java │ │ ├── ASTObjectIdentifierType.java │ │ ├── ASTObjectIdentifierValue.java │ │ ├── ASTOctetStringType.java │ │ ├── ASTPermittedAlphabet.java │ │ ├── ASTPresenceConstraint.java │ │ ├── ASTSelectionType.java │ │ ├── ASTSetOrSequenceOfType.java │ │ ├── ASTSetOrSequenceType.java │ │ ├── ASTSignedNumber.java │ │ ├── ASTSingleTypeConstraint.java │ │ ├── ASTSingleValue.java │ │ ├── ASTSizeConstraint.java │ │ ├── ASTSnmpAccess.java │ │ ├── ASTSnmpDefValPart.java │ │ ├── ASTSnmpDescrPart.java │ │ ├── ASTSnmpIndexPart.java │ │ ├── ASTSnmpObjectTypeMacroType.java │ │ ├── ASTSnmpReferPart.java │ │ ├── ASTSnmpStatus.java │ │ ├── ASTSpecialRealValue.java │ │ ├── ASTSubtypeSpec.java │ │ ├── ASTSubtypeValueSet.java │ │ ├── ASTSubtypeValueSetList.java │ │ ├── ASTSymbol.java │ │ ├── ASTSymbolList.java │ │ ├── ASTSymbolsExported.java │ │ ├── ASTSymbolsFromModule.java │ │ ├── ASTSymbolsFromModuleList.java │ │ ├── ASTSymbolsImported.java │ │ ├── ASTTag.java │ │ ├── ASTTagDefault.java │ │ ├── ASTTaggedType.java │ │ ├── ASTTextualConventionMacroType.java │ │ ├── ASTTypeAssignment.java │ │ ├── ASTTypeConstraints.java │ │ ├── ASTTypeOrValue.java │ │ ├── ASTTypeOrValueList.java │ │ ├── ASTValue.java │ │ ├── ASTValueAssignment.java │ │ ├── ASTValueConstraint.java │ │ ├── ASTValueRange.java │ │ ├── ASTidentifier.java │ │ ├── ASTmodulereference.java │ │ ├── ASTnumber.java │ │ ├── ASTskip_to_matching_brace.java │ │ ├── ASTtypereference.java │ │ ├── AsnParser.java │ │ ├── AsnParserConstants.java │ │ ├── AsnParserDefaultVisitor.java │ │ ├── AsnParserTokenManager.java │ │ ├── AsnParserTreeConstants.java │ │ ├── AsnParserVisitor.java │ │ ├── JJTAsnParserState.java │ │ ├── Node.java │ │ ├── ParseException.java │ │ ├── SimpleCharStream.java │ │ ├── SimpleNode.java │ │ ├── Token.java │ │ └── TokenMgrError.java ├── resources │ └── META-INF │ │ └── templates │ │ ├── any.template │ │ ├── bitstring.template │ │ ├── choice.template │ │ ├── choiceelement.template │ │ ├── definedtype.template │ │ ├── integer.template │ │ ├── myEnum.template │ │ ├── null.template │ │ ├── objectid.template │ │ ├── octetstring.template │ │ ├── sequence.template │ │ ├── sequenceelement.template │ │ ├── sequenceof.template │ │ ├── sequenceofelement.template │ │ ├── set.template │ │ └── setof.template └── text │ └── Notes.txt └── test └── java └── com ├── etrans2020 └── semi │ ├── ConnectionPoint.java │ ├── IPv4Address.java │ ├── IPv6Address.java │ ├── IpAddress.java │ ├── PortNumber.java │ ├── SemiDialogID.java │ ├── SemiSequenceID.java │ ├── ServiceRequest.java │ └── TemporaryID.java ├── etranssystems └── asn1 │ └── generated │ └── dsrc │ ├── Approach.java │ ├── ConnectsTo.java │ ├── Elevation.java │ ├── ExteriorLights.java │ ├── GeoRegion.java │ ├── Latitude.java │ ├── Longitude.java │ ├── NodeList.java │ ├── Offsets.java │ ├── Position3D.java │ ├── ThrottlePosition.java │ ├── TirePressure.java │ ├── VehicleReferenceLane.java │ └── VehicleSituationStatus.java └── turkcelltech └── jac ├── SequenceOfTest.java └── SequenceTest.java /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | target/ 3 | *.iml 4 | -------------------------------------------------------------------------------- /JavaCC input/Makefile: -------------------------------------------------------------------------------- 1 | all: AsnParser.class 2 | 3 | AsnParser.class: AsnParser.java 4 | javacAll.sh 5 | 6 | AsnParser.java: AsnParser.jj.jj 7 | javacc AsnParser.jj.jj 8 | 9 | AsnParser.jj.jj: AsnParser.jj 10 | jjtree AsnParser.jj 11 | 12 | clean: 13 | rm *.class 14 | rm *.jj.jj 15 | rm AsnParser.java AsnParserConstants.java AsnParserTokenManager.java ParseException.java Token.java TokenMgrError.java 16 | -------------------------------------------------------------------------------- /JavaCC input/asn1.asn: -------------------------------------------------------------------------------- 1 | 2 | 3 | JacExample DEFINITIONS IMPLICIT TAGS ::= 4 | 5 | BEGIN 6 | 7 | -- In below example the class "AvailabilityStatus.java" will be generated by JAC, 8 | -- but the inner elements of SequenceOf record will not be defined in the created class. 9 | -- You should focus the inner elements manually. 10 | 11 | AvailabilityStatus ::= SEQUENCE OF INTEGER 12 | { inTest(0), failed(1), powerOff(2), offLine(3) } 13 | 14 | 15 | 16 | -- In the below asn1 definition, JAC will not create TaggedtypeExample.java class by default, because here it is defined as a "tagged type". 17 | -- But you can still generate your java class by JAC. 18 | -- It is very simple to generate java classes of tagged types with a little modification inside your asn.1 file. 19 | -- Have a look at the comments in the top of the generated "examples\TaggedTypeExample.java" class in the project to understand how to do. 20 | 21 | TaggedTypeExample ::= [20] EXPLICIT INTEGER 22 | 23 | END -------------------------------------------------------------------------------- /JavaCC input/runjavacc.bat: -------------------------------------------------------------------------------- 1 | cd jjgen 2 | java -cp C:\Users\Rob\ASN1Compile\jac\javacc-6.0\bin\lib\javacc.jar jjtree -TRACK_TOKENS:true ..\AsnParser.jj 3 | java -cp C:\Users\Rob\ASN1Compile\jac\javacc-6.0\bin\lib\javacc.jar javacc AsnParser.jj.jj 4 | "C:\Program Files\Java\jdk1.7.0_71\bin\javac" *java 5 | cd .. -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | This project contains the JAC parser and runtime. 2 | 3 | Changing the Grammar 4 | -------------------- 5 | To change the grammar you need to do the following: 6 | - Download javacc 7 | - Make modifications to the AsnParser.jj file 8 | - Run the commands from the runjavacc.bat file included in the project. This 9 | will generate some of the java classes that go under the javacc directory in 10 | the project. You will need to modify the batch file for your environment. 11 | - Copy the generated java files into the project. 12 | - Rebuild the project. 13 | 14 | Running the Parser 15 | ------------------ 16 | To run the parser on a set of ASN definitions to the following: 17 | - Build the project. 18 | - Use javacc.AsnParser as the main class and run this with the list of files 19 | that should be parsed. There can be references to other definition files. 20 | - Command line flags: 21 | -d The directory where generated files are created. 22 | -p The package name for generated classes. 23 | You should now have generated classes that can be included in your project 24 | along with the runtime. 25 | -------------------------------------------------------------------------------- /src/main/java/com/chaosinmotion/asn1/AsnEncodingException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007 William Woody, All Rights Reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without modification, 5 | * are permitted provided that the following conditions are met: 6 | * 7 | * 1. Redistributions of source code must retain the above copyright notice, this list 8 | * of conditions and the following disclaimer. 9 | * 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, this 11 | * list of conditions and the following disclaimer in the documentation and/or other 12 | * materials provided with the distribution. 13 | * 14 | * 3. Neither the name of Chaos In Motion nor the names of its contributors may be used 15 | * to endorse or promote products derived from this software without specific prior 16 | * written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 20 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 21 | * SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 22 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 24 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 26 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 27 | * DAMAGE. 28 | * 29 | * Contact William Woody at woody@alumni.caltech.edu or at woody@chaosinmotion.com. 30 | * Chaos In Motion is at http://www.chaosinmotion.com 31 | */ 32 | 33 | package com.chaosinmotion.asn1; 34 | 35 | import java.io.IOException; 36 | 37 | /** 38 | * The ASN.1 Encoding Exception object gets thrown when there is a 39 | * problem with the input or output encoding process. 40 | */ 41 | public class AsnEncodingException extends IOException 42 | { 43 | public AsnEncodingException() 44 | { 45 | super(); 46 | } 47 | 48 | public AsnEncodingException(String message) 49 | { 50 | super(message); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/chaosinmotion/asn1/AsnFatalException.java: -------------------------------------------------------------------------------- 1 | /* AsnFatalException.java 2 | * 3 | * Created on Jun 6, 2006 by William Edward Woody 4 | */ 5 | 6 | /* 7 | * Copyright 2007 William Woody, All Rights Reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without modification, 10 | * are permitted provided that the following conditions are met: 11 | * 12 | * 1. Redistributions of source code must retain the above copyright notice, this list 13 | * of conditions and the following disclaimer. 14 | * 15 | * 2. Redistributions in binary form must reproduce the above copyright notice, this 16 | * list of conditions and the following disclaimer in the documentation and/or other 17 | * materials provided with the distribution. 18 | * 19 | * 3. Neither the name of Chaos In Motion nor the names of its contributors may be used 20 | * to endorse or promote products derived from this software without specific prior 21 | * written permission. 22 | * 23 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 24 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 25 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 26 | * SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 27 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 28 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 29 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 32 | * DAMAGE. 33 | * 34 | * Contact William Woody at woody@alumni.caltech.edu or at woody@chaosinmotion.com. 35 | * Chaos In Motion is at http://www.chaosinmotion.com 36 | */ 37 | 38 | package com.chaosinmotion.asn1; 39 | 40 | /** 41 | * Represents a fatal encoding exception. This is exactly the same as an encoding 42 | * exception, except that it can be thrown by a parser to indicate that what was 43 | * received was so out of bounds that there is nothing to do here but shut down 44 | * the input stream and terminate. 45 | */ 46 | public class AsnFatalException extends AsnEncodingException 47 | { 48 | public AsnFatalException() 49 | { 50 | super(); 51 | } 52 | 53 | public AsnFatalException(String message) 54 | { 55 | super(message); 56 | } 57 | } 58 | 59 | 60 | -------------------------------------------------------------------------------- /src/main/java/com/chaosinmotion/asn1/BerGraphicsString.java: -------------------------------------------------------------------------------- 1 | /* BerTeletexString.java 2 | * 3 | * Created on Jun 4, 2006 by William Edward Woody 4 | */ 5 | 6 | /* 7 | * Copyright 2007 William Woody, All Rights Reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without modification, 10 | * are permitted provided that the following conditions are met: 11 | * 12 | * 1. Redistributions of source code must retain the above copyright notice, this list 13 | * of conditions and the following disclaimer. 14 | * 15 | * 2. Redistributions in binary form must reproduce the above copyright notice, this 16 | * list of conditions and the following disclaimer in the documentation and/or other 17 | * materials provided with the distribution. 18 | * 19 | * 3. Neither the name of Chaos In Motion nor the names of its contributors may be used 20 | * to endorse or promote products derived from this software without specific prior 21 | * written permission. 22 | * 23 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 24 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 25 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 26 | * SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 27 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 28 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 29 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 32 | * DAMAGE. 33 | * 34 | * Contact William Woody at woody@alumni.caltech.edu or at woody@chaosinmotion.com. 35 | * Chaos In Motion is at http://www.chaosinmotion.com 36 | */ 37 | 38 | package com.chaosinmotion.asn1; 39 | 40 | import java.io.IOException; 41 | 42 | /** 43 | * Represents a Graphics string, which is (as far as I'm concerned) an arbitrary 44 | * array of 8-bit bytes 45 | */ 46 | public class BerGraphicsString extends BerOctetString 47 | { 48 | public BerGraphicsString(int tag, byte[] value) 49 | { 50 | super(tag, value); 51 | } 52 | 53 | public BerGraphicsString(byte[] value) 54 | { 55 | this(Tag.GRAPHICSTRING,value); 56 | } 57 | 58 | public BerGraphicsString(int tag, BerInputStream stream) throws IOException 59 | { 60 | super(tag, stream); 61 | } 62 | } 63 | 64 | 65 | -------------------------------------------------------------------------------- /src/main/java/com/chaosinmotion/asn1/BerNumericString.java: -------------------------------------------------------------------------------- 1 | /* BerNumericString.java 2 | * 3 | * Created on Jun 4, 2006 by William Edward Woody 4 | */ 5 | 6 | /* 7 | * Copyright 2007 William Woody, All Rights Reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without modification, 10 | * are permitted provided that the following conditions are met: 11 | * 12 | * 1. Redistributions of source code must retain the above copyright notice, this list 13 | * of conditions and the following disclaimer. 14 | * 15 | * 2. Redistributions in binary form must reproduce the above copyright notice, this 16 | * list of conditions and the following disclaimer in the documentation and/or other 17 | * materials provided with the distribution. 18 | * 19 | * 3. Neither the name of Chaos In Motion nor the names of its contributors may be used 20 | * to endorse or promote products derived from this software without specific prior 21 | * written permission. 22 | * 23 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 24 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 25 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 26 | * SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 27 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 28 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 29 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 32 | * DAMAGE. 33 | * 34 | * Contact William Woody at woody@alumni.caltech.edu or at woody@chaosinmotion.com. 35 | * Chaos In Motion is at http://www.chaosinmotion.com 36 | */ 37 | 38 | package com.chaosinmotion.asn1; 39 | 40 | import java.io.IOException; 41 | 42 | /** 43 | * Numeric string. A numeric string is a sequence of characters that consist 44 | * only of 0-9 45 | */ 46 | public class BerNumericString extends BerAbstractString 47 | { 48 | public BerNumericString(int tag, String value) throws AsnEncodingException 49 | { 50 | super(tag, value); 51 | if (!validate(value)) throw new AsnEncodingException("Illegal numeric value"); 52 | } 53 | 54 | public BerNumericString(int tag, BerInputStream stream) throws IOException 55 | { 56 | super(tag, stream); 57 | } 58 | 59 | public BerNumericString(String value) throws AsnEncodingException 60 | { 61 | this(Tag.NUMERICSTRING,value); 62 | } 63 | 64 | public static final boolean validate(String str) 65 | { 66 | return validateString(str,NUMBER); 67 | } 68 | 69 | public String toString() 70 | { 71 | return "BerNumericString(" + Tag.toString(getTag()) + ")=" + getValue(); 72 | } 73 | 74 | // Added by Fatih Batuk 75 | //This method is not necessary in this level. 76 | //We also override it here because we do not want to set asn.1 library's class as abstract. 77 | public void readElement(BerInputStream in) throws IOException { } 78 | } 79 | -------------------------------------------------------------------------------- /src/main/java/com/chaosinmotion/asn1/BerReal.java: -------------------------------------------------------------------------------- 1 | /* BerBoolean.java 2 | * 3 | * Created on Jun 2, 2006 by William Edward Woody 4 | */ 5 | /* 6 | * Copyright 2007 William Woody, All Rights Reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without modification, 9 | * are permitted provided that the following conditions are met: 10 | * 11 | * 1. Redistributions of source code must retain the above copyright notice, this list 12 | * of conditions and the following disclaimer. 13 | * 14 | * 2. Redistributions in binary form must reproduce the above copyright notice, this 15 | * list of conditions and the following disclaimer in the documentation and/or other 16 | * materials provided with the distribution. 17 | * 18 | * 3. Neither the name of Chaos In Motion nor the names of its contributors may be used 19 | * to endorse or promote products derived from this software without specific prior 20 | * written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 23 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 24 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 25 | * SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 27 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 28 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 30 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 31 | * DAMAGE. 32 | * 33 | * Contact William Woody at woody@alumni.caltech.edu or at woody@chaosinmotion.com. 34 | * Chaos In Motion is at http://www.chaosinmotion.com 35 | */ 36 | 37 | package com.chaosinmotion.asn1; 38 | 39 | import java.io.IOException; 40 | 41 | /** 42 | * Represents a floating point value in the BER stream 43 | */ 44 | public class BerReal extends BerNode 45 | { 46 | private double fValue; 47 | 48 | /** 49 | * Construct a new boolean object with the specified tag 50 | * @param tag 51 | * @param value 52 | */ 53 | public BerReal(int tag, double value) 54 | { 55 | super(tag); 56 | fValue = value; 57 | } 58 | 59 | /** 60 | * Construct a boolean of type BOOLEAN 61 | * @param value 62 | */ 63 | public BerReal(double value) 64 | { 65 | this(Tag.REAL,value); 66 | } 67 | 68 | /** 69 | * Construct a boolean from the input stream 70 | * @param tag 71 | * @param stream 72 | * @throws IOException 73 | */ 74 | public BerReal(int tag, BerInputStream stream) throws IOException 75 | { 76 | super(tag); 77 | 78 | fValue = stream.readReal(); 79 | } 80 | 81 | /** 82 | * Write this BER element to the output stream 83 | * Comment 84 | * @param stream 85 | * @throws IOException 86 | * @see com.chaosinmotion.asn1.BerNode#writeElement(com.chaosinmotion.asn1.BerOutputStream) 87 | */ 88 | public void writeElement(BerOutputStream stream) throws IOException 89 | { 90 | stream.writeBerTag(getTag()); 91 | stream.writeReal(fValue); 92 | } 93 | 94 | /** 95 | * Return the value of this boolean object 96 | * @return 97 | */ 98 | public double getValue() 99 | { 100 | return fValue; 101 | } 102 | 103 | public String toString() 104 | { 105 | return "BerReal(" + Tag.toString(getTag()) + ")=" + fValue; 106 | } 107 | 108 | } 109 | 110 | 111 | -------------------------------------------------------------------------------- /src/main/java/com/chaosinmotion/asn1/BerTag.java: -------------------------------------------------------------------------------- 1 | /* BerSet.java 2 | * 3 | * Created on Jun 4, 2006 by William Edward Woody 4 | */ 5 | /* 6 | * Copyright 2007 William Woody, All Rights Reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without modification, 9 | * are permitted provided that the following conditions are met: 10 | * 11 | * 1. Redistributions of source code must retain the above copyright notice, this list 12 | * of conditions and the following disclaimer. 13 | * 14 | * 2. Redistributions in binary form must reproduce the above copyright notice, this 15 | * list of conditions and the following disclaimer in the documentation and/or other 16 | * materials provided with the distribution. 17 | * 18 | * 3. Neither the name of Chaos In Motion nor the names of its contributors may be used 19 | * to endorse or promote products derived from this software without specific prior 20 | * written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 23 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 24 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 25 | * SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 27 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 28 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 30 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 31 | * DAMAGE. 32 | * 33 | * Contact William Woody at woody@alumni.caltech.edu or at woody@chaosinmotion.com. 34 | * Chaos In Motion is at http://www.chaosinmotion.com 35 | */ 36 | 37 | package com.chaosinmotion.asn1; 38 | 39 | import java.io.IOException; 40 | 41 | /** 42 | * A BerTag can either be marked as implicit or explicit. If it is marked as 43 | * implicit, the tag value is specified when constructing the primitive or 44 | * complex object. When the tag is explicit, you wrap the tag in a BerTag with 45 | * the specific tag value. Thus, this is a constructed object that must contain 46 | * just one object, the value that was tagged. 47 | */ 48 | public class BerTag extends BerConstruct 49 | { 50 | /** 51 | * Construct a new BerSequence with the specified tag 52 | * @param tag 53 | */ 54 | public BerTag(int tag) 55 | { 56 | super(tag); 57 | } 58 | 59 | /** 60 | * Construt a new BerSequence from the input stream 61 | * @param tag The tag used to define this element 62 | * @param state The current read-state we're in 63 | * @param parser The parser that is being used to parse this ASN.1 stream 64 | * @param stream The ASN.1 stream being parsed 65 | * @throws IOException 66 | */ 67 | public BerTag(int tag, int state, BerParser parser, BerInputStream stream) throws IOException 68 | { 69 | super(tag, state, parser, stream); 70 | } 71 | 72 | public String toString() 73 | { 74 | return toLabeledString("BerTag"); 75 | } 76 | 77 | public BerNode get() 78 | { 79 | return get(0); 80 | } 81 | 82 | // Added by Fatih Batuk 83 | //This method is not necessary in this level. 84 | //We also override it here because we do not want to set asn.1 library's class as abstract. 85 | public void readElement(BerInputStream in) throws IOException { } 86 | 87 | } 88 | 89 | 90 | -------------------------------------------------------------------------------- /src/main/java/com/chaosinmotion/asn1/BerTeletexString.java: -------------------------------------------------------------------------------- 1 | /* BerTeletexString.java 2 | * 3 | * Created on Jun 4, 2006 by William Edward Woody 4 | */ 5 | /* 6 | * Copyright 2007 William Woody, All Rights Reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without modification, 9 | * are permitted provided that the following conditions are met: 10 | * 11 | * 1. Redistributions of source code must retain the above copyright notice, this list 12 | * of conditions and the following disclaimer. 13 | * 14 | * 2. Redistributions in binary form must reproduce the above copyright notice, this 15 | * list of conditions and the following disclaimer in the documentation and/or other 16 | * materials provided with the distribution. 17 | * 18 | * 3. Neither the name of Chaos In Motion nor the names of its contributors may be used 19 | * to endorse or promote products derived from this software without specific prior 20 | * written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 23 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 24 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 25 | * SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 27 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 28 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 30 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 31 | * DAMAGE. 32 | * 33 | * Contact William Woody at woody@alumni.caltech.edu or at woody@chaosinmotion.com. 34 | * Chaos In Motion is at http://www.chaosinmotion.com 35 | */ 36 | 37 | package com.chaosinmotion.asn1; 38 | 39 | import java.io.IOException; 40 | 41 | /** 42 | * Represents a Teletex string, which is (as far as I'm concerned) an arbitrary 43 | * array of 8-bit bytes 44 | */ 45 | public class BerTeletexString extends BerOctetString 46 | { 47 | public BerTeletexString(int tag, byte[] value) 48 | { 49 | super(tag, value); 50 | } 51 | 52 | public BerTeletexString(byte[] value) 53 | { 54 | this(Tag.TELETEXSTRING,value); 55 | } 56 | 57 | public BerTeletexString(int tag, BerInputStream stream) throws IOException 58 | { 59 | super(tag, stream); 60 | } 61 | 62 | public String toString() 63 | { 64 | return "BerTeletexString(" + Tag.toString(getTag()) + ")=" + getValue(); 65 | } 66 | } 67 | 68 | 69 | -------------------------------------------------------------------------------- /src/main/java/com/chaosinmotion/asn1/BerUtf8String.java: -------------------------------------------------------------------------------- 1 | /* BerBoolean.java 2 | * 3 | * Created on Jun 2, 2006 by William Edward Woody 4 | */ 5 | 6 | /* 7 | * Copyright 2007 William Woody, All Rights Reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without modification, 10 | * are permitted provided that the following conditions are met: 11 | * 12 | * 1. Redistributions of source code must retain the above copyright notice, this list 13 | * of conditions and the following disclaimer. 14 | * 15 | * 2. Redistributions in binary form must reproduce the above copyright notice, this 16 | * list of conditions and the following disclaimer in the documentation and/or other 17 | * materials provided with the distribution. 18 | * 19 | * 3. Neither the name of Chaos In Motion nor the names of its contributors may be used 20 | * to endorse or promote products derived from this software without specific prior 21 | * written permission. 22 | * 23 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 24 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 25 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 26 | * SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 27 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 28 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 29 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 32 | * DAMAGE. 33 | * 34 | * Contact William Woody at woody@alumni.caltech.edu or at woody@chaosinmotion.com. 35 | * Chaos In Motion is at http://www.chaosinmotion.com 36 | */ 37 | 38 | package com.chaosinmotion.asn1; 39 | 40 | import java.io.IOException; 41 | 42 | /** 43 | * Represents a generic UTF8 encoded string 44 | */ 45 | public class BerUtf8String extends BerNode { 46 | private String fValue; 47 | 48 | /** 49 | * Construct a new boolean object with the specified tag 50 | * 51 | * @param tag 52 | * @param value 53 | */ 54 | public BerUtf8String(int tag, String value) { 55 | super(tag); 56 | fValue = value; 57 | } 58 | 59 | public BerUtf8String(String value) { 60 | this(Tag.UTF8STRING, value); 61 | } 62 | 63 | /** 64 | * Construct a boolean from the input stream 65 | * 66 | * @param tag 67 | * @param stream 68 | * @throws IOException 69 | */ 70 | public BerUtf8String(int tag, BerInputStream stream) throws IOException { 71 | super(tag); 72 | 73 | fValue = new String(stream.readOctetString(0 == (tag & Tag.CONSTRUCTED)), "UTF-8"); 74 | } 75 | 76 | /** 77 | * Write this BER element to the output stream Comment 78 | * 79 | * @param stream 80 | * @throws IOException 81 | * @see com.chaosinmotion.asn1.BerNode#writeElement(com.chaosinmotion.asn1.BerOutputStream) 82 | */ 83 | public void writeElement(BerOutputStream stream) throws IOException { 84 | byte[] b = fValue.getBytes("UTF-8"); 85 | stream.writeBerTag( 86 | getTag() | (stream.isComplexOctetString(b.length) ? Tag.CONSTRUCTED : 0)); 87 | stream.writeOctetString(b, 0, b.length); 88 | } 89 | 90 | /** 91 | * Return the value of this boolean object 92 | * 93 | * @return 94 | */ 95 | public String getValue() { 96 | return fValue; 97 | } 98 | 99 | public String toString() { 100 | return "BerUtf8String(" + Tag.toString(getTag()) + ")=" + fValue; 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /src/main/java/com/chaosinmotion/asn1/BerVideoTextString.java: -------------------------------------------------------------------------------- 1 | /* BerTeletexString.java 2 | * 3 | * Created on Jun 4, 2006 by William Edward Woody 4 | */ 5 | /* 6 | * Copyright 2007 William Woody, All Rights Reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without modification, 9 | * are permitted provided that the following conditions are met: 10 | * 11 | * 1. Redistributions of source code must retain the above copyright notice, this list 12 | * of conditions and the following disclaimer. 13 | * 14 | * 2. Redistributions in binary form must reproduce the above copyright notice, this 15 | * list of conditions and the following disclaimer in the documentation and/or other 16 | * materials provided with the distribution. 17 | * 18 | * 3. Neither the name of Chaos In Motion nor the names of its contributors may be used 19 | * to endorse or promote products derived from this software without specific prior 20 | * written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 23 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 24 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 25 | * SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 27 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 28 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 30 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 31 | * DAMAGE. 32 | * 33 | * Contact William Woody at woody@alumni.caltech.edu or at woody@chaosinmotion.com. 34 | * Chaos In Motion is at http://www.chaosinmotion.com 35 | */ 36 | 37 | package com.chaosinmotion.asn1; 38 | 39 | import java.io.IOException; 40 | 41 | /** 42 | * Represents a VideoText string, which is (as far as I'm concerned) an arbitrary 43 | * array of 8-bit bytes 44 | */ 45 | public class BerVideoTextString extends BerOctetString 46 | { 47 | public BerVideoTextString(int tag, byte[] value) 48 | { 49 | super(tag, value); 50 | } 51 | 52 | public BerVideoTextString(byte[] value) 53 | { 54 | this(Tag.VIDEOTEXTSTRING,value); 55 | } 56 | 57 | public BerVideoTextString(int tag, BerInputStream stream) throws IOException 58 | { 59 | super(tag, stream); 60 | } 61 | 62 | public String toString() 63 | { 64 | return "BerVideoTextString(" + Tag.toString(getTag()) + ")=" + getValue(); 65 | } 66 | } 67 | 68 | 69 | -------------------------------------------------------------------------------- /src/main/java/com/chaosinmotion/asn1/BerVisibleString.java: -------------------------------------------------------------------------------- 1 | /* BerPrintableString.java 2 | * 3 | * Created on Jun 4, 2006 by William Edward Woody 4 | */ 5 | /* 6 | * Copyright 2007 William Woody, All Rights Reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without modification, 9 | * are permitted provided that the following conditions are met: 10 | * 11 | * 1. Redistributions of source code must retain the above copyright notice, this list 12 | * of conditions and the following disclaimer. 13 | * 14 | * 2. Redistributions in binary form must reproduce the above copyright notice, this 15 | * list of conditions and the following disclaimer in the documentation and/or other 16 | * materials provided with the distribution. 17 | * 18 | * 3. Neither the name of Chaos In Motion nor the names of its contributors may be used 19 | * to endorse or promote products derived from this software without specific prior 20 | * written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 23 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 24 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 25 | * SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 27 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 28 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 30 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 31 | * DAMAGE. 32 | * 33 | * Contact William Woody at woody@alumni.caltech.edu or at woody@chaosinmotion.com. 34 | * Chaos In Motion is at http://www.chaosinmotion.com 35 | */ 36 | 37 | package com.chaosinmotion.asn1; 38 | 39 | import java.io.IOException; 40 | 41 | /** 42 | * Represents the BER Visible String character set, which is the subset of ASCII 43 | * minus the control characters. 44 | */ 45 | public class BerVisibleString extends BerAbstractString 46 | { 47 | public BerVisibleString(int tag, String value) throws AsnEncodingException 48 | { 49 | super(tag, value); 50 | if (!validate(value)) throw new AsnEncodingException("Illegal IA5 string"); 51 | } 52 | 53 | public BerVisibleString(int tag, BerInputStream stream) throws IOException 54 | { 55 | super(tag, stream); 56 | } 57 | 58 | public BerVisibleString(String value) throws AsnEncodingException 59 | { 60 | this(Tag.VISIBLESTRING,value); 61 | } 62 | 63 | public static final boolean validate(String str) 64 | { 65 | int i,len = str.length(); 66 | for (i = 0; i < len; ++i) { 67 | char c = str.charAt(i); 68 | if ((c < 32) || (c > 126)) return false; 69 | } 70 | return true; 71 | } 72 | 73 | public String toString() 74 | { 75 | return "BerVisibleString(" + Tag.toString(getTag()) + ")=" + getValue(); 76 | } 77 | 78 | // Added by Fatih Batuk 79 | //This method is not necessary in this level. 80 | //We also override it here because we do not want to set asn.1 library's class as abstract. 81 | public void readElement(BerInputStream in) throws IOException { } 82 | } 83 | -------------------------------------------------------------------------------- /src/main/java/com/chaosinmotion/asn1/JacNode.java: -------------------------------------------------------------------------------- 1 | package com.chaosinmotion.asn1; 2 | 3 | import java.io.IOException; 4 | 5 | /** 6 | * A transition class between our project JAC's classes and the asn.1 library. 7 | * 8 | * We need to handle the decoding process polymorphic in our project. 9 | * Because of that we defined abstract readElement(..) method in this class. 10 | * 11 | * We did not define this abstract method in BerNode, because we do not want to 12 | * affect the all W.Woody's asn.1 libary classes since we do not use all of them. 13 | * 14 | * -- The role of this class and the polymoprphic decoding mechanism is not totally implemented yet but now enough to generate true results. 15 | * -- Now only implemented for simple asn1 types (not the constructed ones: Sequence, Set, etc) 16 | * 17 | * @author Fatih Batuk 18 | */ 19 | public abstract class JacNode extends BerNode { 20 | 21 | public JacNode(int tag) { 22 | super(tag); 23 | } 24 | 25 | public abstract void readElement(BerInputStream in ) throws IOException; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/chaosinmotion/asn1/LengthInputStream.java: -------------------------------------------------------------------------------- 1 | // Created on Apr 8, 2005 5:42:46 PM by woody 2 | /* 3 | * Copyright 2007 William Woody, All Rights Reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this list 9 | * of conditions and the following disclaimer. 10 | * 11 | * 2. Redistributions in binary form must reproduce the above copyright notice, this 12 | * list of conditions and the following disclaimer in the documentation and/or other 13 | * materials provided with the distribution. 14 | * 15 | * 3. Neither the name of Chaos In Motion nor the names of its contributors may be used 16 | * to endorse or promote products derived from this software without specific prior 17 | * written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 21 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 22 | * SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 24 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 25 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 27 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 28 | * DAMAGE. 29 | * 30 | * Contact William Woody at woody@alumni.caltech.edu or at woody@chaosinmotion.com. 31 | * Chaos In Motion is at http://www.chaosinmotion.com 32 | */ 33 | 34 | package com.chaosinmotion.asn1; 35 | 36 | import java.io.FilterInputStream; 37 | import java.io.IOException; 38 | import java.io.InputStream; 39 | 40 | /** 41 | * The LengthInputStream is an internal object used to track the 42 | * number of bytes that have been read so far in the input stream. 43 | * This can be used by BER object readers to track when an object 44 | * data block has started, to know when it is time to terminate 45 | * reading for a compound object 46 | */ 47 | 48 | class LengthInputStream extends FilterInputStream 49 | { 50 | private long fRead; 51 | private long fMark; 52 | 53 | /** 54 | * Construct a length input stream object 55 | */ 56 | protected LengthInputStream(InputStream arg0) 57 | { 58 | super(arg0); 59 | fRead = 0; 60 | } 61 | 62 | public int read() throws IOException 63 | { 64 | int r = super.read(); 65 | if (r != -1) ++fRead; 66 | return r; 67 | } 68 | 69 | public int read(byte[] b, int off, int len) throws IOException 70 | { 71 | int r = super.read(b,off,len); 72 | if (r > 0) fRead += r; 73 | return r; 74 | } 75 | 76 | public void mark(int readlimit) 77 | { 78 | super.mark(readlimit); 79 | fMark = fRead; 80 | } 81 | 82 | public void reset() throws IOException 83 | { 84 | super.reset(); 85 | fRead = fMark; 86 | } 87 | 88 | /** 89 | * Returns the number of bytes that have been read so far from this stream. 90 | * This returns the number of octets read since this object was created. 91 | * @return The number of bytes read 92 | */ 93 | public long getReadBytes() 94 | { 95 | return fRead; 96 | } 97 | 98 | /** 99 | * Resets the read count to zero. 100 | */ 101 | public void resetReadCount() 102 | { 103 | fRead = 0; 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /src/main/java/com/chaosinmotion/asn1/TestParser.java: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * TestParser.java Created on Jun 5, 2006 by William Edward Woody 4 | */ 5 | 6 | /* 7 | * This TestParser.java class is an example of parsing the asn.1 protocol below : 8 | (for more detail look at : http://www.chaosinmotion.com/wiki/index.php?title=ASN.1_Library) 9 | 10 | ExampleProtocol DEFINITIONS ::= 11 | BEGIN 12 | ExampleProtocolMessage ::= CHOICE { 13 | rlcGeneralBroadcastInformation RlcGeneralBroadcastInformation, 14 | rlcFrequencyList RlcFrequencyList } 15 | RlcGeneralBroadcastInformation 16 | ::= [APPLICATION 0] SEQUENCE { 17 | duplexMode DuplexMode, 18 | frameOffset FrameOffset, 19 | uplinkPowerMaxRangingStart UplinkPowerMax, 20 | infoText InfoText } 21 | DuplexMode ::= ENUMERATED {fdd(0), tdd(1)} 22 | FrameOffset ::= INTEGER (0 | 8..20) 23 | UplinkPowerMax ::= INTEGER (10..20) 24 | InfoText ::= IA5String (SIZE (0..128)) 25 | RlcFrequencyList ::= SEQUENCE (SIZE(32)) OF PairOfCarrierFrequencies 26 | PairOfCarrierFrequencies 27 | ::= [APPLICATION 1] SEQUENCE { 28 | uplinkCarrierFrequency CarrierFrequency, 29 | downlinkCarrierFrequency CarrierFrequency } 30 | CarrierFrequency ::= INTEGER (0..130000) 31 | END 32 | * 33 | *(comment by Fatih Batuk) 34 | */ 35 | 36 | package com.chaosinmotion.asn1; 37 | 38 | import java.io.IOException; 39 | 40 | public class TestParser extends BerParser { 41 | 42 | private static final int ExampleProtocolMessage = BerParser.START; 43 | private static final int RlcGeneralBroadcastInformation = 1; 44 | private static final int RlcFrequencyList = 2; 45 | private static final int PairOfCarrierFrequencies = 3; 46 | 47 | //modified by Fatih Batuk (state variable is deleted) 48 | public BerNode create(int tag, BerInputStream stream) throws IOException 49 | { 50 | 51 | return new BerSequence(tag, this,stream); 52 | 53 | // to understand how to write the create(..) method of the asn.1 protocol example given above. 54 | 55 | //W.Woody's TestParser example : 56 | 57 | 58 | /* 59 | switch (state) { 60 | case ExampleProtocolMessage: 61 | // Application 0 == RlcGeneralBroadcastInformation 62 | // Application 1 == RlcFrequencyList 63 | if (tag == (Tag.APPLICATION | 0)) { 64 | return new BerSequence(tag,RlcGeneralBroadcastInformation,this,stream); 65 | } else if (tag == (Tag.APPLICATION | 1)) { 66 | return new BerSequence(tag,RlcFrequencyList,this,stream); 67 | } 68 | else { 69 | throw new AsnEncodingException("Unknown tag: " + tag); 70 | } 71 | 72 | case RlcGeneralBroadcastInformation: 73 | case RlcFrequencyList: 74 | case PairOfCarrierFrequencies: 75 | // All contents are primitive. If they weren't, we'd use the state 76 | // information to sort out what the tag actually is. 77 | throw new AsnEncodingException("Unknown tag: " + tag); 78 | 79 | default: 80 | throw new AsnEncodingException("Unknown state: " + state); 81 | 82 | } 83 | */ 84 | } 85 | 86 | } 87 | 88 | 89 | -------------------------------------------------------------------------------- /src/main/java/com/turkcelltech/jac/ASN1Boolean.java: -------------------------------------------------------------------------------- 1 | 2 | package com.turkcelltech.jac; 3 | 4 | /* 5 | * created by Fatih Batuk on September, 2007. 6 | * 7 | * The classes of this package have a role between the parser generated classes 8 | * and W.Woody's asn.1 library. Our parser reads the asn.1 file and creates .java classes, 9 | * and the generated classes extend the related class of this package to use the asn.1 library for doing encoding/decoding. 10 | * The generation of classes is handled by a framework created by javacc. 11 | * The project "Arc" uses this framework to parse an asn.1 file. We have modified and used this framework. 12 | * Also we have made lots of important modifications in W.Woody's Library to integrate and combine library with the generated classes. 13 | * But we tried not to change the general hierarchy and usage of the library. 14 | * And all of these modifications are notified in the code. 15 | * 16 | * If you want to have a look at the pure versions of these seperate projects: 17 | * for ARC : 18 | * http://www.forge.com.au/Research/products/arc/arc.htm 19 | * for W.Woody's Library : 20 | * http://www.chaosinmotion.com/wiki/index.php?title=ASN.1_Library 21 | * 22 | * Take a look at the README.html file of the project. 23 | * If you want to have a look of the creation of .java classes take a look at the 24 | * ASTBuitinType.java class. And if you need supply of more asn.1 types, you may 25 | * try to modify this class, or whatever. However you should clearly understand 26 | * the generated Javacc an JJTree class hierarchy. 27 | * 28 | * The supported asn.1 data types in this project are : 29 | * CHOICE, SEQUENCE, SEQUENCE OF, SET, SET OF, BOOLEAN, INTEGER, ANY, BIT STRING, 30 | * IA5String, Null, OBJECT IDENTIFIER, OCTET STRING, PRINTABLE STRING, 31 | * UTCTime and ENUMERATED. 32 | * 33 | * Contact Fatih Batuk at fatih_batuk@yahoo.com 34 | */ 35 | 36 | import com.chaosinmotion.asn1.*; 37 | 38 | import java.io.IOException; 39 | 40 | /** 41 | * Represents asn.1 BOOLEAN object. 42 | * 43 | * @author Fatih BATUK 44 | */ 45 | public class ASN1Boolean extends BerBoolean 46 | { 47 | /** 48 | * Constructs an empty boolean. 49 | */ 50 | public ASN1Boolean() { 51 | super(); 52 | isInitialized = false; 53 | } 54 | 55 | /** 56 | * Constructs an empty boolean. 57 | *

58 | * @param name if this object becomes a component in a 59 | * constructed type, this name can be used to retrieve 60 | * the object. 61 | */ 62 | public ASN1Boolean(String name) 63 | { 64 | super(); 65 | setName(name); 66 | isInitialized = false; 67 | } 68 | 69 | public ASN1Boolean(boolean value) 70 | { 71 | super(value); 72 | isInitialized = true; 73 | } 74 | 75 | /** 76 | * Constructs a boolean with the given value. 77 | *

78 | * @param name if this object becomes a component in a 79 | * constructed type, this name can be used to retrieve 80 | * the object. 81 | *

82 | * @param value a Boolean with the desired value. 83 | */ 84 | public ASN1Boolean(String name, boolean value) 85 | { 86 | super(value); 87 | setName(name); 88 | isInitialized = true; 89 | } 90 | 91 | /** 92 | * to encode this boolean value in BER 93 | */ 94 | public void encode(BerOutputStream out) throws IOException 95 | { 96 | writeElement(out); 97 | } 98 | 99 | /** 100 | * To decode a BER encoded Byte value to a BerBoolean automatically.. 101 | * @param parser 102 | * @param in 103 | * @throws IOException 104 | */ 105 | public void 106 | decode(BerInputStream in) throws IOException 107 | { 108 | int tag = in.readBerTag(); 109 | 110 | if (tag != getTag()) 111 | throw new AsnFatalException("\n >> During decoding, the encoded tag value in the byte array does not match with this object's tag number ! "); 112 | 113 | readElement(in); 114 | 115 | } 116 | 117 | } 118 | 119 | -------------------------------------------------------------------------------- /src/main/java/com/turkcelltech/jac/Any.java: -------------------------------------------------------------------------------- 1 | package com.turkcelltech.jac; 2 | 3 | /* 4 | * created by Fatih Batuk on September, 2007. 5 | * 6 | * The classes of this package have a role between the parser generated classes 7 | * and W.Woody's asn.1 library. Our parser reads the asn.1 file and creates .java classes, 8 | * and the generated classes extends the related class of this package to use the asn.1 library for doing encoding/decoding. 9 | * The generation of classes is handled by a framework created by javacc. 10 | * The project "Arc" uses this framework to parse an asn.1 file. We have modified and used this framework. 11 | * Also we have made important modifications in W.Woody's Library to integrate and combine library with the generated classes. 12 | * But we tried not to change the general hierarchy and usage of the library. 13 | * And all of these modifications are notified in the code. 14 | * 15 | * If you want to have a look at the pure versions of these seperate projects: 16 | * for ARC : 17 | * http://www.forge.com.au/Research/products/arc/arc.htm 18 | * for W.Woody's Library : 19 | * http://www.chaosinmotion.com/wiki/index.php?title=ASN.1_Library 20 | * 21 | * Take a look at the README.html file of the project. 22 | * If you want to have a look of the creation of .java classes take a look at the 23 | * ASTBuitinType.java class. And if you need supply of more asn.1 types, you may 24 | * try to modify this class, or whatever. However you should clearly understand 25 | * the generated Javacc an JJTree class hierarchy. 26 | * 27 | * The supported asn.1 data types in this project are : 28 | * CHOICE, SEQUENCE, SEQUENCE OF, SET, SET OF, BOOLEAN, INTEGER, ANY, BIT STRING, 29 | * IA5String, Null, OBJECT IDENTIFIER, OCTET STRING, PRINTABLE STRING, 30 | * UTCTime and ENUMERATED. 31 | * 32 | * Contact Fatih Batuk at fatih_batuk@yahoo.com 33 | */ 34 | 35 | import com.chaosinmotion.asn1.*; 36 | 37 | import java.io.IOException; 38 | 39 | /** 40 | * This class represents an ASN.1 ANY object. 41 | *

42 | * " This class is not a true representation of an ANY, 43 | * as it does not understand the DEFINED BY 44 | * syntax " 45 | * This class is not tested. You should care about this if you are using ANY data type. 46 | * 47 | * @deprecated ANY is a deprecated ASN.1 Structured Type. It has been replaced with X.680 Open Type. 48 | * 49 | * @author Fatih Batuk 50 | */ 51 | 52 | public class Any extends BerPrimitive 53 | { 54 | 55 | public 56 | Any(int tag, byte[] data) 57 | { 58 | super(tag, data); 59 | isInitialized = true; 60 | } 61 | 62 | /** 63 | * Constructs an empty ANY. 64 | *

65 | * @param name if this object becomes a component in a 66 | * constructed type, this name can be used to retrieve 67 | * the object. 68 | */ 69 | public 70 | Any(int tag, byte[] data, String name) 71 | { 72 | super(tag, data); 73 | setName(name); 74 | isInitialized = true; 75 | } 76 | 77 | /** 78 | * to encode this ANY value in BER 79 | */ 80 | public void encode(BerOutputStream out) throws IOException 81 | { 82 | writeElement(out); 83 | } 84 | 85 | /** 86 | * To decode a BER encoded Byte value to a BerPrimitive.. 87 | * @param parser 88 | * @param in 89 | * @throws IOException 90 | */ 91 | public void 92 | decode(int tag, BerInputStream in) throws IOException 93 | { 94 | setTag(tag); 95 | readElement(in); 96 | } 97 | 98 | 99 | 100 | } 101 | 102 | -------------------------------------------------------------------------------- /src/main/java/com/turkcelltech/jac/BitString.java: -------------------------------------------------------------------------------- 1 | package com.turkcelltech.jac; 2 | 3 | /* 4 | * created by Fatih Batuk on September, 2007. 5 | * 6 | * The classes of this package have a role between the parser generated classes 7 | * and W.Woody's asn.1 library. Our parser reads the asn.1 file and creates .java classes, 8 | * and the generated classes extend the related class of this package to use the asn.1 library for doing encoding/decoding. 9 | * The generation of classes is handled by a framework created by javacc. 10 | * The project "Arc" uses this framework to parse an asn.1 file. We have modified and used this framework. 11 | * Also we have made lots of important modifications in W.Woody's Library to integrate and combine library with the generated classes. 12 | * But we tried not to change the general hierarchy and usage of the library. 13 | * And all of these modifications are notified in the code. 14 | * 15 | * If you want to have a look at the pure versions of these seperate projects: 16 | * for ARC : 17 | * http://www.forge.com.au/Research/products/arc/arc.htm 18 | * for W.Woody's Library : 19 | * http://www.chaosinmotion.com/wiki/index.php?title=ASN.1_Library 20 | * 21 | * Take a look at the README.html file of the project. 22 | * If you want to have a look of the creation of .java classes take a look at the 23 | * ASTBuitinType.java class. And if you need supply of more asn.1 types, you may 24 | * try to modify this class, or whatever. However you should clearly understand 25 | * the generated Javacc an JJTree class hierarchy. 26 | * 27 | * The supported asn.1 data types in this project are : 28 | * CHOICE, SEQUENCE, SEQUENCE OF, SET, SET OF, BOOLEAN, INTEGER, ANY, BIT STRING, 29 | * IA5String, Null, OBJECT IDENTIFIER, OCTET STRING, PRINTABLE STRING, 30 | * UTCTime and ENUMERATED. 31 | * 32 | * Contact Fatih Batuk at fatih_batuk@yahoo.com 33 | */ 34 | 35 | import com.chaosinmotion.asn1.*; 36 | 37 | import java.util.BitSet; 38 | import java.io.IOException; 39 | 40 | /** 41 | * Represents asn.1 Bit String object. 42 | * @author Fatih Batuk 43 | * 44 | */ 45 | public class BitString extends BerBitString 46 | { 47 | public 48 | BitString() 49 | { 50 | super(); 51 | isInitialized = false; 52 | } 53 | 54 | public 55 | BitString(String name) 56 | { 57 | super(); 58 | setName(name); 59 | isInitialized = false; 60 | } 61 | 62 | public 63 | BitString(BitSet value) 64 | { 65 | super(value); 66 | isInitialized = true; 67 | } 68 | 69 | public 70 | BitString(String name, BitSet value) 71 | { 72 | super(value); 73 | setName(name); 74 | isInitialized = true; 75 | } 76 | 77 | /** 78 | * to encode this object in BER 79 | */ 80 | public void encode(BerOutputStream out) throws IOException 81 | { 82 | writeElement(out); 83 | } 84 | 85 | /** 86 | * To decode a BER encoded Byte value to a BerBitString automatically.. 87 | * @param parser 88 | * @param in 89 | * @throws IOException 90 | */ 91 | public void 92 | decode(BerInputStream in) throws IOException 93 | { 94 | int tag = in.readBerTag(); 95 | 96 | if (tag != getTag()) 97 | throw new AsnFatalException("\n >> During decoding, the encoded tag value in the byte array does not match with this object's tag number ! "); 98 | 99 | readElement(in); 100 | 101 | } 102 | 103 | 104 | } 105 | -------------------------------------------------------------------------------- /src/main/java/com/turkcelltech/jac/Enumerated.java: -------------------------------------------------------------------------------- 1 | 2 | package com.turkcelltech.jac; 3 | 4 | /* 5 | * created by Fatih Batuk on September, 2007. 6 | * 7 | * The classes of this package have a role between the parser generated classes 8 | * and W.Woody's asn.1 library. Our parser reads the asn.1 file and creates .java classes, 9 | * and the generated classes extend the related class of this package to use the asn.1 library for doing encoding/decoding. 10 | * The generation of classes is handled by a framework created by javacc. 11 | * The project "Arc" uses this framework to parse an asn.1 file. We have modified and used this framework. 12 | * Also we have made lots of important modifications in W.Woody's Library to integrate and combine library with the generated classes. 13 | * But we tried not to change the general hierarchy and usage of the library. 14 | * And all of these modifications are notified in the code. 15 | * 16 | * If you want to have a look at the pure versions of these seperate projects: 17 | * for ARC : 18 | * http://www.forge.com.au/Research/products/arc/arc.htm 19 | * for W.Woody's Library : 20 | * http://www.chaosinmotion.com/wiki/index.php?title=ASN.1_Library 21 | * 22 | * Take a look at the README.html file of the project. 23 | * If you want to have a look of the creation of .java classes take a look at the 24 | * ASTBuitinType.java class. And if you need supply of more asn.1 types, you may 25 | * try to modify this class, or whatever. However you should clearly understand 26 | * the generated Javacc an JJTree class hierarchy. 27 | * 28 | * The supported asn.1 data types in this project are : 29 | * CHOICE, SEQUENCE, SEQUENCE OF, SET, SET OF, BOOLEAN, INTEGER, ANY, BIT STRING, 30 | * IA5String, Null, OBJECT IDENTIFIER, OCTET STRING, PRINTABLE STRING, 31 | * UTCTime and ENUMERATED. 32 | * 33 | * Contact Fatih Batuk at fatih_batuk@yahoo.com 34 | */ 35 | 36 | import com.chaosinmotion.asn1.*; 37 | 38 | import java.io.IOException; 39 | 40 | /** 41 | * Represents asn.1 Enumerated object. 42 | * @author Fatih Batuk 43 | * 44 | */ 45 | public class Enumerated extends BerEnumerated { 46 | 47 | public Enumerated () { 48 | super(); 49 | isInitialized = false; 50 | } 51 | 52 | public Enumerated(long value) 53 | { 54 | super(value); 55 | isInitialized = true; 56 | } 57 | 58 | public Enumerated (String name) 59 | { 60 | super(); 61 | setName(name); 62 | isInitialized = false; 63 | } 64 | 65 | public 66 | Enumerated(String name, long value) 67 | { 68 | super(value); 69 | setName(name); 70 | isInitialized = true; 71 | } 72 | 73 | /** 74 | * to encode this Enumerated value in BER 75 | */ 76 | public void encode(BerOutputStream out) throws IOException 77 | { 78 | writeElement(out); 79 | } 80 | 81 | /** 82 | * To decode a BER encoded Byte value to a BerEnumerated automatically.. 83 | * @param parser 84 | * @param in 85 | * @throws IOException 86 | */ 87 | public void 88 | decode(BerInputStream in) throws IOException 89 | { 90 | int tag = in.readBerTag(); 91 | 92 | if (tag != getTag()) 93 | throw new AsnFatalException("\n >> During decoding, the encoded tag value in the byte array does not match with this object's tag number ! "); 94 | 95 | readElement(in); 96 | 97 | } 98 | 99 | } 100 | -------------------------------------------------------------------------------- /src/main/java/com/turkcelltech/jac/JacConstruct.java: -------------------------------------------------------------------------------- 1 | package com.turkcelltech.jac; 2 | 3 | import java.io.IOException; 4 | 5 | import com.chaosinmotion.asn1.BerInputStream; 6 | 7 | /** 8 | * this interface is implemented in Sequence, Set, SequenceOf and SetOf java classes. 9 | * @author Fatih Batuk 10 | */ 11 | 12 | public interface JacConstruct { 13 | 14 | /** 15 | * is used when decoding a constructed object (Sequence, Set, SequenceOf or SetOf or Choice) 16 | * after reading the asn1 tag number from the input stream 17 | * @param tag 18 | * @param in 19 | * @throws IOException 20 | */ 21 | public void readElement(int tag, BerInputStream in) throws IOException; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/turkcelltech/jac/Null.java: -------------------------------------------------------------------------------- 1 | package com.turkcelltech.jac; 2 | 3 | /* 4 | * created by Fatih Batuk on September, 2007. 5 | * 6 | * The classes of this package have a role between the parser generated classes 7 | * and W.Woody's asn.1 library. Our parser reads the asn.1 file and creates .java classes, 8 | * and the generated classes extend the related class of this package to use the asn.1 library for doing encoding/decoding. 9 | * The generation of classes is handled by a framework created by javacc. 10 | * The project "Arc" uses this framework to parse an asn.1 file. We have modified and used this framework. 11 | * Also we have made lots of important modifications in W.Woody's Library to integrate and combine library with the generated classes. 12 | * But we tried not to change the general hierarchy and usage of the library. 13 | * And all of these modifications are notified in the code. 14 | * 15 | * If you want to have a look at the pure versions of these seperate projects: 16 | * for ARC : 17 | * http://www.forge.com.au/Research/products/arc/arc.htm 18 | * for W.Woody's Library : 19 | * http://www.chaosinmotion.com/wiki/index.php?title=ASN.1_Library 20 | * 21 | * Take a look at the README.html file of the project. 22 | * If you want to have a look of the creation of .java classes take a look at the 23 | * ASTBuitinType.java class. And if you need supply of more asn.1 types, you may 24 | * try to modify this class, or whatever. However you should clearly understand 25 | * the generated Javacc an JJTree class hierarchy. 26 | * 27 | * The supported asn.1 data types in this project are : 28 | * CHOICE, SEQUENCE, SEQUENCE OF, SET, SET OF, BOOLEAN, INTEGER, ANY, BIT STRING, 29 | * IA5String, Null, OBJECT IDENTIFIER, OCTET STRING, PRINTABLE STRING, 30 | * UTCTime and ENUMERATED. 31 | * 32 | * Contact Fatih Batuk at fatih_batuk@yahoo.com 33 | */ 34 | 35 | import com.chaosinmotion.asn1.*; 36 | 37 | import java.io.IOException; 38 | 39 | /** 40 | * Represents asn.1 Null object. 41 | * @author Fatih Batuk 42 | * 43 | */ 44 | 45 | public class Null extends BerNull 46 | { 47 | public Null() { 48 | super(); 49 | isInitialized = true; 50 | } 51 | 52 | /** 53 | * Constructs an empty NULL with the given name. 54 | *

55 | * @param name if this object becomes a component in a 56 | * constructed type, this name can be used to retrieve 57 | * the object. 58 | */ 59 | public Null(String name) 60 | { 61 | super(); 62 | setName(name); 63 | isInitialized = true; 64 | } 65 | 66 | /** 67 | * to encode this null value in BER 68 | */ 69 | public void encode(BerOutputStream out) throws IOException 70 | { 71 | writeElement(out); 72 | } 73 | 74 | /** 75 | * To decode a BER encoded Byte value to a BerNull object.. 76 | * @param parser 77 | * @param in 78 | * @throws IOException 79 | */ 80 | public void 81 | decode(BerInputStream in) throws IOException 82 | { 83 | int tag = in.readBerTag(); 84 | 85 | if (tag != getTag()) 86 | throw new AsnFatalException("\n >> During decoding, the encoded tag value in the byte array does not match with this object's tag number ! "); 87 | 88 | readElement(in); 89 | } 90 | 91 | } 92 | 93 | -------------------------------------------------------------------------------- /src/main/java/com/turkcelltech/jac/ObjectID.java: -------------------------------------------------------------------------------- 1 | package com.turkcelltech.jac; 2 | 3 | /* 4 | * created by Fatih Batuk on September, 2007. 5 | * 6 | * The classes of this package have a role between the parser generated classes 7 | * and W.Woody's asn.1 library. Our parser reads the asn.1 file and creates .java classes, 8 | * and the generated classes extend the related class of this package to use the asn.1 library for doing encoding/decoding. 9 | * The generation of classes is handled by a framework created by javacc. 10 | * The project "Arc" uses this framework to parse an asn.1 file. We have modified and used this framework. 11 | * Also we have made lots of important modifications in W.Woody's Library to integrate and combine library with the generated classes. 12 | * But we tried not to change the general hierarchy and usage of the library. 13 | * And all of these modifications are notified in the code. 14 | * 15 | * If you want to have a look at the pure versions of these seperate projects: 16 | * for ARC : 17 | * http://www.forge.com.au/Research/products/arc/arc.htm 18 | * for W.Woody's Library : 19 | * http://www.chaosinmotion.com/wiki/index.php?title=ASN.1_Library 20 | * 21 | * Take a look at the README.html file of the project. 22 | * If you want to have a look of the creation of .java classes take a look at the 23 | * ASTBuitinType.java class. And if you need supply of more asn.1 types, you may 24 | * try to modify this class, or whatever. However you should clearly understand 25 | * the generated Javacc an JJTree class hierarchy. 26 | * 27 | * The supported asn.1 data types in this project are : 28 | * CHOICE, SEQUENCE, SEQUENCE OF, SET, SET OF, BOOLEAN, INTEGER, ANY, BIT STRING, 29 | * IA5String, Null, OBJECT IDENTIFIER, OCTET STRING, PRINTABLE STRING, 30 | * UTCTime and ENUMERATED. 31 | * 32 | * Contact Fatih Batuk at fatih_batuk@yahoo.com 33 | */ 34 | 35 | import com.chaosinmotion.asn1.*; 36 | 37 | import java.io.IOException; 38 | 39 | /** 40 | * Represents asn.1 Object Identifier object. 41 | * @author Fatih Batuk 42 | * 43 | */ 44 | public class ObjectID extends BerOID 45 | { 46 | 47 | /** 48 | * Construct an, anonymous empty OID. 49 | */ 50 | public 51 | ObjectID() 52 | { 53 | super(); 54 | isInitialized = false; 55 | } 56 | 57 | /** 58 | * Construct an empty OID with given name. 59 | *

60 | * @param name if this object becomes a component in a 61 | * constructed type, this name can be used to retrieve 62 | * the object. 63 | */ 64 | public 65 | ObjectID(String name) 66 | { 67 | super(); 68 | setName(name); 69 | isInitialized = false; 70 | } 71 | 72 | public 73 | ObjectID(long[] value) 74 | { 75 | super(value); 76 | isInitialized = true; 77 | } 78 | 79 | /** 80 | * Construct an OID with the given value and name. 81 | *

82 | * @param name if this object becomes a component in a 83 | * constructed type, this name can be used to retrieve 84 | * the object. 85 | *

86 | * @param value an array of long type numbers 87 | */ 88 | public 89 | ObjectID(String name, long[] value) 90 | { 91 | super(value); 92 | setName(name); 93 | isInitialized = true; 94 | } 95 | 96 | /** 97 | * to encode this OID value in BER 98 | */ 99 | public void encode(BerOutputStream out) throws IOException 100 | { 101 | writeElement(out); 102 | } 103 | 104 | /** 105 | * To decode a BER encoded Byte value to a BerOID.. 106 | * @param parser 107 | * @param in 108 | * @throws IOException 109 | */ 110 | public void 111 | decode(BerInputStream in) throws IOException 112 | { 113 | int tag = in.readBerTag(); 114 | 115 | if (tag != getTag()) 116 | throw new AsnFatalException("\n >> During decoding, the encoded tag value in the byte array does not match with this object's tag number ! "); 117 | 118 | readElement(in); 119 | 120 | } 121 | 122 | 123 | } 124 | 125 | -------------------------------------------------------------------------------- /src/main/java/com/turkcelltech/jac/OctetString.java: -------------------------------------------------------------------------------- 1 | package com.turkcelltech.jac; 2 | 3 | /* 4 | * created by Fatih Batuk on September, 2007. 5 | * 6 | * The classes of this package have a role between the parser generated classes 7 | * and W.Woody's asn.1 library. Our parser reads the asn.1 file and creates .java classes, 8 | * and the generated classes extend the related class of this package to use the asn.1 library for doing encoding/decoding. 9 | * The generation of classes is handled by a framework created by javacc. 10 | * The project "Arc" uses this framework to parse an asn.1 file. We have modified and used this framework. 11 | * Also we have made lots of important modifications in W.Woody's Library to integrate and combine library with the generated classes. 12 | * But we tried not to change the general hierarchy and usage of the library. 13 | * And all of these modifications are notified in the code. 14 | * 15 | * If you want to have a look at the pure versions of these seperate projects: 16 | * for ARC : 17 | * http://www.forge.com.au/Research/products/arc/arc.htm 18 | * for W.Woody's Library : 19 | * http://www.chaosinmotion.com/wiki/index.php?title=ASN.1_Library 20 | * 21 | * Take a look at the README.html file of the project. 22 | * If you want to have a look of the creation of .java classes take a look at the 23 | * ASTBuitinType.java class. And if you need supply of more asn.1 types, you may 24 | * try to modify this class, or whatever. However you should clearly understand 25 | * the generated Javacc an JJTree class hierarchy. 26 | * 27 | * The supported asn.1 data types in this project are : 28 | * CHOICE, SEQUENCE, SEQUENCE OF, SET, SET OF, BOOLEAN, INTEGER, ANY, BIT STRING, 29 | * IA5String, Null, OBJECT IDENTIFIER, OCTET STRING, PRINTABLE STRING, 30 | * UTCTime and ENUMERATED. 31 | * 32 | * Contact Fatih Batuk at fatih_batuk@yahoo.com 33 | */ 34 | 35 | import com.chaosinmotion.asn1.*; 36 | 37 | import java.io.IOException; 38 | 39 | /** 40 | * Represents asn.1 Octet String object. 41 | * 42 | * @author Fatih Batuk 43 | * 44 | */ 45 | public class OctetString extends BerOctetString 46 | { 47 | public 48 | OctetString() 49 | { 50 | super(); 51 | isInitialized = false; 52 | } 53 | 54 | public 55 | OctetString(String name) 56 | { 57 | super(); 58 | setName(name); 59 | isInitialized = false; 60 | } 61 | 62 | public 63 | OctetString( byte[] val) 64 | { 65 | super(val); 66 | isInitialized = true; 67 | } 68 | 69 | public 70 | OctetString(String name, byte[] val) 71 | { 72 | super(val); 73 | setName(name); 74 | isInitialized = true; 75 | } 76 | 77 | 78 | public void encode(BerOutputStream out) throws IOException 79 | { 80 | writeElement(out); 81 | } 82 | 83 | /** 84 | * To decode a BER encoded Byte array to a BerOctetString.. 85 | * @param parser 86 | * @param in 87 | * @throws IOException 88 | */ 89 | public void 90 | decode(BerInputStream in) throws IOException 91 | { 92 | int tag = in.readBerTag(); 93 | 94 | if (tag != getTag()) 95 | throw new AsnFatalException("\n >> During decoding, the encoded tag value in the byte array does not match with this object's tag number ! "); 96 | 97 | readElement(in); 98 | } 99 | 100 | } 101 | 102 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTAnyType.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTAnyType.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTAnyType extends SimpleNode { 7 | public ASTAnyType(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTAnyType(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=f4b3f705e34686c0be371d8ee688d6a9 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTAssignedIdentifier.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTAssignedIdentifier.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTAssignedIdentifier extends SimpleNode { 7 | public ASTAssignedIdentifier(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTAssignedIdentifier(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=84b639ddae6943234c4d97b20385be9d (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTAssignmentList.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTAssignmentList.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTAssignmentList extends SimpleNode { 7 | public ASTAssignmentList(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTAssignmentList(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=9f4b4602e2a78b5760a6c25413c7e4a0 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTBinaryString.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTBinaryString.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTBinaryString extends SimpleNode { 7 | public ASTBinaryString(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTBinaryString(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=2499b0491c583449cd41f6f5b93b2d83 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTBitStringType.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTBitStringType.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTBitStringType extends SimpleNode { 7 | public ASTBitStringType(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTBitStringType(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | /** Accept the visitor. **/ 16 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 17 | 18 | return 19 | visitor.visit(this, data); 20 | } 21 | 22 | public void generateClass(String name) { 23 | generateClass( name, "bitstring" ); 24 | } 25 | } 26 | /* JavaCC - OriginalChecksum=baa48daa5457b4f4d6f9c8aa28089d53 (do not edit this line) */ 27 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTBooleanType.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTBooleanType.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTBooleanType extends SimpleNode { 7 | public ASTBooleanType(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTBooleanType(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=c46e285d0ef32aeabf66c1a359e52a31 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTBooleanValue.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTBooleanValue.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTBooleanValue extends SimpleNode { 7 | public ASTBooleanValue(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTBooleanValue(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=c1f56e6f5bea81e6e4b75dae9dfcfa7b (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTBuiltinValue.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTBuiltinValue.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTBuiltinValue extends SimpleNode { 7 | public ASTBuiltinValue(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTBuiltinValue(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=25eef4587cdb8f50ceec61c6e362d475 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTCharString.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTCharString.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTCharString extends SimpleNode { 7 | public ASTCharString(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTCharString(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=fcfd0bdfe57d644630fb1e539d92c106 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTChoiceType.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTChoiceType.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTChoiceType extends SimpleNode { 7 | public ASTChoiceType(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTChoiceType(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | /** 16 | * Creates the source file for the named class, extending the Choice 17 | * class. 18 | *

19 | * This method must read through the elements of the choice and 20 | * create attributes in the class being generated for each. It must also 21 | * create a setUpElements method that sets all the tagging information. 22 | * 23 | */ 24 | public void 25 | generateClass(String name) 26 | { 27 | generateClass( name, "choice" ); 28 | } 29 | 30 | /** Accept the visitor. **/ 31 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 32 | 33 | return 34 | visitor.visit(this, data); 35 | } 36 | } 37 | /* JavaCC - OriginalChecksum=c21c1f504b2a4ee2f58d9265e8ae4622 (do not edit this line) */ 38 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTClass.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTClass.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public class ASTClass extends SimpleNode { 6 | 7 | private int tc = ASTTaggedType.CONTEXT; 8 | 9 | public void 10 | setTagClass(int x) 11 | { 12 | tc = x; 13 | } 14 | 15 | public int 16 | getTagClass() 17 | { 18 | return tc; 19 | } 20 | 21 | public ASTClass(int id) { 22 | super(id); 23 | } 24 | 25 | public ASTClass(AsnParser p, int id) { 26 | super(p, id); 27 | } 28 | 29 | 30 | /** Accept the visitor. **/ 31 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 32 | 33 | return 34 | visitor.visit(this, data); 35 | } 36 | } 37 | /* JavaCC - OriginalChecksum=4707e764a373a498e5868ca872a44345 (do not edit this line) */ 38 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTClassNumber.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTClassNumber.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public class ASTClassNumber extends SimpleNode { 6 | int tagNumber = -1; 7 | 8 | public void 9 | setTagNumber(int x) 10 | { 11 | tagNumber = x; 12 | } 13 | 14 | public int 15 | getTagNumber() 16 | { 17 | return tagNumber; 18 | } 19 | 20 | public ASTClassNumber(int id) { 21 | super(id); 22 | } 23 | 24 | public ASTClassNumber(AsnParser p, int id) { 25 | super(p, id); 26 | } 27 | 28 | 29 | /** Accept the visitor. **/ 30 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 31 | 32 | return 33 | visitor.visit(this, data); 34 | } 35 | } 36 | /* JavaCC - OriginalChecksum=e756b84a2733d6b31b40cc29f74500d0 (do not edit this line) */ 37 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTComponentsType.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTComponentsType.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTComponentsType extends SimpleNode { 7 | public ASTComponentsType(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTComponentsType(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=81899cfc0b4da1eb1c7d8f4065f8f020 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTCompoundValue.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTCompoundValue.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTCompoundValue extends SimpleNode { 7 | public ASTCompoundValue(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTCompoundValue(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=d6ea09d51658763d82ae506dcb9fd3ff (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTConstraint.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTConstraint.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTConstraint extends SimpleNode { 7 | public ASTConstraint(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTConstraint(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=9e8279496df62759789d43f52417f28b (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTContainedSubtype.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTContainedSubtype.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTContainedSubtype extends SimpleNode { 7 | public ASTContainedSubtype(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTContainedSubtype(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=e0fdf96be45020875d54837b78318b5a (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTDefinedMacroName.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTDefinedMacroName.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTDefinedMacroName extends SimpleNode { 7 | public ASTDefinedMacroName(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTDefinedMacroName(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=573b039f121501c05f2955fa62df60c7 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTDefinedMacroType.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTDefinedMacroType.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTDefinedMacroType extends SimpleNode { 7 | public ASTDefinedMacroType(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTDefinedMacroType(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=be9dd9b1ff6899936f6973b6c682ecd3 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTDefinedType.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTDefinedType.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | import java.io.IOException; 6 | import java.io.OutputStream; 7 | 8 | public class ASTDefinedType extends SimpleNode { 9 | 10 | /** 11 | * Assumes there is child of type "typereference". 12 | */ 13 | public String getClassName() 14 | { 15 | for(int i = 0; i < jjtGetNumChildren(); i++) 16 | { 17 | Node n = jjtGetChild(i); 18 | if(n instanceof ASTtypereference != true) 19 | continue; 20 | 21 | return ((ASTtypereference)n).getClassName().replace('-', '_'); 22 | } 23 | 24 | return null; 25 | } 26 | 27 | public String getBaseClassName() 28 | { 29 | StringBuilder retVal = new StringBuilder(); 30 | for(int i = 0; i < jjtGetNumChildren(); i++) 31 | { 32 | Node n = jjtGetChild(i); 33 | if (n instanceof ASTmodulereference) { 34 | if(AsnParser.outputPackage != null) { 35 | retVal.append( AsnParser.outputPackage + "." ); 36 | } 37 | retVal.append(((ASTmodulereference)n).jjtGetFirstToken().image.toLowerCase() + "."); 38 | } 39 | 40 | if(n instanceof ASTtypereference != true) 41 | continue; 42 | 43 | retVal.append ( ((ASTtypereference)n).getClassName().replace('-','_')); 44 | return retVal.toString(); 45 | } 46 | 47 | return null; 48 | } 49 | 50 | public String 51 | getType() 52 | { 53 | for(int i = 0; i < jjtGetNumChildren(); i++) 54 | { 55 | Node n = jjtGetChild(i); 56 | if(n instanceof ASTtypereference != true) 57 | continue; 58 | 59 | return ((SimpleNode)n).jjtGetFirstToken().image.replace('-', '_'); 60 | } 61 | 62 | return null; 63 | } 64 | 65 | @Override 66 | protected boolean generateClassDirectiveText( OutputStream outputStream, String directiveName, StringBuffer line) throws IOException { 67 | boolean returnValue = false; 68 | if(directiveName.equals("baseclass")) // replace with the base class name 69 | { 70 | int idx = line.indexOf("@"); 71 | String left = line.substring(0, idx); 72 | int ndx = line.indexOf("@", idx + 1); 73 | String right = line.substring(ndx + 1); 74 | // replace the contents 75 | line.setLength(0); 76 | line.append(left + getBaseClassName() + right); 77 | returnValue = true; 78 | } 79 | return returnValue; 80 | } 81 | 82 | public void 83 | createClass(String name) 84 | { 85 | generateClass(name,"definedtype"); 86 | } 87 | 88 | public ASTDefinedType(int id) { 89 | super(id); 90 | } 91 | 92 | public ASTDefinedType(AsnParser p, int id) { 93 | super(p, id); 94 | } 95 | 96 | 97 | /** Accept the visitor. **/ 98 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 99 | 100 | return 101 | visitor.visit(this, data); 102 | } 103 | } 104 | /* JavaCC - OriginalChecksum=773bfe1618eacaaa7ac5bd296ec41d4c (do not edit this line) */ 105 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTDefinedValue.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTDefinedValue.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTDefinedValue extends SimpleNode { 7 | public ASTDefinedValue(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTDefinedValue(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=102d35d77c6d26190d1fce71e4d94809 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTDisplayHint.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTDisplayHint.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTDisplayHint extends SimpleNode { 7 | public ASTDisplayHint(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTDisplayHint(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=7a14d7d6648d493d1884cf79eb71332d (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTEnumeratedType.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTEnumeratedType.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTEnumeratedType extends SimpleNode { 7 | public ASTEnumeratedType(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTEnumeratedType(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=92eb9bc0a0b03106d9cc080ff11a46e4 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTEnumerationItem.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTEnumerationItem.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTEnumerationItem extends SimpleNode { 7 | public ASTEnumerationItem(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTEnumerationItem(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=0caca1fb820bd342872ff59a8e67171b (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTEnumerationList.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTEnumerationList.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTEnumerationList extends SimpleNode { 7 | public ASTEnumerationList(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTEnumerationList(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=69adc28a138b992f8888f7a6433866f8 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTExportSymbolList.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTExportSymbolList.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTExportSymbolList extends SimpleNode { 7 | public ASTExportSymbolList(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTExportSymbolList(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=3aac21e92c7e69f95ce57f9d451a0557 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTExports.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTExports.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTExports extends SimpleNode { 7 | public ASTExports(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTExports(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=e8950aa0fa587ac74478be932b1c9175 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTHexString.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTHexString.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTHexString extends SimpleNode { 7 | public ASTHexString(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTHexString(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=6fcf942923a24f0271c79dc69d84a216 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTImports.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTImports.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTImports extends SimpleNode { 7 | public ASTImports(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTImports(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=c1668cdaf27cf08e00d9c1392b2401da (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTInnerTypeConstraints.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTInnerTypeConstraints.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTInnerTypeConstraints extends SimpleNode { 7 | public ASTInnerTypeConstraints(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTInnerTypeConstraints(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=15c842a5b0455d3a5c04855c020d44ab (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTInput.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTInput.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTInput extends SimpleNode { 7 | public ASTInput(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTInput(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=c5afbd5b1ed30174018a906cd1f4758f (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTIntegerType.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTIntegerType.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTIntegerType extends SimpleNode { 7 | public ASTIntegerType(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTIntegerType(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=d559220a9642d69aa6fb243fec8e7722 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTMacroBody.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTMacroBody.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTMacroBody extends SimpleNode { 7 | public ASTMacroBody(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTMacroBody(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=0233d71f5336ff48d1138d48e9f51e7b (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTMacroDefinition.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTMacroDefinition.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTMacroDefinition extends SimpleNode { 7 | public ASTMacroDefinition(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTMacroDefinition(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=a993b76098224db54db64f1989884159 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTMacroReference.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTMacroReference.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTMacroReference extends SimpleNode { 7 | public ASTMacroReference(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTMacroReference(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=53b67edacd34125b0ca73eccfd9268fa (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTModuleBody.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTModuleBody.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTModuleBody extends SimpleNode { 7 | public ASTModuleBody(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTModuleBody(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=2835387b27749c8b1db2923515335da4 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTModuleDefinition.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTModuleDefinition.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTModuleDefinition extends SimpleNode { 7 | public ASTModuleDefinition(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTModuleDefinition(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | @Override 16 | public String getModuleId(){ 17 | if (moduleId == null) { 18 | for (int i = 0; i < children.length; ++i) { 19 | SimpleNode n = (SimpleNode)children[i]; 20 | if (n instanceof ASTModuleIdentifier) { 21 | moduleId = n.jjtGetFirstToken().image; 22 | } 23 | } 24 | } 25 | return moduleId; 26 | } 27 | 28 | /** Accept the visitor. **/ 29 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 30 | 31 | return 32 | visitor.visit(this, data); 33 | } 34 | } 35 | /* JavaCC - OriginalChecksum=c09c4255e1c7b0fe76d205612a6c3383 (do not edit this line) */ 36 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTModuleIdentifier.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTModuleIdentifier.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTModuleIdentifier extends SimpleNode { 7 | public ASTModuleIdentifier(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTModuleIdentifier(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=6cd40c7f9b40e2d9c9b0db84e18a0719 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTMultipleTypeConstraints.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTMultipleTypeConstraints.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTMultipleTypeConstraints extends SimpleNode { 7 | public ASTMultipleTypeConstraints(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTMultipleTypeConstraints(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=bdc225499be8e09a8257fb9c2dfe5b07 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTNameAndNumberForm.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTNameAndNumberForm.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTNameAndNumberForm extends SimpleNode { 7 | public ASTNameAndNumberForm(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTNameAndNumberForm(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=c01bb909fe05c0750808b048d40b4b9f (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTNamedConstraint.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTNamedConstraint.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTNamedConstraint extends SimpleNode { 7 | public ASTNamedConstraint(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTNamedConstraint(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=781846eb8fc3599fe8af8ad970cfafaf (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTNamedNumber.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTNamedNumber.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTNamedNumber extends SimpleNode { 7 | public ASTNamedNumber(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTNamedNumber(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=f39b67db313c36ca1d5af7a372d52717 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTNamedNumberList.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTNamedNumberList.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTNamedNumberList extends SimpleNode { 7 | public ASTNamedNumberList(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTNamedNumberList(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=57bba68513e7bddd324cd3364d7dc3f2 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTNamedValue.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTNamedValue.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTNamedValue extends SimpleNode { 7 | public ASTNamedValue(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTNamedValue(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=adf0fc6baaacf3c6a286c265615bf867 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTNullType.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTNullType.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTNullType extends SimpleNode { 7 | public ASTNullType(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTNullType(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | public void 17 | generateClass(String name) 18 | { 19 | generateClass( name, "null"); 20 | } 21 | 22 | /////////////////////////////////////// 23 | 24 | 25 | /** Accept the visitor. **/ 26 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 27 | 28 | return 29 | visitor.visit(this, data); 30 | } 31 | } 32 | /* JavaCC - OriginalChecksum=049efd6d5de3969d97fe1d113f09a118 (do not edit this line) */ 33 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTNullValue.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTNullValue.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTNullValue extends SimpleNode { 7 | public ASTNullValue(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTNullValue(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=2b9129b9b9cffe180a6e5b201ae49ef7 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTNumberForm.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTNumberForm.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTNumberForm extends SimpleNode { 7 | public ASTNumberForm(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTNumberForm(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=c7edbf2635ec49829420c43903b9f98d (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTObjIdComponent.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTObjIdComponent.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTObjIdComponent extends SimpleNode { 7 | public ASTObjIdComponent(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTObjIdComponent(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=9a20a39e1bf4c16bd8241db48cdf15a1 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTObjIdComponentList.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTObjIdComponentList.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTObjIdComponentList extends SimpleNode { 7 | public ASTObjIdComponentList(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTObjIdComponentList(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=9bef5a1ed690ee626889406509b13d0e (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTObjectIdentifierType.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTObjectIdentifierType.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTObjectIdentifierType extends SimpleNode { 7 | public ASTObjectIdentifierType(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTObjectIdentifierType(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | public void 16 | generateClass(String name) 17 | { 18 | generateClass(name,"objectid"); 19 | } 20 | 21 | /** Accept the visitor. **/ 22 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 23 | 24 | return 25 | visitor.visit(this, data); 26 | } 27 | } 28 | /* JavaCC - OriginalChecksum=25d03b117c61ffe56c4c97bbd9dffdc0 (do not edit this line) */ 29 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTObjectIdentifierValue.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTObjectIdentifierValue.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTObjectIdentifierValue extends SimpleNode { 7 | public ASTObjectIdentifierValue(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTObjectIdentifierValue(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=bc91b55788d4be9857477d8563a7928e (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTOctetStringType.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTOctetStringType.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTOctetStringType extends SimpleNode { 7 | public ASTOctetStringType(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTOctetStringType(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=d01dd5094503b2561bf9e3bc8b3ac4f8 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTPermittedAlphabet.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTPermittedAlphabet.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTPermittedAlphabet extends SimpleNode { 7 | public ASTPermittedAlphabet(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTPermittedAlphabet(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=3d64c3ff0aa9114af18797b19de44faf (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTPresenceConstraint.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTPresenceConstraint.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTPresenceConstraint extends SimpleNode { 7 | public ASTPresenceConstraint(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTPresenceConstraint(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=343b8de44a487d0d9e5d9cb962d4afa3 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTSelectionType.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTSelectionType.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTSelectionType extends SimpleNode { 7 | public ASTSelectionType(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTSelectionType(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=be8e33923ec67ac1ceeafb482f457563 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTSignedNumber.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTSignedNumber.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTSignedNumber extends SimpleNode { 7 | public ASTSignedNumber(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTSignedNumber(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=fac5ebe810c886d1b2c1ee72999f1c8f (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTSingleTypeConstraint.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTSingleTypeConstraint.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTSingleTypeConstraint extends SimpleNode { 7 | public ASTSingleTypeConstraint(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTSingleTypeConstraint(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=062ea9d2682435ea474b6fc3bbc90744 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTSingleValue.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTSingleValue.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTSingleValue extends SimpleNode { 7 | public ASTSingleValue(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTSingleValue(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=25f0efe49a27cd9e3619674efa2931ad (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTSizeConstraint.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTSizeConstraint.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTSizeConstraint extends SimpleNode { 7 | public ASTSizeConstraint(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTSizeConstraint(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=0387c21444a57ba6c1029d881b051ee1 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTSnmpAccess.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTSnmpAccess.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTSnmpAccess extends SimpleNode { 7 | public ASTSnmpAccess(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTSnmpAccess(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=ab4e9d1836498d21dff8091993ad63b2 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTSnmpDefValPart.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTSnmpDefValPart.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTSnmpDefValPart extends SimpleNode { 7 | public ASTSnmpDefValPart(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTSnmpDefValPart(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=838bc9eeb12934f07fab214881414dbd (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTSnmpDescrPart.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTSnmpDescrPart.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTSnmpDescrPart extends SimpleNode { 7 | public ASTSnmpDescrPart(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTSnmpDescrPart(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=d45381e9f264cb9a7f742ce7850c406c (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTSnmpIndexPart.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTSnmpIndexPart.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTSnmpIndexPart extends SimpleNode { 7 | public ASTSnmpIndexPart(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTSnmpIndexPart(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=aee6cbfae00c64b9384ac6238c0280ae (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTSnmpObjectTypeMacroType.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTSnmpObjectTypeMacroType.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTSnmpObjectTypeMacroType extends SimpleNode { 7 | public ASTSnmpObjectTypeMacroType(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTSnmpObjectTypeMacroType(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=2a892e087ee61acbc7670f7a342c9b8a (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTSnmpReferPart.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTSnmpReferPart.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTSnmpReferPart extends SimpleNode { 7 | public ASTSnmpReferPart(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTSnmpReferPart(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=aa69f0423943202e75e252c84db18402 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTSnmpStatus.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTSnmpStatus.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTSnmpStatus extends SimpleNode { 7 | public ASTSnmpStatus(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTSnmpStatus(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=8cc355aa3fd72fd80764b3fe463f2297 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTSpecialRealValue.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTSpecialRealValue.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTSpecialRealValue extends SimpleNode { 7 | public ASTSpecialRealValue(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTSpecialRealValue(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=5786cca64c30637f1cfdc63fa5c5075b (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTSubtypeSpec.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTSubtypeSpec.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTSubtypeSpec extends SimpleNode { 7 | public ASTSubtypeSpec(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTSubtypeSpec(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=48b6637fdd86f971e7dada43cf7c8684 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTSubtypeValueSet.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTSubtypeValueSet.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTSubtypeValueSet extends SimpleNode { 7 | public ASTSubtypeValueSet(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTSubtypeValueSet(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=3f6c6a129ceddebcda604cc61d5d2617 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTSubtypeValueSetList.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTSubtypeValueSetList.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTSubtypeValueSetList extends SimpleNode { 7 | public ASTSubtypeValueSetList(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTSubtypeValueSetList(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=1ad8644e90f6d4206f0952f7083454b1 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTSymbol.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTSymbol.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTSymbol extends SimpleNode { 7 | public ASTSymbol(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTSymbol(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=a20ad0040a1c40c793c96cc856c1b312 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTSymbolList.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTSymbolList.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTSymbolList extends SimpleNode { 7 | public ASTSymbolList(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTSymbolList(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=cdacaa00cdbf790053a28614d2884bfc (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTSymbolsExported.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTSymbolsExported.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTSymbolsExported extends SimpleNode { 7 | public ASTSymbolsExported(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTSymbolsExported(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=ab9ddb80fb7ed9ff694c3c86cf9a472c (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTSymbolsFromModule.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTSymbolsFromModule.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTSymbolsFromModule extends SimpleNode { 7 | public ASTSymbolsFromModule(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTSymbolsFromModule(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=1f2d35fd3c0e51f4b0c1f3eff0350148 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTSymbolsFromModuleList.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTSymbolsFromModuleList.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTSymbolsFromModuleList extends SimpleNode { 7 | public ASTSymbolsFromModuleList(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTSymbolsFromModuleList(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=0269c3a00848601c4109098da1d64199 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTSymbolsImported.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTSymbolsImported.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTSymbolsImported extends SimpleNode { 7 | public ASTSymbolsImported(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTSymbolsImported(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=5e04f27803e95876b3ce3ad7961dc387 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTTag.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTTag.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public class ASTTag extends SimpleNode { 6 | 7 | public int 8 | getTagNumber() 9 | { 10 | int numChildren = jjtGetNumChildren(); 11 | for(int i = 0; i < numChildren; i++) 12 | { 13 | SimpleNode n = (SimpleNode)jjtGetChild(i); 14 | if(n instanceof ASTClassNumber) 15 | return ((ASTClassNumber)n).getTagNumber(); 16 | } 17 | 18 | return -1; 19 | } 20 | 21 | public int 22 | getTagClass() 23 | { 24 | int numChildren = jjtGetNumChildren(); 25 | for(int i = 0; i < numChildren; i++) 26 | { 27 | SimpleNode n = (SimpleNode)jjtGetChild(i); 28 | if(n instanceof ASTClass) 29 | return ((ASTClass)n).getTagClass(); 30 | } 31 | 32 | return ASTTaggedType.CONTEXT; 33 | } 34 | 35 | public ASTTag(int id) { 36 | super(id); 37 | } 38 | 39 | public ASTTag(AsnParser p, int id) { 40 | super(p, id); 41 | } 42 | 43 | 44 | /** Accept the visitor. **/ 45 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 46 | 47 | return 48 | visitor.visit(this, data); 49 | } 50 | } 51 | /* JavaCC - OriginalChecksum=4bdc3afce47bf7d2f6e15c529a90ec8d (do not edit this line) */ 52 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTTagDefault.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTTagDefault.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTTagDefault extends SimpleNode { 7 | public ASTTagDefault(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTTagDefault(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=4588ef44c48fba43e143070700a3550f (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTTaggedType.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTTaggedType.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public class ASTTaggedType extends SimpleNode { 6 | 7 | public static final int IMPLICIT = 0; 8 | public static final int EXPLICIT = 1; 9 | 10 | public static final int CONTEXT = 0; 11 | public static final int UNIVERSAL = 1; 12 | public static final int APPLICATION = 2; 13 | public static final int PRIVATE = 3; 14 | 15 | private int tm = IMPLICIT; 16 | 17 | public void 18 | setTaggingMethod(int tm) 19 | { 20 | this.tm = tm; 21 | } 22 | 23 | public int 24 | getTaggingMethod() 25 | { 26 | return tm; 27 | } 28 | 29 | public int 30 | getTagNumber() 31 | { 32 | int numChildren = jjtGetNumChildren(); 33 | for(int i = 0; i < numChildren; i++) 34 | { 35 | SimpleNode n = (SimpleNode)jjtGetChild(i); 36 | if(n instanceof ASTTag) 37 | return ((ASTTag)n).getTagNumber(); 38 | } 39 | 40 | return -1; 41 | } 42 | 43 | public int 44 | getTagClass() 45 | { 46 | int numChildren = jjtGetNumChildren(); 47 | for(int i = 0; i < numChildren; i++) 48 | { 49 | SimpleNode n = (SimpleNode)jjtGetChild(i); 50 | if(n instanceof ASTTag) 51 | return ((ASTTag)n).getTagClass(); 52 | } 53 | 54 | return ASTTaggedType.CONTEXT; 55 | } 56 | 57 | public String 58 | getClassName() 59 | { 60 | for(int i = 0; i < jjtGetNumChildren(); i++) 61 | { 62 | Node n = jjtGetChild(i); 63 | if(n instanceof ASTDefinedType == true) 64 | { 65 | return ((ASTDefinedType)n).getClassName(); 66 | } 67 | 68 | if(n instanceof ASTBuiltinType == true) 69 | { 70 | return ((ASTBuiltinType)n).getClassName(); 71 | } 72 | } 73 | 74 | return null; 75 | } 76 | 77 | 78 | public ASTTaggedType(int id) { 79 | super(id); 80 | } 81 | 82 | public ASTTaggedType(AsnParser p, int id) { 83 | super(p, id); 84 | } 85 | 86 | 87 | /** Accept the visitor. **/ 88 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 89 | 90 | return 91 | visitor.visit(this, data); 92 | } 93 | } 94 | /* JavaCC - OriginalChecksum=0d21959eecd393b85da312035bf7a8e2 (do not edit this line) */ 95 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTTextualConventionMacroType.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTTextualConventionMacroType.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTTextualConventionMacroType extends SimpleNode { 7 | public ASTTextualConventionMacroType(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTTextualConventionMacroType(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=1eb97aec360e93925ec983ba860aacc8 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTTypeAssignment.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTTypeAssignment.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTTypeAssignment extends SimpleNode { 7 | public ASTTypeAssignment(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTTypeAssignment(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=c7b53efbddcd08baa8b28d32e1ac9627 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTTypeConstraints.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTTypeConstraints.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTTypeConstraints extends SimpleNode { 7 | public ASTTypeConstraints(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTTypeConstraints(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=a22a53917b83f1363161fc3b0a18c5c0 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTTypeOrValue.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTTypeOrValue.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTTypeOrValue extends SimpleNode { 7 | public ASTTypeOrValue(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTTypeOrValue(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=791d308d884c74de410aa10c6e555ca8 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTTypeOrValueList.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTTypeOrValueList.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTTypeOrValueList extends SimpleNode { 7 | public ASTTypeOrValueList(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTTypeOrValueList(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=c6fa2aedee3d7f894d468b30413b285e (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTValue.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTValue.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTValue extends SimpleNode { 7 | public ASTValue(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTValue(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=9c0c424e12913938554c3084d1aea378 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTValueAssignment.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTValueAssignment.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTValueAssignment extends SimpleNode { 7 | public ASTValueAssignment(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTValueAssignment(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=44971cd7ce9a0158d3e9bafed8fc6f30 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTValueConstraint.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTValueConstraint.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTValueConstraint extends SimpleNode { 7 | public ASTValueConstraint(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTValueConstraint(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=3a316856097a0f08ee5b4ab09fd444b7 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTValueRange.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTValueRange.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTValueRange extends SimpleNode { 7 | public ASTValueRange(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTValueRange(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=a7b3f2359a7ed30b31ee007cbc1d971f (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTidentifier.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTidentifier.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTidentifier extends SimpleNode { 7 | public ASTidentifier(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTidentifier(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=239fd564425ad3b3d955f886cf053b84 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTmodulereference.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTmodulereference.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTmodulereference extends SimpleNode { 7 | public ASTmodulereference(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTmodulereference(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=f0e08cfc42c66a2a788399377e42f8e1 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTnumber.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTnumber.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTnumber extends SimpleNode { 7 | public ASTnumber(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTnumber(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=1211c8aa6e04bee993e437770de0b763 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTskip_to_matching_brace.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTskip_to_matching_brace.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTskip_to_matching_brace extends SimpleNode { 7 | public ASTskip_to_matching_brace(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTskip_to_matching_brace(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | /** Accept the visitor. **/ 17 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 18 | 19 | return 20 | visitor.visit(this, data); 21 | } 22 | } 23 | /* JavaCC - OriginalChecksum=948a09f26f59aa86ccc73e6f5abfb2d8 (do not edit this line) */ 24 | -------------------------------------------------------------------------------- /src/main/java/javacc/ASTtypereference.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. ASTtypereference.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | public 6 | class ASTtypereference extends SimpleNode { 7 | public ASTtypereference(int id) { 8 | super(id); 9 | } 10 | 11 | public ASTtypereference(AsnParser p, int id) { 12 | super(p, id); 13 | } 14 | 15 | 16 | public String 17 | toString() 18 | { 19 | return new String("typereference: " + jjtGetFirstToken().image); 20 | } 21 | 22 | public String 23 | getClassName() 24 | { 25 | return jjtGetFirstToken().image; 26 | } 27 | 28 | /** Accept the visitor. **/ 29 | public Object jjtAccept(AsnParserVisitor visitor, Object data) { 30 | 31 | return 32 | visitor.visit(this, data); 33 | } 34 | } 35 | /* JavaCC - OriginalChecksum=fbd7cdec59c0f23719c119368101ba49 (do not edit this line) */ 36 | -------------------------------------------------------------------------------- /src/main/java/javacc/JJTAsnParserState.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JavaCC: Do not edit this line. JJTAsnParserState.java Version 6.0_1 */ 2 | package javacc; 3 | 4 | public class JJTAsnParserState { 5 | private java.util.List nodes; 6 | private java.util.List marks; 7 | 8 | private int sp; // number of nodes on stack 9 | private int mk; // current mark 10 | private boolean node_created; 11 | 12 | public JJTAsnParserState() { 13 | nodes = new java.util.ArrayList(); 14 | marks = new java.util.ArrayList(); 15 | sp = 0; 16 | mk = 0; 17 | } 18 | 19 | /* Determines whether the current node was actually closed and 20 | pushed. This should only be called in the final user action of a 21 | node scope. */ 22 | public boolean nodeCreated() { 23 | return node_created; 24 | } 25 | 26 | /* Call this to reinitialize the node stack. It is called 27 | automatically by the parser's ReInit() method. */ 28 | public void reset() { 29 | nodes.clear(); 30 | marks.clear(); 31 | sp = 0; 32 | mk = 0; 33 | } 34 | 35 | /* Returns the root node of the AST. It only makes sense to call 36 | this after a successful parse. */ 37 | public Node rootNode() { 38 | return nodes.get(0); 39 | } 40 | 41 | /* Pushes a node on to the stack. */ 42 | public void pushNode(Node n) { 43 | nodes.add(n); 44 | ++sp; 45 | } 46 | 47 | /* Returns the node on the top of the stack, and remove it from the 48 | stack. */ 49 | public Node popNode() { 50 | if (--sp < mk) { 51 | mk = marks.remove(marks.size()-1); 52 | } 53 | return nodes.remove(nodes.size()-1); 54 | } 55 | 56 | /* Returns the node currently on the top of the stack. */ 57 | public Node peekNode() { 58 | return nodes.get(nodes.size()-1); 59 | } 60 | 61 | /* Returns the number of children on the stack in the current node 62 | scope. */ 63 | public int nodeArity() { 64 | return sp - mk; 65 | } 66 | 67 | 68 | public void clearNodeScope(Node n) { 69 | while (sp > mk) { 70 | popNode(); 71 | } 72 | mk = marks.remove(marks.size()-1); 73 | } 74 | 75 | 76 | public void openNodeScope(Node n) { 77 | marks.add(mk); 78 | mk = sp; 79 | n.jjtOpen(); 80 | } 81 | 82 | 83 | /* A definite node is constructed from a specified number of 84 | children. That number of nodes are popped from the stack and 85 | made the children of the definite node. Then the definite node 86 | is pushed on to the stack. */ 87 | public void closeNodeScope(Node n, int num) { 88 | mk = marks.remove(marks.size()-1); 89 | while (num-- > 0) { 90 | Node c = popNode(); 91 | c.jjtSetParent(n); 92 | n.jjtAddChild(c, num); 93 | } 94 | n.jjtClose(); 95 | pushNode(n); 96 | node_created = true; 97 | } 98 | 99 | 100 | /* A conditional node is constructed if its condition is true. All 101 | the nodes that have been pushed since the node was opened are 102 | made children of the conditional node, which is then pushed 103 | on to the stack. If the condition is false the node is not 104 | constructed and they are left on the stack. */ 105 | public void closeNodeScope(Node n, boolean condition) { 106 | if (condition) { 107 | int a = nodeArity(); 108 | mk = marks.remove(marks.size()-1); 109 | while (a-- > 0) { 110 | Node c = popNode(); 111 | c.jjtSetParent(n); 112 | n.jjtAddChild(c, a); 113 | } 114 | n.jjtClose(); 115 | pushNode(n); 116 | node_created = true; 117 | } else { 118 | mk = marks.remove(marks.size()-1); 119 | node_created = false; 120 | } 121 | } 122 | } 123 | /* JavaCC - OriginalChecksum=a0b71a839baf7ab2e5cfb43fc3c872a1 (do not edit this line) */ 124 | -------------------------------------------------------------------------------- /src/main/java/javacc/Node.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JJTree: Do not edit this line. Node.java Version 6.0 */ 2 | /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ 3 | package javacc; 4 | 5 | /* All AST nodes must implement this interface. It provides basic 6 | machinery for constructing the parent and child relationships 7 | between nodes. */ 8 | 9 | public 10 | interface Node { 11 | 12 | /** This method is called after the node has been made the current 13 | node. It indicates that child nodes can now be added to it. */ 14 | public void jjtOpen(); 15 | 16 | /** This method is called after all the child nodes have been 17 | added. */ 18 | public void jjtClose(); 19 | 20 | /** This pair of methods are used to inform the node of its 21 | parent. */ 22 | public void jjtSetParent(Node n); 23 | public Node jjtGetParent(); 24 | 25 | /** This method tells the node to add its argument to the node's 26 | list of children. */ 27 | public void jjtAddChild(Node n, int i); 28 | 29 | /** This method returns a child node. The children are numbered 30 | from zero, left to right. */ 31 | public Node jjtGetChild(int i); 32 | 33 | /** Return the number of children the node has. */ 34 | public int jjtGetNumChildren(); 35 | 36 | public int getId(); 37 | 38 | /** Accept the visitor. **/ 39 | public Object jjtAccept(AsnParserVisitor visitor, Object data); 40 | } 41 | /* JavaCC - OriginalChecksum=9f0f35f2dcca4e90b3a9f52062bb201b (do not edit this line) */ 42 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/templates/any.template: -------------------------------------------------------------------------------- 1 | @package@ 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.Any; 8 | //import com.chaosinmotion.asn1.Tag; 9 | 10 | public class @name@ extends Any 11 | { 12 | /* 13 | * To set your object you can call setValue(..) method. 14 | * To encode/decode your object, just call encode(..) decode(..) methods 15 | * See 'TestProject.java' in the project to examine encoding/decoding examples 16 | */ 17 | 18 | public 19 | @name@() 20 | { 21 | super(); 22 | } 23 | 24 | public 25 | @name@(String name) 26 | { 27 | super(name); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/templates/bitstring.template: -------------------------------------------------------------------------------- 1 | @package@ 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.BitString; 8 | import java.util.BitSet; 9 | //import com.chaosinmotion.asn1.Tag; 10 | 11 | 12 | public class @name@ extends BitString 13 | { 14 | /* 15 | * To set your object you can call setValue(..) method. 16 | * To encode/decode your object, just call encode(..) decode(..) methods 17 | * See 'TestProject.java' in the project to examine encoding/decoding examples 18 | */ 19 | 20 | /** 21 | * constructor to build uninitialized BitString 22 | */ 23 | public 24 | @name@() 25 | { 26 | super(); 27 | } 28 | 29 | /** 30 | * constructor to build uninitialized BitString 31 | */ 32 | public 33 | @name@(String name) 34 | { 35 | super(name); 36 | } 37 | 38 | /** 39 | * constructor to build initialized BitString 40 | */ 41 | public 42 | @name@(String name, BitSet value) 43 | { 44 | super(name, value); 45 | } 46 | 47 | /** 48 | * constructor to build initialized BitString 49 | */ 50 | public 51 | @name@(BitSet value) 52 | { 53 | super(value); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/templates/choice.template: -------------------------------------------------------------------------------- 1 | @package@ 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.*; 8 | import com.chaosinmotion.asn1.Tag; 9 | 10 | public class @name@ extends Choice 11 | { 12 | /** 13 | * For encoding, just call directly encode(..) method after after setting (initializing) only 1 element in your choice object. 14 | * 15 | * For decoding, just directly call decode(..) method. 16 | * You can call the method 'getCurrentChoice()' after decoding to learn which element is decoded from byte array inside choice record. 17 | * 18 | * See 'choice example' section in 'TestProject.java' in the project for encoding/decoding examples with Choice objects. 19 | */ 20 | 21 | @elements@ 22 | 23 | /** 24 | * constructor without a name 25 | */ 26 | public 27 | @name@() 28 | { 29 | super(); 30 | setUpElements(); 31 | } 32 | 33 | /** 34 | * constructor with a name 35 | */ 36 | public 37 | @name@(String name) 38 | { 39 | super(name); 40 | setUpElements(); 41 | } 42 | 43 | protected void 44 | setUpElements() 45 | { 46 | int tagNumber = 0; 47 | @setupelements@ 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/templates/choiceelement.template: -------------------------------------------------------------------------------- 1 | public static class @name@ extends Choice 2 | { 3 | /** 4 | * For encoding, just call directly encode(..) method after after setting (initializing) only 1 element in your choice object. 5 | * 6 | * For decoding, just directly call decode(..) method. 7 | * You can call the method 'getCurrentChoice()' after decoding to learn which element is decoded from byte array inside choice record. 8 | * 9 | * See 'choice example' section in 'TestProject.java' in the project for encoding/decoding examples with Choice objects. 10 | */ 11 | 12 | @elements@ 13 | 14 | /** 15 | * constructor without a name 16 | */ 17 | public 18 | @name@() 19 | { 20 | super(); 21 | setUpElements(); 22 | } 23 | 24 | /** 25 | * constructor with a name 26 | */ 27 | public 28 | @name@(String name) 29 | { 30 | super(name); 31 | setUpElements(); 32 | } 33 | 34 | protected void 35 | setUpElements() 36 | { 37 | int tagNumber = 0; 38 | @setupelements@ 39 | } 40 | 41 | @elementclasses@ 42 | } 43 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/templates/definedtype.template: -------------------------------------------------------------------------------- 1 | @package@ 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.*; 8 | //import com.chaosinmotion.asn1.Tag; 9 | 10 | public class @name@ extends @baseclass@ 11 | { 12 | /** 13 | * This is a "defined type" class. To initialize your object your should 14 | * call setValue() method. You can not initialize it by constructor. 15 | * To encode/decode your object, just call encode(..) decode(..) methods. 16 | * See 'TestProject.java' in the project to examine encoding/decoding examples 17 | */ 18 | 19 | /** 20 | * constructor to build uninitialized object 21 | */ 22 | public 23 | @name@() 24 | { 25 | super(); 26 | } 27 | 28 | /** 29 | * constructor to build uninitialized object 30 | */ 31 | public 32 | @name@(String name) 33 | { 34 | super(name); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/templates/integer.template: -------------------------------------------------------------------------------- 1 | @package@ 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.ASN1Integer; 8 | //import com.chaosinmotion.asn1.Tag; 9 | 10 | 11 | public class @name@ extends ASN1Integer 12 | { 13 | /** 14 | * If you have any constraint below, you must obey to the constraints. 15 | * If you do not consider the constraints when setting your element, you will get exception. 16 | * 17 | * To set your object, you can call setValue(..) method. 18 | * To encode/decode your object, just call encode(..) decode(..) methods 19 | * See 'TestProject.java' in the project to examine encoding/decoding examples 20 | */ 21 | 22 | @constraints@ 23 | 24 | /** 25 | * asn.1 INTEGER constructor to create "uninitialized" object. 26 | * setValue() method can be called to set the value of the integer. 27 | */ 28 | public 29 | @name@() 30 | { 31 | @constructor@ 32 | } 33 | 34 | /** 35 | * asn.1 INTEGER constructor to create "uninitialized" object. 36 | * setValue() method can be called to set the value of the integer. 37 | */ 38 | public 39 | @name@(String name) 40 | { 41 | @constructor@ 42 | setName(name); 43 | } 44 | 45 | /** 46 | * asn.1 INTEGER constructor to create "initialized" object. 47 | */ 48 | public 49 | @name@(long value) 50 | { 51 | @constructor@ 52 | setValue(value); 53 | } 54 | 55 | /** 56 | * constructor to build ASN1Integer with its value and name. 57 | */ 58 | public 59 | @name@(String name, long value) 60 | { 61 | @constructor@ 62 | setValue(value); 63 | setName(name); 64 | } 65 | 66 | /* 67 | * range constraint setter methods 68 | */ 69 | 70 | @methods@ 71 | } 72 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/templates/myEnum.template: -------------------------------------------------------------------------------- 1 | @package@ 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.Enumerated; 8 | //import com.chaosinmotion.asn1.Tag; 9 | 10 | 11 | public class @name@ extends Enumerated 12 | { 13 | /** 14 | * To set your ENUMERATED type, just call one of the "setTo_elementName()" methods. 15 | * To encode/decode your object, just call encode(..) decode(..) methods 16 | * See 'TestProject.java' in the project to examine encoding/decoding examples 17 | */ 18 | 19 | @elementsenum@ 20 | 21 | /** 22 | * constructs empty ENUMERATED object 23 | */ 24 | public 25 | @name@() 26 | { 27 | super(); 28 | } 29 | 30 | /** 31 | * constructs empty ENUMERATED object with its name. 32 | */ 33 | public 34 | @name@(String name) 35 | { 36 | super(name); 37 | } 38 | 39 | /** 40 | * if you want to set your ENUMERATED to a different undefined value, use this constructor. 41 | */ 42 | public 43 | @name@(long value) 44 | { 45 | super(value); 46 | } 47 | 48 | /** 49 | * if you want to set your ENUMERATED to a different undefined value, use this constructor. 50 | */ 51 | public 52 | @name@(String name, long value) 53 | { 54 | super(name, value); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/templates/null.template: -------------------------------------------------------------------------------- 1 | @package@ 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.Null; 8 | //import com.chaosinmotion.asn1.Tag; 9 | 10 | public class @name@ extends Null 11 | { 12 | /* 13 | * To set your object you can call "setValue(long[] value)" method. 14 | * To encode/decode your object, just call encode(..) decode(..) methods 15 | * See 'TestProject.java' in the project to examine encoding/decoding examples 16 | */ 17 | 18 | /** 19 | * constructor to create Null object 20 | */ 21 | public 22 | @name@() 23 | { 24 | super(); 25 | } 26 | 27 | /** 28 | * constructor to create Null object with name 29 | */ 30 | public 31 | @name@(String name) 32 | { 33 | super(name); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/templates/objectid.template: -------------------------------------------------------------------------------- 1 | @package@ 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.ObjectID; 8 | //import com.chaosinmotion.asn1.Tag; 9 | 10 | public class @name@ extends ObjectID 11 | { 12 | /* 13 | * To set your object you can call "setValue(long[] value)" method. 14 | * To encode/decode your object, just call encode(..) decode(..) methods 15 | * See 'TestProject.java' in the project to examine encoding/decoding examples 16 | */ 17 | 18 | /** 19 | * constructor to create "uninitialized" OID. 20 | */ 21 | public 22 | @name@() 23 | { 24 | super(); 25 | } 26 | 27 | /** 28 | * constructor to create "uninitialized" OID. 29 | */ 30 | public 31 | @name@(String name) 32 | { 33 | super(name); 34 | } 35 | 36 | /** 37 | * constructor to create "initialized" OID. 38 | */ 39 | public 40 | @name@(long[] value) 41 | { 42 | super(value); 43 | } 44 | 45 | /** 46 | * constructor to create "initialized" OID. 47 | */ 48 | public 49 | @name@(String name, long[] value) 50 | { 51 | super(name, value); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/templates/octetstring.template: -------------------------------------------------------------------------------- 1 | @package@ 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.OctetString; 8 | //import com.chaosinmotion.asn1.Tag; 9 | 10 | public class @name@ extends OctetString 11 | { 12 | /** 13 | * To set your object you can call the method: "setValue(byte[] array)" 14 | * To encode/decode your object, just call encode(..) decode(..) methods. 15 | * See 'TestProject.java' in the project to examine encoding/decoding examples 16 | */ 17 | 18 | /** 19 | * constructor to create "uninitialized" object. 20 | */ 21 | public 22 | @name@() 23 | { 24 | super(); 25 | } 26 | 27 | /** 28 | * constructor to create "uninitialized" object. 29 | */ 30 | public 31 | @name@(String name) 32 | { 33 | super(name); 34 | } 35 | 36 | /** 37 | * constructor to create "initialized" object. 38 | */ 39 | public 40 | @name@(byte[] value) 41 | { 42 | super(value); 43 | } 44 | 45 | /** 46 | * constructor to create "initialized" object with its name. 47 | */ 48 | public 49 | @name@(String name, byte[] value) 50 | { 51 | super(name, value); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/templates/sequence.template: -------------------------------------------------------------------------------- 1 | @package@ 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.*; 8 | 9 | public class @name@ extends Sequence 10 | { 11 | /** 12 | * if you want to set/fill an element below, just call the setValue(..) method over its instance. 13 | * 14 | * To encode/decode your object, just call encode(..) decode(..) methods. 15 | * See 'TestProject.java' in the project to examine encoding/decoding examples 16 | */ 17 | @elements@ 18 | 19 | /** 20 | * asn.1 SEQUENCE constructor 21 | */ 22 | public 23 | @name@() 24 | { 25 | super(); 26 | setUpElements(); 27 | } 28 | 29 | /** 30 | * asn.1 SEQUENCE constructor with its name 31 | */ 32 | public 33 | @name@(String name) 34 | { 35 | super(name); 36 | setUpElements(); 37 | } 38 | 39 | 40 | protected void 41 | setUpElements() 42 | { 43 | int tagNumber = 0; 44 | @setupelements@ 45 | } 46 | 47 | @accessor@ 48 | 49 | @elementclasses@ 50 | } 51 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/templates/sequenceelement.template: -------------------------------------------------------------------------------- 1 | public static class @name@ extends Sequence 2 | { 3 | /** 4 | * if you want to set/fill an element below, just call the setValue(..) method over its instance. 5 | * 6 | * To encode/decode your object, just call encode(..) decode(..) methods. 7 | * See 'TestProject.java' in the project to examine encoding/decoding examples 8 | */ 9 | @elements@ 10 | 11 | /** 12 | * asn.1 SEQUENCE constructor 13 | */ 14 | public 15 | @name@() 16 | { 17 | super(); 18 | setUpElements(); 19 | } 20 | 21 | /** 22 | * asn.1 SEQUENCE constructor with its name 23 | */ 24 | public 25 | @name@(String name) 26 | { 27 | super(name); 28 | setUpElements(); 29 | } 30 | 31 | 32 | protected void 33 | setUpElements() 34 | { 35 | int tagNumber = 0; 36 | @setupelements@ 37 | } 38 | 39 | @elementclasses@ 40 | } 41 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/templates/sequenceof.template: -------------------------------------------------------------------------------- 1 | @package@ 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.*; 8 | 9 | public class @name@ extends SequenceOf 10 | { 11 | /** 12 | * To add elements to your SequenceOf object, just call the addElement(..) method. 13 | * You can only add an element to your SequenceOf object if it is 14 | * an instance of the elementType defined in below constructors. 15 | * 16 | * To encode/decode your object, just call encode(..) decode(..) methods 17 | * See 'TestProject.java' in the project to examine encoding/decoding examples 18 | */ 19 | 20 | /** 21 | * Uninitialized SEQUENCE OF constructor 22 | */ 23 | public 24 | @name@() 25 | { 26 | super(new @elementtype@("@elementtype@")); 27 | } 28 | 29 | /** 30 | * Uninitialized SEQUENCE OF constructor with name 31 | */ 32 | public 33 | @name@(String name) 34 | { 35 | super(name, new @elementtype@("@elementtype@")); 36 | } 37 | 38 | public void addElement( @elementtype@ element ) { 39 | super.addElement( element ); 40 | } 41 | 42 | public @elementtype@ getElement( int index ) { 43 | return (@elementtype@)get( index ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/templates/sequenceofelement.template: -------------------------------------------------------------------------------- 1 | public static class @name@ extends SequenceOf 2 | { 3 | /** 4 | * To add elements to your SequenceOf object, just call the addElement(..) method. 5 | * You can only add an element to your SequenceOf object if it is 6 | * an instance of the elementType defined in below constructors. 7 | * 8 | * To encode/decode your object, just call encode(..) decode(..) methods 9 | * See 'TestProject.java' in the project to examine encoding/decoding examples 10 | */ 11 | 12 | /** 13 | * Uninitialized SEQUENCE OF constructor 14 | */ 15 | public 16 | @name@() 17 | { 18 | super(new @elementtype@("@name@")); 19 | } 20 | 21 | /** 22 | * Uninitialized SEQUENCE OF constructor with name 23 | */ 24 | public 25 | @name@(String name) 26 | { 27 | super(name, new @elementtype@("@name@")); 28 | } 29 | 30 | public void addElement( @elementtype@ element ) { 31 | super.addElement( element ); 32 | } 33 | 34 | public @elementtype@ getElement( int index ) { 35 | return (@elementtype@)get( index ); 36 | } 37 | 38 | @innerclass@ 39 | } 40 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/templates/set.template: -------------------------------------------------------------------------------- 1 | @package@ 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.*; 8 | import com.chaosinmotion.asn1.Tag; 9 | 10 | public class @name@ extends Set 11 | { 12 | /* 13 | * if you want to set/fill an element below, just call the setValue() method over its instance. 14 | * To encode/decode your object, just call encode(..) decode(..) methods. 15 | * See 'TestProject.java' in the project to examine encoding/decoding examples 16 | */ 17 | @elements@ 18 | 19 | /** 20 | * asn.1 SET constructor 21 | */ 22 | public 23 | @name@() 24 | { 25 | super(); 26 | setUpElements(); 27 | } 28 | 29 | /** 30 | * asn.1 SET constructor with name 31 | */ 32 | public 33 | @name@(String name) 34 | { 35 | super(name); 36 | setUpElements(); 37 | } 38 | 39 | 40 | protected void 41 | setUpElements() 42 | { 43 | @setupelements@ 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/templates/setof.template: -------------------------------------------------------------------------------- 1 | @package@ 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.*; 8 | //import com.chaosinmotion.asn1.Tag; 9 | 10 | public class @name@ extends SetOf 11 | { 12 | /** 13 | * To add elements to your SetOf object, just call the addElemet(..) method. 14 | * You can only add an element to your SetOf object if it is 15 | * an instance of the elementType defined in below constructors. 16 | * 17 | * To encode/decode your object, just call encode(..) decode(..) methods 18 | * See 'TestProject.java' in the project to examine encoding/decoding examples 19 | */ 20 | 21 | /** 22 | * SET OF constructor 23 | */ 24 | public 25 | @name@() 26 | { 27 | super(new @elementtype@("@elementtype@")); 28 | } 29 | 30 | /** 31 | * SET OF constructor with name 32 | */ 33 | public 34 | @name@(String name) 35 | { 36 | super(name, new @elementtype@("@elementtype@")); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/text/Notes.txt: -------------------------------------------------------------------------------- 1 | Downloaded JavaCC 2 | Created batch file to run jjtree then javacc 3 | Making some modifications to the files 4 | -d C:\Users\Rob\ASN1Compile\jac -p com.etrans2020 C:\Users\Rob\ASN1Compile\jac\DSRC_R36_Source.ASN C:\Users\Rob\ASN1Compile\jac\SEMI_ASN.1_Structures_2.1.txt -------------------------------------------------------------------------------- /src/test/java/com/etrans2020/semi/ConnectionPoint.java: -------------------------------------------------------------------------------- 1 | package com.etrans2020.semi; 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.*; 8 | import com.chaosinmotion.asn1.Tag; 9 | 10 | public class ConnectionPoint extends Sequence 11 | { 12 | /** 13 | * if you want to set/fill an element below, just call the setValue(..) method over its instance. 14 | * 15 | * To encode/decode your object, just call encode(..) decode(..) methods. 16 | * See 'TestProject.java' in the project to examine encoding/decoding examples 17 | */ 18 | public IpAddress address = new IpAddress("address"); 19 | public PortNumber port = new PortNumber("port"); 20 | /* end of element declarations */ 21 | 22 | /** 23 | * asn.1 SEQUENCE constructor 24 | */ 25 | public 26 | ConnectionPoint() 27 | { 28 | super(); 29 | setUpElements(); 30 | } 31 | 32 | /** 33 | * asn.1 SEQUENCE constructor with its name 34 | */ 35 | public 36 | ConnectionPoint(String name) 37 | { 38 | super(name); 39 | setUpElements(); 40 | } 41 | 42 | 43 | protected void 44 | setUpElements() 45 | { 46 | int tagNumber = 0; 47 | super.addElement(address); 48 | address.setOptional(true); 49 | address.setTagNumber( tagNumber ++ ); 50 | super.addElement(port); 51 | port.setTagNumber( tagNumber ++ ); 52 | /* end of element setup */ 53 | } 54 | 55 | 56 | 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/test/java/com/etrans2020/semi/IPv4Address.java: -------------------------------------------------------------------------------- 1 | package com.etrans2020.semi; 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.OctetString; 8 | //import com.chaosinmotion.asn1.Tag; 9 | 10 | public class IPv4Address extends OctetString 11 | { 12 | /** 13 | * To set your object you can call the method: "setValue(byte[] array)" 14 | * To encode/decode your object, just call encode(..) decode(..) methods. 15 | * See 'TestProject.java' in the project to examine encoding/decoding examples 16 | */ 17 | 18 | /** 19 | * constructor to create "uninitialized" object. 20 | */ 21 | public 22 | IPv4Address() 23 | { 24 | super(); 25 | } 26 | 27 | /** 28 | * constructor to create "uninitialized" object. 29 | */ 30 | public 31 | IPv4Address(String name) 32 | { 33 | super(name); 34 | } 35 | 36 | /** 37 | * constructor to create "initialized" object. 38 | */ 39 | public 40 | IPv4Address(byte[] value) 41 | { 42 | super(value); 43 | } 44 | 45 | /** 46 | * constructor to create "initialized" object with its name. 47 | */ 48 | public 49 | IPv4Address(String name, byte[] value) 50 | { 51 | super(name, value); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/test/java/com/etrans2020/semi/IPv6Address.java: -------------------------------------------------------------------------------- 1 | package com.etrans2020.semi; 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.OctetString; 8 | //import com.chaosinmotion.asn1.Tag; 9 | 10 | public class IPv6Address extends OctetString 11 | { 12 | /** 13 | * To set your object you can call the method: "setValue(byte[] array)" 14 | * To encode/decode your object, just call encode(..) decode(..) methods. 15 | * See 'TestProject.java' in the project to examine encoding/decoding examples 16 | */ 17 | 18 | /** 19 | * constructor to create "uninitialized" object. 20 | */ 21 | public 22 | IPv6Address() 23 | { 24 | super(); 25 | } 26 | 27 | /** 28 | * constructor to create "uninitialized" object. 29 | */ 30 | public 31 | IPv6Address(String name) 32 | { 33 | super(name); 34 | } 35 | 36 | /** 37 | * constructor to create "initialized" object. 38 | */ 39 | public 40 | IPv6Address(byte[] value) 41 | { 42 | super(value); 43 | } 44 | 45 | /** 46 | * constructor to create "initialized" object with its name. 47 | */ 48 | public 49 | IPv6Address(String name, byte[] value) 50 | { 51 | super(name, value); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/test/java/com/etrans2020/semi/IpAddress.java: -------------------------------------------------------------------------------- 1 | package com.etrans2020.semi; 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.*; 8 | import com.chaosinmotion.asn1.Tag; 9 | 10 | public class IpAddress extends Choice 11 | { 12 | /** 13 | * For encoding, just call directly encode(..) method after after setting (initializing) only 1 element in your choice object. 14 | * 15 | * For decoding, just directly call decode(..) method. 16 | * You can call the method 'getCurrentChoice()' after decoding to learn which element is decoded from byte array inside choice record. 17 | * 18 | * See 'choice example' section in 'TestProject.java' in the project for encoding/decoding examples with Choice objects. 19 | */ 20 | 21 | public IPv4Address ipv4Address = new IPv4Address("ipv4Address"); 22 | public IPv6Address ipv6Address = new IPv6Address("ipv6Address"); 23 | /* end of element declarations */ 24 | 25 | /** 26 | * constructor without a name 27 | */ 28 | public 29 | IpAddress() 30 | { 31 | super(); 32 | setUpElements(); 33 | } 34 | 35 | /** 36 | * constructor with a name 37 | */ 38 | public 39 | IpAddress(String name) 40 | { 41 | super(name); 42 | setUpElements(); 43 | } 44 | 45 | protected void 46 | setUpElements() 47 | { 48 | int tagNumber = 0; 49 | super.addElement(ipv4Address); 50 | ipv4Address.setTagNumber( tagNumber ++ ); 51 | super.addElement(ipv6Address); 52 | ipv6Address.setTagNumber( tagNumber ++ ); 53 | /* end of element setup */ 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/test/java/com/etrans2020/semi/PortNumber.java: -------------------------------------------------------------------------------- 1 | package com.etrans2020.semi; 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.ASN1Integer; 8 | //import com.chaosinmotion.asn1.Tag; 9 | 10 | 11 | public class PortNumber extends ASN1Integer 12 | { 13 | /** 14 | * If you have any constraint below, you must obey to the constraints. 15 | * If you do not consider the constraints when setting your element, you will get exception. 16 | * 17 | * To set your object, you can call setValue(..) method. 18 | * To encode/decode your object, just call encode(..) decode(..) methods 19 | * See 'TestProject.java' in the project to examine encoding/decoding examples 20 | */ 21 | 22 | /* NO range constraint constants */ 23 | 24 | /** 25 | * asn.1 INTEGER constructor to create "uninitialized" object. 26 | * setValue() method can be called to set the value of the integer. 27 | */ 28 | public 29 | PortNumber() 30 | { 31 | super(); 32 | } 33 | 34 | /** 35 | * asn.1 INTEGER constructor to create "uninitialized" object. 36 | * setValue() method can be called to set the value of the integer. 37 | */ 38 | public 39 | PortNumber(String name) 40 | { 41 | super(); 42 | setName(name); 43 | } 44 | 45 | /** 46 | * asn.1 INTEGER constructor to create "initialized" object. 47 | */ 48 | public 49 | PortNumber(long value) 50 | { 51 | super(); 52 | setValue(value); 53 | } 54 | 55 | /** 56 | * constructor to build ASN1Integer with its value and name. 57 | */ 58 | public 59 | PortNumber(String name, long value) 60 | { 61 | super(); 62 | setValue(value); 63 | setName(name); 64 | } 65 | 66 | /* 67 | * range constraint setter methods 68 | */ 69 | 70 | /* NO setter methods. */ 71 | } 72 | -------------------------------------------------------------------------------- /src/test/java/com/etrans2020/semi/SemiDialogID.java: -------------------------------------------------------------------------------- 1 | package com.etrans2020.semi; 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.Enumerated; 8 | //import com.chaosinmotion.asn1.Tag; 9 | 10 | 11 | public class SemiDialogID extends Enumerated 12 | { 13 | /** 14 | * To set your ENUMERATED type, just call one of the "setTo_elementName()" methods. 15 | * To encode/decode your object, just call encode(..) decode(..) methods 16 | * See 'TestProject.java' in the project to examine encoding/decoding examples 17 | */ 18 | 19 | public static final int vehSitData_ = 154; 20 | 21 | public void setTo_vehSitData_154() { 22 | setValue(vehSitData_); 23 | } 24 | 25 | public static final int dataSubscription_ = 155; 26 | 27 | public void setTo_dataSubscription_155() { 28 | setValue(dataSubscription_); 29 | } 30 | 31 | public static final int advSitDataDep_ = 156; 32 | 33 | public void setTo_advSitDataDep_156() { 34 | setValue(advSitDataDep_); 35 | } 36 | 37 | public static final int advSitDatDistRSE_ = 157; 38 | 39 | public void setTo_advSitDatDistRSE_157() { 40 | setValue(advSitDatDistRSE_); 41 | } 42 | 43 | public static final int reserved1_ = 158; 44 | 45 | public void setTo_reserved1_158() { 46 | setValue(reserved1_); 47 | } 48 | 49 | public static final int reserved2_ = 159; 50 | 51 | public void setTo_reserved2_159() { 52 | setValue(reserved2_); 53 | } 54 | 55 | public static final int objReg_ = 160; 56 | 57 | public void setTo_objReg_160() { 58 | setValue(objReg_); 59 | } 60 | 61 | public static final int objDisc_ = 161; 62 | 63 | public void setTo_objDisc_161() { 64 | setValue(objDisc_); 65 | } 66 | 67 | public static final int intersectionSitDataDep_ = 162; 68 | 69 | public void setTo_intersectionSitDataDep_162() { 70 | setValue(intersectionSitDataDep_); 71 | } 72 | 73 | public static final int intersectionSitDataQuery_ = 163; 74 | 75 | public void setTo_intersectionSitDataQuery_163() { 76 | setValue(intersectionSitDataQuery_); 77 | } 78 | 79 | /* end of enumerated constants */ 80 | 81 | /** 82 | * constructs empty ENUMERATED object 83 | */ 84 | public 85 | SemiDialogID() 86 | { 87 | super(); 88 | } 89 | 90 | /** 91 | * constructs empty ENUMERATED object with its name. 92 | */ 93 | public 94 | SemiDialogID(String name) 95 | { 96 | super(name); 97 | } 98 | 99 | /** 100 | * if you want to set your ENUMERATED to a different undefined value, use this constructor. 101 | */ 102 | public 103 | SemiDialogID(long value) 104 | { 105 | super(value); 106 | } 107 | 108 | /** 109 | * if you want to set your ENUMERATED to a different undefined value, use this constructor. 110 | */ 111 | public 112 | SemiDialogID(String name, long value) 113 | { 114 | super(name, value); 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /src/test/java/com/etrans2020/semi/SemiSequenceID.java: -------------------------------------------------------------------------------- 1 | package com.etrans2020.semi; 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.Enumerated; 8 | //import com.chaosinmotion.asn1.Tag; 9 | 10 | 11 | public class SemiSequenceID extends Enumerated 12 | { 13 | /** 14 | * To set your ENUMERATED type, just call one of the "setTo_elementName()" methods. 15 | * To encode/decode your object, just call encode(..) decode(..) methods 16 | * See 'TestProject.java' in the project to examine encoding/decoding examples 17 | */ 18 | 19 | public static final int svcReq_ = 1; 20 | 21 | public void setTo_svcReq_1() { 22 | setValue(svcReq_); 23 | } 24 | 25 | public static final int svcResp_ = 2; 26 | 27 | public void setTo_svcResp_2() { 28 | setValue(svcResp_); 29 | } 30 | 31 | public static final int dataReq_ = 3; 32 | 33 | public void setTo_dataReq_3() { 34 | setValue(dataReq_); 35 | } 36 | 37 | public static final int dataConf_ = 4; 38 | 39 | public void setTo_dataConf_4() { 40 | setValue(dataConf_); 41 | } 42 | 43 | public static final int data_ = 5; 44 | 45 | public void setTo_data_5() { 46 | setValue(data_); 47 | } 48 | 49 | public static final int accept_ = 6; 50 | 51 | public void setTo_accept_6() { 52 | setValue(accept_); 53 | } 54 | 55 | public static final int receipt_ = 7; 56 | 57 | public void setTo_receipt_7() { 58 | setValue(receipt_); 59 | } 60 | 61 | public static final int subscriptionReq_ = 8; 62 | 63 | public void setTo_subscriptionReq_8() { 64 | setValue(subscriptionReq_); 65 | } 66 | 67 | public static final int subscriptinoResp_ = 9; 68 | 69 | public void setTo_subscriptinoResp_9() { 70 | setValue(subscriptinoResp_); 71 | } 72 | 73 | public static final int subscriptionCancel_ = 10; 74 | 75 | public void setTo_subscriptionCancel_10() { 76 | setValue(subscriptionCancel_); 77 | } 78 | 79 | /* end of enumerated constants */ 80 | 81 | /** 82 | * constructs empty ENUMERATED object 83 | */ 84 | public 85 | SemiSequenceID() 86 | { 87 | super(); 88 | } 89 | 90 | /** 91 | * constructs empty ENUMERATED object with its name. 92 | */ 93 | public 94 | SemiSequenceID(String name) 95 | { 96 | super(name); 97 | } 98 | 99 | /** 100 | * if you want to set your ENUMERATED to a different undefined value, use this constructor. 101 | */ 102 | public 103 | SemiSequenceID(long value) 104 | { 105 | super(value); 106 | } 107 | 108 | /** 109 | * if you want to set your ENUMERATED to a different undefined value, use this constructor. 110 | */ 111 | public 112 | SemiSequenceID(String name, long value) 113 | { 114 | super(name, value); 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /src/test/java/com/etrans2020/semi/ServiceRequest.java: -------------------------------------------------------------------------------- 1 | package com.etrans2020.semi; 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.*; 8 | import com.chaosinmotion.asn1.Tag; 9 | 10 | public class ServiceRequest extends Sequence 11 | { 12 | /** 13 | * if you want to set/fill an element below, just call the setValue(..) method over its instance. 14 | * 15 | * To encode/decode your object, just call encode(..) decode(..) methods. 16 | * See 'TestProject.java' in the project to examine encoding/decoding examples 17 | */ 18 | public SemiDialogID dialogID = new SemiDialogID("dialogID"); 19 | public SemiSequenceID seqID = new SemiSequenceID("seqID"); 20 | public TemporaryID requestID = new TemporaryID("requestID"); 21 | public ConnectionPoint destination = new ConnectionPoint("destination"); 22 | /* end of element declarations */ 23 | 24 | /** 25 | * asn.1 SEQUENCE constructor 26 | */ 27 | public 28 | ServiceRequest() 29 | { 30 | super(); 31 | setUpElements(); 32 | } 33 | 34 | /** 35 | * asn.1 SEQUENCE constructor with its name 36 | */ 37 | public 38 | ServiceRequest(String name) 39 | { 40 | super(name); 41 | setUpElements(); 42 | } 43 | 44 | 45 | protected void 46 | setUpElements() 47 | { 48 | int tagNumber = 0; 49 | super.addElement(dialogID); 50 | dialogID.setTagNumber( tagNumber ++ ); 51 | super.addElement(seqID); 52 | seqID.setTagNumber( tagNumber ++ ); 53 | super.addElement(requestID); 54 | requestID.setTagNumber( tagNumber ++ ); 55 | super.addElement(destination); 56 | destination.setOptional(true); 57 | destination.setTagNumber( tagNumber ++ ); 58 | /* end of element setup */ 59 | } 60 | 61 | 62 | 63 | 64 | } 65 | -------------------------------------------------------------------------------- /src/test/java/com/etrans2020/semi/TemporaryID.java: -------------------------------------------------------------------------------- 1 | package com.etrans2020.semi; 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.OctetString; 8 | //import com.chaosinmotion.asn1.Tag; 9 | 10 | public class TemporaryID extends OctetString 11 | { 12 | /** 13 | * To set your object you can call the method: "setValue(byte[] array)" 14 | * To encode/decode your object, just call encode(..) decode(..) methods. 15 | * See 'TestProject.java' in the project to examine encoding/decoding examples 16 | */ 17 | 18 | /** 19 | * constructor to create "uninitialized" object. 20 | */ 21 | public 22 | TemporaryID() 23 | { 24 | super(); 25 | } 26 | 27 | /** 28 | * constructor to create "uninitialized" object. 29 | */ 30 | public 31 | TemporaryID(String name) 32 | { 33 | super(name); 34 | } 35 | 36 | /** 37 | * constructor to create "initialized" object. 38 | */ 39 | public 40 | TemporaryID(byte[] value) 41 | { 42 | super(value); 43 | } 44 | 45 | /** 46 | * constructor to create "initialized" object with its name. 47 | */ 48 | public 49 | TemporaryID(String name, byte[] value) 50 | { 51 | super(name, value); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/test/java/com/etranssystems/asn1/generated/dsrc/Approach.java: -------------------------------------------------------------------------------- 1 | package com.etranssystems.asn1.generated.dsrc; 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.ASN1Integer; 8 | import com.turkcelltech.jac.Sequence; 9 | import com.turkcelltech.jac.SequenceOf; 10 | 11 | public class Approach extends Sequence 12 | { 13 | /** 14 | * if you want to set/fill an element below, just call the setValue(..) method over its instance. 15 | * 16 | * To encode/decode your object, just call encode(..) decode(..) methods. 17 | * See 'TestProject.java' in the project to examine encoding/decoding examples 18 | */ 19 | public DrivingLanes drivingLanes = new DrivingLanes("drivingLanes"); 20 | public ASN1Integer id = new ASN1Integer("id"); 21 | /* end of element declarations */ 22 | 23 | /** 24 | * asn.1 SEQUENCE constructor 25 | */ 26 | public Approach() 27 | { 28 | super(); 29 | setUpElements(); 30 | } 31 | 32 | /** 33 | * asn.1 SEQUENCE constructor with its name 34 | */ 35 | public Approach(String name) 36 | { 37 | super(name); 38 | setUpElements(); 39 | } 40 | 41 | 42 | protected void 43 | setUpElements() 44 | { 45 | int tagNumber = 0; 46 | super.addElement(id); 47 | id.setTagNumber( tagNumber ++ ); 48 | super.addElement(drivingLanes); 49 | drivingLanes.setOptional(true); 50 | drivingLanes.setTagNumber( tagNumber ++ ); 51 | /* end of element setup */ 52 | } 53 | 54 | 55 | 56 | public static class DrivingLanes extends SequenceOf 57 | { 58 | /** 59 | * To add elements to your SequenceOf object, just call the addElement(..) method. 60 | * You can only add an element to your SequenceOf object if it is 61 | * an instance of the elementType defined in below constructors. 62 | * 63 | * To encode/decode your object, just call encode(..) decode(..) methods 64 | * See 'TestProject.java' in the project to examine encoding/decoding examples 65 | */ 66 | 67 | /** 68 | * Uninitialized SEQUENCE OF constructor 69 | */ 70 | public 71 | DrivingLanes() 72 | { 73 | super(new VehicleReferenceLane("DrivingLanes")); 74 | } 75 | 76 | /** 77 | * Uninitialized SEQUENCE OF constructor with name 78 | */ 79 | public 80 | DrivingLanes(String name) 81 | { 82 | super(name, new VehicleReferenceLane("DrivingLanes")); 83 | } 84 | 85 | public void addElement( VehicleReferenceLane element ) { 86 | super.addElement( element ); 87 | } 88 | 89 | public VehicleReferenceLane getElement( int index ) { 90 | return (VehicleReferenceLane)get( index ); 91 | } 92 | 93 | 94 | } 95 | 96 | // END element classes 97 | } 98 | -------------------------------------------------------------------------------- /src/test/java/com/etranssystems/asn1/generated/dsrc/ConnectsTo.java: -------------------------------------------------------------------------------- 1 | package com.etranssystems.asn1.generated.dsrc; 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.OctetString; 8 | //import com.chaosinmotion.asn1.Tag; 9 | 10 | public class ConnectsTo extends OctetString 11 | { 12 | /** 13 | * To set your object you can call the method: "setValue(byte[] array)" 14 | * To encode/decode your object, just call encode(..) decode(..) methods. 15 | * See 'TestProject.java' in the project to examine encoding/decoding examples 16 | */ 17 | 18 | /** 19 | * constructor to create "uninitialized" object. 20 | */ 21 | public ConnectsTo() 22 | { 23 | super(); 24 | } 25 | 26 | /** 27 | * constructor to create "uninitialized" object. 28 | */ 29 | public ConnectsTo(String name) 30 | { 31 | super(name); 32 | } 33 | 34 | /** 35 | * constructor to create "initialized" object. 36 | */ 37 | public ConnectsTo(byte[] value) 38 | { 39 | super(value); 40 | } 41 | 42 | /** 43 | * constructor to create "initialized" object with its name. 44 | */ 45 | public ConnectsTo(String name, byte[] value) 46 | { 47 | super(name, value); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/test/java/com/etranssystems/asn1/generated/dsrc/Elevation.java: -------------------------------------------------------------------------------- 1 | package com.etranssystems.asn1.generated.dsrc; 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.OctetString; 8 | //import com.chaosinmotion.asn1.Tag; 9 | 10 | public class Elevation extends OctetString 11 | { 12 | /** 13 | * To set your object you can call the method: "setValue(byte[] array)" 14 | * To encode/decode your object, just call encode(..) decode(..) methods. 15 | * See 'TestProject.java' in the project to examine encoding/decoding examples 16 | */ 17 | 18 | /** 19 | * constructor to create "uninitialized" object. 20 | */ 21 | public 22 | Elevation() 23 | { 24 | super(); 25 | } 26 | 27 | /** 28 | * constructor to create "uninitialized" object. 29 | */ 30 | public 31 | Elevation(String name) 32 | { 33 | super(name); 34 | } 35 | 36 | /** 37 | * constructor to create "initialized" object. 38 | */ 39 | public 40 | Elevation(byte[] value) 41 | { 42 | super(value); 43 | } 44 | 45 | /** 46 | * constructor to create "initialized" object with its name. 47 | */ 48 | public 49 | Elevation(String name, byte[] value) 50 | { 51 | super(name, value); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/test/java/com/etranssystems/asn1/generated/dsrc/ExteriorLights.java: -------------------------------------------------------------------------------- 1 | package com.etranssystems.asn1.generated.dsrc; 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.ASN1Integer; 8 | //import com.chaosinmotion.asn1.Tag; 9 | 10 | 11 | public class ExteriorLights extends ASN1Integer 12 | { 13 | /** 14 | * If you have any constraint below, you must obey to the constraints. 15 | * If you do not consider the constraints when setting your element, you will get exception. 16 | * 17 | * To set your object, you can call setValue(..) method. 18 | * To encode/decode your object, just call encode(..) decode(..) methods 19 | * See 'TestProject.java' in the project to examine encoding/decoding examples 20 | */ 21 | 22 | /* NO range constraint constants */ 23 | 24 | /** 25 | * asn.1 INTEGER constructor to create "uninitialized" object. 26 | * setValue() method can be called to set the value of the integer. 27 | */ 28 | public ExteriorLights() 29 | { 30 | super(); 31 | } 32 | 33 | /** 34 | * asn.1 INTEGER constructor to create "uninitialized" object. 35 | * setValue() method can be called to set the value of the integer. 36 | */ 37 | public ExteriorLights(String name) 38 | { 39 | super(); 40 | setName(name); 41 | } 42 | 43 | /** 44 | * asn.1 INTEGER constructor to create "initialized" object. 45 | */ 46 | public ExteriorLights(long value) 47 | { 48 | super(); 49 | setValue(value); 50 | } 51 | 52 | /** 53 | * constructor to build ASN1Integer with its value and name. 54 | */ 55 | public ExteriorLights(String name, long value) 56 | { 57 | super(); 58 | setValue(value); 59 | setName(name); 60 | } 61 | 62 | /* 63 | * range constraint setter methods 64 | */ 65 | 66 | /* NO setter methods. */ 67 | } 68 | -------------------------------------------------------------------------------- /src/test/java/com/etranssystems/asn1/generated/dsrc/GeoRegion.java: -------------------------------------------------------------------------------- 1 | package com.etranssystems.asn1.generated.dsrc; 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.Sequence; 8 | 9 | public class GeoRegion extends Sequence 10 | { 11 | /** 12 | * if you want to set/fill an element below, just call the setValue(..) method over its instance. 13 | * 14 | * To encode/decode your object, just call encode(..) decode(..) methods. 15 | * See 'TestProject.java' in the project to examine encoding/decoding examples 16 | */ 17 | public Position3D nwCorner = new Position3D("nwCorner"); 18 | public Position3D seCorner = new Position3D("seCorner"); 19 | /* end of element declarations */ 20 | 21 | /** 22 | * asn.1 SEQUENCE constructor 23 | */ 24 | public GeoRegion() 25 | { 26 | super(); 27 | setUpElements(); 28 | } 29 | 30 | /** 31 | * asn.1 SEQUENCE constructor with its name 32 | */ 33 | public GeoRegion(String name) 34 | { 35 | super(name); 36 | setUpElements(); 37 | } 38 | 39 | 40 | protected void 41 | setUpElements() 42 | { 43 | int tagNumber = 0; 44 | super.addElement(nwCorner); 45 | nwCorner.setTagNumber( tagNumber ++ ); 46 | super.addElement(seCorner); 47 | seCorner.setTagNumber( tagNumber ++ ); 48 | /* end of element setup */ 49 | } 50 | 51 | 52 | 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/test/java/com/etranssystems/asn1/generated/dsrc/Latitude.java: -------------------------------------------------------------------------------- 1 | package com.etranssystems.asn1.generated.dsrc; 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.ASN1Integer; 8 | //import com.chaosinmotion.asn1.Tag; 9 | 10 | 11 | public class Latitude extends ASN1Integer 12 | { 13 | /** 14 | * If you have any constraint below, you must obey to the constraints. 15 | * If you do not consider the constraints when setting your element, you will get exception. 16 | * 17 | * To set your object, you can call setValue(..) method. 18 | * To encode/decode your object, just call encode(..) decode(..) methods 19 | * See 'TestProject.java' in the project to examine encoding/decoding examples 20 | */ 21 | 22 | /* NO range constraint constants */ 23 | 24 | /** 25 | * asn.1 INTEGER constructor to create "uninitialized" object. 26 | * setValue() method can be called to set the value of the integer. 27 | */ 28 | public 29 | Latitude() 30 | { 31 | super(); 32 | } 33 | 34 | /** 35 | * asn.1 INTEGER constructor to create "uninitialized" object. 36 | * setValue() method can be called to set the value of the integer. 37 | */ 38 | public 39 | Latitude(String name) 40 | { 41 | super(); 42 | setName(name); 43 | } 44 | 45 | /** 46 | * asn.1 INTEGER constructor to create "initialized" object. 47 | */ 48 | public 49 | Latitude(long value) 50 | { 51 | super(); 52 | setValue(value); 53 | } 54 | 55 | /** 56 | * constructor to build ASN1Integer with its value and name. 57 | */ 58 | public 59 | Latitude(String name, long value) 60 | { 61 | super(); 62 | setValue(value); 63 | setName(name); 64 | } 65 | 66 | /* 67 | * range constraint setter methods 68 | */ 69 | 70 | /* NO setter methods. */ 71 | } 72 | -------------------------------------------------------------------------------- /src/test/java/com/etranssystems/asn1/generated/dsrc/Longitude.java: -------------------------------------------------------------------------------- 1 | package com.etranssystems.asn1.generated.dsrc; 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.ASN1Integer; 8 | //import com.chaosinmotion.asn1.Tag; 9 | 10 | 11 | public class Longitude extends ASN1Integer 12 | { 13 | /** 14 | * If you have any constraint below, you must obey to the constraints. 15 | * If you do not consider the constraints when setting your element, you will get exception. 16 | * 17 | * To set your object, you can call setValue(..) method. 18 | * To encode/decode your object, just call encode(..) decode(..) methods 19 | * See 'TestProject.java' in the project to examine encoding/decoding examples 20 | */ 21 | 22 | /* NO range constraint constants */ 23 | 24 | /** 25 | * asn.1 INTEGER constructor to create "uninitialized" object. 26 | * setValue() method can be called to set the value of the integer. 27 | */ 28 | public 29 | Longitude() 30 | { 31 | super(); 32 | } 33 | 34 | /** 35 | * asn.1 INTEGER constructor to create "uninitialized" object. 36 | * setValue() method can be called to set the value of the integer. 37 | */ 38 | public 39 | Longitude(String name) 40 | { 41 | super(); 42 | setName(name); 43 | } 44 | 45 | /** 46 | * asn.1 INTEGER constructor to create "initialized" object. 47 | */ 48 | public 49 | Longitude(long value) 50 | { 51 | super(); 52 | setValue(value); 53 | } 54 | 55 | /** 56 | * constructor to build ASN1Integer with its value and name. 57 | */ 58 | public 59 | Longitude(String name, long value) 60 | { 61 | super(); 62 | setValue(value); 63 | setName(name); 64 | } 65 | 66 | /* 67 | * range constraint setter methods 68 | */ 69 | 70 | /* NO setter methods. */ 71 | } 72 | -------------------------------------------------------------------------------- /src/test/java/com/etranssystems/asn1/generated/dsrc/NodeList.java: -------------------------------------------------------------------------------- 1 | package com.etranssystems.asn1.generated.dsrc; 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.*; 8 | //import com.chaosinmotion.asn1.Tag; 9 | 10 | public class NodeList extends SequenceOf 11 | { 12 | /** 13 | * To add elements to your SequenceOf object, just call the addElement(..) method. 14 | * You can only add an element to your SequenceOf object if it is 15 | * an instance of the elementType defined in below constructors. 16 | * 17 | * To encode/decode your object, just call encode(..) decode(..) methods 18 | * See 'TestProject.java' in the project to examine encoding/decoding examples 19 | */ 20 | 21 | /** 22 | * Uninitialized SEQUENCE OF constructor 23 | */ 24 | public 25 | NodeList() 26 | { 27 | super(new Offsets("Offsets")); 28 | } 29 | 30 | /** 31 | * Uninitialized SEQUENCE OF constructor with name 32 | */ 33 | public 34 | NodeList(String name) 35 | { 36 | super(name, new Offsets("Offsets")); 37 | } 38 | 39 | public void addElement( Offsets element ) { 40 | super.addElement( element ); 41 | } 42 | 43 | public Offsets getElement( int index ) { 44 | return (Offsets)get( index ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/test/java/com/etranssystems/asn1/generated/dsrc/Offsets.java: -------------------------------------------------------------------------------- 1 | package com.etranssystems.asn1.generated.dsrc; 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.OctetString; 8 | //import com.chaosinmotion.asn1.Tag; 9 | 10 | public class Offsets extends OctetString 11 | { 12 | /** 13 | * To set your object you can call the method: "setValue(byte[] array)" 14 | * To encode/decode your object, just call encode(..) decode(..) methods. 15 | * See 'TestProject.java' in the project to examine encoding/decoding examples 16 | */ 17 | 18 | /** 19 | * constructor to create "uninitialized" object. 20 | */ 21 | public 22 | Offsets() 23 | { 24 | super(); 25 | } 26 | 27 | /** 28 | * constructor to create "uninitialized" object. 29 | */ 30 | public 31 | Offsets(String name) 32 | { 33 | super(name); 34 | } 35 | 36 | /** 37 | * constructor to create "initialized" object. 38 | */ 39 | public 40 | Offsets(byte[] value) 41 | { 42 | super(value); 43 | } 44 | 45 | /** 46 | * constructor to create "initialized" object with its name. 47 | */ 48 | public 49 | Offsets(String name, byte[] value) 50 | { 51 | super(name, value); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/test/java/com/etranssystems/asn1/generated/dsrc/Position3D.java: -------------------------------------------------------------------------------- 1 | package com.etranssystems.asn1.generated.dsrc; 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.Sequence; 8 | 9 | public class Position3D extends Sequence 10 | { 11 | /** 12 | * if you want to set/fill an element below, just call the setValue(..) method over its instance. 13 | * 14 | * To encode/decode your object, just call encode(..) decode(..) methods. 15 | * See 'TestProject.java' in the project to examine encoding/decoding examples 16 | */ 17 | public Latitude lat = new Latitude("lat"); 18 | public Longitude longElement = new Longitude("longElement"); 19 | public Elevation elevation = new Elevation("elevation"); 20 | /* end of element declarations */ 21 | 22 | /** 23 | * asn.1 SEQUENCE constructor 24 | */ 25 | public Position3D() 26 | { 27 | super(); 28 | setUpElements(); 29 | } 30 | 31 | /** 32 | * asn.1 SEQUENCE constructor with its name 33 | */ 34 | public Position3D(String name) 35 | { 36 | super(name); 37 | setUpElements(); 38 | } 39 | 40 | 41 | protected void 42 | setUpElements() 43 | { 44 | int tagNumber = 0; 45 | super.addElement(lat); 46 | lat.setTagNumber( tagNumber ++ ); 47 | super.addElement(longElement); 48 | longElement.setTagNumber( tagNumber ++ ); 49 | super.addElement(elevation); 50 | elevation.setOptional(true); 51 | elevation.setTagNumber( tagNumber ++ ); 52 | /* end of element setup */ 53 | } 54 | 55 | 56 | 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/test/java/com/etranssystems/asn1/generated/dsrc/ThrottlePosition.java: -------------------------------------------------------------------------------- 1 | package com.etranssystems.asn1.generated.dsrc; 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.ASN1Integer; 8 | //import com.chaosinmotion.asn1.Tag; 9 | 10 | 11 | public class ThrottlePosition extends ASN1Integer 12 | { 13 | /** 14 | * If you have any constraint below, you must obey to the constraints. 15 | * If you do not consider the constraints when setting your element, you will get exception. 16 | * 17 | * To set your object, you can call setValue(..) method. 18 | * To encode/decode your object, just call encode(..) decode(..) methods 19 | * See 'TestProject.java' in the project to examine encoding/decoding examples 20 | */ 21 | 22 | /* NO range constraint constants */ 23 | 24 | /** 25 | * asn.1 INTEGER constructor to create "uninitialized" object. 26 | * setValue() method can be called to set the value of the integer. 27 | */ 28 | public ThrottlePosition() 29 | { 30 | super(); 31 | } 32 | 33 | /** 34 | * asn.1 INTEGER constructor to create "uninitialized" object. 35 | * setValue() method can be called to set the value of the integer. 36 | */ 37 | public ThrottlePosition(String name) 38 | { 39 | super(); 40 | setName(name); 41 | } 42 | 43 | /** 44 | * asn.1 INTEGER constructor to create "initialized" object. 45 | */ 46 | public ThrottlePosition(long value) 47 | { 48 | super(); 49 | setValue(value); 50 | } 51 | 52 | /** 53 | * constructor to build ASN1Integer with its value and name. 54 | */ 55 | public ThrottlePosition(String name, long value) 56 | { 57 | super(); 58 | setValue(value); 59 | setName(name); 60 | } 61 | 62 | /* 63 | * range constraint setter methods 64 | */ 65 | 66 | /* NO setter methods. */ 67 | } 68 | -------------------------------------------------------------------------------- /src/test/java/com/etranssystems/asn1/generated/dsrc/TirePressure.java: -------------------------------------------------------------------------------- 1 | package com.etranssystems.asn1.generated.dsrc; 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.ASN1Integer; 8 | //import com.chaosinmotion.asn1.Tag; 9 | 10 | 11 | public class TirePressure extends ASN1Integer 12 | { 13 | /** 14 | * If you have any constraint below, you must obey to the constraints. 15 | * If you do not consider the constraints when setting your element, you will get exception. 16 | * 17 | * To set your object, you can call setValue(..) method. 18 | * To encode/decode your object, just call encode(..) decode(..) methods 19 | * See 'TestProject.java' in the project to examine encoding/decoding examples 20 | */ 21 | 22 | /* NO range constraint constants */ 23 | 24 | /** 25 | * asn.1 INTEGER constructor to create "uninitialized" object. 26 | * setValue() method can be called to set the value of the integer. 27 | */ 28 | public TirePressure() 29 | { 30 | super(); 31 | } 32 | 33 | /** 34 | * asn.1 INTEGER constructor to create "uninitialized" object. 35 | * setValue() method can be called to set the value of the integer. 36 | */ 37 | public TirePressure(String name) 38 | { 39 | super(); 40 | setName(name); 41 | } 42 | 43 | /** 44 | * asn.1 INTEGER constructor to create "initialized" object. 45 | */ 46 | public TirePressure(long value) 47 | { 48 | super(); 49 | setValue(value); 50 | } 51 | 52 | /** 53 | * constructor to build ASN1Integer with its value and name. 54 | */ 55 | public TirePressure(String name, long value) 56 | { 57 | super(); 58 | setValue(value); 59 | setName(name); 60 | } 61 | 62 | /* 63 | * range constraint setter methods 64 | */ 65 | 66 | /* NO setter methods. */ 67 | } 68 | -------------------------------------------------------------------------------- /src/test/java/com/etranssystems/asn1/generated/dsrc/VehicleReferenceLane.java: -------------------------------------------------------------------------------- 1 | package com.etranssystems.asn1.generated.dsrc; 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.ASN1Integer; 8 | import com.turkcelltech.jac.Sequence; 9 | 10 | public class VehicleReferenceLane extends Sequence 11 | { 12 | /** 13 | * if you want to set/fill an element below, just call the setValue(..) method over its instance. 14 | * 15 | * To encode/decode your object, just call encode(..) decode(..) methods. 16 | * See 'TestProject.java' in the project to examine encoding/decoding examples 17 | */ 18 | public ASN1Integer laneNumber = new ASN1Integer("laneNumber"); 19 | public ConnectsTo connectsTo = new ConnectsTo("connectsTo"); 20 | /* end of element declarations */ 21 | 22 | /** 23 | * asn.1 SEQUENCE constructor 24 | */ 25 | public VehicleReferenceLane() 26 | { 27 | super(); 28 | setUpElements(); 29 | } 30 | 31 | /** 32 | * asn.1 SEQUENCE constructor with its name 33 | */ 34 | public VehicleReferenceLane(String name) 35 | { 36 | super(name); 37 | setUpElements(); 38 | } 39 | 40 | 41 | protected void 42 | setUpElements() 43 | { 44 | int tagNumber = 0; 45 | super.addElement(laneNumber); 46 | laneNumber.setTagNumber( tagNumber ++ ); 47 | super.addElement(connectsTo); 48 | connectsTo.setOptional(true); 49 | connectsTo.setTagNumber( tagNumber ++ ); 50 | /* end of element setup */ 51 | } 52 | 53 | 54 | 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/test/java/com/etranssystems/asn1/generated/dsrc/VehicleSituationStatus.java: -------------------------------------------------------------------------------- 1 | package com.etranssystems.asn1.generated.dsrc; 2 | 3 | /* 4 | * Created by JAC (Java Asn1 Compiler) 5 | */ 6 | 7 | import com.turkcelltech.jac.Sequence; 8 | 9 | public class VehicleSituationStatus extends Sequence 10 | { 11 | /** 12 | * if you want to set/fill an element below, just call the setValue(..) method over its instance. 13 | * 14 | * To encode/decode your object, just call encode(..) decode(..) methods. 15 | * See 'TestProject.java' in the project to examine encoding/decoding examples 16 | */ 17 | public ExteriorLights lights = new ExteriorLights("lights"); 18 | public ThrottlePosition throttlePos = new ThrottlePosition("throttlePos"); 19 | public TirePressureGroup tirePressure = new TirePressureGroup("tirePressure"); 20 | /* end of element declarations */ 21 | 22 | /** 23 | * asn.1 SEQUENCE constructor 24 | */ 25 | public VehicleSituationStatus() 26 | { 27 | super(); 28 | setUpElements(); 29 | } 30 | 31 | /** 32 | * asn.1 SEQUENCE constructor with its name 33 | */ 34 | public VehicleSituationStatus(String name) 35 | { 36 | super(name); 37 | setUpElements(); 38 | } 39 | 40 | 41 | protected void 42 | setUpElements() 43 | { 44 | int tagNumber = 0; 45 | super.addElement(lights); 46 | lights.setTagNumber( tagNumber ++ ); 47 | super.addElement(throttlePos); 48 | throttlePos.setOptional(true); 49 | throttlePos.setTagNumber( tagNumber ++ ); 50 | super.addElement(tirePressure); 51 | tirePressure.setOptional(true); 52 | tirePressure.setTagNumber( tagNumber ++ ); 53 | /* end of element setup */ 54 | } 55 | 56 | 57 | 58 | public static class TirePressureGroup extends Sequence 59 | { 60 | /** 61 | * if you want to set/fill an element below, just call the setValue(..) method over its instance. 62 | * 63 | * To encode/decode your object, just call encode(..) decode(..) methods. 64 | * See 'TestProject.java' in the project to examine encoding/decoding examples 65 | */ 66 | public TirePressure leftFront = new TirePressure("leftFront"); 67 | public TirePressure leftRear = new TirePressure("leftRear"); 68 | public TirePressure rightFront = new TirePressure("rightFront"); 69 | public TirePressure rightRear = new TirePressure("rightRear"); 70 | /* end of element declarations */ 71 | 72 | /** 73 | * asn.1 SEQUENCE constructor 74 | */ 75 | public 76 | TirePressureGroup() 77 | { 78 | super(); 79 | setUpElements(); 80 | } 81 | 82 | /** 83 | * asn.1 SEQUENCE constructor with its name 84 | */ 85 | public 86 | TirePressureGroup(String name) 87 | { 88 | super(name); 89 | setUpElements(); 90 | } 91 | 92 | 93 | protected void 94 | setUpElements() 95 | { 96 | int tagNumber = 0; 97 | super.addElement(leftFront); 98 | leftFront.setTagNumber( tagNumber ++ ); 99 | super.addElement(leftRear); 100 | leftRear.setTagNumber( tagNumber ++ ); 101 | super.addElement(rightFront); 102 | rightFront.setTagNumber( tagNumber ++ ); 103 | super.addElement(rightRear); 104 | rightRear.setTagNumber( tagNumber ++ ); 105 | /* end of element setup */ 106 | } 107 | 108 | 109 | } 110 | 111 | // END element classes 112 | } 113 | -------------------------------------------------------------------------------- /src/test/java/com/turkcelltech/jac/SequenceOfTest.java: -------------------------------------------------------------------------------- 1 | package com.turkcelltech.jac; 2 | 3 | import com.chaosinmotion.asn1.BerInputStream; 4 | import com.chaosinmotion.asn1.BerOutputStream; 5 | import com.etranssystems.asn1.generated.dsrc.NodeList; 6 | import com.etranssystems.asn1.generated.dsrc.Offsets; 7 | import junit.framework.TestCase; 8 | import org.apache.commons.codec.binary.Hex; 9 | 10 | import java.io.ByteArrayInputStream; 11 | import java.io.ByteArrayOutputStream; 12 | 13 | public class SequenceOfTest extends TestCase { 14 | 15 | public void testDecode() throws Exception { 16 | byte[] hexBytes = "300C0404000A00140404001E0028".getBytes(); 17 | Hex hex = new Hex(); 18 | byte[] msgBytes = hex.decode(hexBytes); 19 | ByteArrayInputStream stream = new ByteArrayInputStream( msgBytes ); 20 | BerInputStream in = new BerInputStream( stream); 21 | NodeList nodeList = new NodeList(); 22 | nodeList.decode(in); 23 | assertEquals( 2, nodeList.getList().size() ); 24 | Offsets offsets = nodeList.getElement(0); 25 | } 26 | 27 | public void testEncode() throws Exception { 28 | NodeList nodeList = new NodeList(); 29 | byte[] offsetData1 = new byte[] { 0x00, 0x0A, 0x00, 0x14 }; 30 | Offsets offsets1 = new Offsets( offsetData1 ); 31 | byte[] offsetData2 = new byte[] { 0x00, 0x1E, 0x00, 0x28 }; 32 | Offsets offsets2 = new Offsets( offsetData2 ); 33 | nodeList.addElement( offsets1 ); 34 | nodeList.addElement( offsets2 ); 35 | 36 | ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(128); 37 | BerOutputStream berOutputStream = new BerOutputStream( byteArrayOutputStream ); 38 | nodeList.encode(berOutputStream); 39 | byte[] resultBytes = byteArrayOutputStream.toByteArray(); 40 | StringBuilder sb = new StringBuilder(); 41 | for (int i = 0; i < resultBytes.length; i++) { 42 | sb.append(String.format("%02X", resultBytes[i])); 43 | } 44 | assertEquals("300C0404000A00140404001E0028", sb.toString()); 45 | 46 | } 47 | } --------------------------------------------------------------------------------