From cca86b496e00605163e96d93cda4b9b248df91fe Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Tue, 15 Sep 2020 20:22:35 -0700 Subject: Use lalrpop in a trivial way as a proof of concept. Mess with some Unicode character classes. --- src/commandline.lalrpop | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/commandline.lalrpop (limited to 'src/commandline.lalrpop') diff --git a/src/commandline.lalrpop b/src/commandline.lalrpop new file mode 100644 index 0000000..0655281 --- /dev/null +++ b/src/commandline.lalrpop @@ -0,0 +1,16 @@ +grammar; + +// +// Z is the unicode class for separators, including line, paragraph, and space +// separators. C is the class for control characters. P is the class for +// punctuation. This regexp tests for the intersection of the negation of these +// character classes, which is any character NOT in one of these three classes. +// +// [1] is the official reference, and [2] is a site that is useful for browsing +// to get an intuitive idea of what these classes mean. +// +// [1] http://www.unicode.org/reports/tr44/#General_Category_Values +// [2] https://www.compart.com/en/unicode/category +// +pub Filename: String = => filename.to_string(); + -- cgit 1.4.1