Parser
Date: 2019-10-22

org.jmol.util

## Class Parser

- java.lang.Object
- - org.jmol.util.Parser

-     public class Parser
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Parser()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.String` | `fixDataString(java.lang.String str)`
    `static int[]` | `markLines(java.lang.String data, char eol)`
    `static int` | `parseFloatArrayBsData(java.lang.String[] tokens, javajs.util.BS bs, float[] data)`
    `static float[]` | `parseFloatArrayFromMatchAndField(java.lang.String str, javajs.util.BS bs, int fieldMatch, int fieldMatchColumnCount, int[] matchData, int field, int fieldColumnCount, float[] data, int firstLine)` the major lifter here.
    `static int` | `parseStringInfestedFloatArray(java.lang.String str, javajs.util.BS bs, float[] data)` parses a "dirty" string for floats.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Parser

          public Parser()

  - ### Method Detail

    - #### parseStringInfestedFloatArray

          public static int parseStringInfestedFloatArray(java.lang.String str,
                                                          javajs.util.BS bs,
                                                          float[] data)

      parses a "dirty" string for floats. If there are non-float tokens, they are ignored. A bitset is used to assign values only to specific atoms in the set, not changing the values of the data array for other atoms. thus, a data set can be incrementally added to in this way.
      Parameters:
        `str` - the string to parse
        `bs` - the atom positions to assign
        `data` - the (sparce) array to fill
      Returns:
        number of floats

    - #### parseFloatArrayBsData

          public static int parseFloatArrayBsData(java.lang.String[] tokens,
                                                  javajs.util.BS bs,
                                                  float[] data)

    - #### parseFloatArrayFromMatchAndField

          public static float[] parseFloatArrayFromMatchAndField(java.lang.String str,
                                                                 javajs.util.BS bs,
                                                                 int fieldMatch,
                                                                 int fieldMatchColumnCount,
                                                                 int[] matchData,
                                                                 int field,
                                                                 int fieldColumnCount,
                                                                 float[] data,
                                                                 int firstLine)

      the major lifter here.
      Parameters:
        `str` - string containing the data
        `bs` - selects specific rows of the data
        `fieldMatch` - a free-format field pointer, or a column pointer
        `fieldMatchColumnCount` - specifies a column count -- not free-format
        `matchData` - an array of data to match (atom numbers)
        `field` - a free-format field pointer, or a column pointer
        `fieldColumnCount` - specifies a column count -- not free-format
        `data` - float array to modify or null if size unknown
        `firstLine` - first line to parse (1 indicates all)
      Returns:
        data

    - #### fixDataString

          public static java.lang.String fixDataString(java.lang.String str)

    - #### markLines

          public static int[] markLines(java.lang.String data,
                                        char eol)