Class Parser


  • public class Parser
    extends Object
    BSL modules parser for query wizard 1. Find text by means of findTextPosition 2. Build tokens sequence 3. Parse 4. In parse result find required tokens
    • Method Detail

      • findTextPosition

        public static Parser.TextPosition findTextPosition​(Module module,
                                                           int offset,
                                                           String tagStart,
                                                           String tagStartRu,
                                                           String tagEnd,
                                                           String tagEndRu)
        Find text position in module
        Parameters:
        module - - module with text
        offset - - start offset
        tagStart - - start tag for searching
        tagStartRu - - russian start tag for searching
        tagEnd - - end tag for searching
        tagEndRu - - russian end tag for searching
        Returns:
        text position if text found or null
      • findTextPosition

        public static Parser.TextPosition findTextPosition​(Module module,
                                                           String tagStart,
                                                           String tagStartRu,
                                                           String tagEnd,
                                                           String tagEndRu)
        Find text position
        Parameters:
        module - - module
        tagStart - - start tag
        tagStartRu - - start russian tag
        tagEnd - - end tag
        tagEndRu - - end russian text
        Returns:
        text position
      • findTextPosition

        public static Parser.TextPosition findTextPosition​(String text,
                                                           String tagStart,
                                                           String tagStartRu,
                                                           String tagEnd,
                                                           String tagEndRu)
        Find text position
        Parameters:
        text - - text
        tagStart - - start tag
        tagStartRu - - start russian tag
        tagEnd - - end tag
        tagEndRu - - end russian text
        Returns:
        text position