directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: rev 20728 - in incubator/directory/snickers/trunk/stub-compiler/src: . antlr java java/org java/org/apache java/org/apache/snickers java/org/apache/snickers/asn1 java/org/apache/snickers/asn1/stages java/org/apache/snickers/asn1/stages/codegen java/org/apache/snickers/asn1/stages/parser java/org/apache/snickers/asn1/stages/parser/primitive java/org/apache/snickers/asn1/stages/parser/x680 java/org/apache/snickers/asn1/stages/parser/x680/element java/org/apache/snickers/asn1/stages/parser/x681 java/org/apache/snickers/asn1/stages/parser/x683 test test-data test/org test/org/apache test/org/apache/snickers test/org/apache/snickers/asn1 test/org/apache/snickers/asn1/stages test/org/apache/snickers/asn1/stages/parser vm
Date Tue, 01 Jun 2004 03:19:00 GMT
Author: adc
Date: Mon May 31 20:19:00 2004
New Revision: 20728

Added:
   incubator/directory/snickers/trunk/stub-compiler/src/
   incubator/directory/snickers/trunk/stub-compiler/src/antlr/
   incubator/directory/snickers/trunk/stub-compiler/src/antlr/asn1.g
   incubator/directory/snickers/trunk/stub-compiler/src/java/
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/Compiler.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/ProcessException.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/Stage.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/codegen/
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/codegen/CodeGeneratorStage.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/Environment.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/ParseException.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/ParseStage.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/TokenBase.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/primitive/
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/primitive/BooleanPrimitive.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/primitive/IntegerPrimitive.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/primitive/Primitive.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/BitStringType.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/BooleanType.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ComponentType.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ComponentTypeEnum.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ComponentTypeList.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ComponentTypeLists.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ConstrainedType.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/Constraint.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ConstraintSpec.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/DefinedType.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/DefinitiveIdentifier.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/IntegerType.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/Module.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ModuleIdentifier.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ModuleReference.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/NamedType.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ObjectIdentifier.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/OctetStringType.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ReferencedType.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/SequenceOfType.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/SequenceType.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/SubtypeConstraintSpec.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/Tag.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/TagDefaultEnum.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/Type.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/TypeAssignment.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/TypeReference.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/Value.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ValueAssignment.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ValueReference.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/element/
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/element/Element.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/element/ElementSetSpec.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/element/Intersection.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/element/LowerEndpoint.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/element/Union.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/element/UpperEndpoint.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/element/ValueRange.java
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x681/
   incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x683/
   incubator/directory/snickers/trunk/stub-compiler/src/test/
   incubator/directory/snickers/trunk/stub-compiler/src/test-data/
   incubator/directory/snickers/trunk/stub-compiler/src/test-data/ldap.asn1
   incubator/directory/snickers/trunk/stub-compiler/src/test/org/
   incubator/directory/snickers/trunk/stub-compiler/src/test/org/apache/
   incubator/directory/snickers/trunk/stub-compiler/src/test/org/apache/snickers/
   incubator/directory/snickers/trunk/stub-compiler/src/test/org/apache/snickers/asn1/
   incubator/directory/snickers/trunk/stub-compiler/src/test/org/apache/snickers/asn1/CompilerTest.java
   incubator/directory/snickers/trunk/stub-compiler/src/test/org/apache/snickers/asn1/stages/
   incubator/directory/snickers/trunk/stub-compiler/src/test/org/apache/snickers/asn1/stages/parser/
   incubator/directory/snickers/trunk/stub-compiler/src/test/org/apache/snickers/asn1/stages/parser/ASN1SyntaxTest.java
   incubator/directory/snickers/trunk/stub-compiler/src/vm/
   incubator/directory/snickers/trunk/stub-compiler/src/vm/class.vm
   incubator/directory/snickers/trunk/stub-compiler/src/vm/copyright.vm
Log:
Checkin WIP

