Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 610 Bytes

comments.md

File metadata and controls

28 lines (18 loc) · 610 Bytes

Comments

Comments are texts in the grammar file that are skipped by rcomp.

To write a comment, we use // or /* */:

  • // is a single-line comment. It starts from // and ends with a line break.
  • /* */ is a multiple-line comment. It starts from /* and ends with */.

Here is an example:

/*
  This grammar parses the string 'a' only.
*/

S: A; // a grammar rule says that S is parsed by parsing A

terminals

A: 'a'; // the terminal A is parsed by parsing 'a'

➡️ Next: String Terminals

📘 Back: Table of contents