directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r592082 [17/20] - in /directory/sandbox/felixk/studio-ldapbrowser-core: ./ META-INF/ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/directory/ src/main/java/org/apache/directory/studio/ s...
Date Mon, 05 Nov 2007 16:52:07 GMT
Added: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaPart2.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaPart2.java?rev=592082&view=auto
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaPart2.java (added)
+++ directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaPart2.java Mon Nov  5 08:51:43 2007
@@ -0,0 +1,121 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you 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.directory.studio.ldapbrowser.core.model.schema;
+
+
+import java.util.HashSet;
+import java.util.Set;
+
+
+public abstract class SchemaPart2 extends SchemaPart
+{
+
+    protected String[] names;
+
+    protected boolean isObsolete;
+
+
+    protected SchemaPart2()
+    {
+        super();
+        this.names = new String[0];
+        this.isObsolete = false;
+    }
+
+
+    public Set getLowerCaseIdentifierSet()
+    {
+        Set idSet = new HashSet();
+        if ( this.numericOID != null )
+        {
+            idSet.add( this.numericOID.toLowerCase() );
+        }
+        idSet.addAll( toLowerCaseSet( this.names ) );
+        return idSet;
+    }
+
+
+    /**
+     * 
+     * @return the string representation of this schema part, a
+     *         comma-separated list of names.
+     */
+    public String toString()
+    {
+        StringBuffer sb = new StringBuffer();
+        for ( int i = 0; i < names.length; i++ )
+        {
+            sb.append( names[i] ).append( ", " );
+        }
+        if ( sb.length() > 2 )
+        {
+            sb.delete( sb.length() - 2, sb.length() );
+        }
+        return sb.toString();
+    }
+
+
+    /**
+     * 
+     * @return the names, may be an empty array
+     */
+    public String[] getNames()
+    {
+        return names;
+    }
+
+
+    public void setNames( String[] names )
+    {
+        this.names = names;
+    }
+
+
+    /**
+     * 
+     * @return the obsolete flag
+     */
+    public boolean isObsolete()
+    {
+        return isObsolete;
+    }
+
+
+    public void setObsolete( boolean isObsolete )
+    {
+        this.isObsolete = isObsolete;
+    }
+
+
+    protected Set toLowerCaseSet( String[] names )
+    {
+        Set set = new HashSet();
+        if ( names != null )
+        {
+            for ( int i = 0; i < names.length; i++ )
+            {
+                set.add( names[i].toLowerCase() );
+            }
+        }
+        return set;
+    }
+
+}

Propchange: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaPart2.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaUtils.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaUtils.java?rev=592082&view=auto
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaUtils.java (added)
+++ directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaUtils.java Mon Nov  5 08:51:43 2007
@@ -0,0 +1,157 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you 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.directory.studio.ldapbrowser.core.model.schema;
+
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
+
+
+public class SchemaUtils
+{
+
+    public static String[] getAttributeTypeDescriptionNames( AttributeTypeDescription[] atds )
+    {
+
+        Set attributeSet = new HashSet();
+        for ( int i = 0; i < atds.length; i++ )
+        {
+            AttributeTypeDescription atd = atds[i];
+            attributeSet.addAll( Arrays.asList( atd.getNames() ) );
+        }
+
+        String[] attributes = ( String[] ) attributeSet.toArray( new String[0] );
+        Arrays.sort( attributes );
+        return attributes;
+
+    }
+
+
+    /**
+     * 
+     * @return all operational attributes types
+     */
+    public static AttributeTypeDescription[] getOperationalAttributeDescriptions( Schema schema )
+    {
+        Set operationalAttributeSet = new HashSet();
+        for ( Iterator it = schema.getAtdMapByName().values().iterator(); it.hasNext(); )
+        {
+            AttributeTypeDescription atd = ( AttributeTypeDescription ) it.next();
+            if ( isOperational( atd ) )
+            {
+                operationalAttributeSet.add( atd );
+            }
+        }
+
+        AttributeTypeDescription[] operationalAttributes = ( AttributeTypeDescription[] ) operationalAttributeSet
+            .toArray( new AttributeTypeDescription[0] );
+        return operationalAttributes;
+    }
+
+
+    /**
+     * 
+     * @return all user attributes types
+     */
+    public static AttributeTypeDescription[] getUserAttributeDescriptions( Schema schema )
+    {
+        Set userAttributeSet = new HashSet();
+        for ( Iterator it = schema.getAtdMapByName().values().iterator(); it.hasNext(); )
+        {
+            AttributeTypeDescription atd = ( AttributeTypeDescription ) it.next();
+            if ( !isOperational( atd ) )
+            {
+                userAttributeSet.add( atd );
+            }
+        }
+
+        AttributeTypeDescription[] userAttributes = ( AttributeTypeDescription[] ) userAttributeSet
+            .toArray( new AttributeTypeDescription[0] );
+        return userAttributes;
+    }
+
+
+    public static boolean isOperational( AttributeTypeDescription atd )
+    {
+        return atd.isNoUserModification()
+            || !AttributeTypeDescription.ATTRIBUTE_USAGE_USER_APPLICATIONS.equalsIgnoreCase( atd.getUsage() );
+
+        // atd.isNoUserModification()
+        // ||
+        // AttributeTypeDescription.ATTRIBUTE_USAGE_DIRECTORY_OPERATION.equalsIgnoreCase(atd.getUsage())
+        // ||
+        // AttributeTypeDescription.ATTRIBUTE_USAGE_DSA_OPERATION.equalsIgnoreCase(atd.getUsage());
+    }
+
+
+    public static boolean isModifyable( AttributeTypeDescription atd )
+    {
+
+        if ( atd == null )
+        {
+            return false;
+        }
+
+        if ( atd.isNoUserModification() )
+        {
+            return false;
+        }
+
+        // Check some default no-user-modification attributes
+        // e.g. Siemens DirX doesn't provide a good schema.
+        // TODO: make default no-user-modification attributes configurable
+        String[] nonModifyableAttributes = new String[]
+            { IAttribute.OPERATIONAL_ATTRIBUTE_CREATORS_NAME, IAttribute.OPERATIONAL_ATTRIBUTE_CREATE_TIMESTAMP,
+                IAttribute.OPERATIONAL_ATTRIBUTE_MODIFIERS_NAME, IAttribute.OPERATIONAL_ATTRIBUTE_MODIFY_TIMESTAMP,
+                IAttribute.OPERATIONAL_ATTRIBUTE_STRUCTURAL_OBJECT_CLASS,
+                IAttribute.OPERATIONAL_ATTRIBUTE_GOVERNING_STRUCTURE_RULE,
+
+                IAttribute.OPERATIONAL_ATTRIBUTE_SUBSCHEMA_SUBENTRY, IAttribute.OPERATIONAL_ATTRIBUTE_VENDOR_NAME,
+                IAttribute.OPERATIONAL_ATTRIBUTE_VENDOR_VERSION,
+
+                IAttribute.OPERATIONAL_ATTRIBUTE_ENTRY_UUID, IAttribute.OPERATIONAL_ATTRIBUTE_HAS_SUBORDINATES,
+                IAttribute.OPERATIONAL_ATTRIBUTE_SUBORDINATE_COUNT, IAttribute.OPERATIONAL_ATTRIBUTE_NUM_SUBORDINATES
+
+            };
+        for ( int i = 0; i < nonModifyableAttributes.length; i++ )
+        {
+            String att = nonModifyableAttributes[i];
+            if ( att.equalsIgnoreCase( atd.getNumericOID() ) )
+            {
+                return false;
+            }
+            for ( int n = 0; n < atd.getNames().length; n++ )
+            {
+                if ( att.equalsIgnoreCase( atd.getNames()[n] ) )
+                {
+                    return false;
+                }
+            }
+        }
+
+        return true;
+    }
+
+}

