From c8ebe093150509d9f01d82f0d698ef5df09bd985 Mon Sep 17 00:00:00 2001 From: krasimir Date: Mon, 21 Mar 2016 13:27:44 +0000 Subject: initial support for BNFC syntax in context-free grammars for GF. Not all features are supported yet. Based on contribution from Gleb Lobanov --- src/compiler/GF/Grammar/Lexer.x | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/compiler/GF/Grammar/Lexer.x') diff --git a/src/compiler/GF/Grammar/Lexer.x b/src/compiler/GF/Grammar/Lexer.x index f073bcdfc..c579b5609 100644 --- a/src/compiler/GF/Grammar/Lexer.x +++ b/src/compiler/GF/Grammar/Lexer.x @@ -124,6 +124,10 @@ data Token | T_variants | T_where | T_with + | T_coercions + | T_terminator + | T_separator + | T_nonempty | T_String String -- string literals | T_Integer Int -- integer literals | T_Double Double -- double precision float literals @@ -212,6 +216,10 @@ resWords = Map.fromList , b "variants" T_variants , b "where" T_where , b "with" T_with + , b "coercions" T_coercions + , b "terminator" T_terminator + , b "separator" T_separator + , b "nonempty" T_nonempty ] where b s t = (identS s, t) -- cgit v1.2.3