This library provides the programmatic interface for the PHiLe Compiler and Domain-Specific Language. The crate is composed of several modules, each of which roughly corresponds to a single step in the compilation pipeline:
lexerperforms lexical analysis and tokenization.parserperforms higher-level syntactic analysis and outputs an…ast, an Abstract Syntax Tree.sqirgentakes the AST and typechecks it, then emits…sqir, the Schema and Query Intermediate Representation, PHiLe IR.sqiroptwill take the raw SQIR and optimize it, so that it can be fed into…dalgen, which is the back-end that generates the actual DAL code.utilcontains miscellaneous helper types and functions.errorcontains type definitions for uniformly describing syntactic, semantic, and internal compiler errors.
Depending on how you are willing to use PHiLe, you may be looking for…
- The Tutorial. This gets you started quickly and painlessly with writing schemas and queries in PHiLe's domain-specific language.
- The Examples. Check out these code snippets if you learn easier by example.
- The Reference. Search through this document if you are already familiar with the basics and you are now looking for the details of a specific feature.
- Manpage-style docs for
philec, if you want to deep dive into the invocation of the PHiLe CLI compiler.