Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

FAQ

Frequently asked questions about Sipha.

General

What is Sipha?

Sipha is a flexible, incremental parsing library for Rust with support for multiple parsing algorithms.

Why use Sipha?

Sipha is designed for interactive applications like IDEs and language servers that need fast, incremental parsing.

Is Sipha production-ready?

Sipha is currently in alpha and under active development. The API is subject to change.

Parsing

Which backend should I use?

See Choosing a Backend for guidance.

Does Sipha support left recursion?

  • LL parser: With left-recursion elimination
  • LR parser: Yes, naturally
  • GLR parser: Yes, naturally

How do I handle ambiguous grammars?

Use the GLR backend. See GLR Parser for details.

Incremental Parsing

When should I use incremental parsing?

Use incremental parsing for interactive applications like IDEs and language servers.

How much faster is incremental parsing?

  • Small edits: 10-100x faster
  • Medium edits: 5-20x faster
  • Large edits: 2-5x faster

Do I need to provide the grammar for incremental parsing?

Yes, providing the grammar enables cache population, which improves performance.

Performance

How do I optimize performance?

See Performance for optimization tips.

Is Sipha fast?

Sipha is competitive with other Rust parsing libraries for batch parsing, and significantly faster for incremental parsing.

Grammar

How do I define a grammar?

Use GrammarBuilder. See Grammars for details.

Can I use regex in patterns?

Yes, use Pattern::Regex. See Lexers for details.

Error Handling

How do I handle errors?

Check result.errors after parsing. See Error Handling for details.

Does Sipha recover from errors?

Yes, Sipha supports configurable error recovery strategies.

Contributing

How do I contribute?

See Contributing for guidelines.

Where do I report bugs?

Open an issue on GitHub.

Next Steps