Propchange: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaUtils.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Subschema.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Subschema.java?rev=592082&view=auto
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Subschema.java (added)
+++ directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Subschema.java Mon Nov  5 08:51:43 2007
@@ -0,0 +1,219 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you 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.directory.studio.ldapbrowser.core.model.schema;
+
+
+import java.io.Serializable;
+import java.util.Arrays;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
+
+
+public class Subschema implements Serializable
+{
+
+    private static final long serialVersionUID = 7821844589084867562L;
+
+    private String[] objectClassNames;
+
+    private Schema schema;
+
+    private Set allAttributeNameSet;
+
+
+    protected Subschema()
+    {
+    }
+
+
+    public Subschema( IEntry entry )
+    {
+        if ( entry.getAttribute( IAttribute.OBJECTCLASS_ATTRIBUTE ) != null )
+        {
+            this.objectClassNames = entry.getAttribute( IAttribute.OBJECTCLASS_ATTRIBUTE ).getStringValues();
+        }
+        else
+        {
+            this.objectClassNames = new String[0];
+        }
+        this.schema = entry.getBrowserConnection().getSchema();
+    }
+
+
+    public Subschema( String[] objectClassNames, IBrowserConnection connection )
+    {
+        this.objectClassNames = objectClassNames;
+        this.schema = connection.getSchema();
+    }
+
+
+    /**
+     * Returns the names of this and all super object classes.
+     * 
+     * @return
+     */
+    public String[] getObjectClassNames()
+    {
+        return this.objectClassNames;
+    }
+
+
+    /**
+     * Returns the must attribute names of this and all super object
+     * classes.
+     * 
+     * @return
+     */
+    public String[] getMustAttributeNames()
+    {
+        Set mustAttrSet = new TreeSet();
+        for ( int i = 0; i < this.objectClassNames.length; i++ )
+        {
+            this.fetchMust( this.objectClassNames[i], mustAttrSet );
+        }
+        return ( String[] ) mustAttrSet.toArray( new String[0] );
+    }
+
+
+    /**
+     * Returns the must attribute types of this and all super object
+     * classes.
+     * 
+     * @return
+     */
+    public AttributeTypeDescription[] getMustAttributeTypeDescriptions()
+    {
+        String[] musts = getMustAttributeNames();
+        AttributeTypeDescription[] atds = new AttributeTypeDescription[musts.length];
+        for ( int i = 0; i < musts.length; i++ )
+        {
+            AttributeTypeDescription atd = getSchema().getAttributeTypeDescription( musts[i] );
+            atds[i] = atd;
+        }
+        return atds;
+    }
+
+
+    private void fetchMust( String ocName, Set attributeSet )
+    {
+        // add own must attributes
+        ObjectClassDescription ocd = this.getSchema().getObjectClassDescription( ocName );
+        attributeSet.addAll( Arrays.asList( ocd.getMustAttributeTypeDescriptionNames() ) );
+
+        // add must attributes of super object classes
+        if ( ocd.getSuperiorObjectClassDescriptionNames() != null )
+        {
+            for ( int k = 0; k < ocd.getSuperiorObjectClassDescriptionNames().length; k++ )
+            {
+                fetchMust( ocd.getSuperiorObjectClassDescriptionNames()[k], attributeSet );
+            }
+        }
+    }
+
+
+    /**
+     * Returns the may attribute names of this and all super object classes.
+     * 
+     * @return
+     */
+    public String[] getMayAttributeNames()
+    {
+        Set mayAttrSet = new TreeSet();
+        for ( int i = 0; i < this.objectClassNames.length; i++ )
+        {
+            this.fetchMay( this.objectClassNames[i], mayAttrSet );
+        }
+        return ( String[] ) mayAttrSet.toArray( new String[0] );
+    }
+
+
+    /**
+     * Returns the may attribute types of this and all super object classes.
+     * 
+     * @return
+     */
+    public AttributeTypeDescription[] getMayAttributeTypeDescriptions()
+    {
+        String[] mays = getMayAttributeNames();
+        AttributeTypeDescription[] atds = new AttributeTypeDescription[mays.length];
+        for ( int i = 0; i < mays.length; i++ )
+        {
+            AttributeTypeDescription atd = getSchema().getAttributeTypeDescription( mays[i] );
+            atds[i] = atd;
+        }
+        return atds;
+    }
+
+
+    private void fetchMay( String ocName, Set attributeSet )
+    {
+        // add own may attributes
+        ObjectClassDescription ocd = this.getSchema().getObjectClassDescription( ocName );
+        attributeSet.addAll( Arrays.asList( ocd.getMayAttributeTypeDescriptionNames() ) );
+
+        // add may attributes of super object classes
+        if ( ocd.getSuperiorObjectClassDescriptionNames() != null )
+        {
+            for ( int k = 0; k < ocd.getSuperiorObjectClassDescriptionNames().length; k++ )
+            {
+                fetchMay( ocd.getSuperiorObjectClassDescriptionNames()[k], attributeSet );
+            }
+        }
+    }
+
+
+    /**
+     * Returns the must and may attribute names of this and all super object
+     * classes.
+     * 
+     * @return
+     */
+    public String[] getAllAttributeNames()
+    {
+        return ( String[] ) getAllAttributeNameSet().toArray( new String[0] );
+    }
+
+
+    public Set getAllAttributeNameSet()
+    {
+        if ( this.allAttributeNameSet == null )
+        {
+            this.allAttributeNameSet = new TreeSet();
+            this.allAttributeNameSet.addAll( Arrays.asList( this.getMustAttributeNames() ) );
+            this.allAttributeNameSet.addAll( Arrays.asList( this.getMayAttributeNames() ) );
+        }
+
+        return this.allAttributeNameSet;
+    }
+
+
+    private Schema getSchema()
+    {
+        return schema;
+        // return
+        // BrowserCorePlugin.getDefault().getConnectionManager().getConnection(this.connectionName).getSchema();
+    }
+
+}