Added: incubator/directory/snickers/trunk/stub-compiler/src/antlr/asn1.g
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/antlr/asn1.g	Mon May 31 20:19:00 2004
@@ -0,0 +1,592 @@
+header {
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.parser;
+
+import java.util.*;
+import org.apache.snickers.asn1.stages.parser.*;
+import org.apache.snickers.asn1.stages.parser.primitive.*;
+import org.apache.snickers.asn1.stages.parser.x680.*;
+import org.apache.snickers.asn1.stages.parser.x680.element.*;
+}
+
+class ASN1Parser extends Parser;
+options {
+    k=5;
+}
+
+tokens {
+    REAL_NUMBER;
+    INTEGER_NUMBER;
+}
+
+compile returns [Environment environment]
+{
+    Module module;
+    environment = new Environment();
+}
+    : (module = module_definition { environment.addModule(module); })+ ;
+
+/*
+ * X.680-0207
+ */
+module_definition returns [Module module]
+{
+    module = new Module();
+    ModuleIdentifier id;
+}
+    : id=module_identifier { module.setModuleIdentifier(id); }
+      DEFINITIONS
+      (tag_default[module])?
+      (extension_default[module])?
+      ASSIGNMENT BEGIN module_body[module] END
+    ;
+
+module_identifier returns [ModuleIdentifier id]
+{
+    ModuleReference mr;
+    DefinitiveIdentifier did;
+    id = new ModuleIdentifier();
+}
+    : mr=module_reference { id.setModuleReference(mr); } (did=definative_identifier { id.setDefinitiveIdentifier(did); } )?
+    ;
+
+definative_identifier returns [DefinitiveIdentifier id]
+{ id = new DefinitiveIdentifier(); }
+    : LEFT_CURLY (definitive_obj_id_component[id])+ RIGHT_CURLY
+    ;
+
+definitive_obj_id_component[DefinitiveIdentifier id]
+    : s1:IDENTIFIER { id.addNameForm(s1); }
+    | n1:INTEGER_NUMBER { id.addNumberForm(new IntegerPrimitive(n1)); }
+    | s2:IDENTIFIER LEFT_PAREN n2:INTEGER_NUMBER RIGHT_PAREN  { id.addNameAndNumberForm(s2, new IntegerPrimitive(n2)); }
+    ;
+
+tag_default[Module module]
+    : EXPLICIT TAGS { module.setTagDefault(TagDefaultEnum.EXPLICIT); }
+    | IMPLICIT TAGS { module.setTagDefault(TagDefaultEnum.IMPLICIT); }
+    | AUTOMATIC TAGS { module.setTagDefault(TagDefaultEnum.AUTOMATIC); }
+    ;
+
+extension_default[Module module]
+    : EXTENSIBILITY IMPLIED { module.setExtensibilityImplied(true); }
+    ;
+
+module_body[Module module]
+    : (assignment[module])+
+    ;
+
+assignment[Module module]
+{
+    TypeAssignment ta;
+    ValueAssignment va;
+}
+    : ta=type_assignment { module.addTypeAssignment(ta); }
+    | va=value_assignment { module.addValueAssignment(va); }
+    ;
+
+type_assignment returns [TypeAssignment ta]
+{
+    ta = new TypeAssignment();
+    Type t;
+}
+    : tr:TYPEREFERENCE { ta.setTypeReference(new TypeReference(tr)); } ASSIGNMENT t=type { ta.setType(t); }
+    ;
+
+type_assignment_test returns [TypeAssignment ta] { ta = null; } : ta=type_assignment ;
+
+type returns [Type type]
+{
+    Type t;
+    ConstrainedType ct;
+    Constraint c;
+    type = null;
+}
+    : t=builtin_type { type = t; } (c=constraint { ct = new ConstrainedType(); ct.setType(t); ct.setConstraint(c); type=ct; })?
+    | type=referenced_type
+    ;
+
+builtin_type returns [Type type]
+{ type = null; }
+    : type=bitstring_type
+    | type=boolean_type
+    | type=octet_string_type
+    | type=sequence_type
+    | type=sequence_of_type
+    | type=integer_type
+    ;
+
+bitstring_type returns [BitStringType bitStringType]
+{ bitStringType = new BitStringType(); }
+    : BIT STRING (LEFT_CURLY namedbit (COMMA namedbit)+ RIGHT_CURLY)?
+    ;
+
+namedbit
+    : IDENTIFIER LEFT_PAREN INTEGER_NUMBER RIGHT_PAREN
+    ;
+
+boolean_type returns [BooleanType booleanType]
+{ booleanType = new BooleanType(); }
+    : b:BOOLEAN { booleanType.setToken(b); }
+    ;
+
+octet_string_type returns [OctetStringType octetStringType]
+{ octetStringType = new OctetStringType(); }
+    : o:OCTET STRING { octetStringType.setToken(o); }
+    ;
+
+character_string_type
+    : BMPSTRING
+    | GENERAL_STRING
+    | GRAPHIC_STRING
+    | IA5_STRING
+    | ISO646_STRING
+    | NUMERIC_STRING
+    | PRINTABLE_STRING
+    | TELETEX_STRING
+    | T61_STRING
+    | UNIVERSAL_STRING
+    | UTF8_STRING
+    | VIDEOTEX_STRING
+    | VISIBLE_STRING
+    | CHARACTER STRING
+    ;
+
+sequence_type returns [SequenceType sequenceType]
+{
+    ComponentTypeLists ctl;
+    sequenceType = new SequenceType();
+}
+    : SEQUENCE LEFT_CURLY RIGHT_CURLY
+    | SEQUENCE LEFT_CURLY ctl=component_type_lists RIGHT_CURLY { sequenceType.setComponentTypeLists(ctl); }
+    ;
+
+sequence_of_type returns [SequenceOfType sequenceOfType]
+{
+    Type t;
+    sequenceOfType = new SequenceOfType();
+}
+    : SEQUENCE OF t=type { sequenceOfType.setType(t); }
+    | SEQUENCE OF t=named_type { sequenceOfType.setType(t); }
+    ;
+
+referenced_type returns [ReferencedType referencedType]
+{
+    Object r;
+    referencedType = new ReferencedType();
+}
+    : r=defined_type { referencedType.setReference(r); }
+    ;
+
+defined_type returns [DefinedType definedType]
+{ definedType = new DefinedType(); }
+    : tr:TYPEREFERENCE { definedType.setDefinition(new TypeReference(tr)); }
+    ;
+
+component_type_lists returns [ComponentTypeLists componentTypeLists]
+{
+    ComponentTypeList ctl;
+    componentTypeLists = new ComponentTypeLists();
+}
+    : ctl=root_component_type_list { componentTypeLists.setComponentTypeList(ctl); }
+    ;
+
+root_component_type_list returns [ComponentTypeList componentTypeList]
+{ componentTypeList = null; }
+    : componentTypeList=component_type_list
+    ;
+
+component_type_list returns [ComponentTypeList componentTypeList]
+  {
+      Type t;
+      componentTypeList = new ComponentTypeList();
+  }
+
+    : t=component_type { componentTypeList.add(t); } (COMMA t=component_type { componentTypeList.add(t); })*
+    ;
+
+component_type returns [ComponentType componentType]
+{
+    Type t;
+    Value v;
+    componentType = new ComponentType();
+}
+    : t=named_type { componentType.setType(t); }
+      (  OPTIONAL { componentType.setComponentTypeEnum(ComponentTypeEnum.OPTIONAL); }
+       | DEFAULT v=value { componentType.setValue(v); componentType.setComponentTypeEnum(ComponentTypeEnum.DEFAULT); })?
+    | COMPONENTS OF t=type { componentType.setType(t); componentType.setComponentTypeEnum(ComponentTypeEnum.COMPONENTS_OF); }
+    ;
+
+named_type returns [NamedType namedType]
+{
+    Type t;
+    namedType = new NamedType();
+}
+    : id:IDENTIFIER
+      (LEFT_SQUARE tid:INTEGER_NUMBER RIGHT_SQUARE { namedType.setTag( new Tag(new IntegerPrimitive(tid))); } )?
+      t=type { namedType.setName(id); namedType.setType(t); }
+    ;
+
+integer_type returns [IntegerType t]
+{ t = new IntegerType(); }
+    : i:INTEGER { t.setToken(i); }
+    ;
+
+value returns [Value v]
+{ v = null; }
+    : v=builtin_value
+    | IDENTIFIER
+    ;
+
+builtin_value returns [Value value]
+{ value = null; }
+    : value=boolean_value
+    | value=integer_value
+    ;
+
+boolean_value returns [BooleanPrimitive v]
+{ v = new BooleanPrimitive(); }
+    : b1:TRUE  { v.setToken(b1); }
+    | b2:FALSE { v.setToken(b2); }
+    ;
+
+integer_value returns [IntegerPrimitive v]
+{ v = new IntegerPrimitive(); }
+    : MINUS i1:INTEGER_NUMBER  { v.setNegative(true); v.setToken(i1); }
+    | i2:INTEGER_NUMBER { v.setToken(i2); }
+    ;
+
+value_assignment returns [ValueAssignment va]
+{
+    va = new ValueAssignment();
+    Type t;
+    Value v;
+}
+    : id:IDENTIFIER { va.setValueReference(new ValueReference(id)); } t=type { va.setType(t); } ASSIGNMENT v=value { va.setValue(v); }
+    ;
+
+constraint returns [Constraint constraint]
+{
+    ConstraintSpec cs;
+    constraint = new Constraint();
+}
+    : LEFT_PAREN cs=constraint_spec RIGHT_PAREN { constraint.setConstraintSpec(cs); }
+    ;
+
+constraint_spec returns [ConstraintSpec constraintSpec]
+{ constraintSpec = null; }
+    : constraintSpec=subtype_constraint
+    ;
+
+subtype_constraint returns [SubtypeConstraintSpec subtypeConstraintSpec]
+{
+    ElementSetSpec ess;
+    subtypeConstraintSpec = new SubtypeConstraintSpec();
+}
+    : ess=element_set_specs { subtypeConstraintSpec.setElementSetSpec(ess); }
+    ;
+
+element_set_specs returns [ElementSetSpec elementSetSpec]
+{ elementSetSpec = null; }
+    : elementSetSpec=root_element_set_spec
+    ;
+
+root_element_set_spec returns [ElementSetSpec elementSetSpec]
+{ elementSetSpec = null; }
+    : elementSetSpec=element_set_spec
+    ;
+
+element_set_spec returns [ElementSetSpec elementSetSpec]
+{ elementSetSpec = null; }
+    : elementSetSpec=unions
+    ;
+
+unions returns [Union union]
+{
+    Intersection i;
+    union = new Union();
+}
+    : i=intersections { union.addIntersection(i); }
+    ;
+
+intersections returns [Intersection intersection]
+{
+    Element ie;
+    intersection = new Intersection();
+}
+    : ie=intersection_elements { intersection.addElement(ie); }
+    ;
+
+intersection_elements returns [Element element]
+{ element = null; }
+    : element=elements
+    ;
+
+elements returns [Element element]
+{ element = null; }
+    : element=subtype_elements
+    ;
+
+subtype_elements returns [Element element]
+{ element = null; }
+    : element=value_range
+    ;
+
+value_range returns [ValueRange valueRange]
+{
+    LowerEndpoint le;
+    UpperEndpoint ue;
+    valueRange = new ValueRange();
+}
+    : le=lower_endpoint RANGE ue=upper_endpoint { valueRange.setLowerEndpoint(le); valueRange.setUpperEndpoint(ue); }
+    ;
+
+lower_endpoint returns [LowerEndpoint le]
+{
+    Value v;
+    le = new LowerEndpoint();
+}
+    : v=value { le.setValue(v); } (LESS_THAN { le.setOpen(true); })?
+    | MIN { le.setMin(true); } (LESS_THAN { le.setOpen(true); })?
+    ;
+
+upper_endpoint returns [UpperEndpoint ue]
+{
+    Value v;
+    ue = new UpperEndpoint();
+}
+    :  (LESS_THAN { ue.setOpen(true); })? v=value { ue.setValue(v); }
+    |  (LESS_THAN { ue.setOpen(true); })? MAX { ue.setMax(true); }
+    ;
+
+
+/*
+ * X.681-0207
+ */
+
+
+/*
+ * X.682-0207
+ */
+
+/*
+ * X.683-0207
+ */
+
+number
+    : INTEGER_NUMBER
+    | REAL_NUMBER
+    | BINARY_STRING
+    | HEXADECIMAL_STRING
+    ;
+
+module_reference returns [ModuleReference reference]
+{ reference = new ModuleReference(); }
+    : tr:TYPEREFERENCE { reference.setToken(tr); }
+    ;
+
+value_reference : IDENTIFIER;
+type_reference : TYPEREFERENCE;
+object_reference : value_reference;
+word : type_reference;
+object_set_reference : type_reference;
+type_field_reference : AMPERSAND type_reference;
+value_field_reference : AMPERSAND value_reference;
+value_set_field_reference : AMPERSAND value_reference;
+object_field_reference : AMPERSAND object_reference;
+object_set_field_reference : AMPERSAND object_reference;
+object_class_reference : AMPERSAND type_reference;
+
+
+{
+import org.apache.snickers.asn1.*;
+}
+class ASN1Compiler extends TreeParser;
+options {
+    defaultErrorHandler=false;
+}
+
+modules : ( ABSENT );
+
+class ASN1Lexer extends Lexer;
+options {
+    k=3;
+    charVocabulary = '\3'..'\377' | '\u1000'..'\u1fff';
+}
+
+/*
+ * X.680-0207
+ */
+tokens {
+    ABSENT = "ABSENT";
+    ABSTRACT_SYNTAX = "ABSTRACT-SYNTAX";
+    ALL = "ALL";
+    ANY = "ANY";
+    ARGUMENT = "ARGUMENT";
+    APPLICATION = "APPLICATION";
+    AUTOMATIC = "AUTOMATIC";
+    BASEDNUM = "BASEDNUM";
+    BEGIN = "BEGIN";
+    BIT = "BIT";
+    BMPSTRING = "BMPString";
+    BOOLEAN = "BOOLEAN";
+    BY = "BY";
+    CHARACTER = "CHARACTER";
+    CHOICE = "CHOICE";
+    CLASS = "CLASS";
+    COMPONENTS = "COMPONENTS";
+    COMPONENT = "COMPONENT";
+    CONSTRAINED = "CONSTRAINED";
+    DEFAULT = "DEFAULT";
+    DEFINED= "DEFINED";
+    DEFINITIONS = "DEFINITIONS";
+    EMBEDDED = "EMBEDDED";
+    END = "END";
+    ENUMERATED  = "ENUMERATED";
+    ERROR  = "ERROR";
+    ERRORS = "ERRORS";
+    EXCEPT = "EXCEPT";
+    EXPLICIT = "EXPLICIT";
+    EXPORTS = "EXPORTS";
+    EXTENSIBILITY = "EXTENSIBILITY";
+    EXTERNAL = "EXTERNAL";
+    FALSE = "FALSE";
+    FROM = "FROM";
+    GENERALIZED_TIME = "GeneralizedTime";
+    GENERAL_STRING = "GeneralString";
+    GRAPHIC_STRING = "GraphicString";
+    IA5_STRING = "IA5String";
+    IDENTIFIER = "IDENTIFIER";
+    IMPLICIT = "IMPLICIT";
+    IMPLIED = "IMPLIED";
+    IMPORTS = "IMPORTS";
+    INCLUDES = "INCLUDES";
+    INSTANCE = "INSTANCE";
+    INTEGER = "INTEGER";
+    INTERSECTION = "INTERSECTION";
+    ISO646_STRING = "ISO646String";
+    LINKED = "LINKED";
+    MAX = "MAX";
+    MINUS_INFINITY = "MINUSINFINITY";
+    MIN = "MIN";
+    NULL = "NULL";
+    NUMERIC_STRING = "NumericString";
+    OBJECT_DESCRIPTOR = "ObjectDescriptor";
+    OBJECT = "OBJECT";
+    OCTET = "OCTET";
+    OPERATION = "OPERATION";
+    OF = "OF";
+    OID = "OID";
+    OPTIONAL = "OPTIONAL";
+    PARAMETER = "PARAMETER";
+    PDV = "PDV";
+    PLUS_INFINITY = "PLUSINFINITY";
+    PRESENT = "PRESENT";
+    PRINTABLE_STRING = "PrintableString";
+    PRIVATE = "PRIVATE";
+    REAL = "REAL";
+    RELATIVE = "RELATIVE";
+    RESULT = "RESULT";
+    SEQUENCE = "SEQUENCE";
+    SET = "SET";
+    SIZE = "SIZE";
+    STRING = "STRING";
+    T61_STRING = "T61String";
+    TAGS = "TAGS";
+    TELETEX_STRING = "TeletexString";
+    TRUE = "TRUE";
+    TYPE_IDENTIFIER = "TYPE-IDENTIFIER";
+    UNION = "UNION";
+    UNIQUE = "UNIQUE";
+    UNIVERSAL = "UNIVERSAL";
+    UNIVERSAL_STRING = "UniversalString";
+    UTC_TIME = "UTCTime";
+    UTF8_STRING = "UTF8String";
+    VIDEOTEX_STRING = "VideotexString";
+    VISIBLE_STRING = "VisibleString";
+    WITH = "WITH";
+
+/*
+ * X.680-0207
+ */
+
+    REFERENCE = "Reference";
+}
+
+NEWLINE
+    : ((('\r''\n') => '\r''\n') | '\r' | '\n')
+        { newline(); $setType(Token.SKIP); }
+    ;
+
+WS : ( ' ' | '\t' | '\f' ) { $setType(Token.SKIP); } ;
+
+COMMENT : "--" ;
+
+SL_COMMENT
+	: COMMENT
+	  ({ LA(2)!='-' }? '-' | ~('-'|'\n'|'\r'))*
+	  (((('\r''\n') => '\r''\n') | '\r' | '\n') {newline();} | COMMENT)
+        { $setType(Token.SKIP); }
+	;
+
+ASSIGNMENT : "::=";
+
+IDENTIFIER : SMALL_LETTER ( (HYPHEN)? (SMALL_LETTER | CAPITAL_LETTER | DIGIT) )* ;
+TYPEREFERENCE : CAPITAL_LETTER ( (HYPHEN)? (SMALL_LETTER | CAPITAL_LETTER | DIGIT) )* ;
+
+NUMBER : DIGITS (DOT (DIGIT)* (EXPONENT)? { $setType(REAL_NUMBER); } | { $setType(INTEGER_NUMBER); } ) ;
+
+
+protected DIGITS : ( ('1'..'9') (DIGIT)* | '0' );
+
+protected EXPONENT
+    : ('e'|'E') ('+'|'-')? (DIGIT)+
+    ;
+
+NUMBER_STRING : "'" (HEX_DIGIT | WS)* ("'B" {$setType(BINARY_STRING);} | "'H" {$setType(HEXADECIMAL_STRING);} );
+
+protected CAPITAL_LETTER : 'A'..'Z';
+protected SMALL_LETTER : 'a'..'z';
+protected DIGIT : '0'..'9';
+protected HEX_DIGIT : ('0'..'9' | 'A'..'F');
+EXCLAMATION_MARK : '!';
+QUOTATION_MARK : '"';
+AMPERSAND : '&';
+APOSTROPHE : '\'';
+LEFT_PAREN : '(';
+RIGHT_PAREN : ')';
+ASTERISK : '*';
+COMMA : ',';
+HYPHEN : '-';
+DOT : '.';
+SOLIDUS : '/';
+COLON : ':';
+SEMICOLON : ';';
+LESS_THAN : '<';
+EQUALS : '=';
+GREATER_THAN : '>';
+AT : '@';
+LEFT_SQUARE : '[';
+RIGHT_SQUARE : ']';
+CIRCUMFLEX : '^';
+UNDERSCORE : '_';
+LEFT_CURLY : '{';
+BAR : '|';
+RIGHT_CURLY : '}';
+RANGE : "..";
+ELLIPSIS : "...";
+

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/Compiler.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/Compiler.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,35 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1;
+
+import java.util.Map;
+
+import org.apache.snickers.asn1.stages.ProcessException;
+import org.apache.snickers.asn1.stages.codegen.CodeGeneratorStage;
+import org.apache.snickers.asn1.stages.parser.ParseStage;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class Compiler
+{
+    public void compile( Map environment ) throws ProcessException
+    {
+        new ParseStage().process( environment );
+        new CodeGeneratorStage().process( environment );
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/ProcessException.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/ProcessException.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,45 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages;
+
+/**
+ * A exception class that is thown by a compiler stage's proccess method.
+ * 
+ * @version $Revision: $ $Date: $
+ */
+public class ProcessException extends Exception
+{
+    public ProcessException()
+    {
+        super();
+    }
+
+    public ProcessException( String message )
+    {
+        super( message );
+    }
+
+    public ProcessException( String message, Throwable cause )
+    {
+        super( message, cause );
+    }
+
+    public ProcessException( Throwable cause )
+    {
+        super( cause );
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/Stage.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/Stage.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,29 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages;
+
+import java.util.Map;
+
+/**
+ * Interface for compiler stages.
+ * 
+ * @version $Revision: $ $Date: $
+ */
+public interface Stage
+{
+    public void process( Map environment ) throws ProcessException;
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/codegen/CodeGeneratorStage.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/codegen/CodeGeneratorStage.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,163 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.codegen;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Vector;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.velocity.VelocityContext;
+import org.apache.velocity.app.Velocity;
+import org.apache.velocity.exception.ParseErrorException;
+import org.apache.snickers.asn1.parser.Environment;
+import org.apache.snickers.asn1.stages.ProcessException;
+import org.apache.snickers.asn1.stages.Stage;
+import org.apache.snickers.asn1.stages.parser.ParseStage;
+import org.apache.snickers.asn1.stages.parser.x680.Module;
+import org.apache.snickers.asn1.stages.parser.x680.TypeReference;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class CodeGeneratorStage implements Stage
+{
+    private static Log log = LogFactory.getLog( CodeGeneratorStage.class );
+    public static final String ROOT_PACKAGE = "org.apache.snickers.asn1.stages.codegen.ROOT_PACKAGE";
+    public static final String DESTINATION_PATH = "org.apache.snickers.asn1.stages.codegen.DESTINATION_PATH";
+
+    private File destination;
+    private String packages;
+
+    public void process( Map environment ) throws ProcessException
+    {
+        log.trace( "Code generation stage processing begun" );
+
+
+        try
+        {
+            Properties props = new Properties();
+            props.put( "resource.loader", "class" );
+            props.put( "class.resource.loader.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader" );
+
+            Velocity.init( props );
+
+            Environment env = (Environment) environment.get( ParseStage.ENVIRONMENT );
+            if ( env == null ) throw new ProcessException( "Missing ENVIRONMENT from Parse stage" );
+
+            destination = generatePackages( environment );
+            Iterator modules = env.getModules();
+            while ( modules.hasNext() )
+            {
+                Module module = (Module) modules.next();
+                Map typeAssignments = module.getTypeAssignments();
+                Iterator typeReferences = typeAssignments.keySet().iterator();
+                while ( typeReferences.hasNext() )
+                {
+                    TypeReference typeReference = (TypeReference) typeReferences.next();
+                    generateClass( typeReference, environment );
+                }
+            }
+        }
+        catch ( Exception e )
+        {
+            throw new ProcessException( e );
+        }
+        finally
+        {
+            log.trace( "Code generation stage processing complete" );
+        }
+    }
+
+    private void generateClass( TypeReference typeReference, Map environment ) throws ProcessException
+    {
+        try
+        {
+            File classFile = new File( destination, typeReference.toString() + ".java" );
+            classFile.createNewFile();
+            PrintStream out = new PrintStream( new FileOutputStream( classFile ) );
+
+            VelocityContext context = new VelocityContext();
+
+            context.put( "package", packages );
+            context.put( "class", typeReference.toString() );
+
+            Vector list = new Vector();
+            list.add( new Test( "ONE" ) );
+            list.add( new Test( "TWO" ) );
+            context.put( "fieldList", list );
+
+            PrintWriter pw = new PrintWriter( out );
+
+            Velocity.mergeTemplate( "copyright.vm", context, pw );
+            Velocity.mergeTemplate( "class.vm", context, pw );
+
+
+            pw.flush();
+            pw.close();
+        }
+        catch ( IOException e )
+        {
+            throw new ProcessException( e );
+        }
+        catch ( ParseErrorException e )
+        {
+            throw new ProcessException( e );
+        }
+        catch ( Exception e )
+        {
+            throw new ProcessException( e );
+        }
+    }
+
+    public class Test
+    {
+        public String Name;
+
+        Test( String Name )
+        {
+            this.Name = Name;
+        }
+
+        public String getName()
+        {
+            return Name;
+        }
+    }
+
+    private File generatePackages( Map environment ) throws ProcessException
+    {
+        packages = (String) environment.get( ROOT_PACKAGE );
+        if ( packages == null ) throw new ProcessException( "Missing ENVIRONMENT from Parse stage" );
+
+        if ( !environment.containsKey( DESTINATION_PATH ) ) throw new ProcessException( "Missing DESTINATION_PATH" );
+        File root = new File( (String) environment.get( DESTINATION_PATH ) );
+        if ( !root.isDirectory() ) throw new ProcessException( "DESTINATION_PATH is not a valid directory" );
+
+        File directories = new File( root, packages.replace( '.', '/' ) );
+        directories.mkdirs();
+
+        return directories;
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/Environment.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/Environment.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,44 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.parser;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import org.apache.snickers.asn1.stages.parser.x680.Module;
+import org.apache.snickers.asn1.stages.parser.x680.Module;
+
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class Environment
+{
+
+    private ArrayList modules = new ArrayList();
+
+    public void addModule( Module module )
+    {
+        modules.add( module );
+    }
+
+    public Iterator getModules()
+    {
+        return modules.iterator();
+    }
+
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/ParseException.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/ParseException.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,44 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.parser;
+
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class ParseException extends Exception
+{
+    public ParseException()
+    {
+        super();
+    }
+
+    public ParseException( String message )
+    {
+        super( message );
+    }
+
+    public ParseException( String message, Throwable cause )
+    {
+        super( message, cause );
+    }
+
+    public ParseException( Throwable cause )
+    {
+        super( cause );
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/ParseStage.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/ParseStage.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,81 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.Map;
+import antlr.RecognitionException;
+import antlr.TokenStreamException;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.snickers.asn1.parser.ASN1Lexer;
+import org.apache.snickers.asn1.parser.ASN1Parser;
+import org.apache.snickers.asn1.parser.Environment;
+import org.apache.snickers.asn1.stages.Stage;
+import org.apache.snickers.asn1.stages.ProcessException;
+
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class ParseStage implements Stage
+{
+    private static Log log = LogFactory.getLog(ParseStage.class);
+
+    public static final String SRC_URI = "org.apache.snickers.asn1.stages.parser.SRC_URI";
+    public static final String ENVIRONMENT = "org.apache.snickers.asn1.stages.parser.ENVIRONMENT";
+
+    public void process( Map environment ) throws ProcessException
+    {
+        log.trace( "Parse stage processing begun");
+
+        try
+        {
+            ASN1Lexer lexer = new ASN1Lexer( new URI( (String) environment.get( SRC_URI ) ).toURL().openStream() );
+            Environment env = new ASN1Parser( lexer ).compile();
+            environment.put( ENVIRONMENT, env );
+        }
+        catch ( URISyntaxException e )
+        {
+            throw new ProcessException("SRC_URI is invalid", e);
+        }
+        catch ( MalformedURLException e )
+        {
+            throw new ProcessException("SRC_URI is invalid", e);
+        }
+        catch ( IOException e )
+        {
+            throw new ProcessException("SRC_URI is invalid", e);
+        }
+        catch ( TokenStreamException e )
+        {
+            throw new ProcessException("SRC_URI is invalid", e);
+        }
+        catch ( RecognitionException e )
+        {
+            throw new ProcessException("SRC_URI is invalid", e);
+        }
+        finally
+        {
+            log.trace( "Parse stage processing complete");
+        }
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/TokenBase.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/TokenBase.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,51 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.parser;
+
+import antlr.Token;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class TokenBase
+{
+    private Token token;
+
+    public TokenBase()
+    {
+    }
+
+    public TokenBase( Token token )
+    {
+        this.token = token;
+    }
+
+    public Token getToken()
+    {
+        return token;
+    }
+
+    public void setToken( Token token )
+    {
+        this.token = token;
+    }
+
+    public String toString()
+    {
+        return token.getText();
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/primitive/BooleanPrimitive.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/primitive/BooleanPrimitive.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,61 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.primitive;
+
+import antlr.Token;
+
+import org.apache.snickers.asn1.parser.ParseException;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class BooleanPrimitive extends Primitive
+{
+    private transient Boolean value;
+
+    public BooleanPrimitive()
+    {
+        super();
+    }
+
+    public BooleanPrimitive( Token token )
+    {
+        super( token );
+    }
+
+    public Object toPrimitive() throws ParseException
+    {
+        if ( value == null )
+        {
+            value = new Boolean( getToken().getText() );
+        }
+
+        return value;
+    }
+
+    public String toString()
+    {
+        try
+        {
+            return ( (Integer) toPrimitive() ).toString();
+        }
+        catch ( ParseException e )
+        {
+            return "[PARSE ERROR]";
+        }
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/primitive/IntegerPrimitive.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/primitive/IntegerPrimitive.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,79 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.primitive;
+
+import antlr.Token;
+
+import org.apache.snickers.asn1.parser.ParseException;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class IntegerPrimitive extends Primitive
+{
+    private transient Integer value;
+    private boolean negative;
+
+    public IntegerPrimitive()
+    {
+        super();
+    }
+
+    public IntegerPrimitive( Token token )
+    {
+        super( token );
+    }
+
+    public boolean isNegative()
+    {
+        return negative;
+    }
+
+    public void setNegative( boolean negative )
+    {
+        this.negative = negative;
+    }
+
+    public Object toPrimitive() throws ParseException
+    {
+        if ( value == null )
+        {
+            try
+            {
+                value = new Integer( ( negative ? "-" : "" ) + getToken().getText() );
+            }
+            catch ( NumberFormatException nfe )
+            {
+                throw new ParseException( nfe );
+            }
+        }
+
+        return value;
+    }
+
+    public String toString()
+    {
+        try
+        {
+            return ( (Integer) toPrimitive() ).toString();
+        }
+        catch ( ParseException e )
+        {
+            return "[PARSE ERROR]";
+        }
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/primitive/Primitive.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/primitive/Primitive.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,39 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.primitive;
+
+import antlr.Token;
+
+import org.apache.snickers.asn1.parser.ParseException;
+import org.apache.snickers.asn1.stages.parser.x680.Value;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+abstract public class Primitive extends Value
+{
+    public Primitive()
+    {
+    }
+
+    public Primitive( Token token )
+    {
+        super( token );
+    }
+
+    abstract public Object toPrimitive() throws ParseException;
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/BitStringType.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/BitStringType.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,37 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680;
+
+import org.apache.snickers.asn1.parser.TokenBase;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class BitStringType extends TokenBase implements Type
+{
+    private Tag tag;
+
+    public Tag getTag()
+    {
+        return tag;
+    }
+
+    public void setTag( Tag tag )
+    {
+        this.tag = tag;
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/BooleanType.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/BooleanType.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,37 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680;
+
+import org.apache.snickers.asn1.parser.TokenBase;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class BooleanType extends TokenBase implements Type
+{
+    private Tag tag;
+
+    public Tag getTag()
+    {
+        return tag;
+    }
+
+    public void setTag( Tag tag )
+    {
+        this.tag = tag;
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ComponentType.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ComponentType.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,68 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class ComponentType implements Type
+{
+    private Tag tag;
+    private Type type;
+    private Value value;
+    private ComponentTypeEnum componentTypeEnum;
+
+    public Tag getTag()
+    {
+        return tag;
+    }
+
+    public void setTag( Tag tag )
+    {
+        this.tag = tag;
+    }
+
+    public Type getType()
+    {
+        return type;
+    }
+
+    public void setType( Type type )
+    {
+        this.type = type;
+    }
+
+    public Value getValue()
+    {
+        return value;
+    }
+
+    public void setValue( Value value )
+    {
+        this.value = value;
+    }
+
+    public ComponentTypeEnum getComponentTypeEnum()
+    {
+        return componentTypeEnum;
+    }
+
+    public void setComponentTypeEnum( ComponentTypeEnum componentTypeEnum )
+    {
+        this.componentTypeEnum = componentTypeEnum;
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ComponentTypeEnum.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ComponentTypeEnum.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,34 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680;
+
+import org.apache.commons.lang.enum.ValuedEnum;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class ComponentTypeEnum extends ValuedEnum
+{
+    public static final ComponentTypeEnum OPTIONAL = new ComponentTypeEnum( "OPTIONAL", 0 );
+    public static final ComponentTypeEnum DEFAULT = new ComponentTypeEnum( "DEFAULT", 1 );
+    public static final ComponentTypeEnum COMPONENTS_OF = new ComponentTypeEnum( "COMPONENTS_OF", 2 );
+
+    public ComponentTypeEnum( String s, int i )
+    {
+        super( s, i );
+    }
+}
\ No newline at end of file

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ComponentTypeList.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ComponentTypeList.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,37 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680;
+
+import java.util.ArrayList;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class ComponentTypeList extends ArrayList implements Type
+{
+    private Tag tag;
+
+    public Tag getTag()
+    {
+        return tag;
+    }
+
+    public void setTag( Tag tag )
+    {
+        this.tag = tag;
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ComponentTypeLists.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ComponentTypeLists.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,37 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680;
+
+import org.apache.snickers.asn1.stages.parser.x680.ComponentTypeList;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class ComponentTypeLists
+{
+    private ComponentTypeList componentTypeList;
+
+    public ComponentTypeList getComponentTypeList()
+    {
+        return componentTypeList;
+    }
+
+    public void setComponentTypeList( ComponentTypeList componentTypeList )
+    {
+        this.componentTypeList = componentTypeList;
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ConstrainedType.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ConstrainedType.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,59 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680;
+
+
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class ConstrainedType implements Type
+{
+    private Tag tag;
+    private Type type;
+    private Constraint constraint;
+
+    public Tag getTag()
+    {
+        return tag;
+    }
+
+    public void setTag( Tag tag )
+    {
+        this.tag = tag;
+    }
+
+    public Type getType()
+    {
+        return type;
+    }
+
+    public void setType( Type type )
+    {
+        this.type = type;
+    }
+
+    public Constraint getConstraint()
+    {
+        return constraint;
+    }
+
+    public void setConstraint( Constraint constraint )
+    {
+        this.constraint = constraint;
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/Constraint.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/Constraint.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,35 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class Constraint
+{
+    private ConstraintSpec constraintSpec;
+
+    public ConstraintSpec getConstraintSpec()
+    {
+        return constraintSpec;
+    }
+
+    public void setConstraintSpec( ConstraintSpec constraintSpec )
+    {
+        this.constraintSpec = constraintSpec;
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ConstraintSpec.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ConstraintSpec.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,24 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class ConstraintSpec
+{
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/DefinedType.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/DefinedType.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,35 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class DefinedType
+{
+    private Object definition;
+
+    public Object getDefinition()
+    {
+        return definition;
+    }
+
+    public void setDefinition( Object definition )
+    {
+        this.definition = definition;
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/DefinitiveIdentifier.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/DefinitiveIdentifier.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,24 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class DefinitiveIdentifier extends ObjectIdentifier
+{
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/IntegerType.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/IntegerType.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,37 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680;
+
+import org.apache.snickers.asn1.parser.TokenBase;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class IntegerType extends TokenBase implements Type
+{
+    private Tag tag;
+
+    public Tag getTag()
+    {
+        return tag;
+    }
+
+    public void setTag( Tag tag )
+    {
+        this.tag = tag;
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/Module.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/Module.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,84 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class Module
+{
+    private ModuleIdentifier id;
+    private TagDefaultEnum tagDefault = TagDefaultEnum.EXPLICIT;
+    private boolean extensibilityImplied = false;
+    private Map assignments = new HashMap();
+    private Map typeAssignments = new HashMap();
+
+    public ModuleIdentifier getModuleIdentifier()
+    {
+        return id;
+    }
+
+    public void setModuleIdentifier( ModuleIdentifier id )
+    {
+        this.id = id;
+    }
+
+    public TagDefaultEnum getTagDefault()
+    {
+        return tagDefault;
+    }
+
+    public void setTagDefault( TagDefaultEnum tagDefault )
+    {
+        this.tagDefault = tagDefault;
+    }
+
+    public boolean isExtensibilityImplied()
+    {
+        return extensibilityImplied;
+    }
+
+    public void setExtensibilityImplied( boolean extensibilityImplied )
+    {
+        this.extensibilityImplied = extensibilityImplied;
+    }
+
+    public void addTypeAssignment( TypeAssignment assignment )
+    {
+        assignments.put( assignment.getTypeReference(), assignment );
+        typeAssignments.put( assignment.getTypeReference(), assignment );
+    }
+
+    public void addValueAssignment( ValueAssignment assignment )
+    {
+        assignments.put( assignment.getValueReference(), assignment );
+    }
+
+    public Map getTypeAssignments()
+    {
+        return typeAssignments;
+    }
+
+    public Map getAssignments()
+    {
+        return assignments;
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ModuleIdentifier.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ModuleIdentifier.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,48 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680;
+
+import org.apache.snickers.asn1.stages.parser.x680.DefinitiveIdentifier;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class ModuleIdentifier
+{
+    private ModuleReference name;
+    private DefinitiveIdentifier id;
+
+    public ModuleReference getModuleReference()
+    {
+        return name;
+    }
+
+    public void setModuleReference( ModuleReference name )
+    {
+        this.name = name;
+    }
+
+    public DefinitiveIdentifier getDefinitiveIdentifier()
+    {
+        return id;
+    }
+
+    public void setDefinitiveIdentifier( DefinitiveIdentifier id )
+    {
+        this.id = id;
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ModuleReference.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ModuleReference.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,26 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680;
+
+import org.apache.snickers.asn1.parser.TokenBase;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class ModuleReference extends TokenBase
+{
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/NamedType.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/NamedType.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,59 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680;
+
+import antlr.Token;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class NamedType implements Type
+{
+    private Tag tag;
+    private Token name;
+    private Type type;
+
+    public Tag getTag()
+    {
+        return tag;
+    }
+
+    public void setTag( Tag tag )
+    {
+        this.tag = tag;
+    }
+
+    public Token getName()
+    {
+        return name;
+    }
+
+    public void setName( Token name )
+    {
+        this.name = name;
+    }
+
+    public Type getType()
+    {
+        return type;
+    }
+
+    public void setType( Type type )
+    {
+        this.type = type;
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ObjectIdentifier.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ObjectIdentifier.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,74 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680;
+
+import java.util.ArrayList;
+import antlr.Token;
+
+import org.apache.snickers.asn1.stages.parser.primitive.IntegerPrimitive;
+import org.apache.snickers.asn1.stages.parser.primitive.IntegerPrimitive;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class ObjectIdentifier
+{
+    private ArrayList list = new ArrayList();
+
+    public void addNameForm( Token name )
+    {
+        list.add( name );
+    }
+
+    public void addNumberForm( IntegerPrimitive number )
+    {
+        list.add( number );
+    }
+
+    public void addNameAndNumberForm( Token name, IntegerPrimitive number )
+    {
+        list.add( new NameAndNumber( name, number ) );
+    }
+
+    private class NameAndNumber
+    {
+        private Token name;
+        private IntegerPrimitive number;
+
+        NameAndNumber( Token name, IntegerPrimitive number )
+        {
+            this.name = name;
+            this.number = number;
+        }
+
+        public String toString()
+        {
+            return name.getText() + "(" + number + ")";
+        }
+
+        public boolean equals( Object object )
+        {
+            if ( object instanceof NameAndNumber )
+            {
+                NameAndNumber other = (NameAndNumber) object;
+                return name.getText().equals( other.name.getText() ) && number.equals( other.number );
+            }
+            else
+                return false;
+        }
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/OctetStringType.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/OctetStringType.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,37 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680;
+
+import org.apache.snickers.asn1.parser.TokenBase;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class OctetStringType extends TokenBase implements Type
+{
+    private Tag tag;
+
+    public Tag getTag()
+    {
+        return tag;
+    }
+
+    public void setTag( Tag tag )
+    {
+        this.tag = tag;
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ReferencedType.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ReferencedType.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,46 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class ReferencedType implements Type
+{
+    private Tag tag;
+    private Object Reference;
+
+    public Tag getTag()
+    {
+        return tag;
+    }
+
+    public void setTag( Tag tag )
+    {
+        this.tag = tag;
+    }
+
+    public Object getReference()
+    {
+        return Reference;
+    }
+
+    public void setReference( Object reference )
+    {
+        this.Reference = reference;
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/SequenceOfType.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/SequenceOfType.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,47 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680;
+
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class SequenceOfType implements Type
+{
+    private Tag tag;
+    private Type type;
+
+    public Tag getTag()
+    {
+        return tag;
+    }
+
+    public void setTag( Tag tag )
+    {
+        this.tag = tag;
+    }
+
+    public Type getType()
+    {
+        return type;
+    }
+
+    public void setType( Type type )
+    {
+        this.type = type;
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/SequenceType.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/SequenceType.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,49 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680;
+
+import org.apache.snickers.asn1.stages.parser.x680.ComponentTypeLists;
+
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class SequenceType implements Type
+{
+    private Tag tag;
+    private ComponentTypeLists componentTypeLists;
+
+    public Tag getTag()
+    {
+        return tag;
+    }
+
+    public void setTag( Tag tag )
+    {
+        this.tag = tag;
+    }
+
+    public ComponentTypeLists getComponentTypeLists()
+    {
+        return componentTypeLists;
+    }
+
+    public void setComponentTypeLists( ComponentTypeLists componentTypeLists )
+    {
+        this.componentTypeLists = componentTypeLists;
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/SubtypeConstraintSpec.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/SubtypeConstraintSpec.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,38 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680;
+
+import org.apache.snickers.asn1.stages.parser.x680.element.ElementSetSpec;
+import org.apache.snickers.asn1.stages.parser.x680.ConstraintSpec;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class SubtypeConstraintSpec extends ConstraintSpec
+{
+    private ElementSetSpec ElementSetSpec;
+
+    public ElementSetSpec getElementSetSpec()
+    {
+        return ElementSetSpec;
+    }
+
+    public void setElementSetSpec( ElementSetSpec elementSetSpec )
+    {
+        ElementSetSpec = elementSetSpec;
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/Tag.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/Tag.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,44 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680;
+
+import org.apache.snickers.asn1.stages.parser.primitive.IntegerPrimitive;
+import org.apache.snickers.asn1.stages.parser.primitive.IntegerPrimitive;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class Tag
+{
+    private int id;
+    private IntegerPrimitive integerPrimitive;
+
+    public Tag( IntegerPrimitive integerPrimitive )
+    {
+        this.integerPrimitive = integerPrimitive;
+    }
+
+    public int getId()
+    {
+        return id;
+    }
+
+    public void setId( int id )
+    {
+        this.id = id;
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/TagDefaultEnum.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/TagDefaultEnum.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,34 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680;
+
+import org.apache.commons.lang.enum.ValuedEnum;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class TagDefaultEnum extends ValuedEnum
+{
+    public static final TagDefaultEnum EXPLICIT = new TagDefaultEnum( "EXPLICIT", 0 );
+    public static final TagDefaultEnum IMPLICIT = new TagDefaultEnum( "IMPLICIT", 1 );
+    public static final TagDefaultEnum AUTOMATIC = new TagDefaultEnum( "AUTOMATIC", 2 );
+
+    public TagDefaultEnum( String s, int i )
+    {
+        super( s, i );
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/Type.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/Type.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,30 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680;
+
+
+import org.apache.snickers.asn1.stages.parser.x680.Tag;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public interface Type
+{
+    public Tag getTag();
+
+    public void setTag( Tag tag );
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/TypeAssignment.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/TypeAssignment.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,48 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680;
+
+import org.apache.snickers.asn1.stages.parser.x680.Type;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class TypeAssignment
+{
+    private TypeReference typeReference;
+    private Type type;
+
+    public TypeReference getTypeReference()
+    {
+        return typeReference;
+    }
+
+    public void setTypeReference( TypeReference typeReference )
+    {
+        this.typeReference = typeReference;
+    }
+
+    public Type getType()
+    {
+        return type;
+    }
+
+    public void setType( Type type )
+    {
+        this.type = type;
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/TypeReference.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/TypeReference.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,32 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680;
+
+import antlr.Token;
+
+import org.apache.snickers.asn1.parser.TokenBase;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class TypeReference extends TokenBase
+{
+    public TypeReference( Token token )
+    {
+        super( token );
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/Value.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/Value.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,42 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680;
+
+import antlr.Token;
+
+import org.apache.snickers.asn1.parser.TokenBase;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class Value extends TokenBase
+{
+    public Value()
+    {
+        super();
+    }
+
+    public Value( Value value )
+    {
+        super( value.getToken() );
+    }
+
+    public Value( Token token )
+    {
+        super( token );
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ValueAssignment.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ValueAssignment.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,60 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680;
+
+import org.apache.snickers.asn1.stages.parser.x680.Type;
+import org.apache.snickers.asn1.stages.parser.x680.Value;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class ValueAssignment
+{
+    private ValueReference valueReference;
+    private Type type;
+    private Value value;
+
+    public ValueReference getValueReference()
+    {
+        return valueReference;
+    }
+
+    public void setValueReference( ValueReference valueReference )
+    {
+        this.valueReference = valueReference;
+    }
+
+    public Type getType()
+    {
+        return type;
+    }
+
+    public void setType( Type type )
+    {
+        this.type = type;
+    }
+
+    public Value getValue()
+    {
+        return value;
+    }
+
+    public void setValue( Value value )
+    {
+        this.value = value;
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ValueReference.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/ValueReference.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,32 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680;
+
+import antlr.Token;
+
+import org.apache.snickers.asn1.parser.TokenBase;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class ValueReference extends TokenBase
+{
+    public ValueReference( Token token )
+    {
+        super( token );
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/element/Element.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/element/Element.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,24 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680.element;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class Element
+{
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/element/ElementSetSpec.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/element/ElementSetSpec.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,24 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680.element;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class ElementSetSpec
+{
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/element/Intersection.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/element/Intersection.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,35 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680.element;
+
+import java.util.ArrayList;
+
+import org.apache.snickers.asn1.stages.parser.x680.element.Element;
+import org.apache.snickers.asn1.stages.parser.x680.element.ElementSetSpec;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class Intersection extends ElementSetSpec
+{
+    private ArrayList elements = new ArrayList();
+
+    public void addElement( Element element )
+    {
+        elements.add( element );
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/element/LowerEndpoint.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/element/LowerEndpoint.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,59 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680.element;
+
+import org.apache.snickers.asn1.stages.parser.x680.Value;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class LowerEndpoint
+{
+    private Value value;
+    private boolean min;
+    private boolean open;
+
+    public Value getValue()
+    {
+        return value;
+    }
+
+    public void setValue( Value value )
+    {
+        this.value = value;
+    }
+
+    public boolean isMin()
+    {
+        return min;
+    }
+
+    public void setMin( boolean min )
+    {
+        this.min = min;
+    }
+
+    public boolean isOpen()
+    {
+        return open;
+    }
+
+    public void setOpen( boolean open )
+    {
+        this.open = open;
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/element/Union.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/element/Union.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,35 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680.element;
+
+import java.util.ArrayList;
+
+import org.apache.snickers.asn1.stages.parser.x680.element.ElementSetSpec;
+import org.apache.snickers.asn1.stages.parser.x680.element.Intersection;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class Union extends ElementSetSpec
+{
+    private ArrayList intersections = new ArrayList();
+
+    public void addIntersection( Intersection intersection )
+    {
+        intersections.add( intersection );
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/element/UpperEndpoint.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/element/UpperEndpoint.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,60 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680.element;
+
+import org.apache.snickers.asn1.stages.parser.x680.Value;
+import org.apache.snickers.asn1.stages.parser.x680.Value;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class UpperEndpoint extends Value
+{
+    private Value value;
+    private boolean max;
+    private boolean open;
+
+    public Value getValue()
+    {
+        return value;
+    }
+
+    public void setValue( Value value )
+    {
+        this.value = value;
+    }
+
+    public boolean isMax()
+    {
+        return max;
+    }
+
+    public void setMax( boolean max )
+    {
+        this.max = max;
+    }
+
+    public boolean isOpen()
+    {
+        return open;
+    }
+
+    public void setOpen( boolean open )
+    {
+        this.open = open;
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/element/ValueRange.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/java/org/apache/snickers/asn1/stages/parser/x680/element/ValueRange.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,51 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser.x680.element;
+
+import org.apache.snickers.asn1.stages.parser.x680.element.Element;
+import org.apache.snickers.asn1.stages.parser.x680.element.LowerEndpoint;
+import org.apache.snickers.asn1.stages.parser.x680.element.UpperEndpoint;
+
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class ValueRange extends Element
+{
+    private LowerEndpoint lowerEndpoint;
+    private UpperEndpoint upperEndpoint;
+
+    public LowerEndpoint getLowerEndpoint()
+    {
+        return lowerEndpoint;
+    }
+
+    public void setLowerEndpoint( LowerEndpoint lowerEndpoint )
+    {
+        this.lowerEndpoint = lowerEndpoint;
+    }
+
+    public UpperEndpoint getUpperEndpoint()
+    {
+        return upperEndpoint;
+    }
+
+    public void setUpperEndpoint( UpperEndpoint upperEndpoint )
+    {
+        this.upperEndpoint = upperEndpoint;
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/test-data/ldap.asn1
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/test-data/ldap.asn1	Mon May 31 20:19:00 2004
@@ -0,0 +1,29 @@
+-- foo --
+
+    Lightweight-Directory-Access-Protocol-V3 DEFINITIONS
+    IMPLICIT TAGS ::= --pragma {packagePrefix: "ldapd.common.ber"}
+
+    BEGIN
+
+        LDAPMessage ::= SEQUENCE {
+            messageID       MessageID,
+ --           protocolOp      CHOICE {
+ --               bindRequest     BindRequest  },
+            controls       [0] Controls OPTIONAL
+        }
+
+        MessageID ::= INTEGER (0 .. maxInt)
+
+        maxInt INTEGER ::= 2147483647 -- (2^^31 - 1) --
+
+        LDAPOID ::= OCTET STRING
+
+        Controls ::= SEQUENCE OF Control
+
+        Control ::= SEQUENCE {
+            controlType     LDAPOID,
+            criticality     BOOLEAN DEFAULT FALSE,
+            controlValue    OCTET STRING OPTIONAL
+        }
+
+    END

Added: incubator/directory/snickers/trunk/stub-compiler/src/test/org/apache/snickers/asn1/CompilerTest.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/test/org/apache/snickers/asn1/CompilerTest.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,43 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1;
+
+import java.util.HashMap;
+import java.util.Map;
+import junit.framework.TestCase;
+
+import org.apache.snickers.asn1.stages.parser.ParseStage;
+import org.apache.snickers.asn1.stages.codegen.CodeGeneratorStage;
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class CompilerTest extends TestCase
+{
+
+    public void testCompiler() throws Exception
+    {
+        Compiler compiler = new Compiler();
+        Map environment = new HashMap();
+
+        environment.put( ParseStage.SRC_URI, "file:./src/test-data/ldap.asn1" );
+        environment.put( CodeGeneratorStage.ROOT_PACKAGE, "org.apache.ldap.asn1" );
+        environment.put( CodeGeneratorStage.DESTINATION_PATH, "./target/test-code" );
+
+        compiler.compile( environment );
+    }
+}
\ No newline at end of file

Added: incubator/directory/snickers/trunk/stub-compiler/src/test/org/apache/snickers/asn1/stages/parser/ASN1SyntaxTest.java
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/test/org/apache/snickers/asn1/stages/parser/ASN1SyntaxTest.java	Mon May 31 20:19:00 2004
@@ -0,0 +1,88 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.snickers.asn1.stages.parser;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.StringReader;
+import junit.framework.TestCase;
+
+import org.apache.snickers.asn1.parser.ASN1Lexer;
+import org.apache.snickers.asn1.parser.ASN1Parser;
+import org.apache.snickers.asn1.parser.Environment;
+
+
+/**
+ * @version $Revision: $ $Date: $
+ */
+public class ASN1SyntaxTest extends TestCase
+{
+
+    public void testModules() throws Exception
+    {
+        Environment env = getParser( "FOOBAR DEFINITIONS ::= BEGIN BSTRING ::= BIT STRING END" ).compile();
+        getParser( "FOOBAR { dOOBAR dd(2) 2 } DEFINITIONS ::= BEGIN BSTRING ::= BIT STRING END" ).module_definition();
+        getParser( "FOOBAR { dOOBAR dd(2) 2 } DEFINITIONS AUTOMATIC TAGS ::= BEGIN BSTRING ::= BIT STRING END" ).module_definition();
+        getParser( "FOOBAR { dOOBAR dd(2) 2 } DEFINITIONS AUTOMATIC TAGS EXTENSIBILITY IMPLIED ::= BEGIN BSTRING ::= BIT STRING END" ).module_definition();
+
+
+        env = getParser( new File( "./src/test-data/ldap.asn1" ) ).compile();
+    }
+
+    public void testTypeAssignment() throws Exception
+    {
+        getParser( "BSTRING ::= BIT STRING" ).type_assignment_test();
+        getParser( "BSTRING ::= BIT STRING {a(1), b(2)}" ).type_assignment_test();
+        getParser( "BSTRING ::= BOOLEAN" ).type_assignment_test();
+    }
+
+    public void testModuleReference() throws Exception
+    {
+        getParser( "FOOBAR" ).module_reference();
+        getParser( "D" ).module_reference();
+        getParser( "D-C" ).module_reference();
+    }
+
+    public void testNumber() throws Exception
+    {
+        getParser( "1.0" ).number();
+        getParser( "1" ).number();
+        getParser( "0" ).number();
+        getParser( "0.123" ).number();
+        getParser( "0.123e-123" ).number();
+        getParser( "0.123e123" ).number();
+        getParser( "0.123E123" ).number();
+        getParser( "''B" ).number();
+        getParser( "'101010'B" ).number();
+        getParser( "'1010 1011 1101 0001'B" ).number();
+        getParser( "''H" ).number();
+        getParser( "'CAFEBABE'H" ).number();
+        getParser( "'CAFE BABE'H" ).number();
+    }
+
+    private ASN1Parser getParser( String src )
+    {
+        ASN1Lexer lexer = new ASN1Lexer( new StringReader( src ) );
+        return new ASN1Parser( lexer );
+    }
+
+    private ASN1Parser getParser( File src ) throws Exception
+    {
+        ASN1Lexer lexer = new ASN1Lexer( new FileReader( src ) );
+        return new ASN1Parser( lexer );
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/vm/class.vm
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/vm/class.vm	Mon May 31 20:19:00 2004
@@ -0,0 +1,16 @@
+package $package;
+
+import org.apache.snickers.as1.runtime.*;
+
+public class $class extends Type
+{
+#foreach( $field in $fieldList )
+    int $field.getName();
+#end
+
+    public $class() { }
+    
+    public $class($class other)
+    {
+    }
+}

Added: incubator/directory/snickers/trunk/stub-compiler/src/vm/copyright.vm
==============================================================================
--- (empty file)
+++ incubator/directory/snickers/trunk/stub-compiler/src/vm/copyright.vm	Mon May 31 20:19:00 2004
@@ -0,0 +1,16 @@
+/**
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */

Mime
View raw message