Class BslParser


  • public class BslParser
    extends Object
    A helper to generate AST for a bsl file.
    • Method Detail

      • generateAST

        public static org.eclipse.emf.ecore.EObject generateAST​(org.eclipse.emf.common.util.URI uri)
                                                         throws com._1c.g5.gumtree.core.tree.TreeGeneratorException
        Generates the Xtext AST for the given bsl file.
        Parameters:
        uri - URI of the given bsl file, not null
        Returns:
        the root of the generated Xtext AST if there are no syntax errors and null otherwise
        Throws:
        com._1c.g5.gumtree.core.tree.TreeGeneratorException - if there are syntax errors in the given bsl file
      • generateAST

        public static org.eclipse.emf.ecore.EObject generateAST​(String content)
                                                         throws com._1c.g5.gumtree.core.tree.TreeGeneratorException
        Generates the Xtext AST for the given bsl file.
        Parameters:
        content - the content of the given bsl file, not null
        Returns:
        the root of the generated Xtext AST if there are no syntax errors and null otherwise
        Throws:
        com._1c.g5.gumtree.core.tree.TreeGeneratorException - if there are syntax errors in the given bsl file