主权项 |
1. A method for parsing a domain-specific language (DSL) statement, the method comprising:
accessing, by one or more processors, a DSL statement that includes contracted phrases; identifying, by one or more processors, one or more contracted phrases in the DSL statement utilizing an annotated domain vocabulary for a DSL associated with the DSL statement and grammar rules for the DSL; determining, by one or more processors, expanded phrases corresponding to the identified one or more contracted phrases based on the annotated domain vocabulary and the grammar rules; creating, by one or more processors, an expanded abstract syntax tree (AST) that is representative of the DSL statement with the determined expanded phrases replacing the identified one or more contracted phrases; and identifying, by one or more processors, operators in the DSL statement that are associated with annotations in the annotated domain vocabulary; and determining, by one or more processors, extensions to add to the annotated domain vocabulary based on the identified operators. |