Exemple #1
0
        private static ParseTree ParseTree(string sqlGeographyRepresentation, bool throwOnError = true)
        {
            var grammar = new SqlGeographyGrammar(sqlGeographyRepresentation);
            var p       = new Parser(grammar);
            var tree    = p.Parse(sqlGeographyRepresentation);

            if (tree.Status == ParseTreeStatus.Error && throwOnError)
            {
                throw new SqlGeometryParseException(tree);
            }
            return(tree);
        }
Exemple #2
0
 private static ParseTree ParseTree(string sqlGeographyRepresentation, bool throwOnError = true)
 {
     var grammar = new SqlGeographyGrammar(sqlGeographyRepresentation);
     var p = new Parser(grammar);
     var tree = p.Parse(sqlGeographyRepresentation);
     if (tree.Status == ParseTreeStatus.Error && throwOnError)
         throw new SqlGeometryParseException(tree);
     return tree;
 }