diff --git a/docs/grammar.md b/docs/grammar.md index 8622450..d8aeb07 100644 --- a/docs/grammar.md +++ b/docs/grammar.md @@ -133,10 +133,10 @@ When importing rules, all their dependencies will be imported into a namespace, **Syntax:** ```html %import . -%import . -> -%import ( ) %import . +%import . -> %import . -> +%import ( ) ``` If the module path is absolute, Lark will attempt to load it from the built-in directory (currently, only `common.lark` is available). @@ -154,7 +154,7 @@ The rule or terminal can be imported under an other name with the `->` syntax. %import .rules_file.rulea -> ruleb ``` -Note that importing rules drops the `%ignore` directives, so this may change the grammar defined in the file. +Note that `%ignore` directives cannot be imported. Imported rules will abide by the `%ignore` directives declared in the main grammar. ### %declare