-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(ebnf) add backtick (grave symbol) as string character (#2290)
This adds backticks as an allowed character for terminal strings. This has precedent in some EBNF-described specifications such as the Go specification.
- Loading branch information
1 parent
4ba3b91
commit eebe0cb
Showing
4 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<span class="hljs-attribute">first_quote_symbol</span> = <span class="hljs-string">"'"</span> . | ||
<span class="hljs-attribute">second_quote_symbol</span> = <span class="hljs-string">'"'</span> . | ||
|
||
<span class="hljs-comment">(* escaped_quote_symbol tests backticks, which does not interfere | ||
* with backslashes. It has precedent in some language | ||
* specifications. | ||
*)</span> | ||
<span class="hljs-attribute">escaped_quote_symbol</span> = <span class="hljs-string">`\`</span> ( first_quote_symbol | second_quote_symbol ) . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
first_quote_symbol = "'" . | ||
second_quote_symbol = '"' . | ||
|
||
(* escaped_quote_symbol tests backticks, which does not interfere | ||
* with backslashes. It has precedent in some language | ||
* specifications. | ||
*) | ||
escaped_quote_symbol = `\` ( first_quote_symbol | second_quote_symbol ) . |