Propchange: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Subschema.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SyntaxValueProviderRelation.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SyntaxValueProviderRelation.java?rev=592082&view=auto
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SyntaxValueProviderRelation.java (added)
+++ directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SyntaxValueProviderRelation.java Mon Nov  5 08:51:43 2007
@@ -0,0 +1,67 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you 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.directory.studio.ldapbrowser.core.model.schema;
+
+
+public class SyntaxValueProviderRelation
+{
+
+    private String syntaxOID;
+
+    private String valueProviderClassname;
+
+
+    public SyntaxValueProviderRelation()
+    {
+    }
+
+
+    public SyntaxValueProviderRelation( String syntaxOID, String valueProviderClassname )
+    {
+        this.syntaxOID = syntaxOID;
+        this.valueProviderClassname = valueProviderClassname;
+    }
+
+
+    public String getSyntaxOID()
+    {
+        return syntaxOID;
+    }
+
+
+    public void setSyntaxOID( String syntaxOID )
+    {
+        this.syntaxOID = syntaxOID;
+    }
+
+
+    public String getValueProviderClassname()
+    {
+        return valueProviderClassname;
+    }
+
+
+    public void setValueProviderClassname( String valueProviderClassname )
+    {
+        this.valueProviderClassname = valueProviderClassname;
+    }
+
+}

