From 78d11265a3b559059e6d9292970b30ea3965d12a Mon Sep 17 00:00:00 2001 From: Joe Hildebrand Date: Mon, 26 Feb 2024 08:58:30 -0700 Subject: [PATCH] Add note about shell escaping --- docs/documentation.html | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/documentation.html b/docs/documentation.html index b3fed470..461970d6 100644 --- a/docs/documentation.html +++ b/docs/documentation.html @@ -746,12 +746,13 @@

Importing External Rules

grammar, NOT the source. Grammars MUST be compiled by a version that supports imports in order to be imported. Only rules that are allowed start rules are valid. It can be useful to specify - --allowed-start-rules * in library grammars. Imports are - only valid in output formats "es" and "commonjs". If you - use imports, you should use { output: "source" }; the default - output of "parser" will call `eval` on the source which fails immediately - for some formats (e.g. "es") and will not find modules in the expected - places for others (e.g. "commonjs"). The + --allowed-start-rules * (with appropriate escaping for + your shell!) in library grammars. Imports are only valid in output + formats "es" and "commonjs". If you use imports, you should use + { output: "source" }; the default output of "parser" will + call `eval` on the source which fails immediately for some formats + (e.g. "es") and will not find modules in the expected places for others + (e.g. "commonjs"). The from-mem project is used by the Peggy CLI to resolve these issues, but note well its relatively severe limitations.