summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/shakespeare-spl-fix-grammar.patch
diff options
context:
space:
mode:
authorLeo Prikler <leo.prikler@student.tugraz.at>2020-12-16 18:50:00 +0100
committerLeo Prikler <leo.prikler@student.tugraz.at>2020-12-29 13:54:48 +0100
commit142f8713ab647ecb8833dcf9eb98e3bdc62cd44a (patch)
treef9ac803b87857becaccc2f7b83c5e2c5cec1216b /gnu/packages/patches/shakespeare-spl-fix-grammar.patch
parent219612904c005328d892aaf9737c37a91635db2a (diff)
gnu: Add shakespeare-spl.
* gnu/packages/patches/shakespeare-spl-fix-grammar.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it here. * gnu/packages/esolangs.scm (shakespeare-spl): New variable.
Diffstat (limited to 'gnu/packages/patches/shakespeare-spl-fix-grammar.patch')
-rw-r--r--gnu/packages/patches/shakespeare-spl-fix-grammar.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/gnu/packages/patches/shakespeare-spl-fix-grammar.patch b/gnu/packages/patches/shakespeare-spl-fix-grammar.patch
new file mode 100644
index 0000000000..737c0eb8c1
--- /dev/null
+++ b/gnu/packages/patches/shakespeare-spl-fix-grammar.patch
@@ -0,0 +1,16 @@
+ROMAN_HUNDREDS, ROMAN_TENS and ROMAN_ONES seem to use syntax, that is not
+recognized (any longer?) by flex, so let's expand their definitions.
+
+Index: spl-1.2.1/include/roman_numbers.metaflex
+===================================================================
+--- spl-1.2.1.orig/include/roman_numbers.metaflex
++++ spl-1.2.1/include/roman_numbers.metaflex
+@@ -1,5 +1,5 @@
+ ROMAN_THOUSANDS m+
+-ROMAN_HUNDREDS (c(d|m)|dc{0,3}|c{1,3})
+-ROMAN_TENS (x(l|c)|lx{0,3}|x{1,3})
+-ROMAN_ONES (i(v|x)|vi{0,3}|i{1,3})
++ROMAN_HUNDREDS (c(d|m|c?c?)|dc?c?c?)
++ROMAN_TENS (x(l|c|x?x?)|lx?x?x?)
++ROMAN_ONES (i(v|x|i?i?)|vi?i?i?)
+ ROMAN_NUMBER {ROMAN_ONES}|{ROMAN_TENS}{ROMAN_ONES}?|{ROMAN_HUNDREDS}{ROMAN_TENS}?{ROMAN_ONES}?|{ROMAN_THOUSANDS}{ROMAN_HUNDREDS}?{ROMAN_TENS}?{ROMAN_ONES}?