Propchange: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SyntaxValueProviderRelation.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/parser/SchemaLexer.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/parser/SchemaLexer.java?rev=592082&view=auto
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/parser/SchemaLexer.java (added)
+++ directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/parser/SchemaLexer.java Mon Nov  5 08:51:43 2007
@@ -0,0 +1,1640 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you 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. 
+ *  
+ */
+
+// $ANTLR 2.7.5 (20050128): "schema.g" -> "SchemaLexer.java"$
+package org.apache.directory.studio.ldapbrowser.core.model.schema.parser;
+
+
+import java.io.InputStream;
+import java.io.Reader;
+import java.util.Hashtable;
+
+import antlr.ByteBuffer;
+import antlr.CharBuffer;
+import antlr.CharStreamException;
+import antlr.CharStreamIOException;
+import antlr.InputBuffer;
+import antlr.LexerSharedInputState;
+import antlr.NoViableAltForCharException;
+import antlr.RecognitionException;
+import antlr.Token;
+import antlr.TokenStream;
+import antlr.TokenStreamException;
+import antlr.TokenStreamIOException;
+import antlr.TokenStreamRecognitionException;
+import antlr.collections.impl.BitSet;
+
+
+public class SchemaLexer extends antlr.CharScanner implements SchemaTokenTypes, TokenStream
+{
+    public SchemaLexer( InputStream in )
+    {
+        this( new ByteBuffer( in ) );
+    }
+
+
+    public SchemaLexer( Reader in )
+    {
+        this( new CharBuffer( in ) );
+    }
+
+
+    public SchemaLexer( InputBuffer ib )
+    {
+        this( new LexerSharedInputState( ib ) );
+    }
+
+
+    public SchemaLexer( LexerSharedInputState state )
+    {
+        super( state );
+        caseSensitiveLiterals = true;
+        setCaseSensitive( false );
+        literals = new Hashtable();
+    }
+
+
+    public Token nextToken() throws TokenStreamException
+    {
+        Token theRetToken = null;
+        tryAgain: for ( ;; )
+        {
+            Token _token = null;
+            int _ttype = Token.INVALID_TYPE;
+            resetText();
+            try
+            { // for char stream error handling
+                try
+                { // for lexical error handling
+                    switch ( LA( 1 ) )
+                    {
+                        case ' ':
+                        {
+                            mWHSP( true );
+                            theRetToken = _returnToken;
+                            break;
+                        }
+                        case ')':
+                        {
+                            mRPAR( true );
+                            theRetToken = _returnToken;
+                            break;
+                        }
+                        case '\'':
+                        {
+                            mQUOTE( true );
+                            theRetToken = _returnToken;
+                            break;
+                        }
+                        case '$':
+                        {
+                            mDOLLAR( true );
+                            theRetToken = _returnToken;
+                            break;
+                        }
+                        case '}':
+                        {
+                            mRBRACKET( true );
+                            theRetToken = _returnToken;
+                            break;
+                        }
+                        case 'e':
+                        {
+                            mEQUALITY( true );
+                            theRetToken = _returnToken;
+                            break;
+                        }
+                        case 'x':
+                        {
+                            mX( true );
+                            theRetToken = _returnToken;
+                            break;
+                        }
+                        case 'c':
+                        {
+                            mCOLLECTIVE( true );
+                            theRetToken = _returnToken;
+                            break;
+                        }
+                        default:
+                            if ( ( LA( 1 ) == 'u' ) && ( LA( 2 ) == 's' ) && ( LA( 3 ) == 'e' ) )
+                            {
+                                mUSAGE_USERAPPLICATIONS( true );
+                                theRetToken = _returnToken;
+                            }
+                            else if ( ( LA( 1 ) == 'd' ) && ( LA( 2 ) == 'i' ) && ( LA( 3 ) == 'r' ) )
+                            {
+                                mUSAGE_DIRECTORYOPERATION( true );
+                                theRetToken = _returnToken;
+                            }
+                            else if ( ( LA( 1 ) == 'd' ) && ( LA( 2 ) == 'i' ) && ( LA( 3 ) == 's' ) )
+                            {
+                                mUSAGE_DISTRIBUTEDOPERATION( true );
+                                theRetToken = _returnToken;
+                            }
+                            else if ( ( LA( 1 ) == 's' ) && ( LA( 2 ) == 'u' ) && ( LA( 3 ) == 'p' ) )
+                            {
+                                mSUP( true );
+                                theRetToken = _returnToken;
+                            }
+                            else if ( ( LA( 1 ) == 's' ) && ( LA( 2 ) == 'u' ) && ( LA( 3 ) == 'b' ) )
+                            {
+                                mSUBSTR( true );
+                                theRetToken = _returnToken;
+                            }
+                            else if ( ( LA( 1 ) == 'u' ) && ( LA( 2 ) == 's' ) && ( LA( 3 ) == 'a' ) )
+                            {
+                                mUSAGE( true );
+                                theRetToken = _returnToken;
+                            }
+                            else if ( ( LA( 1 ) == '{' ) && ( ( LA( 2 ) >= '0' && LA( 2 ) <= '9' ) ) )
+                            {
+                                mLEN( true );
+                                theRetToken = _returnToken;
+                            }
+                            else if ( ( LA( 1 ) == 'd' ) && ( LA( 2 ) == 's' ) )
+                            {
+                                mUSAGE_DSAOPERATION( true );
+                                theRetToken = _returnToken;
+                            }
+                            else if ( ( LA( 1 ) == '(' ) && ( _tokenSet_0.member( LA( 2 ) ) ) )
+                            {
+                                mSTARTNUMERICOID( true );
+                                theRetToken = _returnToken;
+                            }
+                            else if ( ( LA( 1 ) == 'n' ) && ( LA( 2 ) == 'a' ) )
+                            {
+                                mNAME( true );
+                                theRetToken = _returnToken;
+                            }
+                            else if ( ( LA( 1 ) == 'd' ) && ( LA( 2 ) == 'e' ) )
+                            {
+                                mDESC( true );
+                                theRetToken = _returnToken;
+                            }
+                            else if ( ( LA( 1 ) == 'm' ) && ( LA( 2 ) == 'u' ) )
+                            {
+                                mMUST( true );
+                                theRetToken = _returnToken;
+                            }
+                            else if ( ( LA( 1 ) == 'm' ) && ( LA( 2 ) == 'a' ) )
+                            {
+                                mMAY( true );
+                                theRetToken = _returnToken;
+                            }
+                            else if ( ( LA( 1 ) == 'o' ) && ( LA( 2 ) == 'r' ) )
+                            {
+                                mORDERING( true );
+                                theRetToken = _returnToken;
+                            }
+                            else if ( ( LA( 1 ) == 's' ) && ( LA( 2 ) == 'y' ) )
+                            {
+                                mSYNTAX( true );
+                                theRetToken = _returnToken;
+                            }
+                            else if ( ( LA( 1 ) == 'a' ) && ( LA( 2 ) == 'p' ) )
+                            {
+                                mAPPLIES( true );
+                                theRetToken = _returnToken;
+                            }
+                            else if ( ( LA( 1 ) == 's' ) && ( LA( 2 ) == 'i' ) )
+                            {
+                                mSINGLE_VALUE( true );
+                                theRetToken = _returnToken;
+                            }
+                            else if ( ( LA( 1 ) == 'n' ) && ( LA( 2 ) == 'o' ) )
+                            {
+                                mNO_USER_MODIFICATION( true );
+                                theRetToken = _returnToken;
+                            }
+                            else if ( ( LA( 1 ) == 'o' ) && ( LA( 2 ) == 'b' ) )
+                            {
+                                mOBSOLETE( true );
+                                theRetToken = _returnToken;
+                            }
+                            else if ( ( LA( 1 ) == 'a' ) && ( LA( 2 ) == 'b' ) )
+                            {
+                                mABSTRACT( true );
+                                theRetToken = _returnToken;
+                            }
+                            else if ( ( LA( 1 ) == 's' ) && ( LA( 2 ) == 't' ) )
+                            {
+                                mSTRUCTURAL( true );
+                                theRetToken = _returnToken;
+                            }
+                            else if ( ( LA( 1 ) == 'a' ) && ( LA( 2 ) == 'u' ) )
+                            {
+                                mAUXILIARY( true );
+                                theRetToken = _returnToken;
+                            }
+                            else if ( ( LA( 1 ) == '(' ) && ( true ) )
+                            {
+                                mLPAR( true );
+                                theRetToken = _returnToken;
+                            }
+                            else if ( ( LA( 1 ) == '{' ) && ( true ) )
+                            {
+                                mLBRACKET( true );
+                                theRetToken = _returnToken;
+                            }
+                            else
+                            {
+                                if ( LA( 1 ) == EOF_CHAR )
+                                {
+                                    uponEOF();
+                                    _returnToken = makeToken( Token.EOF_TYPE );
+                                }
+                                else
+                                {
+                                    throw new NoViableAltForCharException( ( char ) LA( 1 ), getFilename(), getLine(),
+                                        getColumn() );
+                                }
+                            }
+                    }
+                    if ( _returnToken == null )
+                        continue tryAgain; // found SKIP token
+                    _ttype = _returnToken.getType();
+                    _ttype = testLiteralsTable( _ttype );
+                    _returnToken.setType( _ttype );
+                    return _returnToken;
+                }
+                catch ( RecognitionException e )
+                {
+                    throw new TokenStreamRecognitionException( e );
+                }
+            }
+            catch ( CharStreamException cse )
+            {
+                if ( cse instanceof CharStreamIOException )
+                {
+                    throw new TokenStreamIOException( ( ( CharStreamIOException ) cse ).io );
+                }
+                else
+                {
+                    throw new TokenStreamException( cse.getMessage() );
+                }
+            }
+        }
+    }
+
+
+    public final void mWHSP( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = WHSP;
+        int _saveIndex;
+
+        {
+            int _cnt3 = 0;
+            _loop3: do
+            {
+                if ( ( LA( 1 ) == ' ' ) && ( true ) && ( true ) && ( true ) && ( true ) )
+                {
+                    match( ' ' );
+                }
+                else
+                {
+                    if ( _cnt3 >= 1 )
+                    {
+                        break _loop3;
+                    }
+                    else
+                    {
+                        throw new NoViableAltForCharException( ( char ) LA( 1 ), getFilename(), getLine(), getColumn() );
+                    }
+                }
+
+                _cnt3++;
+            }
+            while ( true );
+        }
+        _ttype = Token.SKIP;
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mLPAR( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = LPAR;
+        int _saveIndex;
+
+        match( '(' );
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mRPAR( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = RPAR;
+        int _saveIndex;
+
+        match( ')' );
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mQUOTE( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = QUOTE;
+        int _saveIndex;
+
+        match( '\'' );
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mDOLLAR( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = DOLLAR;
+        int _saveIndex;
+
+        match( '$' );
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mLBRACKET( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = LBRACKET;
+        int _saveIndex;
+
+        match( '{' );
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mRBRACKET( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = RBRACKET;
+        int _saveIndex;
+
+        match( '}' );
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mLEN( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = LEN;
+        int _saveIndex;
+
+        mLBRACKET( false );
+        {
+            int _cnt12 = 0;
+            _loop12: do
+            {
+                if ( ( ( LA( 1 ) >= '0' && LA( 1 ) <= '9' ) ) )
+                {
+                    matchRange( '0', '9' );
+                }
+                else
+                {
+                    if ( _cnt12 >= 1 )
+                    {
+                        break _loop12;
+                    }
+                    else
+                    {
+                        throw new NoViableAltForCharException( ( char ) LA( 1 ), getFilename(), getLine(), getColumn() );
+                    }
+                }
+
+                _cnt12++;
+            }
+            while ( true );
+        }
+        mRBRACKET( false );
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mUSAGE_USERAPPLICATIONS( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = USAGE_USERAPPLICATIONS;
+        int _saveIndex;
+
+        match( "userapplications" );
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mUSAGE_DIRECTORYOPERATION( boolean _createToken ) throws RecognitionException,
+        CharStreamException, TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = USAGE_DIRECTORYOPERATION;
+        int _saveIndex;
+
+        match( "directoryoperation" );
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mUSAGE_DISTRIBUTEDOPERATION( boolean _createToken ) throws RecognitionException,
+        CharStreamException, TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = USAGE_DISTRIBUTEDOPERATION;
+        int _saveIndex;
+
+        match( "distributedoperation" );
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mUSAGE_DSAOPERATION( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = USAGE_DSAOPERATION;
+        int _saveIndex;
+
+        match( "dsaoperation" );
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mSTARTNUMERICOID( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = STARTNUMERICOID;
+        int _saveIndex;
+        Token numericoid = null;
+
+        {
+            mLPAR( false );
+            {
+                mVALUE( true );
+                numericoid = _returnToken;
+            }
+        }
+        setText( numericoid.getText().trim() );
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    protected final void mVALUE( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = VALUE;
+        int _saveIndex;
+
+        {
+            switch ( LA( 1 ) )
+            {
+                case ' ':
+                {
+                    mWHSP( false );
+                    break;
+                }
+                case '\'':
+                case '-':
+                case '.':
+                case '0':
+                case '1':
+                case '2':
+                case '3':
+                case '4':
+                case '5':
+                case '6':
+                case '7':
+                case '8':
+                case '9':
+                case ';':
+                case 'a':
+                case 'b':
+                case 'c':
+                case 'd':
+                case 'e':
+                case 'f':
+                case 'g':
+                case 'h':
+                case 'i':
+                case 'j':
+                case 'k':
+                case 'l':
+                case 'm':
+                case 'n':
+                case 'o':
+                case 'p':
+                case 'q':
+                case 'r':
+                case 's':
+                case 't':
+                case 'u':
+                case 'v':
+                case 'w':
+                case 'x':
+                case 'y':
+                case 'z':
+                {
+                    break;
+                }
+                default:
+                {
+                    throw new NoViableAltForCharException( ( char ) LA( 1 ), getFilename(), getLine(), getColumn() );
+                }
+            }
+        }
+        {
+            switch ( LA( 1 ) )
+            {
+                case '\'':
+                {
+                    mQUOTED_STRING( false );
+                    break;
+                }
+                case '-':
+                case '.':
+                case '0':
+                case '1':
+                case '2':
+                case '3':
+                case '4':
+                case '5':
+                case '6':
+                case '7':
+                case '8':
+                case '9':
+                case ';':
+                case 'a':
+                case 'b':
+                case 'c':
+                case 'd':
+                case 'e':
+                case 'f':
+                case 'g':
+                case 'h':
+                case 'i':
+                case 'j':
+                case 'k':
+                case 'l':
+                case 'm':
+                case 'n':
+                case 'o':
+                case 'p':
+                case 'q':
+                case 'r':
+                case 's':
+                case 't':
+                case 'u':
+                case 'v':
+                case 'w':
+                case 'x':
+                case 'y':
+                case 'z':
+                {
+                    mUNQUOTED_STRING( false );
+                    break;
+                }
+                default:
+                {
+                    throw new NoViableAltForCharException( ( char ) LA( 1 ), getFilename(), getLine(), getColumn() );
+                }
+            }
+        }
+        {
+            if ( ( LA( 1 ) == ' ' ) && ( true ) && ( true ) && ( true ) && ( true ) )
+            {
+                mWHSP( false );
+            }
+            else
+            {
+            }
+
+        }
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mNAME( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = NAME;
+        int _saveIndex;
+        Token qdstrings = null;
+
+        {
+            match( "name" );
+            mWHSP( false );
+            mVALUES( true );
+            qdstrings = _returnToken;
+        }
+        setText( qdstrings.getText().trim() );
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    protected final void mVALUES( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = VALUES;
+        int _saveIndex;
+
+        {
+            switch ( LA( 1 ) )
+            {
+                case ' ':
+                case '\'':
+                case '-':
+                case '.':
+                case '0':
+                case '1':
+                case '2':
+                case '3':
+                case '4':
+                case '5':
+                case '6':
+                case '7':
+                case '8':
+                case '9':
+                case ';':
+                case 'a':
+                case 'b':
+                case 'c':
+                case 'd':
+                case 'e':
+                case 'f':
+                case 'g':
+                case 'h':
+                case 'i':
+                case 'j':
+                case 'k':
+                case 'l':
+                case 'm':
+                case 'n':
+                case 'o':
+                case 'p':
+                case 'q':
+                case 'r':
+                case 's':
+                case 't':
+                case 'u':
+                case 'v':
+                case 'w':
+                case 'x':
+                case 'y':
+                case 'z':
+                {
+                    mVALUE( false );
+                    break;
+                }
+                case '(':
+                {
+                    mLPAR( false );
+                    mVALUE( false );
+                    {
+                        _loop72: do
+                        {
+                            if ( ( _tokenSet_1.member( LA( 1 ) ) ) )
+                            {
+                                {
+                                    switch ( LA( 1 ) )
+                                    {
+                                        case '$':
+                                        {
+                                            mDOLLAR( false );
+                                            break;
+                                        }
+                                        case ' ':
+                                        case '\'':
+                                        case '-':
+                                        case '.':
+                                        case '0':
+                                        case '1':
+                                        case '2':
+                                        case '3':
+                                        case '4':
+                                        case '5':
+                                        case '6':
+                                        case '7':
+                                        case '8':
+                                        case '9':
+                                        case ';':
+                                        case 'a':
+                                        case 'b':
+                                        case 'c':
+                                        case 'd':
+                                        case 'e':
+                                        case 'f':
+                                        case 'g':
+                                        case 'h':
+                                        case 'i':
+                                        case 'j':
+                                        case 'k':
+                                        case 'l':
+                                        case 'm':
+                                        case 'n':
+                                        case 'o':
+                                        case 'p':
+                                        case 'q':
+                                        case 'r':
+                                        case 's':
+                                        case 't':
+                                        case 'u':
+                                        case 'v':
+                                        case 'w':
+                                        case 'x':
+                                        case 'y':
+                                        case 'z':
+                                        {
+                                            break;
+                                        }
+                                        default:
+                                        {
+                                            throw new NoViableAltForCharException( ( char ) LA( 1 ), getFilename(),
+                                                getLine(), getColumn() );
+                                        }
+                                    }
+                                }
+                                mVALUE( false );
+                            }
+                            else
+                            {
+                                break _loop72;
+                            }
+
+                        }
+                        while ( true );
+                    }
+                    mRPAR( false );
+                    break;
+                }
+                default:
+                {
+                    throw new NoViableAltForCharException( ( char ) LA( 1 ), getFilename(), getLine(), getColumn() );
+                }
+            }
+        }
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mDESC( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = DESC;
+        int _saveIndex;
+        Token qdstring = null;
+
+        {
+            match( "desc" );
+            mWHSP( false );
+            mVALUES( true );
+            qdstring = _returnToken;
+        }
+        setText( qdstring.getText().trim() );
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mSUP( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = SUP;
+        int _saveIndex;
+        Token sup = null;
+
+        {
+            match( "sup" );
+            mWHSP( false );
+            mVALUES( true );
+            sup = _returnToken;
+        }
+        setText( sup.getText().trim() );
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mMUST( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = MUST;
+        int _saveIndex;
+        Token must = null;
+
+        {
+            match( "must" );
+            mWHSP( false );
+            mVALUES( true );
+            must = _returnToken;
+        }
+        setText( must.getText().trim() );
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mMAY( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = MAY;
+        int _saveIndex;
+        Token may = null;
+
+        {
+            match( "may" );
+            mWHSP( false );
+            mVALUES( true );
+            may = _returnToken;
+        }
+        setText( may.getText() );
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mEQUALITY( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = EQUALITY;
+        int _saveIndex;
+        Token equality = null;
+
+        {
+            match( "equality" );
+            mWHSP( false );
+            mVALUES( true );
+            equality = _returnToken;
+        }
+        setText( equality.getText().trim() );
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mORDERING( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = ORDERING;
+        int _saveIndex;
+        Token ordering = null;
+
+        {
+            match( "ordering" );
+            mWHSP( false );
+            mVALUES( true );
+            ordering = _returnToken;
+        }
+        setText( ordering.getText().trim() );
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mSUBSTR( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = SUBSTR;
+        int _saveIndex;
+        Token substr = null;
+
+        {
+            match( "substr" );
+            mWHSP( false );
+            mVALUES( true );
+            substr = _returnToken;
+        }
+        setText( substr.getText().trim() );
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mSYNTAX( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = SYNTAX;
+        int _saveIndex;
+        Token syntax = null;
+        Token len = null;
+
+        {
+            match( "syntax" );
+            mWHSP( false );
+            mVALUES( true );
+            syntax = _returnToken;
+            {
+                if ( ( LA( 1 ) == '{' ) )
+                {
+                    mLEN( true );
+                    len = _returnToken;
+                }
+                else
+                {
+                }
+
+            }
+        }
+        setText( syntax.getText().trim() + ( len != null ? len.getText().trim() : "" ) );
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mUSAGE( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = USAGE;
+        int _saveIndex;
+        Token op = null;
+
+        {
+            match( "usage" );
+            mWHSP( false );
+            mVALUES( true );
+            op = _returnToken;
+        }
+        setText( op.getText().trim() );
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mAPPLIES( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = APPLIES;
+        int _saveIndex;
+        Token applies = null;
+
+        {
+            match( "applies" );
+            mWHSP( false );
+            mVALUES( true );
+            applies = _returnToken;
+        }
+        setText( applies.getText().trim() );
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mX( boolean _createToken ) throws RecognitionException, CharStreamException, TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = X;
+        int _saveIndex;
+
+        {
+            match( "x-" );
+            {
+                int _cnt46 = 0;
+                _loop46: do
+                {
+                    switch ( LA( 1 ) )
+                    {
+                        case 'a':
+                        case 'b':
+                        case 'c':
+                        case 'd':
+                        case 'e':
+                        case 'f':
+                        case 'g':
+                        case 'h':
+                        case 'i':
+                        case 'j':
+                        case 'k':
+                        case 'l':
+                        case 'm':
+                        case 'n':
+                        case 'o':
+                        case 'p':
+                        case 'q':
+                        case 'r':
+                        case 's':
+                        case 't':
+                        case 'u':
+                        case 'v':
+                        case 'w':
+                        case 'x':
+                        case 'y':
+                        case 'z':
+                        {
+                            matchRange( 'a', 'z' );
+                            break;
+                        }
+                        case '0':
+                        case '1':
+                        case '2':
+                        case '3':
+                        case '4':
+                        case '5':
+                        case '6':
+                        case '7':
+                        case '8':
+                        case '9':
+                        {
+                            matchRange( '0', '9' );
+                            break;
+                        }
+                        case '-':
+                        {
+                            match( '-' );
+                            break;
+                        }
+                        case '_':
+                        {
+                            match( '_' );
+                            break;
+                        }
+                        default:
+                        {
+                            if ( _cnt46 >= 1 )
+                            {
+                                break _loop46;
+                            }
+                            else
+                            {
+                                throw new NoViableAltForCharException( ( char ) LA( 1 ), getFilename(), getLine(),
+                                    getColumn() );
+                            }
+                        }
+                    }
+                    _cnt46++;
+                }
+                while ( true );
+            }
+            mWHSP( false );
+            mVALUES( false );
+        }
+        _ttype = Token.SKIP;
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mSINGLE_VALUE( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = SINGLE_VALUE;
+        int _saveIndex;
+
+        {
+            match( "single-value" );
+            {
+                if ( ( LA( 1 ) == ' ' ) )
+                {
+                    mWHSP( false );
+                }
+                else
+                {
+                }
+
+            }
+        }
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mCOLLECTIVE( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = COLLECTIVE;
+        int _saveIndex;
+
+        {
+            match( "collective" );
+            {
+                if ( ( LA( 1 ) == ' ' ) )
+                {
+                    mWHSP( false );
+                }
+                else
+                {
+                }
+
+            }
+        }
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mNO_USER_MODIFICATION( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = NO_USER_MODIFICATION;
+        int _saveIndex;
+
+        {
+            match( "no-user-modification" );
+            {
+                if ( ( LA( 1 ) == ' ' ) )
+                {
+                    mWHSP( false );
+                }
+                else
+                {
+                }
+
+            }
+        }
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mOBSOLETE( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = OBSOLETE;
+        int _saveIndex;
+
+        {
+            match( "obsolete" );
+            {
+                if ( ( LA( 1 ) == ' ' ) )
+                {
+                    mWHSP( false );
+                }
+                else
+                {
+                }
+
+            }
+        }
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mABSTRACT( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = ABSTRACT;
+        int _saveIndex;
+
+        {
+            match( "abstract" );
+            {
+                if ( ( LA( 1 ) == ' ' ) )
+                {
+                    mWHSP( false );
+                }
+                else
+                {
+                }
+
+            }
+        }
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mSTRUCTURAL( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = STRUCTURAL;
+        int _saveIndex;
+
+        {
+            match( "structural" );
+            {
+                if ( ( LA( 1 ) == ' ' ) )
+                {
+                    mWHSP( false );
+                }
+                else
+                {
+                }
+
+            }
+        }
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    public final void mAUXILIARY( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = AUXILIARY;
+        int _saveIndex;
+
+        {
+            match( "auxiliary" );
+            {
+                if ( ( LA( 1 ) == ' ' ) )
+                {
+                    mWHSP( false );
+                }
+                else
+                {
+                }
+
+            }
+        }
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    protected final void mQUOTED_STRING( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = QUOTED_STRING;
+        int _saveIndex;
+
+        {
+            mQUOTE( false );
+            {
+                _loop83: do
+                {
+                    if ( ( _tokenSet_2.member( LA( 1 ) ) ) )
+                    {
+                        matchNot( '\'' );
+                    }
+                    else
+                    {
+                        break _loop83;
+                    }
+
+                }
+                while ( true );
+            }
+            mQUOTE( false );
+        }
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    protected final void mUNQUOTED_STRING( boolean _createToken ) throws RecognitionException, CharStreamException,
+        TokenStreamException
+    {
+        int _ttype;
+        Token _token = null;
+        int _begin = text.length();
+        _ttype = UNQUOTED_STRING;
+        int _saveIndex;
+
+        {
+            int _cnt79 = 0;
+            _loop79: do
+            {
+                if ( ( ( LA( 1 ) >= 'a' && LA( 1 ) <= 'z' ) ) && ( true ) && ( true ) && ( true ) && ( true ) )
+                {
+                    matchRange( 'a', 'z' );
+                }
+                else if ( ( ( LA( 1 ) >= '0' && LA( 1 ) <= '9' ) ) && ( true ) && ( true ) && ( true ) && ( true ) )
+                {
+                    matchRange( '0', '9' );
+                }
+                else if ( ( LA( 1 ) == '-' ) && ( true ) && ( true ) && ( true ) && ( true ) )
+                {
+                    match( '-' );
+                }
+                else if ( ( LA( 1 ) == ';' ) && ( true ) && ( true ) && ( true ) && ( true ) )
+                {
+                    match( ';' );
+                }
+                else if ( ( LA( 1 ) == '.' ) && ( true ) && ( true ) && ( true ) && ( true ) )
+                {
+                    match( '.' );
+                }
+                else
+                {
+                    if ( _cnt79 >= 1 )
+                    {
+                        break _loop79;
+                    }
+                    else
+                    {
+                        throw new NoViableAltForCharException( ( char ) LA( 1 ), getFilename(), getLine(), getColumn() );
+                    }
+                }
+
+                _cnt79++;
+            }
+            while ( true );
+        }
+        if ( _createToken && _token == null && _ttype != Token.SKIP )
+        {
+            _token = makeToken( _ttype );
+            _token.setText( new String( text.getBuffer(), _begin, text.length() - _begin ) );
+        }
+        _returnToken = _token;
+    }
+
+
+    private static final long[] mk_tokenSet_0()
+    {
+        long[] data =
+            { 864515760645472256L, 576460743713488896L, 0L, 0L, 0L };
+        return data;
+    }
+
+    public static final BitSet _tokenSet_0 = new BitSet( mk_tokenSet_0() );
+
+
+    private static final long[] mk_tokenSet_1()
+    {
+        long[] data =
+            { 864515829364948992L, 576460743713488896L, 0L, 0L, 0L };
+        return data;
+    }
+
+    public static final BitSet _tokenSet_1 = new BitSet( mk_tokenSet_1() );
+
+
+    private static final long[] mk_tokenSet_2()
+    {
+        long[] data = new long[8];
+        data[0] = -549755813896L;
+        for ( int i = 1; i <= 3; i++ )
+        {
+            data[i] = -1L;
+        }
+        return data;
+    }
+
+    public static final BitSet _tokenSet_2 = new BitSet( mk_tokenSet_2() );
+
+}

Propchange: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/parser/SchemaLexer.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message