Skip to content

Commit

Permalink
Feature list updated
Browse files Browse the repository at this point in the history
  • Loading branch information
igochkov committed Jun 19, 2023
1 parent 3097bad commit b5bf55f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 46 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@ See the [changelog](CHANGELOG.md) for changes and roadmap.
## Features

- Syntax highlighting (colorization)
- Syntax highlighting in Markdown fenced code blocks
- Commenting blocks of code
- Bracket matching
- Rename symbol

### Syntax highlighting (colorization)
![Syntax highlighting](https://raw.githubusercontent.com/igochkov/vscode-ebnf/master/docs/syntax-highlighting.png)

### Syntax highlighting in Markdown fenced code blocks
![Syntax highlighting in Markdown fenced code blocks](https://raw.githubusercontent.com/igochkov/vscode-ebnf/master/docs/fenced-code-blocks.png)

### Commenting blocks of code
![Commenting blocks of code](https://raw.githubusercontent.com/igochkov/vscode-ebnf/master/docs/commenting-block.gif)

Expand Down
Binary file added docs/fenced-code-blocks.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 3 additions & 46 deletions test/codeblock.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
``` ebnf
(*
This example defines Extended BNF informally. Many of the syntax rules include
a comment to explain their meaning; inside a comment a meta identifier is enclosed in angle
brackets < and > to avoid confusion with similar English words. The non-terminal symbols
<letter>, <decimal digit> and <character> are not defined. The position of <comments> is
stated in a comment but not formally defined.
*)
### EBNF Grammar
This is an example ...

``` ebnf
syntax = syntax_rule, {syntax_rule};
(* A <syntax rule> defines the sequences of symbols represented by a <meta identifier> *)
Expand All @@ -28,42 +23,4 @@ exception = factor;
(* The <integer> specifies the number of repetitions of the <primary> *)
factor = [integer, '*'], primary;
primary
= optionalsequence | repeatedsequence | specialsequence
| groupedsequence | meta_identifier | terminalstring;
(* The brackets [ and ] enclose symbols which are optional *)
optionalsequence = '[', definitions_list, ']';
(* The brackets { and } enclose symbols which may be repeated any number of times *)
repeatedsequence = '{', definitions_list, '}';
(* The brackets ( and ) allow any <definitions list> to be a <primary> *)
groupedsequence = '(', definitions_list, ')';
(* A <terminal string> represents the <characters> between the quote symbols *)
terminalstring
= "'", character - "'", {character - "'"}, "'"
| '"', character - '"', {character - '"'}, '"';
(* A <meta identifier> is the name of a syntactic element of the language being defined *)
meta_identifier = letter, {letter | decimaldigit};
integer = decimaldigit, {decimaldigit};
(* The meaning of a <special sequence> is not defined in the standard metalanguage. *)
specialsequence = '?', {character - '?'}, '?';
(* A comment is allowed anywhere outside a <terminal string>, <meta identifier>, <integer> or <special sequence> *)
comment = '*', {commentsymbol}, '*';
commentsymbol
= comment | terminalstring | specialsequence | character;
letter = ? lowercase and uppercase letters ? ;
decimaldigit = ? digits from 0 to 9 ? ;
character = ? any character ?;
```

0 comments on commit b5bf55f

Please sign in to comment.