Package org.openscience.cdk.iupac.parser
Class NomParser
- java.lang.Object
-
- org.openscience.cdk.iupac.parser.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 Summary
Fields Modifier and Type Field Description Token
jj_nt
Deprecated.Next token.Token
token
Deprecated.Current token.NomParserTokenManager
token_source
Deprecated.Generated Token Manager.-
Fields inherited from interface org.openscience.cdk.iupac.parser.NomParserConstants
A, ACTINIUM, AL, ALUMINIUM, ALUMINO, AMERCIUM, AMIDE, AMINE, AMINO, AN, ANTIMONY, ARSENIC, BARIUM, BERKELIUM, BERYLLIUM, BISMUTH, BOHRIUM, BROMO, BUT, CADMIUM, CALCIUM, CALIFORNIUM, CERIUM, CESIUM, CHLORO, CHROMIUM, COBALT, COMMA, CONSTANT, CONT, COPPER, COS, CURIUM, CYCLO, DASH, DEC, DEFAULT, DI, DIGIT, DO, DUBNIUM, DYSPROSIUM, E, EICOS, EINSTEINIUM, EN, EOF, EOL, ERBIUM, ETH, EUROPIUM, FERMIUM, FLUORO, FRANCIUM, GADOLINIUM, GALLIUM, GERMAINIUM, GOLD, HAFNIUM, HASSIUM, HEN, HENICOS, HEPT, HEX, HOLMIUM, HYDROXY, INDIUM, IODO, IRIDIUM, IRON, LANTHANUM, LAWRENCIUM, LEAD, LITHIUM, LITHO, LUTETIUM, MAGNESIUM, MANGANESE, MECURY, MEITMERIUM, MENDELEVIUM, METH, MOLYBDENUM, NEODYMIUM, NEPTUNIUM, NICKEL, NIOBIUM, NITRILE, NITRO, NOBELIUM, NON, OATE, OCT, OICACID, OL, ONE, OSMIUM, OXO, OYLCHLORIDE, PALLADIUM, PENT, PHENYL, PLATINUM, PLUTONIUM, POLONIUM, POTASSIUM, PRASEODYMIUM, PROMETHIUM, PROP, PROTACTINIUM, RADIUM, RHENIUM, RHODIUM, RUBIDIUM, RUTHENIUM, RUTHERFORDIUM, SANARIUM, SCANDIUM, SEABORGIUM, SELENIUM, SILVER, SODIUM, SPACE, STRONTIUM, TANTALUM, TECHNETIUM, TELLURIUM, TERBIUM, TETR, THALLIUM, THORIUM, THULIUM, TIN, TITANIUM, tokenImage, TRI, TUNGSTEN, UNDEC, URANIUM, VANADIUM, YL, YN, YTTERBIUM, YTTRIUM, ZINC, ZIRCONIUM
-
-
Constructor Summary
Constructors Constructor Description NomParser(InputStream stream)
Deprecated.Constructor with InputStream.NomParser(InputStream stream, String encoding)
Deprecated.Constructor with InputStream and supplied encodingNomParser(Reader stream)
Deprecated.Constructor.NomParser(NomParserTokenManager tm)
Deprecated.Constructor with generated Token Manager.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
allBaseNumbers()
Deprecated.The usual numbers .void
attachLocationSpecified()
Deprecated.An attach position has been specified using a comma seperated list followed by a dashvoid
bondType()
Deprecated.Tokens which affect the bond order of the first bond.void
chainPrefix()
Deprecated.A list of known tokens denoting a chain's length.void
completeChemicalName()
Deprecated.The general form all chemical names must follow.void
connectingFunctionalGroupsConstruct()
Deprecated.The layout of a functional group(s) which can connect anywhere.void
connectingFunctionalGroupSuffix()
Deprecated.Functional groups suffixs for groups which can be connected anywhere along the main chain.void
cycle()
Deprecated.Deals with cyclic main chains.void
dBlockMetals()
Deprecated.void
disable_tracing()
Deprecated.Disable tracing.void
enable_tracing()
Deprecated.Enable tracing.void
endFunctionalGroups()
Deprecated.Functional groups which occur at the end of the main chain and need a connecting "an".void
fBlockMetals()
Deprecated.void
functionalGroupPrefix()
Deprecated.The functional group part of the prefixstatic IAtomContainer
generate(String stringToParse)
Deprecated.Parses the chemical name and returns the built molecule.static IAtomContainer
generate(String stringToParse, IChemObjectBuilder builder)
Deprecated.Parses the chemical name and returns the built molecule.ParseException
generateParseException()
Deprecated.Generate ParseException.Token
getNextToken()
Deprecated.Get the next Token.Token
getToken(int index)
Deprecated.Get the specific Token.void
groupOneMetals()
Deprecated.void
groupTwoMetals()
Deprecated.void
mainChainConstruct()
Deprecated.Main chains are compulsary and consist of an optional "cyclo", a length prefix and a posfix denoting functional groups.void
mainChainPrefix()
Deprecated.Deal with the main chain's length.void
mainChainSuffix()
Deprecated.Figure out the functional group by the main chain's suffix.void
oneAttachLocation()
Deprecated.Only one attach location specified, should be followed by a dash.void
pBlockMetals()
Deprecated.void
prefixConstruct()
Deprecated.Allows 1 or more prefixesvoid
prefixFunctionalGroups()
Deprecated.void
prefixType()
Deprecated.void
prioritySubstituents()
Deprecated.Things which have sub chains branching off them but the molecule has no main chain.void
prioritySubstituentsFunGroups()
Deprecated.Things which have sub chains branching off them and the molecule does have a main chain.void
ReInit(InputStream stream)
Deprecated.Reinitialise.void
ReInit(InputStream stream, String encoding)
Deprecated.Reinitialise.void
ReInit(Reader stream)
Deprecated.Reinitialise.void
ReInit(NomParserTokenManager tm)
Deprecated.Reinitialise.void
specialCase()
Deprecated.Deal with special cases where the rules don't apply.void
subChain()
Deprecated.The substituent part of the prefixvoid
tensNoUnits()
Deprecated.Deal with fragments refering to the positioning of the base numbers (denoting their magnitude)void
tensWithUnits()
Deprecated.Deals with numbers above 30 where the base numbers set appear twice.boolean
trace_enabled()
Deprecated.Trace enabled.void
twoOrThreeAttachLocations()
Deprecated.Two or three attach locations specidied, handle the second and if needed, the third one here.
-
-
-
Field Detail
-
token_source
public NomParserTokenManager token_source
Deprecated.Generated Token Manager.
-
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 theDefaultChemObjectBuilder
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 givenIChemObjectBuilder
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
-
prefixConstruct
public final void prefixConstruct() throws ParseException
Deprecated.Allows 1 or more prefixes- Throws:
ParseException
-
prefixType
public final void prefixType() throws ParseException
Deprecated.- Throws:
ParseException
-
subChain
public final void subChain() throws ParseException
Deprecated.The substituent part of the prefix- 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
-
allBaseNumbers
public final void allBaseNumbers() throws ParseException
Deprecated.The usual numbers .- 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
-
cycle
public final void cycle() throws ParseException
Deprecated.Deals with cyclic main chains.- 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
-
prefixFunctionalGroups
public final void prefixFunctionalGroups() throws ParseException
Deprecated.- 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
-
groupOneMetals
public final void groupOneMetals() throws ParseException
Deprecated.- Throws:
ParseException
-
groupTwoMetals
public final void groupTwoMetals() throws ParseException
Deprecated.- Throws:
ParseException
-
dBlockMetals
public final void dBlockMetals() throws ParseException
Deprecated.- Throws:
ParseException
-
pBlockMetals
public final void pBlockMetals() throws ParseException
Deprecated.- Throws:
ParseException
-
fBlockMetals
public final void fBlockMetals() throws ParseException
Deprecated.- 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.
-
ReInit
public void ReInit(NomParserTokenManager tm)
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.
-
-