Class NomParser

  • All Implemented Interfaces:
    NomParserConstants

    public class NomParser
    extends Object
    implements NomParserConstants
    Deprecated.
    The OPSIN (http://opsin.ch.cam.ac.uk/) tool offers a more comprehensive alternative to this parsers functionality.
    A class partly generated by JavaCC which breaks down the chemical name into computable subparts and passes these parts to the MoleculeBuilder.
    Author:
    David Robinson (University of Manchester), Bhupinder Sandhu, Stephen Tomkinson
    Keywords:
    IUPAC name
    • Field Detail

      • token

        public Token token
        Deprecated.
        Current token.
      • jj_nt

        public Token jj_nt
        Deprecated.
        Next token.
    • Constructor Detail

      • NomParser

        public NomParser​(InputStream stream)
        Deprecated.
        Constructor with InputStream.
      • NomParser

        public NomParser​(InputStream stream,
                         String encoding)
        Deprecated.
        Constructor with InputStream and supplied encoding
      • NomParser

        public NomParser​(Reader stream)
        Deprecated.
        Constructor.
      • NomParser

        public NomParser​(NomParserTokenManager tm)
        Deprecated.
        Constructor with generated Token Manager.
    • Method Detail

      • generate

        public static IAtomContainer generate​(String stringToParse)
                                       throws ParseException,
                                              CDKException
        Deprecated.
        Parses the chemical name and returns the built molecule. It uses the DefaultChemObjectBuilder to create a data model.
        Parameters:
        stringToParse - A case-insensitive name of the chemical to build.
        Returns:
        A molecule which represents the interpretation of the name.
        Throws:
        ParseException - Any error which occur in the parsing get wrapped up in a ParseException and thrown.
        CDKException
      • generate

        public static IAtomContainer generate​(String stringToParse,
                                              IChemObjectBuilder builder)
                                       throws ParseException,
                                              CDKException
        Deprecated.
        Parses the chemical name and returns the built molecule. It uses the given IChemObjectBuilder to create a data model.
        Parameters:
        stringToParse - A case-insensitive name of the chemical to build.
        Returns:
        A molecule which represents the interpretation of the name.
        Throws:
        ParseException - Any error which occur in the parsing get wrapped up in a ParseException and thrown.
        CDKException
      • completeChemicalName

        public final void completeChemicalName()
                                        throws ParseException
        Deprecated.
        The general form all chemical names must follow.
        Throws:
        ParseException
      • attachLocationSpecified

        public final void attachLocationSpecified()
                                           throws ParseException
        Deprecated.
        An attach position has been specified using a comma seperated list followed by a dash
        Throws:
        ParseException
      • oneAttachLocation

        public final void oneAttachLocation()
                                     throws ParseException
        Deprecated.
        Only one attach location specified, should be followed by a dash.
        Throws:
        ParseException
      • twoOrThreeAttachLocations

        public final void twoOrThreeAttachLocations()
                                             throws ParseException
        Deprecated.
        Two or three attach locations specidied, handle the second and if needed, the third one here.
        Throws:
        ParseException
      • chainPrefix

        public final void chainPrefix()
                               throws ParseException
        Deprecated.
        A list of known tokens denoting a chain's length.
        Throws:
        ParseException
      • specialCase

        public final void specialCase()
                               throws ParseException
        Deprecated.
        Deal with special cases where the rules don't apply.
        Throws:
        ParseException
      • tensNoUnits

        public final void tensNoUnits()
                               throws ParseException
        Deprecated.
        Deal with fragments refering to the positioning of the base numbers (denoting their magnitude)
        Throws:
        ParseException
      • tensWithUnits

        public final void tensWithUnits()
                                 throws ParseException
        Deprecated.
        Deals with numbers above 30 where the base numbers set appear twice. For example, in the tens and the units.
        Throws:
        ParseException
      • functionalGroupPrefix

        public final void functionalGroupPrefix()
                                         throws ParseException
        Deprecated.
        The functional group part of the prefix
        Throws:
        ParseException
      • mainChainConstruct

        public final void mainChainConstruct()
                                      throws ParseException
        Deprecated.
        Main chains are compulsary and consist of an optional "cyclo", a length prefix and a posfix denoting functional groups.
        Throws:
        ParseException
      • mainChainPrefix

        public final void mainChainPrefix()
                                   throws ParseException
        Deprecated.
        Deal with the main chain's length.
        Throws:
        ParseException
      • bondType

        public final void bondType()
                            throws ParseException
        Deprecated.
        Tokens which affect the bond order of the first bond.
        Throws:
        ParseException
      • mainChainSuffix

        public final void mainChainSuffix()
                                   throws ParseException
        Deprecated.
        Figure out the functional group by the main chain's suffix.
        Throws:
        ParseException
      • endFunctionalGroups

        public final void endFunctionalGroups()
                                       throws ParseException
        Deprecated.
        Functional groups which occur at the end of the main chain and need a connecting "an".
        Throws:
        ParseException
      • connectingFunctionalGroupsConstruct

        public final void connectingFunctionalGroupsConstruct()
                                                       throws ParseException
        Deprecated.
        The layout of a functional group(s) which can connect anywhere. No number specified, or a number list specified.
        Throws:
        ParseException
      • connectingFunctionalGroupSuffix

        public final void connectingFunctionalGroupSuffix()
                                                   throws ParseException
        Deprecated.
        Functional groups suffixs for groups which can be connected anywhere along the main chain.
        Throws:
        ParseException
      • prioritySubstituentsFunGroups

        public final void prioritySubstituentsFunGroups()
                                                 throws ParseException
        Deprecated.
        Things which have sub chains branching off them and the molecule does have a main chain.
        Throws:
        ParseException
      • prioritySubstituents

        public final void prioritySubstituents()
                                        throws ParseException
        Deprecated.
        Things which have sub chains branching off them but the molecule has no main chain.
        Throws:
        ParseException
      • ReInit

        public void ReInit​(InputStream stream)
        Deprecated.
        Reinitialise.
      • ReInit

        public void ReInit​(InputStream stream,
                           String encoding)
        Deprecated.
        Reinitialise.
      • ReInit

        public void ReInit​(Reader stream)
        Deprecated.
        Reinitialise.
      • getNextToken

        public final Token getNextToken()
        Deprecated.
        Get the next Token.
      • getToken

        public final Token getToken​(int index)
        Deprecated.
        Get the specific Token.
      • generateParseException

        public ParseException generateParseException()
        Deprecated.
        Generate ParseException.
      • trace_enabled

        public final boolean trace_enabled()
        Deprecated.
        Trace enabled.
      • enable_tracing

        public final void enable_tracing()
        Deprecated.
        Enable tracing.
      • disable_tracing

        public final void disable_tracing()
        Deprecated.
        Disable tracing.