From ecc187c51bcf97e4d9f0b25b12b25491f45b2a5f Mon Sep 17 00:00:00 2001 From: Robin Jadoul Date: Sat, 28 Jan 2017 11:56:27 +0100 Subject: [PATCH] Add comments to the input file --- README.md | 2 ++ man/man5/Parsodus.5.ronn | 2 ++ src/parsodusLexer.lxs | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7d839ec..dfcbc19 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,8 @@ We are building an LALR(1) parser, with replacement rules, both starting from th Conventionally, terminals are all caps, while variables are lowercase. +Comments are from a `#` to the end of the line. + ### Using the parser diff --git a/man/man5/Parsodus.5.ronn b/man/man5/Parsodus.5.ronn index 7e4b6df..c45bf40 100644 --- a/man/man5/Parsodus.5.ronn +++ b/man/man5/Parsodus.5.ronn @@ -31,6 +31,8 @@ We are building an LALR(1) parser, with replacement rules, both starting from th Conventionally, terminals are all caps, while variables are lowercase. +Comments are from a `#` to the end of the line. + AUTHORS ------- diff --git a/src/parsodusLexer.lxs b/src/parsodusLexer.lxs index d15038c..78eff83 100644 --- a/src/parsodusLexer.lxs +++ b/src/parsodusLexer.lxs @@ -20,4 +20,4 @@ RULENAME = [_a-zA-Z][_a-zA-Z0-9]* LBRACKET = \[ RBRACKET = \] COMMA = , -ignore = \t| |\n|\r +ignore = \t| |\n|\r|#.*