From fd6c7ccd8586d633d15e2be3c67fd1634febcc2f Mon Sep 17 00:00:00 2001 From: Nikolai Kudasov Date: Fri, 22 Dec 2023 00:56:16 +0300 Subject: [PATCH] Remove and ignore backup and unnecessary(?) generated BNFC files --- .gitignore | 7 + .../src/Language/EO/Phi/Syntax/Abs.hs.bak | 157 - .../src/Language/EO/Phi/Syntax/Doc.txt.bak | 89 - .../src/Language/EO/Phi/Syntax/ErrM.hs.bak | 91 - .../src/Language/EO/Phi/Syntax/Lex.hs | 6868 ----------------- .../src/Language/EO/Phi/Syntax/Lex.x.bak | 264 - .../src/Language/EO/Phi/Syntax/Par.hs | 1523 ---- .../src/Language/EO/Phi/Syntax/Par.info | 1227 --- .../src/Language/EO/Phi/Syntax/Par.y.bak | 212 - .../src/Language/EO/Phi/Syntax/Print.hs.bak | 214 - .../src/Language/EO/Phi/Syntax/Skel.hs.bak | 82 - .../src/Language/EO/Phi/Syntax/Test.hs.bak | 76 - 12 files changed, 7 insertions(+), 10803 deletions(-) delete mode 100644 eo-phi-normalizer/src/Language/EO/Phi/Syntax/Abs.hs.bak delete mode 100644 eo-phi-normalizer/src/Language/EO/Phi/Syntax/Doc.txt.bak delete mode 100644 eo-phi-normalizer/src/Language/EO/Phi/Syntax/ErrM.hs.bak delete mode 100644 eo-phi-normalizer/src/Language/EO/Phi/Syntax/Lex.hs delete mode 100644 eo-phi-normalizer/src/Language/EO/Phi/Syntax/Lex.x.bak delete mode 100644 eo-phi-normalizer/src/Language/EO/Phi/Syntax/Par.hs delete mode 100644 eo-phi-normalizer/src/Language/EO/Phi/Syntax/Par.info delete mode 100644 eo-phi-normalizer/src/Language/EO/Phi/Syntax/Par.y.bak delete mode 100644 eo-phi-normalizer/src/Language/EO/Phi/Syntax/Print.hs.bak delete mode 100644 eo-phi-normalizer/src/Language/EO/Phi/Syntax/Skel.hs.bak delete mode 100644 eo-phi-normalizer/src/Language/EO/Phi/Syntax/Test.hs.bak diff --git a/.gitignore b/.gitignore index 4d1733fd7..fc587c5eb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,10 @@ +*.bak +eo-phi-normalizer/src/Language/EO/Phi/Syntax/Lex.hs +eo-phi-normalizer/src/Language/EO/Phi/Syntax/Par.hs +eo-phi-normalizer/src/Language/EO/Phi/Syntax/ErrM.hs +eo-phi-normalizer/src/Language/EO/Phi/Syntax/Skel.hs +eo-phi-normalizer/src/Language/EO/Phi/Syntax/Test.hs +eo-phi-normalizer/src/Language/EO/Phi/Syntax/Test .cache/ .DS_Store dist diff --git a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Abs.hs.bak b/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Abs.hs.bak deleted file mode 100644 index f38a2ccac..000000000 --- a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Abs.hs.bak +++ /dev/null @@ -1,157 +0,0 @@ --- File generated by the BNF Converter (bnfc 2.9.5). - -{-# LANGUAGE DeriveDataTypeable #-} -{-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE DeriveTraversable #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE GeneralizedNewtypeDeriving #-} -{-# LANGUAGE LambdaCase #-} -{-# LANGUAGE PatternSynonyms #-} - --- | The abstract syntax of language Syntax. - -module Language.EO.Phi.Syntax.Abs where - -import Prelude (String) -import qualified Prelude as C - ( Eq, Ord, Show, Read - , Functor, Foldable, Traversable - , Int, Maybe(..) - ) -import qualified Data.String - -import qualified Data.Data as C (Data, Typeable) -import qualified GHC.Generics as C (Generic) - -type Program = Program' BNFC'Position -data Program' a = Program a [Binding' a] - deriving (C.Eq, C.Ord, C.Show, C.Read, C.Functor, C.Foldable, C.Traversable, C.Data, C.Typeable, C.Generic) - -type Object = Object' BNFC'Position -data Object' a - = Formation a [Binding' a] - | Application a (AbstractObject' a) [Binding' a] [Bindings' a] - | Dispatch a (Dispatch' a) - | Termination a - deriving (C.Eq, C.Ord, C.Show, C.Read, C.Functor, C.Foldable, C.Traversable, C.Data, C.Typeable, C.Generic) - -type AbstractObject = AbstractObject' BNFC'Position -data AbstractObject' a - = AbstractFormation a [Binding' a] - | AbstractDispatch a (Dispatch' a) - | AbstractTermination a - deriving (C.Eq, C.Ord, C.Show, C.Read, C.Functor, C.Foldable, C.Traversable, C.Data, C.Typeable, C.Generic) - -type DispatchedObject = DispatchedObject' BNFC'Position -data DispatchedObject' a - = DispatchedFormation a [Binding' a] | DispatchedTermination a - deriving (C.Eq, C.Ord, C.Show, C.Read, C.Functor, C.Foldable, C.Traversable, C.Data, C.Typeable, C.Generic) - -type Binding = Binding' BNFC'Position -data Binding' a - = EmptyBinding a (Attribute' a) - | DeltaBinding a Bytes - | LambdaBinding a - deriving (C.Eq, C.Ord, C.Show, C.Read, C.Functor, C.Foldable, C.Traversable, C.Data, C.Typeable, C.Generic) - -type Bindings = Bindings' BNFC'Position -data Bindings' a = Bindings a [Binding' a] - deriving (C.Eq, C.Ord, C.Show, C.Read, C.Functor, C.Foldable, C.Traversable, C.Data, C.Typeable, C.Generic) - -type Dispatch = Dispatch' BNFC'Position -data Dispatch' a - = HomeDispatch a [Attribute' a] [Disp' a] - | ThisDispatch a [Attribute' a] [Disp' a] - deriving (C.Eq, C.Ord, C.Show, C.Read, C.Functor, C.Foldable, C.Traversable, C.Data, C.Typeable, C.Generic) - -type Attribute = Attribute' BNFC'Position -data Attribute' a - = Phi a - | Rho a - | Sigma a - | VTX a - | Label a LabelId - | Alpha a AlphaIndex - deriving (C.Eq, C.Ord, C.Show, C.Read, C.Functor, C.Foldable, C.Traversable, C.Data, C.Typeable, C.Generic) - -type Disp = Disp' BNFC'Position -data Disp' a = Disp a [Binding' a] (Bindings' a) [Attribute' a] - deriving (C.Eq, C.Ord, C.Show, C.Read, C.Functor, C.Foldable, C.Traversable, C.Data, C.Typeable, C.Generic) - -newtype Bytes = Bytes String - deriving (C.Eq, C.Ord, C.Show, C.Read, C.Data, C.Typeable, C.Generic, Data.String.IsString) - -newtype Function = Function String - deriving (C.Eq, C.Ord, C.Show, C.Read, C.Data, C.Typeable, C.Generic, Data.String.IsString) - -newtype LabelId = LabelId String - deriving (C.Eq, C.Ord, C.Show, C.Read, C.Data, C.Typeable, C.Generic, Data.String.IsString) - -newtype AlphaIndex = AlphaIndex String - deriving (C.Eq, C.Ord, C.Show, C.Read, C.Data, C.Typeable, C.Generic, Data.String.IsString) - --- | Start position (line, column) of something. - -type BNFC'Position = C.Maybe (C.Int, C.Int) - -pattern BNFC'NoPosition :: BNFC'Position -pattern BNFC'NoPosition = C.Nothing - -pattern BNFC'Position :: C.Int -> C.Int -> BNFC'Position -pattern BNFC'Position line col = C.Just (line, col) - --- | Get the start position of something. - -class HasPosition a where - hasPosition :: a -> BNFC'Position - -instance HasPosition Program where - hasPosition = \case - Program p _ -> p - -instance HasPosition Object where - hasPosition = \case - Formation p _ -> p - Application p _ _ _ -> p - Dispatch p _ -> p - Termination p -> p - -instance HasPosition AbstractObject where - hasPosition = \case - AbstractFormation p _ -> p - AbstractDispatch p _ -> p - AbstractTermination p -> p - -instance HasPosition DispatchedObject where - hasPosition = \case - DispatchedFormation p _ -> p - DispatchedTermination p -> p - -instance HasPosition Binding where - hasPosition = \case - EmptyBinding p _ -> p - DeltaBinding p _ -> p - LambdaBinding p -> p - -instance HasPosition Bindings where - hasPosition = \case - Bindings p _ -> p - -instance HasPosition Dispatch where - hasPosition = \case - HomeDispatch p _ _ -> p - ThisDispatch p _ _ -> p - -instance HasPosition Attribute where - hasPosition = \case - Phi p -> p - Rho p -> p - Sigma p -> p - VTX p -> p - Label p _ -> p - Alpha p _ -> p - -instance HasPosition Disp where - hasPosition = \case - Disp p _ _ _ -> p - diff --git a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Doc.txt.bak b/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Doc.txt.bak deleted file mode 100644 index 4b884671a..000000000 --- a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Doc.txt.bak +++ /dev/null @@ -1,89 +0,0 @@ -The Language Syntax -BNF Converter - - -%Process by txt2tags to generate html or latex - - - -This document was automatically generated by the //BNF-Converter//. It was generated together with the lexer, the parser, and the abstract syntax module, which guarantees that the document matches with the implementation of the language (provided no hand-hacking has taken place). - -==The lexical structure of Syntax== - -===Literals=== - - - - - -Bytes literals are recognized by the regular expression -`````{"--"} | ["0123456789ABCDEF"] ["0123456789ABCDEF"] ('-' ["0123456789ABCDEF"] ["0123456789ABCDEF"])* {"--"}````` - -Function literals are recognized by the regular expression -`````upper (char - [" - !'(),-.:;?[]{|}⟦⟧"])*````` - -LabelId literals are recognized by the regular expression -`````lower (char - [" - !'(),-.:;?[]{|}⟦⟧"])*````` - -AlphaIndex literals are recognized by the regular expression -`````{"α0"} | 'α' (digit - '0') digit*````` - - -===Reserved words and symbols=== -The set of reserved words is the set of terminals appearing in the grammar. Those reserved words that consist of non-letter characters are called symbols, and they are treated in a different way from those that are similar to identifiers. The lexer follows rules familiar from languages like Haskell, C, and Java, including longest match and spacing conventions. - -The reserved words used in Syntax are the following: - | ``Δ`` | ``Φ`` | ``λ`` | ``ν`` - | ``ξ`` | ``ρ`` | ``σ`` | ``φ`` - -The symbols used in Syntax are the following: - | { | } | ⊥ | ↦ - | ∅ | ⤍ | , | . - -===Comments=== -There are no single-line comments in the grammar.There are no multiple-line comments in the grammar. - -==The syntactic structure of Syntax== -Non-terminals are enclosed between < and >. -The symbols -> (production), **|** (union) -and **eps** (empty rule) belong to the BNF notation. -All other symbols are terminals. - - | //Program// | -> | ``{`` //[Binding]// ``}`` - | //Object// | -> | ``{`` //[Binding]// ``}`` - | | **|** | //AbstractObject// ``{`` //[Binding]// ``}`` //[Bindings]// - | | **|** | //Dispatch// - | | **|** | ``⊥`` - | //AbstractObject// | -> | ``{`` //[Binding]// ``}`` - | | **|** | //Dispatch// - | | **|** | ``⊥`` - | //DispatchedObject// | -> | ``{`` //[Binding]// ``}`` - | | **|** | ``⊥`` - | //Binding// | -> | //Attribute// ``↦`` ``∅`` - | | **|** | ``Δ`` ``⤍`` //Bytes// - | | **|** | ``λ`` ``⤍`` - | //[Binding]// | -> | **eps** - | | **|** | //Binding// - | | **|** | //Binding// ``,`` //[Binding]// - | //Bindings// | -> | ``{`` //[Binding]// ``}`` - | //[Bindings]// | -> | **eps** - | | **|** | //Bindings// //[Bindings]// - | //Dispatch// | -> | ``Φ`` ``.`` //[Attribute]// //[Disp]// - | | **|** | ``ξ`` ``.`` //[Attribute]// //[Disp]// - | //Attribute// | -> | ``φ`` - | | **|** | ``ρ`` - | | **|** | ``σ`` - | | **|** | ``ν`` - | | **|** | //LabelId// - | | **|** | //AlphaIndex// - | //[Attribute]// | -> | //Attribute// - | | **|** | //Attribute// ``.`` //[Attribute]// - | //Disp// | -> | ``{`` //[Binding]// ``}`` //Bindings// ``.`` //[Attribute]// - | //[Disp]// | -> | **eps** - | | **|** | //Disp// //[Disp]// - - - -%% File generated by the BNF Converter (bnfc 2.9.5). diff --git a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/ErrM.hs.bak b/eo-phi-normalizer/src/Language/EO/Phi/Syntax/ErrM.hs.bak deleted file mode 100644 index c72618db5..000000000 --- a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/ErrM.hs.bak +++ /dev/null @@ -1,91 +0,0 @@ --- File generated by the BNF Converter (bnfc 2.9.6). - -{-# LANGUAGE CPP #-} - -#if __GLASGOW_HASKELL__ >= 708 ---------------------------------------------------------------------------- --- Pattern synonyms exist since ghc 7.8. - --- | BNF Converter: Error Monad. --- --- Module for backwards compatibility. --- --- The generated parser now uses @'Either' String@ as error monad. --- This module defines a type synonym 'Err' and pattern synonyms --- 'Bad' and 'Ok' for 'Left' and 'Right'. - -{-# LANGUAGE PatternSynonyms #-} -{-# LANGUAGE FlexibleInstances #-} - -module Language.EO.Phi.Syntax.ErrM where - -import Prelude (id, const, Either(..), String) - -import Control.Monad (MonadPlus(..)) -import Control.Applicative (Alternative(..)) -#if __GLASGOW_HASKELL__ >= 808 -import Control.Monad (MonadFail(..)) -#endif - --- | Error monad with 'String' error messages. -type Err = Either String - -pattern Bad msg = Left msg -pattern Ok a = Right a - -#if __GLASGOW_HASKELL__ >= 808 -instance MonadFail Err where - fail = Bad -#endif - -instance Alternative Err where - empty = Left "Err.empty" - (<|>) Left{} = id - (<|>) x@Right{} = const x - -instance MonadPlus Err where - mzero = empty - mplus = (<|>) - -#else ---------------------------------------------------------------------------- --- ghc 7.6 and before: use old definition as data type. - --- | BNF Converter: Error Monad - --- Copyright (C) 2004 Author: Aarne Ranta --- This file comes with NO WARRANTY and may be used FOR ANY PURPOSE. - -module Language.EO.Phi.Syntax.ErrM where - --- the Error monad: like Maybe type with error msgs - -import Control.Applicative (Applicative(..), Alternative(..)) -import Control.Monad (MonadPlus(..), liftM) - -data Err a = Ok a | Bad String - deriving (Read, Show, Eq, Ord) - -instance Monad Err where - return = Ok - Ok a >>= f = f a - Bad s >>= _ = Bad s - -instance Applicative Err where - pure = Ok - (Bad s) <*> _ = Bad s - (Ok f) <*> o = liftM f o - -instance Functor Err where - fmap = liftM - -instance MonadPlus Err where - mzero = Bad "Err.mzero" - mplus (Bad _) y = y - mplus x _ = x - -instance Alternative Err where - empty = mzero - (<|>) = mplus - -#endif diff --git a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Lex.hs b/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Lex.hs deleted file mode 100644 index 873fa3a31..000000000 --- a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Lex.hs +++ /dev/null @@ -1,6868 +0,0 @@ -{-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-missing-signatures #-} -{-# LANGUAGE CPP #-} -{-# LINE 4 "Lex.x" #-} -{-# OPTIONS -fno-warn-incomplete-patterns #-} -{-# OPTIONS_GHC -w #-} - -{-# LANGUAGE PatternSynonyms #-} - -module Language.EO.Phi.Syntax.Lex where - -import Prelude - -import qualified Data.Bits -import Data.Char (ord) -import Data.Function (on) -import Data.Word (Word8) -#if __GLASGOW_HASKELL__ >= 603 -#include "ghcconfig.h" -#elif defined(__GLASGOW_HASKELL__) -#include "config.h" -#endif -#if __GLASGOW_HASKELL__ >= 503 -import Data.Array -#else -import Array -#endif -alex_tab_size :: Int -alex_tab_size = 8 -alex_base :: Array Int Int -alex_base = listArray (0 :: Int, 50) - [ -8 - , 0 - , 0 - , 76 - , -73 - , 140 - , -153 - , -159 - , 268 - , 332 - , 396 - , 460 - , 588 - , 844 - , 963 - , -39 - , 0 - , -23 - , 1091 - , 1235 - , 840 - , 50 - , -147 - , 0 - , 180 - , 0 - , -145 - , -120 - , -111 - , -79 - , 0 - , -22 - , -10 - , 983 - , 1010 - , 1367 - , 1612 - , 1857 - , 2093 - , 2349 - , 2350 - , 2478 - , -113 - , -108 - , 1303 - , 1549 - , 2591 - , 0 - , 0 - , 0 - , 2847 - ] - -alex_table :: Array Int Int -alex_table = listArray (0 :: Int, 3102) - [ 0 - , 24 - , 24 - , 24 - , 24 - , 24 - , 7 - , -1 - , -1 - , 16 - , 17 - , 17 - , 17 - , 17 - , 17 - , 17 - , 17 - , 17 - , 17 - , 25 - , 25 - , 25 - , 25 - , 30 - , 24 - , 17 - , 17 - , 17 - , 17 - , 17 - , 17 - , 17 - , 17 - , 17 - , 17 - , 34 - , 25 - , 31 - , 25 - , 0 - , 33 - , 33 - , 33 - , 33 - , 33 - , 33 - , 33 - , 33 - , 33 - , 33 - , 25 - , 42 - , 25 - , -1 - , -1 - , 25 - , 0 - , 36 - , 36 - , 36 - , 36 - , 36 - , 36 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 25 - , 0 - , 25 - , 5 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 0 - , 22 - , 0 - , 28 - , 8 - , 26 - , 24 - , 24 - , 24 - , 24 - , 24 - , 0 - , 0 - , 0 - , 0 - , 20 - , 29 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 24 - , 0 - , 27 - , 0 - , 0 - , 0 - , 21 - , 4 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 0 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 0 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 0 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 0 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 0 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 0 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 12 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 13 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 0 - , 0 - , -1 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 25 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , -1 - , -1 - , 0 - , 0 - , 0 - , 0 - , 0 - , -1 - , -1 - , -1 - , 0 - , 25 - , -1 - , -1 - , -1 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 15 - , 0 - , 0 - , 0 - , -1 - , -1 - , 0 - , 0 - , 0 - , -1 - , 25 - , 0 - , 25 - , 25 - , 32 - , 32 - , 32 - , 32 - , 32 - , 32 - , 32 - , 32 - , 32 - , 32 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 32 - , 32 - , 32 - , 32 - , 32 - , 32 - , -1 - , 30 - , -1 - , 0 - , 33 - , 33 - , 33 - , 33 - , 33 - , 33 - , 33 - , 33 - , 33 - , 33 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 33 - , 33 - , 33 - , 33 - , 33 - , 33 - , 0 - , 0 - , 0 - , 0 - , 0 - , -1 - , -1 - , -1 - , 0 - , 0 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 13 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 5 - , 12 - , 23 - , 6 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 4 - , 11 - , 1 - , 1 - , 1 - , 3 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 0 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 0 - , 0 - , 0 - , 0 - , 19 - , 0 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 19 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 0 - , 0 - , 38 - , 38 - , 0 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 0 - , 0 - , 38 - , 38 - , 38 - , 38 - , 38 - , 19 - , 0 - , 0 - , 38 - , 38 - , 0 - , 0 - , 0 - , 38 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 0 - , 0 - , 38 - , 38 - , 38 - , 18 - , 38 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 0 - , 38 - , 0 - , 38 - , 35 - , 38 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 0 - , 0 - , 0 - , 38 - , 38 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 0 - , 0 - , 39 - , 9 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 44 - , 40 - , 48 - , 43 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 45 - , 41 - , 49 - , 49 - , 49 - , 46 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 0 - , 0 - , 38 - , 38 - , 0 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 0 - , 0 - , 38 - , 38 - , 38 - , 38 - , 38 - , 19 - , 0 - , 0 - , 38 - , 38 - , 0 - , 0 - , 0 - , 38 - , 37 - , 37 - , 37 - , 37 - , 37 - , 37 - , 37 - , 37 - , 37 - , 37 - , 0 - , 0 - , 38 - , 38 - , 38 - , 0 - , 38 - , 37 - , 37 - , 37 - , 37 - , 37 - , 37 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 0 - , 38 - , 0 - , 38 - , 35 - , 38 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 0 - , 0 - , 0 - , 38 - , 38 - , 44 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 0 - , 39 - , 9 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 44 - , 40 - , 48 - , 43 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 45 - , 41 - , 49 - , 49 - , 49 - , 46 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 0 - , 0 - , 38 - , 38 - , 0 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 38 - , 0 - , 0 - , 38 - , 38 - , 38 - , 38 - , 38 - , 19 - , 0 - , 0 - , 38 - , 38 - , 0 - , 34 - , 0 - , 38 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 0 - , 0 - , 38 - , 38 - , 38 - , 0 - , 38 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 0 - , 38 - , 0 - , 38 - , 35 - , 38 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 35 - , 0 - , 0 - , 0 - , 38 - , 38 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 39 - , 9 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 44 - , 40 - , 48 - , 43 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 45 - , 41 - , 49 - , 49 - , 49 - , 46 - , -1 - , -1 - , 0 - , 0 - , -1 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , -1 - , -1 - , 0 - , 0 - , 0 - , 0 - , 0 - , -1 - , -1 - , -1 - , 0 - , 0 - , -1 - , -1 - , -1 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , -1 - , -1 - , 0 - , 0 - , 0 - , -1 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , -1 - , 0 - , -1 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , -1 - , -1 - , -1 - , 0 - , 0 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 39 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 44 - , 40 - , 48 - , 43 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 45 - , 41 - , 49 - , 49 - , 49 - , 46 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 0 - , 39 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 47 - , 40 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 48 - , 45 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 14 - , 14 - , 14 - , 14 - , 14 - , 14 - , 14 - , 14 - , 14 - , 0 - , 0 - , 14 - , 14 - , 0 - , 14 - , 14 - , 14 - , 14 - , 14 - , 14 - , 14 - , 14 - , 14 - , 14 - , 14 - , 14 - , 14 - , 14 - , 14 - , 14 - , 14 - , 14 - , 0 - , 0 - , 14 - , 14 - , 14 - , 14 - , 14 - , 19 - , 0 - , 0 - , 14 - , 14 - , 0 - , 0 - , 0 - , 14 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 0 - , 0 - , 14 - , 14 - , 14 - , 0 - , 14 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 0 - , 14 - , 0 - , 14 - , 50 - , 14 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 50 - , 0 - , 0 - , 0 - , 14 - , 14 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 13 - , 10 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - , 5 - , 12 - , 23 - , 6 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 23 - , 4 - , 11 - , 1 - , 1 - , 1 - , 3 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - ] - -alex_check :: Array Int Int -alex_check = listArray (0 :: Int, 3102) - [ -1 - , 9 - , 10 - , 11 - , 12 - , 13 - , 159 - , 166 - , 167 - , 48 - , 49 - , 50 - , 51 - , 52 - , 53 - , 54 - , 55 - , 56 - , 57 - , 166 - , 165 - , 141 - , 133 - , 45 - , 32 - , 48 - , 49 - , 50 - , 51 - , 52 - , 53 - , 54 - , 55 - , 56 - , 57 - , 45 - , 44 - , 45 - , 46 - , -1 - , 48 - , 49 - , 50 - , 51 - , 52 - , 53 - , 54 - , 55 - , 56 - , 57 - , 129 - , 159 - , 131 - , 166 - , 167 - , 134 - , -1 - , 65 - , 66 - , 67 - , 68 - , 69 - , 70 - , 71 - , 72 - , 73 - , 74 - , 75 - , 76 - , 77 - , 78 - , 79 - , 80 - , 81 - , 82 - , 83 - , 84 - , 85 - , 86 - , 87 - , 88 - , 89 - , 90 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 97 - , 98 - , 99 - , 100 - , 101 - , 102 - , 103 - , 104 - , 105 - , 106 - , 107 - , 108 - , 109 - , 110 - , 111 - , 112 - , 113 - , 114 - , 115 - , 116 - , 117 - , 118 - , 119 - , 120 - , 121 - , 122 - , 123 - , -1 - , 125 - , 191 - , 192 - , 193 - , 194 - , 195 - , 196 - , 197 - , 198 - , 199 - , 200 - , 201 - , 202 - , 203 - , 204 - , 205 - , 206 - , 207 - , 208 - , 209 - , 210 - , 211 - , 212 - , 213 - , 214 - , 215 - , 216 - , 217 - , 218 - , 219 - , 220 - , 221 - , 222 - , 223 - , 224 - , 225 - , 226 - , 227 - , 228 - , 229 - , 230 - , 231 - , 232 - , 233 - , 234 - , 235 - , 236 - , 237 - , 238 - , 239 - , 240 - , 241 - , 242 - , 243 - , 244 - , 245 - , 246 - , 247 - , 248 - , 249 - , 250 - , 251 - , 252 - , 253 - , 254 - , 255 - , -1 - , 134 - , -1 - , 136 - , 195 - , 138 - , 9 - , 10 - , 11 - , 12 - , 13 - , -1 - , -1 - , -1 - , -1 - , 206 - , 207 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 32 - , -1 - , 164 - , -1 - , -1 - , -1 - , 226 - , 143 - , 144 - , 145 - , 146 - , 147 - , 148 - , 149 - , 150 - , 151 - , 152 - , 153 - , 154 - , 155 - , 156 - , 157 - , 158 - , 159 - , 160 - , 161 - , 162 - , 163 - , 164 - , 165 - , 166 - , 167 - , 168 - , 169 - , 170 - , 171 - , 172 - , 173 - , 174 - , 175 - , 176 - , 177 - , 178 - , 179 - , 180 - , 181 - , 182 - , 183 - , 184 - , 185 - , 186 - , 187 - , 188 - , 189 - , 190 - , 191 - , 192 - , 193 - , 194 - , 195 - , 196 - , 197 - , 198 - , 199 - , 200 - , 201 - , 202 - , 203 - , 204 - , 205 - , 206 - , 207 - , 208 - , 209 - , 210 - , 211 - , 212 - , 213 - , 214 - , 215 - , 216 - , 217 - , 218 - , 219 - , 220 - , 221 - , 222 - , 223 - , 224 - , 225 - , 226 - , 227 - , 228 - , 229 - , 230 - , 231 - , 232 - , 233 - , 234 - , 235 - , 236 - , 237 - , 238 - , 239 - , 240 - , 241 - , 242 - , 243 - , 244 - , 245 - , 246 - , 247 - , 248 - , 249 - , 250 - , 251 - , 252 - , 253 - , 254 - , 255 - , 192 - , 193 - , 194 - , 195 - , 196 - , 197 - , 198 - , 199 - , 200 - , 201 - , 202 - , 203 - , 204 - , 205 - , 206 - , 207 - , 208 - , 209 - , 210 - , 211 - , 212 - , 213 - , 214 - , 215 - , 216 - , 217 - , 218 - , 219 - , 220 - , 221 - , 222 - , 223 - , 224 - , 225 - , 226 - , 227 - , 228 - , 229 - , 230 - , 231 - , 232 - , 233 - , 234 - , 235 - , 236 - , 237 - , 238 - , 239 - , 240 - , 241 - , 242 - , 243 - , 244 - , 245 - , 246 - , 247 - , 248 - , 249 - , 250 - , 251 - , 252 - , 253 - , 254 - , 255 - , 128 - , 129 - , 130 - , 131 - , 132 - , 133 - , 134 - , 135 - , 136 - , 137 - , 138 - , 139 - , 140 - , 141 - , 142 - , 143 - , 144 - , 145 - , 146 - , 147 - , 148 - , 149 - , 150 - , -1 - , 152 - , 153 - , 154 - , 155 - , 156 - , 157 - , 158 - , 159 - , 160 - , 161 - , 162 - , 163 - , 164 - , 165 - , 166 - , 167 - , 168 - , 169 - , 170 - , 171 - , 172 - , 173 - , 174 - , 175 - , 176 - , 177 - , 178 - , 179 - , 180 - , 181 - , 182 - , -1 - , 184 - , 185 - , 186 - , 187 - , 188 - , 189 - , 190 - , 191 - , 128 - , 129 - , 130 - , 131 - , 132 - , 133 - , 134 - , 135 - , 136 - , 137 - , 138 - , 139 - , 140 - , 141 - , 142 - , 143 - , 144 - , 145 - , 146 - , 147 - , 148 - , 149 - , 150 - , -1 - , 152 - , 153 - , 154 - , 155 - , 156 - , 157 - , 158 - , 159 - , 160 - , 161 - , 162 - , 163 - , 164 - , 165 - , 166 - , 167 - , 168 - , 169 - , 170 - , 171 - , 172 - , 173 - , 174 - , 175 - , 176 - , 177 - , 178 - , 179 - , 180 - , 181 - , 182 - , -1 - , 184 - , 185 - , 186 - , 187 - , 188 - , 189 - , 190 - , 191 - , 128 - , 129 - , 130 - , 131 - , 132 - , 133 - , 134 - , 135 - , 136 - , 137 - , 138 - , 139 - , 140 - , 141 - , 142 - , 143 - , 144 - , 145 - , 146 - , 147 - , 148 - , 149 - , 150 - , -1 - , 152 - , 153 - , 154 - , 155 - , 156 - , 157 - , 158 - , 159 - , 160 - , 161 - , 162 - , 163 - , 164 - , 165 - , 166 - , 167 - , 168 - , 169 - , 170 - , 171 - , 172 - , 173 - , 174 - , 175 - , 176 - , 177 - , 178 - , 179 - , 180 - , 181 - , 182 - , -1 - , 184 - , 185 - , 186 - , 187 - , 188 - , 189 - , 190 - , 191 - , 128 - , 129 - , 130 - , 131 - , 132 - , 133 - , 134 - , 135 - , 136 - , 137 - , 138 - , 139 - , 140 - , 141 - , 142 - , 143 - , 144 - , 145 - , 146 - , 147 - , 148 - , 149 - , 150 - , 151 - , 152 - , 153 - , 154 - , 155 - , 156 - , 157 - , 158 - , 159 - , 160 - , 161 - , 162 - , 163 - , 164 - , 165 - , 166 - , 167 - , 168 - , 169 - , 170 - , 171 - , 172 - , 173 - , 174 - , 175 - , 176 - , 177 - , 178 - , 179 - , 180 - , 181 - , 182 - , 183 - , 184 - , 185 - , 186 - , 187 - , 188 - , 189 - , 190 - , 191 - , 192 - , 193 - , 194 - , 195 - , 196 - , 197 - , 198 - , 199 - , 200 - , 201 - , 202 - , 203 - , 204 - , 205 - , 206 - , 207 - , 208 - , 209 - , 210 - , 211 - , 212 - , 213 - , 214 - , 215 - , 216 - , 217 - , 218 - , 219 - , 220 - , 221 - , 222 - , 223 - , 224 - , 225 - , 226 - , 227 - , 228 - , 229 - , 230 - , 231 - , 232 - , 233 - , 234 - , 235 - , 236 - , 237 - , 238 - , 239 - , 240 - , 241 - , 242 - , 243 - , 244 - , 245 - , 246 - , 247 - , 248 - , 249 - , 250 - , 251 - , 252 - , 253 - , 254 - , 255 - , 128 - , 129 - , 130 - , 131 - , 132 - , 133 - , 134 - , 135 - , 136 - , 137 - , 138 - , 139 - , 140 - , 141 - , 142 - , 143 - , 144 - , 145 - , 146 - , 147 - , 148 - , 149 - , 150 - , 151 - , 152 - , 153 - , 154 - , 155 - , 156 - , 157 - , 158 - , 159 - , 160 - , 161 - , 162 - , 163 - , 164 - , 165 - , 166 - , 167 - , 168 - , 169 - , 170 - , 171 - , 172 - , 173 - , 174 - , 175 - , 176 - , 177 - , 178 - , 179 - , 180 - , 181 - , 182 - , 183 - , 184 - , 185 - , 186 - , 187 - , 188 - , 189 - , 190 - , 191 - , 192 - , 193 - , 194 - , 195 - , 196 - , 197 - , 198 - , 199 - , 200 - , 201 - , 202 - , 203 - , 204 - , 205 - , 206 - , 207 - , 208 - , 209 - , 210 - , 211 - , 212 - , 213 - , 214 - , 215 - , 216 - , 217 - , 218 - , 219 - , 220 - , 221 - , 222 - , 223 - , 224 - , 225 - , 226 - , 227 - , 228 - , 229 - , 230 - , 231 - , 232 - , 233 - , 234 - , 235 - , 236 - , 237 - , 238 - , 239 - , 240 - , 241 - , 242 - , 243 - , 244 - , 245 - , 246 - , 247 - , 248 - , 249 - , 250 - , 251 - , 252 - , 253 - , 254 - , 255 - , 0 - , 1 - , 2 - , 3 - , 4 - , 5 - , 6 - , 7 - , 8 - , 9 - , 10 - , 11 - , 12 - , 13 - , 14 - , 15 - , 16 - , 17 - , 18 - , 19 - , 20 - , 21 - , 22 - , 23 - , 24 - , 25 - , 26 - , 27 - , 28 - , 29 - , 30 - , 31 - , 32 - , 33 - , 34 - , 35 - , 36 - , 37 - , 38 - , 39 - , 40 - , 41 - , 42 - , 43 - , 44 - , 45 - , 46 - , 47 - , 48 - , 49 - , 50 - , 51 - , 52 - , 53 - , 54 - , 55 - , 56 - , 57 - , 58 - , 59 - , 60 - , 61 - , 62 - , 63 - , 64 - , 65 - , 66 - , 67 - , 68 - , 69 - , 70 - , 71 - , 72 - , 73 - , 74 - , 75 - , 76 - , 77 - , 78 - , 79 - , 80 - , 81 - , 82 - , 83 - , 84 - , 85 - , 86 - , 87 - , 88 - , 89 - , 90 - , 91 - , 92 - , 93 - , 94 - , 95 - , 96 - , 97 - , 98 - , 99 - , 100 - , 101 - , 102 - , 103 - , 104 - , 105 - , 106 - , 107 - , 108 - , 109 - , 110 - , 111 - , 112 - , 113 - , 114 - , 115 - , 116 - , 117 - , 118 - , 119 - , 120 - , 121 - , 122 - , 123 - , 124 - , 125 - , 126 - , 127 - , 9 - , 10 - , -1 - , -1 - , 13 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 148 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 32 - , 33 - , -1 - , -1 - , -1 - , -1 - , -1 - , 39 - , 40 - , 41 - , -1 - , 166 - , 44 - , 45 - , 46 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 177 - , -1 - , -1 - , -1 - , 58 - , 59 - , -1 - , -1 - , -1 - , 63 - , 187 - , -1 - , 189 - , 190 - , 48 - , 49 - , 50 - , 51 - , 52 - , 53 - , 54 - , 55 - , 56 - , 57 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 65 - , 66 - , 67 - , 68 - , 69 - , 70 - , 91 - , 45 - , 93 - , -1 - , 48 - , 49 - , 50 - , 51 - , 52 - , 53 - , 54 - , 55 - , 56 - , 57 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 65 - , 66 - , 67 - , 68 - , 69 - , 70 - , -1 - , -1 - , -1 - , -1 - , -1 - , 123 - , 124 - , 125 - , -1 - , -1 - , 128 - , 129 - , 130 - , 131 - , 132 - , 133 - , 134 - , 135 - , 136 - , 137 - , 138 - , 139 - , 140 - , 141 - , 142 - , 143 - , 144 - , 145 - , 146 - , 147 - , 148 - , 149 - , 150 - , 151 - , 152 - , 153 - , 154 - , 155 - , 156 - , 157 - , 158 - , 159 - , 160 - , 161 - , 162 - , 163 - , 164 - , 165 - , 166 - , 167 - , 168 - , 169 - , 170 - , 171 - , 172 - , 173 - , 174 - , 175 - , 176 - , 177 - , 178 - , 179 - , 180 - , 181 - , 182 - , 183 - , 184 - , 185 - , 186 - , 187 - , 188 - , 189 - , 190 - , 191 - , 192 - , 193 - , 194 - , 195 - , 196 - , 197 - , 198 - , 199 - , 200 - , 201 - , 202 - , 203 - , 204 - , 205 - , 206 - , 207 - , 208 - , 209 - , 210 - , 211 - , 212 - , 213 - , 214 - , 215 - , 216 - , 217 - , 218 - , 219 - , 220 - , 221 - , 222 - , 223 - , 224 - , 225 - , 226 - , 227 - , 228 - , 229 - , 230 - , 231 - , 232 - , 233 - , 234 - , 235 - , 236 - , 237 - , 238 - , 239 - , 240 - , 241 - , 242 - , 243 - , 244 - , 245 - , 246 - , 247 - , 248 - , 249 - , 250 - , 251 - , 252 - , 253 - , 254 - , 255 - , 128 - , 129 - , 130 - , 131 - , 132 - , 133 - , 134 - , 135 - , 136 - , 137 - , 138 - , 139 - , 140 - , 141 - , 142 - , 143 - , 144 - , 145 - , 146 - , 147 - , 148 - , 149 - , 150 - , -1 - , 152 - , 153 - , 154 - , 155 - , 156 - , 157 - , 158 - , 159 - , 160 - , 161 - , 162 - , 163 - , 164 - , 165 - , 166 - , 167 - , 168 - , 169 - , 170 - , 171 - , 172 - , 173 - , 174 - , 175 - , 176 - , 177 - , 178 - , 179 - , 180 - , 181 - , 182 - , 39 - , 184 - , 185 - , 186 - , 187 - , 188 - , 189 - , 190 - , 191 - , 48 - , 49 - , 50 - , 51 - , 52 - , 53 - , 54 - , 55 - , 56 - , 57 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 65 - , 66 - , 67 - , 68 - , 69 - , 70 - , 71 - , 72 - , 73 - , 74 - , 75 - , 76 - , 77 - , 78 - , 79 - , 80 - , 81 - , 82 - , 83 - , 84 - , 85 - , 86 - , 87 - , 88 - , 89 - , 90 - , -1 - , -1 - , -1 - , -1 - , 95 - , -1 - , 97 - , 98 - , 99 - , 100 - , 101 - , 102 - , 103 - , 104 - , 105 - , 106 - , 107 - , 108 - , 109 - , 110 - , 111 - , 112 - , 113 - , 114 - , 115 - , 116 - , 117 - , 118 - , 119 - , 120 - , 121 - , 122 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 0 - , 1 - , 2 - , 3 - , 4 - , 5 - , 6 - , 7 - , 8 - , -1 - , -1 - , 11 - , 12 - , -1 - , 14 - , 15 - , 16 - , 17 - , 18 - , 19 - , 20 - , 21 - , 22 - , 23 - , 24 - , 25 - , 26 - , 27 - , 28 - , 29 - , 30 - , 31 - , -1 - , -1 - , 34 - , 35 - , 36 - , 37 - , 38 - , 39 - , -1 - , -1 - , 42 - , 43 - , -1 - , -1 - , -1 - , 47 - , 48 - , 49 - , 50 - , 51 - , 52 - , 53 - , 54 - , 55 - , 56 - , 57 - , -1 - , -1 - , 60 - , 61 - , 62 - , 195 - , 64 - , 65 - , 66 - , 67 - , 68 - , 69 - , 70 - , 71 - , 72 - , 73 - , 74 - , 75 - , 76 - , 77 - , 78 - , 79 - , 80 - , 81 - , 82 - , 83 - , 84 - , 85 - , 86 - , 87 - , 88 - , 89 - , 90 - , -1 - , 92 - , -1 - , 94 - , 95 - , 96 - , 97 - , 98 - , 99 - , 100 - , 101 - , 102 - , 103 - , 104 - , 105 - , 106 - , 107 - , 108 - , 109 - , 110 - , 111 - , 112 - , 113 - , 114 - , 115 - , 116 - , 117 - , 118 - , 119 - , 120 - , 121 - , 122 - , -1 - , -1 - , -1 - , 126 - , 127 - , 192 - , 193 - , 194 - , 195 - , 196 - , 197 - , 198 - , 199 - , 200 - , 201 - , 202 - , 203 - , 204 - , 205 - , 206 - , 207 - , 208 - , 209 - , 210 - , 211 - , 212 - , 213 - , 214 - , 215 - , 216 - , 217 - , 218 - , 219 - , 220 - , 221 - , 222 - , 223 - , 224 - , 225 - , 226 - , 227 - , 228 - , 229 - , 230 - , 231 - , 232 - , 233 - , 234 - , 235 - , 236 - , 237 - , 238 - , 239 - , 240 - , 241 - , 242 - , 243 - , 244 - , 245 - , 246 - , 247 - , 248 - , 249 - , 250 - , 251 - , 252 - , 253 - , 254 - , 255 - , -1 - , -1 - , 194 - , 195 - , 196 - , 197 - , 198 - , 199 - , 200 - , 201 - , 202 - , 203 - , 204 - , 205 - , 206 - , 207 - , 208 - , 209 - , 210 - , 211 - , 212 - , 213 - , 214 - , 215 - , 216 - , 217 - , 218 - , 219 - , 220 - , 221 - , 222 - , 223 - , 224 - , 225 - , 226 - , 227 - , 228 - , 229 - , 230 - , 231 - , 232 - , 233 - , 234 - , 235 - , 236 - , 237 - , 238 - , 239 - , 240 - , 241 - , 242 - , 243 - , 244 - , 0 - , 1 - , 2 - , 3 - , 4 - , 5 - , 6 - , 7 - , 8 - , -1 - , -1 - , 11 - , 12 - , -1 - , 14 - , 15 - , 16 - , 17 - , 18 - , 19 - , 20 - , 21 - , 22 - , 23 - , 24 - , 25 - , 26 - , 27 - , 28 - , 29 - , 30 - , 31 - , -1 - , -1 - , 34 - , 35 - , 36 - , 37 - , 38 - , 39 - , -1 - , -1 - , 42 - , 43 - , -1 - , -1 - , -1 - , 47 - , 48 - , 49 - , 50 - , 51 - , 52 - , 53 - , 54 - , 55 - , 56 - , 57 - , -1 - , -1 - , 60 - , 61 - , 62 - , -1 - , 64 - , 65 - , 66 - , 67 - , 68 - , 69 - , 70 - , 71 - , 72 - , 73 - , 74 - , 75 - , 76 - , 77 - , 78 - , 79 - , 80 - , 81 - , 82 - , 83 - , 84 - , 85 - , 86 - , 87 - , 88 - , 89 - , 90 - , -1 - , 92 - , -1 - , 94 - , 95 - , 96 - , 97 - , 98 - , 99 - , 100 - , 101 - , 102 - , 103 - , 104 - , 105 - , 106 - , 107 - , 108 - , 109 - , 110 - , 111 - , 112 - , 113 - , 114 - , 115 - , 116 - , 117 - , 118 - , 119 - , 120 - , 121 - , 122 - , -1 - , -1 - , -1 - , 126 - , 127 - , 191 - , 192 - , 193 - , 194 - , 195 - , 196 - , 197 - , 198 - , 199 - , 200 - , 201 - , 202 - , 203 - , 204 - , 205 - , 206 - , 207 - , 208 - , 209 - , 210 - , 211 - , 212 - , 213 - , 214 - , 215 - , 216 - , 217 - , 218 - , 219 - , 220 - , 221 - , 222 - , 223 - , 224 - , 225 - , 226 - , 227 - , 228 - , 229 - , 230 - , 231 - , 232 - , 233 - , 234 - , 235 - , 236 - , 237 - , 238 - , 239 - , 240 - , 241 - , 242 - , 243 - , 244 - , 245 - , 246 - , 247 - , 248 - , 249 - , 250 - , 251 - , 252 - , 253 - , 254 - , 255 - , -1 - , 194 - , 195 - , 196 - , 197 - , 198 - , 199 - , 200 - , 201 - , 202 - , 203 - , 204 - , 205 - , 206 - , 207 - , 208 - , 209 - , 210 - , 211 - , 212 - , 213 - , 214 - , 215 - , 216 - , 217 - , 218 - , 219 - , 220 - , 221 - , 222 - , 223 - , 224 - , 225 - , 226 - , 227 - , 228 - , 229 - , 230 - , 231 - , 232 - , 233 - , 234 - , 235 - , 236 - , 237 - , 238 - , 239 - , 240 - , 241 - , 242 - , 243 - , 244 - , 0 - , 1 - , 2 - , 3 - , 4 - , 5 - , 6 - , 7 - , 8 - , -1 - , -1 - , 11 - , 12 - , -1 - , 14 - , 15 - , 16 - , 17 - , 18 - , 19 - , 20 - , 21 - , 22 - , 23 - , 24 - , 25 - , 26 - , 27 - , 28 - , 29 - , 30 - , 31 - , -1 - , -1 - , 34 - , 35 - , 36 - , 37 - , 38 - , 39 - , -1 - , -1 - , 42 - , 43 - , -1 - , 45 - , -1 - , 47 - , 48 - , 49 - , 50 - , 51 - , 52 - , 53 - , 54 - , 55 - , 56 - , 57 - , -1 - , -1 - , 60 - , 61 - , 62 - , -1 - , 64 - , 65 - , 66 - , 67 - , 68 - , 69 - , 70 - , 71 - , 72 - , 73 - , 74 - , 75 - , 76 - , 77 - , 78 - , 79 - , 80 - , 81 - , 82 - , 83 - , 84 - , 85 - , 86 - , 87 - , 88 - , 89 - , 90 - , -1 - , 92 - , -1 - , 94 - , 95 - , 96 - , 97 - , 98 - , 99 - , 100 - , 101 - , 102 - , 103 - , 104 - , 105 - , 106 - , 107 - , 108 - , 109 - , 110 - , 111 - , 112 - , 113 - , 114 - , 115 - , 116 - , 117 - , 118 - , 119 - , 120 - , 121 - , 122 - , -1 - , -1 - , -1 - , 126 - , 127 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 194 - , 195 - , 196 - , 197 - , 198 - , 199 - , 200 - , 201 - , 202 - , 203 - , 204 - , 205 - , 206 - , 207 - , 208 - , 209 - , 210 - , 211 - , 212 - , 213 - , 214 - , 215 - , 216 - , 217 - , 218 - , 219 - , 220 - , 221 - , 222 - , 223 - , 224 - , 225 - , 226 - , 227 - , 228 - , 229 - , 230 - , 231 - , 232 - , 233 - , 234 - , 235 - , 236 - , 237 - , 238 - , 239 - , 240 - , 241 - , 242 - , 243 - , 244 - , 9 - , 10 - , -1 - , -1 - , 13 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 32 - , 33 - , -1 - , -1 - , -1 - , -1 - , -1 - , 39 - , 40 - , 41 - , -1 - , -1 - , 44 - , 45 - , 46 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 58 - , 59 - , -1 - , -1 - , -1 - , 63 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 91 - , -1 - , 93 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 123 - , 124 - , 125 - , -1 - , -1 - , 128 - , 129 - , 130 - , 131 - , 132 - , 133 - , 134 - , 135 - , 136 - , 137 - , 138 - , 139 - , 140 - , 141 - , 142 - , 143 - , 144 - , 145 - , 146 - , 147 - , 148 - , 149 - , 150 - , 151 - , 152 - , 153 - , 154 - , 155 - , 156 - , 157 - , 158 - , 159 - , 160 - , 161 - , 162 - , 163 - , 164 - , 165 - , 166 - , 167 - , 168 - , 169 - , 170 - , 171 - , 172 - , 173 - , 174 - , 175 - , 176 - , 177 - , 178 - , 179 - , 180 - , 181 - , 182 - , 183 - , 184 - , 185 - , 186 - , 187 - , 188 - , 189 - , 190 - , 191 - , 192 - , 193 - , 194 - , 195 - , 196 - , 197 - , 198 - , 199 - , 200 - , 201 - , 202 - , 203 - , 204 - , 205 - , 206 - , 207 - , 208 - , 209 - , 210 - , 211 - , 212 - , 213 - , 214 - , 215 - , 216 - , 217 - , 218 - , 219 - , 220 - , 221 - , 222 - , 223 - , 224 - , 225 - , 226 - , 227 - , 228 - , 229 - , 230 - , 231 - , 232 - , 233 - , 234 - , 235 - , 236 - , 237 - , 238 - , 239 - , 240 - , 241 - , 242 - , 243 - , 244 - , 245 - , 246 - , 247 - , 248 - , 249 - , 250 - , 251 - , 252 - , 253 - , 254 - , 255 - , 0 - , 1 - , 2 - , 3 - , 4 - , 5 - , 6 - , 7 - , 8 - , 9 - , 10 - , 11 - , 12 - , 13 - , 14 - , 15 - , 16 - , 17 - , 18 - , 19 - , 20 - , 21 - , 22 - , 23 - , 24 - , 25 - , 26 - , 27 - , 28 - , 29 - , 30 - , 31 - , 32 - , 33 - , 34 - , 35 - , 36 - , 37 - , 38 - , 39 - , 40 - , 41 - , 42 - , 43 - , 44 - , 45 - , 46 - , 47 - , 48 - , 49 - , 50 - , 51 - , 52 - , 53 - , 54 - , 55 - , 56 - , 57 - , 58 - , 59 - , 60 - , 61 - , 62 - , 63 - , 64 - , 65 - , 66 - , 67 - , 68 - , 69 - , 70 - , 71 - , 72 - , 73 - , 74 - , 75 - , 76 - , 77 - , 78 - , 79 - , 80 - , 81 - , 82 - , 83 - , 84 - , 85 - , 86 - , 87 - , 88 - , 89 - , 90 - , 91 - , 92 - , 93 - , 94 - , 95 - , 96 - , 97 - , 98 - , 99 - , 100 - , 101 - , 102 - , 103 - , 104 - , 105 - , 106 - , 107 - , 108 - , 109 - , 110 - , 111 - , 112 - , 113 - , 114 - , 115 - , 116 - , 117 - , 118 - , 119 - , 120 - , 121 - , 122 - , 123 - , 124 - , 125 - , 126 - , 127 - , -1 - , 128 - , 129 - , 130 - , 131 - , 132 - , 133 - , 134 - , 135 - , 136 - , 137 - , 138 - , 139 - , 140 - , 141 - , 142 - , 143 - , 144 - , 145 - , 146 - , 147 - , 148 - , 149 - , 150 - , 151 - , 152 - , 153 - , 154 - , 155 - , 156 - , 157 - , 158 - , 159 - , 160 - , 161 - , 162 - , 163 - , 164 - , 165 - , 166 - , 167 - , 168 - , 169 - , 170 - , 171 - , 172 - , 173 - , 174 - , 175 - , 176 - , 177 - , 178 - , 179 - , 180 - , 181 - , 182 - , 183 - , 184 - , 185 - , 186 - , 187 - , 188 - , 189 - , 190 - , 191 - , 192 - , 193 - , 194 - , 195 - , 196 - , 197 - , 198 - , 199 - , 200 - , 201 - , 202 - , 203 - , 204 - , 205 - , 206 - , 207 - , 208 - , 209 - , 210 - , 211 - , 212 - , 213 - , 214 - , 215 - , 216 - , 217 - , 218 - , 219 - , 220 - , 221 - , 222 - , 223 - , 224 - , 225 - , 226 - , 227 - , 228 - , 229 - , 230 - , 231 - , 232 - , 233 - , 234 - , 235 - , 236 - , 237 - , 238 - , 239 - , 240 - , 241 - , 242 - , 243 - , 244 - , 245 - , 246 - , 247 - , 248 - , 249 - , 250 - , 251 - , 252 - , 253 - , 254 - , 255 - , 128 - , 129 - , 130 - , 131 - , 132 - , 133 - , 134 - , 135 - , 136 - , 137 - , 138 - , 139 - , 140 - , 141 - , 142 - , 143 - , 144 - , 145 - , 146 - , 147 - , 148 - , 149 - , 150 - , 151 - , 152 - , 153 - , 154 - , 155 - , 156 - , 157 - , 158 - , 159 - , 160 - , 161 - , 162 - , 163 - , 164 - , 165 - , 166 - , 167 - , 168 - , 169 - , 170 - , 171 - , 172 - , 173 - , 174 - , 175 - , 176 - , 177 - , 178 - , 179 - , 180 - , 181 - , 182 - , 183 - , 184 - , 185 - , 186 - , 187 - , 188 - , 189 - , 190 - , 191 - , 192 - , 193 - , 194 - , 195 - , 196 - , 197 - , 198 - , 199 - , 200 - , 201 - , 202 - , 203 - , 204 - , 205 - , 206 - , 207 - , 208 - , 209 - , 210 - , 211 - , 212 - , 213 - , 214 - , 215 - , 216 - , 217 - , 218 - , 219 - , 220 - , 221 - , 222 - , 223 - , 224 - , 225 - , 226 - , 227 - , 228 - , 229 - , 230 - , 231 - , 232 - , 233 - , 234 - , 235 - , 236 - , 237 - , 238 - , 239 - , 240 - , 241 - , 242 - , 243 - , 244 - , 245 - , 246 - , 247 - , 248 - , 249 - , 250 - , 251 - , 252 - , 253 - , 254 - , 255 - , 143 - , 144 - , 145 - , 146 - , 147 - , 148 - , 149 - , 150 - , 151 - , 152 - , 153 - , 154 - , 155 - , 156 - , 157 - , 158 - , 159 - , 160 - , 161 - , 162 - , 163 - , 164 - , 165 - , 166 - , 167 - , 168 - , 169 - , 170 - , 171 - , 172 - , 173 - , 174 - , 175 - , 176 - , 177 - , 178 - , 179 - , 180 - , 181 - , 182 - , 183 - , 184 - , 185 - , 186 - , 187 - , 188 - , 189 - , 190 - , 191 - , 192 - , 193 - , 194 - , 195 - , 196 - , 197 - , 198 - , 199 - , 200 - , 201 - , 202 - , 203 - , 204 - , 205 - , 206 - , 207 - , 208 - , 209 - , 210 - , 211 - , 212 - , 213 - , 214 - , 215 - , 216 - , 217 - , 218 - , 219 - , 220 - , 221 - , 222 - , 223 - , 224 - , 225 - , 226 - , 227 - , 228 - , 229 - , 230 - , 231 - , 232 - , 233 - , 234 - , 235 - , 236 - , 237 - , 238 - , 239 - , 240 - , 241 - , 242 - , 243 - , 244 - , 245 - , 246 - , 247 - , 248 - , 249 - , 250 - , 251 - , 252 - , 253 - , 254 - , 255 - , 0 - , 1 - , 2 - , 3 - , 4 - , 5 - , 6 - , 7 - , 8 - , -1 - , -1 - , 11 - , 12 - , -1 - , 14 - , 15 - , 16 - , 17 - , 18 - , 19 - , 20 - , 21 - , 22 - , 23 - , 24 - , 25 - , 26 - , 27 - , 28 - , 29 - , 30 - , 31 - , -1 - , -1 - , 34 - , 35 - , 36 - , 37 - , 38 - , 39 - , -1 - , -1 - , 42 - , 43 - , -1 - , -1 - , -1 - , 47 - , 48 - , 49 - , 50 - , 51 - , 52 - , 53 - , 54 - , 55 - , 56 - , 57 - , -1 - , -1 - , 60 - , 61 - , 62 - , -1 - , 64 - , 65 - , 66 - , 67 - , 68 - , 69 - , 70 - , 71 - , 72 - , 73 - , 74 - , 75 - , 76 - , 77 - , 78 - , 79 - , 80 - , 81 - , 82 - , 83 - , 84 - , 85 - , 86 - , 87 - , 88 - , 89 - , 90 - , -1 - , 92 - , -1 - , 94 - , 95 - , 96 - , 97 - , 98 - , 99 - , 100 - , 101 - , 102 - , 103 - , 104 - , 105 - , 106 - , 107 - , 108 - , 109 - , 110 - , 111 - , 112 - , 113 - , 114 - , 115 - , 116 - , 117 - , 118 - , 119 - , 120 - , 121 - , 122 - , -1 - , -1 - , -1 - , 126 - , 127 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 194 - , 195 - , 196 - , 197 - , 198 - , 199 - , 200 - , 201 - , 202 - , 203 - , 204 - , 205 - , 206 - , 207 - , 208 - , 209 - , 210 - , 211 - , 212 - , 213 - , 214 - , 215 - , 216 - , 217 - , 218 - , 219 - , 220 - , 221 - , 222 - , 223 - , 224 - , 225 - , 226 - , 227 - , 228 - , 229 - , 230 - , 231 - , 232 - , 233 - , 234 - , 235 - , 236 - , 237 - , 238 - , 239 - , 240 - , 241 - , 242 - , 243 - , 244 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - ] - -alex_deflt :: Array Int Int -alex_deflt = listArray (0 :: Int, 50) - [ -1 - , 23 - , 14 - , 23 - , 2 - , 14 - , 2 - , 14 - , -1 - , 38 - , 14 - , -1 - , -1 - , 14 - , 14 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 2 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 38 - , 38 - , -1 - , -1 - , 38 - , 47 - , 38 - , 47 - , 48 - , 38 - , 47 - , 48 - , -1 - ] - -alex_accept = listArray (0 :: Int, 50) - [ AlexAccNone - , AlexAccNone - , AlexAccNone - , AlexAccNone - , AlexAccNone - , AlexAccNone - , AlexAccNone - , AlexAccNone - , AlexAccNone - , AlexAccNone - , AlexAccNone - , AlexAccNone - , AlexAccNone - , AlexAccNone - , AlexAcc 10 - , AlexAccNone - , AlexAcc 9 - , AlexAcc 8 - , AlexAccNone - , AlexAcc 7 - , AlexAccNone - , AlexAccNone - , AlexAccNone - , AlexAccNone - , AlexAccSkip - , AlexAcc 6 - , AlexAccNone - , AlexAccNone - , AlexAccNone - , AlexAccNone - , AlexAcc 5 - , AlexAccNone - , AlexAccNone - , AlexAccNone - , AlexAccNone - , AlexAcc 4 - , AlexAcc 3 - , AlexAcc 2 - , AlexAcc 1 - , AlexAccNone - , AlexAccNone - , AlexAccNone - , AlexAccNone - , AlexAccNone - , AlexAccNone - , AlexAccNone - , AlexAccNone - , AlexAccNone - , AlexAccNone - , AlexAccNone - , AlexAcc 0 - ] - -alex_actions = array (0 :: Int, 11) - [ (10,alex_action_4) - , (9,alex_action_5) - , (8,alex_action_5) - , (7,alex_action_6) - , (6,alex_action_1) - , (5,alex_action_2) - , (4,alex_action_3) - , (3,alex_action_3) - , (2,alex_action_3) - , (1,alex_action_3) - , (0,alex_action_4) - ] - -{-# LINE 62 "Lex.x" #-} --- | Create a token with position. -tok :: (String -> Tok) -> (Posn -> String -> Token) -tok f p = PT p . f - --- | Token without position. -data Tok - = TK {-# UNPACK #-} !TokSymbol -- ^ Reserved word or symbol. - | TL !String -- ^ String literal. - | TI !String -- ^ Integer literal. - | TV !String -- ^ Identifier. - | TD !String -- ^ Float literal. - | TC !String -- ^ Character literal. - | T_Bytes !String - | T_Function !String - | T_LabelId !String - | T_AlphaIndex !String - deriving (Eq, Show, Ord) - --- | Smart constructor for 'Tok' for the sake of backwards compatibility. -pattern TS :: String -> Int -> Tok -pattern TS t i = TK (TokSymbol t i) - --- | Keyword or symbol tokens have a unique ID. -data TokSymbol = TokSymbol - { tsText :: String - -- ^ Keyword or symbol text. - , tsID :: !Int - -- ^ Unique ID. - } deriving (Show) - --- | Keyword/symbol equality is determined by the unique ID. -instance Eq TokSymbol where (==) = (==) `on` tsID - --- | Keyword/symbol ordering is determined by the unique ID. -instance Ord TokSymbol where compare = compare `on` tsID - --- | Token with position. -data Token - = PT Posn Tok - | Err Posn - deriving (Eq, Show, Ord) - --- | Pretty print a position. -printPosn :: Posn -> String -printPosn (Pn _ l c) = "line " ++ show l ++ ", column " ++ show c - --- | Pretty print the position of the first token in the list. -tokenPos :: [Token] -> String -tokenPos (t:_) = printPosn (tokenPosn t) -tokenPos [] = "end of file" - --- | Get the position of a token. -tokenPosn :: Token -> Posn -tokenPosn (PT p _) = p -tokenPosn (Err p) = p - --- | Get line and column of a token. -tokenLineCol :: Token -> (Int, Int) -tokenLineCol = posLineCol . tokenPosn - --- | Get line and column of a position. -posLineCol :: Posn -> (Int, Int) -posLineCol (Pn _ l c) = (l,c) - --- | Convert a token into "position token" form. -mkPosToken :: Token -> ((Int, Int), String) -mkPosToken t = (tokenLineCol t, tokenText t) - --- | Convert a token to its text. -tokenText :: Token -> String -tokenText t = case t of - PT _ (TS s _) -> s - PT _ (TL s) -> show s - PT _ (TI s) -> s - PT _ (TV s) -> s - PT _ (TD s) -> s - PT _ (TC s) -> s - Err _ -> "#error" - PT _ (T_Bytes s) -> s - PT _ (T_Function s) -> s - PT _ (T_LabelId s) -> s - PT _ (T_AlphaIndex s) -> s - --- | Convert a token to a string. -prToken :: Token -> String -prToken t = tokenText t - --- | Finite map from text to token organized as binary search tree. -data BTree - = N -- ^ Nil (leaf). - | B String Tok BTree BTree - -- ^ Binary node. - deriving (Show) - --- | Convert potential keyword into token or use fallback conversion. -eitherResIdent :: (String -> Tok) -> String -> Tok -eitherResIdent tv s = treeFind resWords - where - treeFind N = tv s - treeFind (B a t left right) = - case compare s a of - LT -> treeFind left - GT -> treeFind right - EQ -> t - --- | The keywords and symbols of the language organized as binary search tree. -resWords :: BTree -resWords = - b "\958" 9 - (b "\916" 5 - (b "{" 3 (b "." 2 (b "," 1 N N) N) (b "}" 4 N N)) - (b "\955" 7 (b "\934" 6 N N) (b "\957" 8 N N))) - (b "\8614" 13 - (b "\963" 11 (b "\961" 10 N N) (b "\966" 12 N N)) - (b "\8869" 15 (b "\8709" 14 N N) (b "\10509" 16 N N))) - where - b s n = B bs (TS bs n) - where - bs = s - --- | Unquote string literal. -unescapeInitTail :: String -> String -unescapeInitTail = id . unesc . tail . id - where - unesc s = case s of - '\\':c:cs | elem c ['\"', '\\', '\''] -> c : unesc cs - '\\':'n':cs -> '\n' : unesc cs - '\\':'t':cs -> '\t' : unesc cs - '\\':'r':cs -> '\r' : unesc cs - '\\':'f':cs -> '\f' : unesc cs - '"':[] -> [] - c:cs -> c : unesc cs - _ -> [] - -------------------------------------------------------------------- --- Alex wrapper code. --- A modified "posn" wrapper. -------------------------------------------------------------------- - -data Posn = Pn !Int !Int !Int - deriving (Eq, Show, Ord) - -alexStartPos :: Posn -alexStartPos = Pn 0 1 1 - -alexMove :: Posn -> Char -> Posn -alexMove (Pn a l c) '\t' = Pn (a+1) l (((c+7) `div` 8)*8+1) -alexMove (Pn a l c) '\n' = Pn (a+1) (l+1) 1 -alexMove (Pn a l c) _ = Pn (a+1) l (c+1) - -type Byte = Word8 - -type AlexInput = (Posn, -- current position, - Char, -- previous char - [Byte], -- pending bytes on the current char - String) -- current input string - -tokens :: String -> [Token] -tokens str = go (alexStartPos, '\n', [], str) - where - go :: AlexInput -> [Token] - go inp@(pos, _, _, str) = - case alexScan inp 0 of - AlexEOF -> [] - AlexError (pos, _, _, _) -> [Err pos] - AlexSkip inp' len -> go inp' - AlexToken inp' len act -> act pos (take len str) : (go inp') - -alexGetByte :: AlexInput -> Maybe (Byte,AlexInput) -alexGetByte (p, c, (b:bs), s) = Just (b, (p, c, bs, s)) -alexGetByte (p, _, [], s) = - case s of - [] -> Nothing - (c:s) -> - let p' = alexMove p c - (b:bs) = utf8Encode c - in p' `seq` Just (b, (p', c, bs, s)) - -alexInputPrevChar :: AlexInput -> Char -alexInputPrevChar (p, c, bs, s) = c - --- | Encode a Haskell String to a list of Word8 values, in UTF8 format. -utf8Encode :: Char -> [Word8] -utf8Encode = map fromIntegral . go . ord - where - go oc - | oc <= 0x7f = [oc] - - | oc <= 0x7ff = [ 0xc0 + (oc `Data.Bits.shiftR` 6) - , 0x80 + oc Data.Bits..&. 0x3f - ] - - | oc <= 0xffff = [ 0xe0 + (oc `Data.Bits.shiftR` 12) - , 0x80 + ((oc `Data.Bits.shiftR` 6) Data.Bits..&. 0x3f) - , 0x80 + oc Data.Bits..&. 0x3f - ] - | otherwise = [ 0xf0 + (oc `Data.Bits.shiftR` 18) - , 0x80 + ((oc `Data.Bits.shiftR` 12) Data.Bits..&. 0x3f) - , 0x80 + ((oc `Data.Bits.shiftR` 6) Data.Bits..&. 0x3f) - , 0x80 + oc Data.Bits..&. 0x3f - ] -alex_action_1 = tok (eitherResIdent TV) -alex_action_2 = tok (eitherResIdent T_Bytes) -alex_action_3 = tok (eitherResIdent T_Function) -alex_action_4 = tok (eitherResIdent T_LabelId) -alex_action_5 = tok (eitherResIdent T_AlphaIndex) -alex_action_6 = tok (eitherResIdent TV) - -#define ALEX_NOPRED 1 --- ----------------------------------------------------------------------------- --- ALEX TEMPLATE --- --- This code is in the PUBLIC DOMAIN; you may copy it freely and use --- it for any purpose whatsoever. - --- ----------------------------------------------------------------------------- --- INTERNALS and main scanner engine - -#ifdef ALEX_GHC -# define ILIT(n) n# -# define IBOX(n) (I# (n)) -# define FAST_INT Int# --- Do not remove this comment. Required to fix CPP parsing when using GCC and a clang-compiled alex. -# if __GLASGOW_HASKELL__ > 706 -# define GTE(n,m) (tagToEnum# (n >=# m)) -# define EQ(n,m) (tagToEnum# (n ==# m)) -# else -# define GTE(n,m) (n >=# m) -# define EQ(n,m) (n ==# m) -# endif -# define PLUS(n,m) (n +# m) -# define MINUS(n,m) (n -# m) -# define TIMES(n,m) (n *# m) -# define NEGATE(n) (negateInt# (n)) -# define IF_GHC(x) (x) -#else -# define ILIT(n) (n) -# define IBOX(n) (n) -# define FAST_INT Int -# define GTE(n,m) (n >= m) -# define EQ(n,m) (n == m) -# define PLUS(n,m) (n + m) -# define MINUS(n,m) (n - m) -# define TIMES(n,m) (n * m) -# define NEGATE(n) (negate (n)) -# define IF_GHC(x) -#endif - -#ifdef ALEX_GHC -data AlexAddr = AlexA# Addr# --- Do not remove this comment. Required to fix CPP parsing when using GCC and a clang-compiled alex. -#if __GLASGOW_HASKELL__ < 503 -uncheckedShiftL# = shiftL# -#endif - -{-# INLINE alexIndexInt16OffAddr #-} -alexIndexInt16OffAddr :: AlexAddr -> Int# -> Int# -alexIndexInt16OffAddr (AlexA# arr) off = -#ifdef WORDS_BIGENDIAN - narrow16Int# i - where - i = word2Int# ((high `uncheckedShiftL#` 8#) `or#` low) - high = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1#))) - low = int2Word# (ord# (indexCharOffAddr# arr off')) - off' = off *# 2# -#else -#if __GLASGOW_HASKELL__ >= 901 - int16ToInt# -#endif - (indexInt16OffAddr# arr off) -#endif -#else -alexIndexInt16OffAddr arr off = arr ! off -#endif - -#ifdef ALEX_GHC -{-# INLINE alexIndexInt32OffAddr #-} -alexIndexInt32OffAddr :: AlexAddr -> Int# -> Int# -alexIndexInt32OffAddr (AlexA# arr) off = -#ifdef WORDS_BIGENDIAN - narrow32Int# i - where - i = word2Int# ((b3 `uncheckedShiftL#` 24#) `or#` - (b2 `uncheckedShiftL#` 16#) `or#` - (b1 `uncheckedShiftL#` 8#) `or#` b0) - b3 = int2Word# (ord# (indexCharOffAddr# arr (off' +# 3#))) - b2 = int2Word# (ord# (indexCharOffAddr# arr (off' +# 2#))) - b1 = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1#))) - b0 = int2Word# (ord# (indexCharOffAddr# arr off')) - off' = off *# 4# -#else -#if __GLASGOW_HASKELL__ >= 901 - int32ToInt# -#endif - (indexInt32OffAddr# arr off) -#endif -#else -alexIndexInt32OffAddr arr off = arr ! off -#endif - -#ifdef ALEX_GHC - -#if __GLASGOW_HASKELL__ < 503 -quickIndex arr i = arr ! i -#else --- GHC >= 503, unsafeAt is available from Data.Array.Base. -quickIndex = unsafeAt -#endif -#else -quickIndex arr i = arr ! i -#endif - --- ----------------------------------------------------------------------------- --- Main lexing routines - -data AlexReturn a - = AlexEOF - | AlexError !AlexInput - | AlexSkip !AlexInput !Int - | AlexToken !AlexInput !Int a - --- alexScan :: AlexInput -> StartCode -> AlexReturn a -alexScan input__ IBOX(sc) - = alexScanUser undefined input__ IBOX(sc) - -alexScanUser user__ input__ IBOX(sc) - = case alex_scan_tkn user__ input__ ILIT(0) input__ sc AlexNone of - (AlexNone, input__') -> - case alexGetByte input__ of - Nothing -> -#ifdef ALEX_DEBUG - trace ("End of input.") $ -#endif - AlexEOF - Just _ -> -#ifdef ALEX_DEBUG - trace ("Error.") $ -#endif - AlexError input__' - - (AlexLastSkip input__'' len, _) -> -#ifdef ALEX_DEBUG - trace ("Skipping.") $ -#endif - AlexSkip input__'' len - - (AlexLastAcc k input__''' len, _) -> -#ifdef ALEX_DEBUG - trace ("Accept.") $ -#endif - AlexToken input__''' len (alex_actions ! k) - - --- Push the input through the DFA, remembering the most recent accepting --- state it encountered. - -alex_scan_tkn user__ orig_input len input__ s last_acc = - input__ `seq` -- strict in the input - let - new_acc = (check_accs (alex_accept `quickIndex` IBOX(s))) - in - new_acc `seq` - case alexGetByte input__ of - Nothing -> (new_acc, input__) - Just (c, new_input) -> -#ifdef ALEX_DEBUG - trace ("State: " ++ show IBOX(s) ++ ", char: " ++ show c) $ -#endif - case fromIntegral c of { IBOX(ord_c) -> - let - base = alexIndexInt32OffAddr alex_base s - offset = PLUS(base,ord_c) - check = alexIndexInt16OffAddr alex_check offset - - new_s = if GTE(offset,ILIT(0)) && EQ(check,ord_c) - then alexIndexInt16OffAddr alex_table offset - else alexIndexInt16OffAddr alex_deflt s - in - case new_s of - ILIT(-1) -> (new_acc, input__) - -- on an error, we want to keep the input *before* the - -- character that failed, not after. - _ -> alex_scan_tkn user__ orig_input -#ifdef ALEX_LATIN1 - PLUS(len,ILIT(1)) - -- issue 119: in the latin1 encoding, *each* byte is one character -#else - (if c < 0x80 || c >= 0xC0 then PLUS(len,ILIT(1)) else len) - -- note that the length is increased ONLY if this is the 1st byte in a char encoding) -#endif - new_input new_s new_acc - } - where - check_accs (AlexAccNone) = last_acc - check_accs (AlexAcc a ) = AlexLastAcc a input__ IBOX(len) - check_accs (AlexAccSkip) = AlexLastSkip input__ IBOX(len) -#ifndef ALEX_NOPRED - check_accs (AlexAccPred a predx rest) - | predx user__ orig_input IBOX(len) input__ - = AlexLastAcc a input__ IBOX(len) - | otherwise - = check_accs rest - check_accs (AlexAccSkipPred predx rest) - | predx user__ orig_input IBOX(len) input__ - = AlexLastSkip input__ IBOX(len) - | otherwise - = check_accs rest -#endif - -data AlexLastAcc - = AlexNone - | AlexLastAcc !Int !AlexInput !Int - | AlexLastSkip !AlexInput !Int - -data AlexAcc user - = AlexAccNone - | AlexAcc Int - | AlexAccSkip -#ifndef ALEX_NOPRED - | AlexAccPred Int (AlexAccPred user) (AlexAcc user) - | AlexAccSkipPred (AlexAccPred user) (AlexAcc user) - -type AlexAccPred user = user -> AlexInput -> Int -> AlexInput -> Bool - --- ----------------------------------------------------------------------------- --- Predicates on a rule - -alexAndPred p1 p2 user__ in1 len in2 - = p1 user__ in1 len in2 && p2 user__ in1 len in2 - ---alexPrevCharIsPred :: Char -> AlexAccPred _ -alexPrevCharIs c _ input__ _ _ = c == alexInputPrevChar input__ - -alexPrevCharMatches f _ input__ _ _ = f (alexInputPrevChar input__) - ---alexPrevCharIsOneOfPred :: Array Char Bool -> AlexAccPred _ -alexPrevCharIsOneOf arr _ input__ _ _ = arr ! alexInputPrevChar input__ - ---alexRightContext :: Int -> AlexAccPred _ -alexRightContext IBOX(sc) user__ _ _ input__ = - case alex_scan_tkn user__ input__ ILIT(0) input__ sc AlexNone of - (AlexNone, _) -> False - _ -> True - -- TODO: there's no need to find the longest - -- match when checking the right context, just - -- the first match will do. -#endif diff --git a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Lex.x.bak b/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Lex.x.bak deleted file mode 100644 index c120dbf30..000000000 --- a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Lex.x.bak +++ /dev/null @@ -1,264 +0,0 @@ --- -*- haskell -*- File generated by the BNF Converter (bnfc 2.9.5). - --- Lexer definition for use with Alex 3 -{ -{-# OPTIONS -fno-warn-incomplete-patterns #-} -{-# OPTIONS_GHC -w #-} - -{-# LANGUAGE PatternSynonyms #-} - -module Language.EO.Phi.Syntax.Lex where - -import Prelude - -import qualified Data.Bits -import Data.Char (ord) -import Data.Function (on) -import Data.Word (Word8) -} - --- Predefined character classes - -$c = [A-Z\192-\221] # [\215] -- capital isolatin1 letter (215 = \times) FIXME -$s = [a-z\222-\255] # [\247] -- small isolatin1 letter (247 = \div ) FIXME -$l = [$c $s] -- letter -$d = [0-9] -- digit -$i = [$l $d _ '] -- identifier character -$u = [. \n] -- universal: any character - --- Symbols and non-identifier-like reserved words - -@rsyms = \Δ | \λ | \Φ | \ξ | \φ | \ρ | \σ | \ν | \↦ | \∅ | \⤍ | \, | \{ | \} | \. - -:- - --- Whitespace (skipped) -$white+ ; - --- Symbols -@rsyms - { tok (eitherResIdent TV) } - --- token Bytes -\- \- | [0 1 2 3 4 5 6 7 8 9 A B C D E F][0 1 2 3 4 5 6 7 8 9 A B C D E F](\- [0 1 2 3 4 5 6 7 8 9 A B C D E F][0 1 2 3 4 5 6 7 8 9 A B C D E F]) * (\- \-) - { tok (eitherResIdent T_Bytes) } - --- token Function -$c [$u # [\t \n \r \ \! \' \( \) \, \- \. \: \; \? \[ \] \{ \| \} \⟦ \⟧]] * - { tok (eitherResIdent T_Function) } - --- token LabelId -$s [$u # [\t \n \r \ \! \' \( \) \, \- \. \: \; \? \[ \] \{ \| \} \⟦ \⟧]] * - { tok (eitherResIdent T_LabelId) } - --- token AlphaIndex -α 0 | α [$d # 0]$d * - { tok (eitherResIdent T_AlphaIndex) } - --- Keywords and Ident -$l $i* - { tok (eitherResIdent TV) } - -{ --- | Create a token with position. -tok :: (String -> Tok) -> (Posn -> String -> Token) -tok f p = PT p . f - --- | Token without position. -data Tok - = TK {-# UNPACK #-} !TokSymbol -- ^ Reserved word or symbol. - | TL !String -- ^ String literal. - | TI !String -- ^ Integer literal. - | TV !String -- ^ Identifier. - | TD !String -- ^ Float literal. - | TC !String -- ^ Character literal. - | T_Bytes !String - | T_Function !String - | T_LabelId !String - | T_AlphaIndex !String - deriving (Eq, Show, Ord) - --- | Smart constructor for 'Tok' for the sake of backwards compatibility. -pattern TS :: String -> Int -> Tok -pattern TS t i = TK (TokSymbol t i) - --- | Keyword or symbol tokens have a unique ID. -data TokSymbol = TokSymbol - { tsText :: String - -- ^ Keyword or symbol text. - , tsID :: !Int - -- ^ Unique ID. - } deriving (Show) - --- | Keyword/symbol equality is determined by the unique ID. -instance Eq TokSymbol where (==) = (==) `on` tsID - --- | Keyword/symbol ordering is determined by the unique ID. -instance Ord TokSymbol where compare = compare `on` tsID - --- | Token with position. -data Token - = PT Posn Tok - | Err Posn - deriving (Eq, Show, Ord) - --- | Pretty print a position. -printPosn :: Posn -> String -printPosn (Pn _ l c) = "line " ++ show l ++ ", column " ++ show c - --- | Pretty print the position of the first token in the list. -tokenPos :: [Token] -> String -tokenPos (t:_) = printPosn (tokenPosn t) -tokenPos [] = "end of file" - --- | Get the position of a token. -tokenPosn :: Token -> Posn -tokenPosn (PT p _) = p -tokenPosn (Err p) = p - --- | Get line and column of a token. -tokenLineCol :: Token -> (Int, Int) -tokenLineCol = posLineCol . tokenPosn - --- | Get line and column of a position. -posLineCol :: Posn -> (Int, Int) -posLineCol (Pn _ l c) = (l,c) - --- | Convert a token into "position token" form. -mkPosToken :: Token -> ((Int, Int), String) -mkPosToken t = (tokenLineCol t, tokenText t) - --- | Convert a token to its text. -tokenText :: Token -> String -tokenText t = case t of - PT _ (TS s _) -> s - PT _ (TL s) -> show s - PT _ (TI s) -> s - PT _ (TV s) -> s - PT _ (TD s) -> s - PT _ (TC s) -> s - Err _ -> "#error" - PT _ (T_Bytes s) -> s - PT _ (T_Function s) -> s - PT _ (T_LabelId s) -> s - PT _ (T_AlphaIndex s) -> s - --- | Convert a token to a string. -prToken :: Token -> String -prToken t = tokenText t - --- | Finite map from text to token organized as binary search tree. -data BTree - = N -- ^ Nil (leaf). - | B String Tok BTree BTree - -- ^ Binary node. - deriving (Show) - --- | Convert potential keyword into token or use fallback conversion. -eitherResIdent :: (String -> Tok) -> String -> Tok -eitherResIdent tv s = treeFind resWords - where - treeFind N = tv s - treeFind (B a t left right) = - case compare s a of - LT -> treeFind left - GT -> treeFind right - EQ -> t - --- | The keywords and symbols of the language organized as binary search tree. -resWords :: BTree -resWords = - b "\957" 8 - (b "}" 4 - (b "." 2 (b "," 1 N N) (b "{" 3 N N)) - (b "\934" 6 (b "\916" 5 N N) (b "\955" 7 N N))) - (b "\966" 12 - (b "\961" 10 (b "\958" 9 N N) (b "\963" 11 N N)) - (b "\8709" 14 (b "\8614" 13 N N) (b "\10509" 15 N N))) - where - b s n = B bs (TS bs n) - where - bs = s - --- | Unquote string literal. -unescapeInitTail :: String -> String -unescapeInitTail = id . unesc . tail . id - where - unesc s = case s of - '\\':c:cs | elem c ['\"', '\\', '\''] -> c : unesc cs - '\\':'n':cs -> '\n' : unesc cs - '\\':'t':cs -> '\t' : unesc cs - '\\':'r':cs -> '\r' : unesc cs - '\\':'f':cs -> '\f' : unesc cs - '"':[] -> [] - c:cs -> c : unesc cs - _ -> [] - -------------------------------------------------------------------- --- Alex wrapper code. --- A modified "posn" wrapper. -------------------------------------------------------------------- - -data Posn = Pn !Int !Int !Int - deriving (Eq, Show, Ord) - -alexStartPos :: Posn -alexStartPos = Pn 0 1 1 - -alexMove :: Posn -> Char -> Posn -alexMove (Pn a l c) '\t' = Pn (a+1) l (((c+7) `div` 8)*8+1) -alexMove (Pn a l c) '\n' = Pn (a+1) (l+1) 1 -alexMove (Pn a l c) _ = Pn (a+1) l (c+1) - -type Byte = Word8 - -type AlexInput = (Posn, -- current position, - Char, -- previous char - [Byte], -- pending bytes on the current char - String) -- current input string - -tokens :: String -> [Token] -tokens str = go (alexStartPos, '\n', [], str) - where - go :: AlexInput -> [Token] - go inp@(pos, _, _, str) = - case alexScan inp 0 of - AlexEOF -> [] - AlexError (pos, _, _, _) -> [Err pos] - AlexSkip inp' len -> go inp' - AlexToken inp' len act -> act pos (take len str) : (go inp') - -alexGetByte :: AlexInput -> Maybe (Byte,AlexInput) -alexGetByte (p, c, (b:bs), s) = Just (b, (p, c, bs, s)) -alexGetByte (p, _, [], s) = - case s of - [] -> Nothing - (c:s) -> - let p' = alexMove p c - (b:bs) = utf8Encode c - in p' `seq` Just (b, (p', c, bs, s)) - -alexInputPrevChar :: AlexInput -> Char -alexInputPrevChar (p, c, bs, s) = c - --- | Encode a Haskell String to a list of Word8 values, in UTF8 format. -utf8Encode :: Char -> [Word8] -utf8Encode = map fromIntegral . go . ord - where - go oc - | oc <= 0x7f = [oc] - - | oc <= 0x7ff = [ 0xc0 + (oc `Data.Bits.shiftR` 6) - , 0x80 + oc Data.Bits..&. 0x3f - ] - - | oc <= 0xffff = [ 0xe0 + (oc `Data.Bits.shiftR` 12) - , 0x80 + ((oc `Data.Bits.shiftR` 6) Data.Bits..&. 0x3f) - , 0x80 + oc Data.Bits..&. 0x3f - ] - | otherwise = [ 0xf0 + (oc `Data.Bits.shiftR` 18) - , 0x80 + ((oc `Data.Bits.shiftR` 12) Data.Bits..&. 0x3f) - , 0x80 + ((oc `Data.Bits.shiftR` 6) Data.Bits..&. 0x3f) - , 0x80 + oc Data.Bits..&. 0x3f - ] -} diff --git a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Par.hs b/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Par.hs deleted file mode 100644 index 3a7ccef30..000000000 --- a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Par.hs +++ /dev/null @@ -1,1523 +0,0 @@ -{-# OPTIONS_GHC -w #-} -{-# OPTIONS_GHC -fno-warn-incomplete-patterns -fno-warn-overlapping-patterns #-} -{-# LANGUAGE PatternSynonyms #-} - -module Language.EO.Phi.Syntax.Par - ( happyError - , myLexer - , pProgram - , pObject - , pAbstractObject - , pDispatchedObject - , pBinding - , pListBinding - , pBindings - , pListBindings - , pDispatch - , pAttribute - , pListAttribute - , pDisp - , pListDisp - ) where - -import Prelude - -import qualified Language.EO.Phi.Syntax.Abs -import Language.EO.Phi.Syntax.Lex -import qualified Data.Array as Happy_Data_Array -import qualified Data.Bits as Bits -import Control.Applicative(Applicative(..)) -import Control.Monad (ap) - --- parser produced by Happy Version 1.20.1.1 - -data HappyAbsSyn - = HappyTerminal (Token) - | HappyErrorToken Prelude.Int - | HappyAbsSyn16 ((Language.EO.Phi.Syntax.Abs.BNFC'Position, Language.EO.Phi.Syntax.Abs.Bytes)) - | HappyAbsSyn17 ((Language.EO.Phi.Syntax.Abs.BNFC'Position, Language.EO.Phi.Syntax.Abs.Function)) - | HappyAbsSyn18 ((Language.EO.Phi.Syntax.Abs.BNFC'Position, Language.EO.Phi.Syntax.Abs.LabelId)) - | HappyAbsSyn19 ((Language.EO.Phi.Syntax.Abs.BNFC'Position, Language.EO.Phi.Syntax.Abs.AlphaIndex)) - | HappyAbsSyn20 ((Language.EO.Phi.Syntax.Abs.BNFC'Position, Language.EO.Phi.Syntax.Abs.Program)) - | HappyAbsSyn21 ((Language.EO.Phi.Syntax.Abs.BNFC'Position, Language.EO.Phi.Syntax.Abs.Object)) - | HappyAbsSyn22 ((Language.EO.Phi.Syntax.Abs.BNFC'Position, Language.EO.Phi.Syntax.Abs.AbstractObject)) - | HappyAbsSyn23 ((Language.EO.Phi.Syntax.Abs.BNFC'Position, Language.EO.Phi.Syntax.Abs.DispatchedObject)) - | HappyAbsSyn24 ((Language.EO.Phi.Syntax.Abs.BNFC'Position, Language.EO.Phi.Syntax.Abs.Binding)) - | HappyAbsSyn25 ((Language.EO.Phi.Syntax.Abs.BNFC'Position, [Language.EO.Phi.Syntax.Abs.Binding])) - | HappyAbsSyn26 ((Language.EO.Phi.Syntax.Abs.BNFC'Position, Language.EO.Phi.Syntax.Abs.Bindings)) - | HappyAbsSyn27 ((Language.EO.Phi.Syntax.Abs.BNFC'Position, [Language.EO.Phi.Syntax.Abs.Bindings])) - | HappyAbsSyn28 ((Language.EO.Phi.Syntax.Abs.BNFC'Position, Language.EO.Phi.Syntax.Abs.Dispatch)) - | HappyAbsSyn29 ((Language.EO.Phi.Syntax.Abs.BNFC'Position, Language.EO.Phi.Syntax.Abs.Attribute)) - | HappyAbsSyn30 ((Language.EO.Phi.Syntax.Abs.BNFC'Position, [Language.EO.Phi.Syntax.Abs.Attribute])) - | HappyAbsSyn31 ((Language.EO.Phi.Syntax.Abs.BNFC'Position, Language.EO.Phi.Syntax.Abs.Disp)) - | HappyAbsSyn32 ((Language.EO.Phi.Syntax.Abs.BNFC'Position, [Language.EO.Phi.Syntax.Abs.Disp])) - -{- to allow type-synonyms as our monads (likely - - with explicitly-specified bind and return) - - in Haskell98, it seems that with - - /type M a = .../, then /(HappyReduction M)/ - - is not allowed. But Happy is a - - code-generator that can just substitute it. -type HappyReduction m = - Prelude.Int - -> (Token) - -> HappyState (Token) (HappyStk HappyAbsSyn -> [(Token)] -> m HappyAbsSyn) - -> [HappyState (Token) (HappyStk HappyAbsSyn -> [(Token)] -> m HappyAbsSyn)] - -> HappyStk HappyAbsSyn - -> [(Token)] -> m HappyAbsSyn --} - -action_0, - action_1, - action_2, - action_3, - action_4, - action_5, - action_6, - action_7, - action_8, - action_9, - action_10, - action_11, - action_12, - action_13, - action_14, - action_15, - action_16, - action_17, - action_18, - action_19, - action_20, - action_21, - action_22, - action_23, - action_24, - action_25, - action_26, - action_27, - action_28, - action_29, - action_30, - action_31, - action_32, - action_33, - action_34, - action_35, - action_36, - action_37, - action_38, - action_39, - action_40, - action_41, - action_42, - action_43, - action_44, - action_45, - action_46, - action_47, - action_48, - action_49, - action_50, - action_51, - action_52, - action_53, - action_54, - action_55, - action_56, - action_57, - action_58, - action_59, - action_60, - action_61, - action_62, - action_63, - action_64, - action_65, - action_66, - action_67, - action_68, - action_69, - action_70, - action_71, - action_72, - action_73, - action_74, - action_75, - action_76, - action_77, - action_78, - action_79, - action_80, - action_81, - action_82, - action_83, - action_84, - action_85, - action_86, - action_87, - action_88, - action_89, - action_90, - action_91, - action_92, - action_93, - action_94, - action_95, - action_96, - action_97, - action_98 :: () => Prelude.Int -> ({-HappyReduction (Err) = -} - Prelude.Int - -> (Token) - -> HappyState (Token) (HappyStk HappyAbsSyn -> [(Token)] -> (Err) HappyAbsSyn) - -> [HappyState (Token) (HappyStk HappyAbsSyn -> [(Token)] -> (Err) HappyAbsSyn)] - -> HappyStk HappyAbsSyn - -> [(Token)] -> (Err) HappyAbsSyn) - -happyReduce_13, - happyReduce_14, - happyReduce_15, - happyReduce_16, - happyReduce_17, - happyReduce_18, - happyReduce_19, - happyReduce_20, - happyReduce_21, - happyReduce_22, - happyReduce_23, - happyReduce_24, - happyReduce_25, - happyReduce_26, - happyReduce_27, - happyReduce_28, - happyReduce_29, - happyReduce_30, - happyReduce_31, - happyReduce_32, - happyReduce_33, - happyReduce_34, - happyReduce_35, - happyReduce_36, - happyReduce_37, - happyReduce_38, - happyReduce_39, - happyReduce_40, - happyReduce_41, - happyReduce_42, - happyReduce_43, - happyReduce_44, - happyReduce_45, - happyReduce_46, - happyReduce_47, - happyReduce_48, - happyReduce_49, - happyReduce_50 :: () => ({-HappyReduction (Err) = -} - Prelude.Int - -> (Token) - -> HappyState (Token) (HappyStk HappyAbsSyn -> [(Token)] -> (Err) HappyAbsSyn) - -> [HappyState (Token) (HappyStk HappyAbsSyn -> [(Token)] -> (Err) HappyAbsSyn)] - -> HappyStk HappyAbsSyn - -> [(Token)] -> (Err) HappyAbsSyn) - -happyExpList :: Happy_Data_Array.Array Prelude.Int Prelude.Int -happyExpList = Happy_Data_Array.listArray (0,215) ([0,0,4,0,0,9344,8,0,36864,260,0,0,8194,0,0,60672,192,0,40960,6173,0,0,1,0,0,32,0,0,9216,65,0,0,33232,1,0,14848,48,0,512,0,0,16384,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,55808,385,0,0,0,0,0,0,0,0,0,0,0,1024,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,256,0,0,0,0,0,0,3792,12,0,64,0,0,2048,0,0,0,0,0,0,64,0,0,0,0,0,0,948,3,0,0,0,0,256,0,0,0,0,0,0,16384,0,0,0,64,0,0,2048,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55808,385,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,948,3,0,0,0,0,0,0,0,0,33242,1,0,32,0,0,1024,0,0,0,49389,0,0,16,0,0,0,0,0,0,2048,0,0,24868,0,0,55808,385,0,8192,0,0,0,0,0,0,59392,192,0,0,6173,0,0,2,0,0,16,0,0,32768,3086,0,0,1,0,0,0,0,0,512,0,0,0,0,0,0,7424,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,128,0,0,0,24692,0,0,0,0,0,0,0,0,0,0,0 - ]) - -{-# NOINLINE happyExpListPerState #-} -happyExpListPerState st = - token_strs_expected - where token_strs = ["error","%dummy","%start_pProgram_internal","%start_pObject_internal","%start_pAbstractObject_internal","%start_pDispatchedObject_internal","%start_pBinding_internal","%start_pListBinding_internal","%start_pBindings_internal","%start_pListBindings_internal","%start_pDispatch_internal","%start_pAttribute_internal","%start_pListAttribute_internal","%start_pDisp_internal","%start_pListDisp_internal","Bytes","Function","LabelId","AlphaIndex","Program","Object","AbstractObject","DispatchedObject","Binding","ListBinding","Bindings","ListBindings","Dispatch","Attribute","ListAttribute","Disp","ListDisp","','","'.'","'{'","'}'","'\916'","'\934'","'\955'","'\957'","'\958'","'\961'","'\963'","'\966'","'\8614'","'\8709'","'\8869'","'\10509'","L_Bytes","L_Function","L_LabelId","L_AlphaIndex","%eof"] - bit_start = st Prelude.* 53 - bit_end = (st Prelude.+ 1) Prelude.* 53 - read_bit = readArrayBit happyExpList - bits = Prelude.map read_bit [bit_start..bit_end Prelude.- 1] - bits_indexed = Prelude.zip bits [0..52] - token_strs_expected = Prelude.concatMap f bits_indexed - f (Prelude.False, _) = [] - f (Prelude.True, nr) = [token_strs Prelude.!! nr] - -action_0 (35) = happyShift action_57 -action_0 (20) = happyGoto action_56 -action_0 _ = happyFail (happyExpListPerState 0) - -action_1 (35) = happyShift action_54 -action_1 (38) = happyShift action_33 -action_1 (41) = happyShift action_34 -action_1 (47) = happyShift action_55 -action_1 (21) = happyGoto action_51 -action_1 (22) = happyGoto action_52 -action_1 (23) = happyGoto action_30 -action_1 (28) = happyGoto action_53 -action_1 _ = happyFail (happyExpListPerState 1) - -action_2 (35) = happyShift action_49 -action_2 (38) = happyShift action_33 -action_2 (41) = happyShift action_34 -action_2 (47) = happyShift action_50 -action_2 (22) = happyGoto action_47 -action_2 (23) = happyGoto action_30 -action_2 (28) = happyGoto action_48 -action_2 _ = happyFail (happyExpListPerState 2) - -action_3 (35) = happyShift action_32 -action_3 (47) = happyShift action_35 -action_3 (23) = happyGoto action_46 -action_3 _ = happyFail (happyExpListPerState 3) - -action_4 (37) = happyShift action_43 -action_4 (39) = happyShift action_44 -action_4 (40) = happyShift action_23 -action_4 (42) = happyShift action_24 -action_4 (43) = happyShift action_25 -action_4 (44) = happyShift action_26 -action_4 (51) = happyShift action_27 -action_4 (52) = happyShift action_28 -action_4 (18) = happyGoto action_19 -action_4 (19) = happyGoto action_20 -action_4 (24) = happyGoto action_45 -action_4 (29) = happyGoto action_42 -action_4 _ = happyFail (happyExpListPerState 4) - -action_5 (37) = happyShift action_43 -action_5 (39) = happyShift action_44 -action_5 (40) = happyShift action_23 -action_5 (42) = happyShift action_24 -action_5 (43) = happyShift action_25 -action_5 (44) = happyShift action_26 -action_5 (51) = happyShift action_27 -action_5 (52) = happyShift action_28 -action_5 (18) = happyGoto action_19 -action_5 (19) = happyGoto action_20 -action_5 (24) = happyGoto action_40 -action_5 (25) = happyGoto action_41 -action_5 (29) = happyGoto action_42 -action_5 _ = happyReduce_31 - -action_6 (35) = happyShift action_38 -action_6 (26) = happyGoto action_39 -action_6 _ = happyFail (happyExpListPerState 6) - -action_7 (35) = happyShift action_38 -action_7 (26) = happyGoto action_36 -action_7 (27) = happyGoto action_37 -action_7 _ = happyReduce_35 - -action_8 (35) = happyShift action_32 -action_8 (38) = happyShift action_33 -action_8 (41) = happyShift action_34 -action_8 (47) = happyShift action_35 -action_8 (23) = happyGoto action_30 -action_8 (28) = happyGoto action_31 -action_8 _ = happyFail (happyExpListPerState 8) - -action_9 (40) = happyShift action_23 -action_9 (42) = happyShift action_24 -action_9 (43) = happyShift action_25 -action_9 (44) = happyShift action_26 -action_9 (51) = happyShift action_27 -action_9 (52) = happyShift action_28 -action_9 (18) = happyGoto action_19 -action_9 (19) = happyGoto action_20 -action_9 (29) = happyGoto action_29 -action_9 _ = happyFail (happyExpListPerState 9) - -action_10 (40) = happyShift action_23 -action_10 (42) = happyShift action_24 -action_10 (43) = happyShift action_25 -action_10 (44) = happyShift action_26 -action_10 (51) = happyShift action_27 -action_10 (52) = happyShift action_28 -action_10 (18) = happyGoto action_19 -action_10 (19) = happyGoto action_20 -action_10 (29) = happyGoto action_21 -action_10 (30) = happyGoto action_22 -action_10 _ = happyFail (happyExpListPerState 10) - -action_11 (35) = happyShift action_17 -action_11 (31) = happyGoto action_18 -action_11 _ = happyFail (happyExpListPerState 11) - -action_12 (35) = happyShift action_17 -action_12 (31) = happyGoto action_15 -action_12 (32) = happyGoto action_16 -action_12 _ = happyReduce_49 - -action_13 (49) = happyShift action_14 -action_13 _ = happyFail (happyExpListPerState 13) - -action_14 _ = happyReduce_13 - -action_15 (35) = happyShift action_17 -action_15 (31) = happyGoto action_15 -action_15 (32) = happyGoto action_74 -action_15 _ = happyReduce_49 - -action_16 (53) = happyAccept -action_16 _ = happyFail (happyExpListPerState 16) - -action_17 (37) = happyShift action_43 -action_17 (39) = happyShift action_44 -action_17 (40) = happyShift action_23 -action_17 (42) = happyShift action_24 -action_17 (43) = happyShift action_25 -action_17 (44) = happyShift action_26 -action_17 (51) = happyShift action_27 -action_17 (52) = happyShift action_28 -action_17 (18) = happyGoto action_19 -action_17 (19) = happyGoto action_20 -action_17 (24) = happyGoto action_40 -action_17 (25) = happyGoto action_73 -action_17 (29) = happyGoto action_42 -action_17 _ = happyReduce_31 - -action_18 (53) = happyAccept -action_18 _ = happyFail (happyExpListPerState 18) - -action_19 _ = happyReduce_44 - -action_20 _ = happyReduce_45 - -action_21 (34) = happyShift action_72 -action_21 _ = happyReduce_46 - -action_22 (53) = happyAccept -action_22 _ = happyFail (happyExpListPerState 22) - -action_23 _ = happyReduce_43 - -action_24 _ = happyReduce_41 - -action_25 _ = happyReduce_42 - -action_26 _ = happyReduce_40 - -action_27 _ = happyReduce_15 - -action_28 _ = happyReduce_16 - -action_29 (53) = happyAccept -action_29 _ = happyFail (happyExpListPerState 29) - -action_30 (35) = happyShift action_38 -action_30 (26) = happyGoto action_36 -action_30 (27) = happyGoto action_71 -action_30 _ = happyReduce_35 - -action_31 (53) = happyAccept -action_31 _ = happyFail (happyExpListPerState 31) - -action_32 (37) = happyShift action_43 -action_32 (39) = happyShift action_44 -action_32 (40) = happyShift action_23 -action_32 (42) = happyShift action_24 -action_32 (43) = happyShift action_25 -action_32 (44) = happyShift action_26 -action_32 (51) = happyShift action_27 -action_32 (52) = happyShift action_28 -action_32 (18) = happyGoto action_19 -action_32 (19) = happyGoto action_20 -action_32 (24) = happyGoto action_40 -action_32 (25) = happyGoto action_70 -action_32 (29) = happyGoto action_42 -action_32 _ = happyReduce_31 - -action_33 (34) = happyShift action_69 -action_33 _ = happyFail (happyExpListPerState 33) - -action_34 (34) = happyShift action_68 -action_34 _ = happyFail (happyExpListPerState 34) - -action_35 _ = happyReduce_26 - -action_36 (35) = happyShift action_38 -action_36 (26) = happyGoto action_36 -action_36 (27) = happyGoto action_67 -action_36 _ = happyReduce_35 - -action_37 (53) = happyAccept -action_37 _ = happyFail (happyExpListPerState 37) - -action_38 (37) = happyShift action_43 -action_38 (39) = happyShift action_44 -action_38 (40) = happyShift action_23 -action_38 (42) = happyShift action_24 -action_38 (43) = happyShift action_25 -action_38 (44) = happyShift action_26 -action_38 (51) = happyShift action_27 -action_38 (52) = happyShift action_28 -action_38 (18) = happyGoto action_19 -action_38 (19) = happyGoto action_20 -action_38 (24) = happyGoto action_40 -action_38 (25) = happyGoto action_66 -action_38 (29) = happyGoto action_42 -action_38 _ = happyReduce_31 - -action_39 (53) = happyAccept -action_39 _ = happyFail (happyExpListPerState 39) - -action_40 (33) = happyShift action_65 -action_40 _ = happyReduce_32 - -action_41 (53) = happyAccept -action_41 _ = happyFail (happyExpListPerState 41) - -action_42 (45) = happyShift action_64 -action_42 _ = happyFail (happyExpListPerState 42) - -action_43 (48) = happyShift action_63 -action_43 _ = happyFail (happyExpListPerState 43) - -action_44 (48) = happyShift action_62 -action_44 _ = happyFail (happyExpListPerState 44) - -action_45 (53) = happyAccept -action_45 _ = happyFail (happyExpListPerState 45) - -action_46 (53) = happyAccept -action_46 _ = happyFail (happyExpListPerState 46) - -action_47 (53) = happyAccept -action_47 _ = happyFail (happyExpListPerState 47) - -action_48 _ = happyReduce_23 - -action_49 (37) = happyShift action_43 -action_49 (39) = happyShift action_44 -action_49 (40) = happyShift action_23 -action_49 (42) = happyShift action_24 -action_49 (43) = happyShift action_25 -action_49 (44) = happyShift action_26 -action_49 (51) = happyShift action_27 -action_49 (52) = happyShift action_28 -action_49 (18) = happyGoto action_19 -action_49 (19) = happyGoto action_20 -action_49 (24) = happyGoto action_40 -action_49 (25) = happyGoto action_61 -action_49 (29) = happyGoto action_42 -action_49 _ = happyReduce_31 - -action_50 (53) = happyReduce_24 -action_50 _ = happyReduce_26 - -action_51 (53) = happyAccept -action_51 _ = happyFail (happyExpListPerState 51) - -action_52 (35) = happyShift action_60 -action_52 _ = happyFail (happyExpListPerState 52) - -action_53 (35) = happyReduce_23 -action_53 _ = happyReduce_20 - -action_54 (37) = happyShift action_43 -action_54 (39) = happyShift action_44 -action_54 (40) = happyShift action_23 -action_54 (42) = happyShift action_24 -action_54 (43) = happyShift action_25 -action_54 (44) = happyShift action_26 -action_54 (51) = happyShift action_27 -action_54 (52) = happyShift action_28 -action_54 (18) = happyGoto action_19 -action_54 (19) = happyGoto action_20 -action_54 (24) = happyGoto action_40 -action_54 (25) = happyGoto action_59 -action_54 (29) = happyGoto action_42 -action_54 _ = happyReduce_31 - -action_55 (34) = happyReduce_26 -action_55 (35) = happyReduce_26 -action_55 _ = happyReduce_21 - -action_56 (53) = happyAccept -action_56 _ = happyFail (happyExpListPerState 56) - -action_57 (37) = happyShift action_43 -action_57 (39) = happyShift action_44 -action_57 (40) = happyShift action_23 -action_57 (42) = happyShift action_24 -action_57 (43) = happyShift action_25 -action_57 (44) = happyShift action_26 -action_57 (51) = happyShift action_27 -action_57 (52) = happyShift action_28 -action_57 (18) = happyGoto action_19 -action_57 (19) = happyGoto action_20 -action_57 (24) = happyGoto action_40 -action_57 (25) = happyGoto action_58 -action_57 (29) = happyGoto action_42 -action_57 _ = happyReduce_31 - -action_58 (36) = happyShift action_89 -action_58 _ = happyFail (happyExpListPerState 58) - -action_59 (36) = happyShift action_88 -action_59 _ = happyFail (happyExpListPerState 59) - -action_60 (37) = happyShift action_43 -action_60 (39) = happyShift action_44 -action_60 (40) = happyShift action_23 -action_60 (42) = happyShift action_24 -action_60 (43) = happyShift action_25 -action_60 (44) = happyShift action_26 -action_60 (51) = happyShift action_27 -action_60 (52) = happyShift action_28 -action_60 (18) = happyGoto action_19 -action_60 (19) = happyGoto action_20 -action_60 (24) = happyGoto action_40 -action_60 (25) = happyGoto action_87 -action_60 (29) = happyGoto action_42 -action_60 _ = happyReduce_31 - -action_61 (36) = happyShift action_86 -action_61 _ = happyFail (happyExpListPerState 61) - -action_62 _ = happyReduce_30 - -action_63 (49) = happyShift action_14 -action_63 (16) = happyGoto action_85 -action_63 _ = happyFail (happyExpListPerState 63) - -action_64 (35) = happyShift action_54 -action_64 (38) = happyShift action_33 -action_64 (41) = happyShift action_34 -action_64 (46) = happyShift action_84 -action_64 (47) = happyShift action_55 -action_64 (21) = happyGoto action_83 -action_64 (22) = happyGoto action_52 -action_64 (23) = happyGoto action_30 -action_64 (28) = happyGoto action_53 -action_64 _ = happyFail (happyExpListPerState 64) - -action_65 (37) = happyShift action_43 -action_65 (39) = happyShift action_44 -action_65 (40) = happyShift action_23 -action_65 (42) = happyShift action_24 -action_65 (43) = happyShift action_25 -action_65 (44) = happyShift action_26 -action_65 (51) = happyShift action_27 -action_65 (52) = happyShift action_28 -action_65 (18) = happyGoto action_19 -action_65 (19) = happyGoto action_20 -action_65 (24) = happyGoto action_40 -action_65 (25) = happyGoto action_82 -action_65 (29) = happyGoto action_42 -action_65 _ = happyReduce_31 - -action_66 (36) = happyShift action_81 -action_66 _ = happyFail (happyExpListPerState 66) - -action_67 _ = happyReduce_36 - -action_68 (40) = happyShift action_23 -action_68 (42) = happyShift action_24 -action_68 (43) = happyShift action_25 -action_68 (44) = happyShift action_26 -action_68 (51) = happyShift action_27 -action_68 (52) = happyShift action_28 -action_68 (18) = happyGoto action_19 -action_68 (19) = happyGoto action_20 -action_68 (29) = happyGoto action_21 -action_68 (30) = happyGoto action_80 -action_68 _ = happyFail (happyExpListPerState 68) - -action_69 (40) = happyShift action_23 -action_69 (42) = happyShift action_24 -action_69 (43) = happyShift action_25 -action_69 (44) = happyShift action_26 -action_69 (51) = happyShift action_27 -action_69 (52) = happyShift action_28 -action_69 (18) = happyGoto action_19 -action_69 (19) = happyGoto action_20 -action_69 (29) = happyGoto action_21 -action_69 (30) = happyGoto action_79 -action_69 _ = happyFail (happyExpListPerState 69) - -action_70 (36) = happyShift action_78 -action_70 _ = happyFail (happyExpListPerState 70) - -action_71 (34) = happyShift action_77 -action_71 _ = happyFail (happyExpListPerState 71) - -action_72 (40) = happyShift action_23 -action_72 (42) = happyShift action_24 -action_72 (43) = happyShift action_25 -action_72 (44) = happyShift action_26 -action_72 (51) = happyShift action_27 -action_72 (52) = happyShift action_28 -action_72 (18) = happyGoto action_19 -action_72 (19) = happyGoto action_20 -action_72 (29) = happyGoto action_21 -action_72 (30) = happyGoto action_76 -action_72 _ = happyFail (happyExpListPerState 72) - -action_73 (36) = happyShift action_75 -action_73 _ = happyFail (happyExpListPerState 73) - -action_74 _ = happyReduce_50 - -action_75 (35) = happyShift action_38 -action_75 (26) = happyGoto action_94 -action_75 _ = happyFail (happyExpListPerState 75) - -action_76 _ = happyReduce_47 - -action_77 (40) = happyShift action_23 -action_77 (42) = happyShift action_24 -action_77 (43) = happyShift action_25 -action_77 (44) = happyShift action_26 -action_77 (51) = happyShift action_27 -action_77 (52) = happyShift action_28 -action_77 (18) = happyGoto action_19 -action_77 (19) = happyGoto action_20 -action_77 (29) = happyGoto action_21 -action_77 (30) = happyGoto action_93 -action_77 _ = happyFail (happyExpListPerState 77) - -action_78 _ = happyReduce_25 - -action_79 (35) = happyShift action_17 -action_79 (31) = happyGoto action_15 -action_79 (32) = happyGoto action_92 -action_79 _ = happyReduce_49 - -action_80 (35) = happyShift action_17 -action_80 (31) = happyGoto action_15 -action_80 (32) = happyGoto action_91 -action_80 _ = happyReduce_49 - -action_81 _ = happyReduce_34 - -action_82 _ = happyReduce_33 - -action_83 _ = happyReduce_27 - -action_84 _ = happyReduce_28 - -action_85 _ = happyReduce_29 - -action_86 (53) = happyReduce_22 -action_86 _ = happyReduce_25 - -action_87 (36) = happyShift action_90 -action_87 _ = happyFail (happyExpListPerState 87) - -action_88 (34) = happyReduce_25 -action_88 (35) = happyReduce_25 -action_88 _ = happyReduce_18 - -action_89 _ = happyReduce_17 - -action_90 (35) = happyShift action_38 -action_90 (26) = happyGoto action_36 -action_90 (27) = happyGoto action_97 -action_90 _ = happyReduce_35 - -action_91 _ = happyReduce_39 - -action_92 _ = happyReduce_38 - -action_93 (35) = happyShift action_17 -action_93 (31) = happyGoto action_15 -action_93 (32) = happyGoto action_96 -action_93 _ = happyReduce_49 - -action_94 (34) = happyShift action_95 -action_94 _ = happyFail (happyExpListPerState 94) - -action_95 (40) = happyShift action_23 -action_95 (42) = happyShift action_24 -action_95 (43) = happyShift action_25 -action_95 (44) = happyShift action_26 -action_95 (51) = happyShift action_27 -action_95 (52) = happyShift action_28 -action_95 (18) = happyGoto action_19 -action_95 (19) = happyGoto action_20 -action_95 (29) = happyGoto action_21 -action_95 (30) = happyGoto action_98 -action_95 _ = happyFail (happyExpListPerState 95) - -action_96 _ = happyReduce_37 - -action_97 _ = happyReduce_19 - -action_98 _ = happyReduce_48 - -happyReduce_13 = happySpecReduce_1 16 happyReduction_13 -happyReduction_13 (HappyTerminal happy_var_1) - = HappyAbsSyn16 - ((uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1), Language.EO.Phi.Syntax.Abs.Bytes (tokenText happy_var_1)) - ) -happyReduction_13 _ = notHappyAtAll - -happyReduce_14 = happySpecReduce_1 17 happyReduction_14 -happyReduction_14 (HappyTerminal happy_var_1) - = HappyAbsSyn17 - ((uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1), Language.EO.Phi.Syntax.Abs.Function (tokenText happy_var_1)) - ) -happyReduction_14 _ = notHappyAtAll - -happyReduce_15 = happySpecReduce_1 18 happyReduction_15 -happyReduction_15 (HappyTerminal happy_var_1) - = HappyAbsSyn18 - ((uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1), Language.EO.Phi.Syntax.Abs.LabelId (tokenText happy_var_1)) - ) -happyReduction_15 _ = notHappyAtAll - -happyReduce_16 = happySpecReduce_1 19 happyReduction_16 -happyReduction_16 (HappyTerminal happy_var_1) - = HappyAbsSyn19 - ((uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1), Language.EO.Phi.Syntax.Abs.AlphaIndex (tokenText happy_var_1)) - ) -happyReduction_16 _ = notHappyAtAll - -happyReduce_17 = happySpecReduce_3 20 happyReduction_17 -happyReduction_17 _ - (HappyAbsSyn25 happy_var_2) - (HappyTerminal happy_var_1) - = HappyAbsSyn20 - ((uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1), Language.EO.Phi.Syntax.Abs.Program (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1)) (snd happy_var_2)) - ) -happyReduction_17 _ _ _ = notHappyAtAll - -happyReduce_18 = happySpecReduce_3 21 happyReduction_18 -happyReduction_18 _ - (HappyAbsSyn25 happy_var_2) - (HappyTerminal happy_var_1) - = HappyAbsSyn21 - ((uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1), Language.EO.Phi.Syntax.Abs.Formation (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1)) (snd happy_var_2)) - ) -happyReduction_18 _ _ _ = notHappyAtAll - -happyReduce_19 = happyReduce 5 21 happyReduction_19 -happyReduction_19 ((HappyAbsSyn27 happy_var_5) `HappyStk` - _ `HappyStk` - (HappyAbsSyn25 happy_var_3) `HappyStk` - _ `HappyStk` - (HappyAbsSyn22 happy_var_1) `HappyStk` - happyRest) - = HappyAbsSyn21 - ((fst happy_var_1, Language.EO.Phi.Syntax.Abs.Application (fst happy_var_1) (snd happy_var_1) (snd happy_var_3) (snd happy_var_5)) - ) `HappyStk` happyRest - -happyReduce_20 = happySpecReduce_1 21 happyReduction_20 -happyReduction_20 (HappyAbsSyn28 happy_var_1) - = HappyAbsSyn21 - ((fst happy_var_1, Language.EO.Phi.Syntax.Abs.Dispatch (fst happy_var_1) (snd happy_var_1)) - ) -happyReduction_20 _ = notHappyAtAll - -happyReduce_21 = happySpecReduce_1 21 happyReduction_21 -happyReduction_21 (HappyTerminal happy_var_1) - = HappyAbsSyn21 - ((uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1), Language.EO.Phi.Syntax.Abs.Termination (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1))) - ) -happyReduction_21 _ = notHappyAtAll - -happyReduce_22 = happySpecReduce_3 22 happyReduction_22 -happyReduction_22 _ - (HappyAbsSyn25 happy_var_2) - (HappyTerminal happy_var_1) - = HappyAbsSyn22 - ((uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1), Language.EO.Phi.Syntax.Abs.AbstractFormation (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1)) (snd happy_var_2)) - ) -happyReduction_22 _ _ _ = notHappyAtAll - -happyReduce_23 = happySpecReduce_1 22 happyReduction_23 -happyReduction_23 (HappyAbsSyn28 happy_var_1) - = HappyAbsSyn22 - ((fst happy_var_1, Language.EO.Phi.Syntax.Abs.AbstractDispatch (fst happy_var_1) (snd happy_var_1)) - ) -happyReduction_23 _ = notHappyAtAll - -happyReduce_24 = happySpecReduce_1 22 happyReduction_24 -happyReduction_24 (HappyTerminal happy_var_1) - = HappyAbsSyn22 - ((uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1), Language.EO.Phi.Syntax.Abs.AbstractTermination (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1))) - ) -happyReduction_24 _ = notHappyAtAll - -happyReduce_25 = happySpecReduce_3 23 happyReduction_25 -happyReduction_25 _ - (HappyAbsSyn25 happy_var_2) - (HappyTerminal happy_var_1) - = HappyAbsSyn23 - ((uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1), Language.EO.Phi.Syntax.Abs.DispatchedFormation (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1)) (snd happy_var_2)) - ) -happyReduction_25 _ _ _ = notHappyAtAll - -happyReduce_26 = happySpecReduce_1 23 happyReduction_26 -happyReduction_26 (HappyTerminal happy_var_1) - = HappyAbsSyn23 - ((uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1), Language.EO.Phi.Syntax.Abs.DispatchedTermination (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1))) - ) -happyReduction_26 _ = notHappyAtAll - -happyReduce_27 = happySpecReduce_3 24 happyReduction_27 -happyReduction_27 (HappyAbsSyn21 happy_var_3) - _ - (HappyAbsSyn29 happy_var_1) - = HappyAbsSyn24 - ((fst happy_var_1, Language.EO.Phi.Syntax.Abs.AlphaBinding (fst happy_var_1) (snd happy_var_1) (snd happy_var_3)) - ) -happyReduction_27 _ _ _ = notHappyAtAll - -happyReduce_28 = happySpecReduce_3 24 happyReduction_28 -happyReduction_28 _ - _ - (HappyAbsSyn29 happy_var_1) - = HappyAbsSyn24 - ((fst happy_var_1, Language.EO.Phi.Syntax.Abs.EmptyBinding (fst happy_var_1) (snd happy_var_1)) - ) -happyReduction_28 _ _ _ = notHappyAtAll - -happyReduce_29 = happySpecReduce_3 24 happyReduction_29 -happyReduction_29 (HappyAbsSyn16 happy_var_3) - _ - (HappyTerminal happy_var_1) - = HappyAbsSyn24 - ((uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1), Language.EO.Phi.Syntax.Abs.DeltaBinding (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1)) (snd happy_var_3)) - ) -happyReduction_29 _ _ _ = notHappyAtAll - -happyReduce_30 = happySpecReduce_2 24 happyReduction_30 -happyReduction_30 _ - (HappyTerminal happy_var_1) - = HappyAbsSyn24 - ((uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1), Language.EO.Phi.Syntax.Abs.LambdaBinding (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1))) - ) -happyReduction_30 _ _ = notHappyAtAll - -happyReduce_31 = happySpecReduce_0 25 happyReduction_31 -happyReduction_31 = HappyAbsSyn25 - ((Language.EO.Phi.Syntax.Abs.BNFC'NoPosition, []) - ) - -happyReduce_32 = happySpecReduce_1 25 happyReduction_32 -happyReduction_32 (HappyAbsSyn24 happy_var_1) - = HappyAbsSyn25 - ((fst happy_var_1, (:[]) (snd happy_var_1)) - ) -happyReduction_32 _ = notHappyAtAll - -happyReduce_33 = happySpecReduce_3 25 happyReduction_33 -happyReduction_33 (HappyAbsSyn25 happy_var_3) - _ - (HappyAbsSyn24 happy_var_1) - = HappyAbsSyn25 - ((fst happy_var_1, (:) (snd happy_var_1) (snd happy_var_3)) - ) -happyReduction_33 _ _ _ = notHappyAtAll - -happyReduce_34 = happySpecReduce_3 26 happyReduction_34 -happyReduction_34 _ - (HappyAbsSyn25 happy_var_2) - (HappyTerminal happy_var_1) - = HappyAbsSyn26 - ((uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1), Language.EO.Phi.Syntax.Abs.Bindings (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1)) (snd happy_var_2)) - ) -happyReduction_34 _ _ _ = notHappyAtAll - -happyReduce_35 = happySpecReduce_0 27 happyReduction_35 -happyReduction_35 = HappyAbsSyn27 - ((Language.EO.Phi.Syntax.Abs.BNFC'NoPosition, []) - ) - -happyReduce_36 = happySpecReduce_2 27 happyReduction_36 -happyReduction_36 (HappyAbsSyn27 happy_var_2) - (HappyAbsSyn26 happy_var_1) - = HappyAbsSyn27 - ((fst happy_var_1, (:) (snd happy_var_1) (snd happy_var_2)) - ) -happyReduction_36 _ _ = notHappyAtAll - -happyReduce_37 = happyReduce 5 28 happyReduction_37 -happyReduction_37 ((HappyAbsSyn32 happy_var_5) `HappyStk` - (HappyAbsSyn30 happy_var_4) `HappyStk` - _ `HappyStk` - (HappyAbsSyn27 happy_var_2) `HappyStk` - (HappyAbsSyn23 happy_var_1) `HappyStk` - happyRest) - = HappyAbsSyn28 - ((fst happy_var_1, Language.EO.Phi.Syntax.Abs.ObjectDispatch (fst happy_var_1) (snd happy_var_1) (snd happy_var_2) (snd happy_var_4) (snd happy_var_5)) - ) `HappyStk` happyRest - -happyReduce_38 = happyReduce 4 28 happyReduction_38 -happyReduction_38 ((HappyAbsSyn32 happy_var_4) `HappyStk` - (HappyAbsSyn30 happy_var_3) `HappyStk` - _ `HappyStk` - (HappyTerminal happy_var_1) `HappyStk` - happyRest) - = HappyAbsSyn28 - ((uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1), Language.EO.Phi.Syntax.Abs.HomeDispatch (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1)) (snd happy_var_3) (snd happy_var_4)) - ) `HappyStk` happyRest - -happyReduce_39 = happyReduce 4 28 happyReduction_39 -happyReduction_39 ((HappyAbsSyn32 happy_var_4) `HappyStk` - (HappyAbsSyn30 happy_var_3) `HappyStk` - _ `HappyStk` - (HappyTerminal happy_var_1) `HappyStk` - happyRest) - = HappyAbsSyn28 - ((uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1), Language.EO.Phi.Syntax.Abs.ThisDispatch (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1)) (snd happy_var_3) (snd happy_var_4)) - ) `HappyStk` happyRest - -happyReduce_40 = happySpecReduce_1 29 happyReduction_40 -happyReduction_40 (HappyTerminal happy_var_1) - = HappyAbsSyn29 - ((uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1), Language.EO.Phi.Syntax.Abs.Phi (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1))) - ) -happyReduction_40 _ = notHappyAtAll - -happyReduce_41 = happySpecReduce_1 29 happyReduction_41 -happyReduction_41 (HappyTerminal happy_var_1) - = HappyAbsSyn29 - ((uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1), Language.EO.Phi.Syntax.Abs.Rho (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1))) - ) -happyReduction_41 _ = notHappyAtAll - -happyReduce_42 = happySpecReduce_1 29 happyReduction_42 -happyReduction_42 (HappyTerminal happy_var_1) - = HappyAbsSyn29 - ((uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1), Language.EO.Phi.Syntax.Abs.Sigma (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1))) - ) -happyReduction_42 _ = notHappyAtAll - -happyReduce_43 = happySpecReduce_1 29 happyReduction_43 -happyReduction_43 (HappyTerminal happy_var_1) - = HappyAbsSyn29 - ((uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1), Language.EO.Phi.Syntax.Abs.VTX (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1))) - ) -happyReduction_43 _ = notHappyAtAll - -happyReduce_44 = happySpecReduce_1 29 happyReduction_44 -happyReduction_44 (HappyAbsSyn18 happy_var_1) - = HappyAbsSyn29 - ((fst happy_var_1, Language.EO.Phi.Syntax.Abs.Label (fst happy_var_1) (snd happy_var_1)) - ) -happyReduction_44 _ = notHappyAtAll - -happyReduce_45 = happySpecReduce_1 29 happyReduction_45 -happyReduction_45 (HappyAbsSyn19 happy_var_1) - = HappyAbsSyn29 - ((fst happy_var_1, Language.EO.Phi.Syntax.Abs.Alpha (fst happy_var_1) (snd happy_var_1)) - ) -happyReduction_45 _ = notHappyAtAll - -happyReduce_46 = happySpecReduce_1 30 happyReduction_46 -happyReduction_46 (HappyAbsSyn29 happy_var_1) - = HappyAbsSyn30 - ((fst happy_var_1, (:[]) (snd happy_var_1)) - ) -happyReduction_46 _ = notHappyAtAll - -happyReduce_47 = happySpecReduce_3 30 happyReduction_47 -happyReduction_47 (HappyAbsSyn30 happy_var_3) - _ - (HappyAbsSyn29 happy_var_1) - = HappyAbsSyn30 - ((fst happy_var_1, (:) (snd happy_var_1) (snd happy_var_3)) - ) -happyReduction_47 _ _ _ = notHappyAtAll - -happyReduce_48 = happyReduce 6 31 happyReduction_48 -happyReduction_48 ((HappyAbsSyn30 happy_var_6) `HappyStk` - _ `HappyStk` - (HappyAbsSyn26 happy_var_4) `HappyStk` - _ `HappyStk` - (HappyAbsSyn25 happy_var_2) `HappyStk` - (HappyTerminal happy_var_1) `HappyStk` - happyRest) - = HappyAbsSyn31 - ((uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1), Language.EO.Phi.Syntax.Abs.Disp (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol happy_var_1)) (snd happy_var_2) (snd happy_var_4) (snd happy_var_6)) - ) `HappyStk` happyRest - -happyReduce_49 = happySpecReduce_0 32 happyReduction_49 -happyReduction_49 = HappyAbsSyn32 - ((Language.EO.Phi.Syntax.Abs.BNFC'NoPosition, []) - ) - -happyReduce_50 = happySpecReduce_2 32 happyReduction_50 -happyReduction_50 (HappyAbsSyn32 happy_var_2) - (HappyAbsSyn31 happy_var_1) - = HappyAbsSyn32 - ((fst happy_var_1, (:) (snd happy_var_1) (snd happy_var_2)) - ) -happyReduction_50 _ _ = notHappyAtAll - -happyNewToken action sts stk [] = - action 53 53 notHappyAtAll (HappyState action) sts stk [] - -happyNewToken action sts stk (tk:tks) = - let cont i = action i i tk (HappyState action) sts stk tks in - case tk of { - PT _ (TS _ 1) -> cont 33; - PT _ (TS _ 2) -> cont 34; - PT _ (TS _ 3) -> cont 35; - PT _ (TS _ 4) -> cont 36; - PT _ (TS _ 5) -> cont 37; - PT _ (TS _ 6) -> cont 38; - PT _ (TS _ 7) -> cont 39; - PT _ (TS _ 8) -> cont 40; - PT _ (TS _ 9) -> cont 41; - PT _ (TS _ 10) -> cont 42; - PT _ (TS _ 11) -> cont 43; - PT _ (TS _ 12) -> cont 44; - PT _ (TS _ 13) -> cont 45; - PT _ (TS _ 14) -> cont 46; - PT _ (TS _ 15) -> cont 47; - PT _ (TS _ 16) -> cont 48; - PT _ (T_Bytes _) -> cont 49; - PT _ (T_Function _) -> cont 50; - PT _ (T_LabelId _) -> cont 51; - PT _ (T_AlphaIndex _) -> cont 52; - _ -> happyError' ((tk:tks), []) - } - -happyError_ explist 53 tk tks = happyError' (tks, explist) -happyError_ explist _ tk tks = happyError' ((tk:tks), explist) - -happyThen :: () => Err a -> (a -> Err b) -> Err b -happyThen = ((>>=)) -happyReturn :: () => a -> Err a -happyReturn = (return) -happyThen1 m k tks = ((>>=)) m (\a -> k a tks) -happyReturn1 :: () => a -> b -> Err a -happyReturn1 = \a tks -> (return) a -happyError' :: () => ([(Token)], [Prelude.String]) -> Err a -happyError' = (\(tokens, _) -> happyError tokens) -pProgram_internal tks = happySomeParser where - happySomeParser = happyThen (happyParse action_0 tks) (\x -> case x of {HappyAbsSyn20 z -> happyReturn z; _other -> notHappyAtAll }) - -pObject_internal tks = happySomeParser where - happySomeParser = happyThen (happyParse action_1 tks) (\x -> case x of {HappyAbsSyn21 z -> happyReturn z; _other -> notHappyAtAll }) - -pAbstractObject_internal tks = happySomeParser where - happySomeParser = happyThen (happyParse action_2 tks) (\x -> case x of {HappyAbsSyn22 z -> happyReturn z; _other -> notHappyAtAll }) - -pDispatchedObject_internal tks = happySomeParser where - happySomeParser = happyThen (happyParse action_3 tks) (\x -> case x of {HappyAbsSyn23 z -> happyReturn z; _other -> notHappyAtAll }) - -pBinding_internal tks = happySomeParser where - happySomeParser = happyThen (happyParse action_4 tks) (\x -> case x of {HappyAbsSyn24 z -> happyReturn z; _other -> notHappyAtAll }) - -pListBinding_internal tks = happySomeParser where - happySomeParser = happyThen (happyParse action_5 tks) (\x -> case x of {HappyAbsSyn25 z -> happyReturn z; _other -> notHappyAtAll }) - -pBindings_internal tks = happySomeParser where - happySomeParser = happyThen (happyParse action_6 tks) (\x -> case x of {HappyAbsSyn26 z -> happyReturn z; _other -> notHappyAtAll }) - -pListBindings_internal tks = happySomeParser where - happySomeParser = happyThen (happyParse action_7 tks) (\x -> case x of {HappyAbsSyn27 z -> happyReturn z; _other -> notHappyAtAll }) - -pDispatch_internal tks = happySomeParser where - happySomeParser = happyThen (happyParse action_8 tks) (\x -> case x of {HappyAbsSyn28 z -> happyReturn z; _other -> notHappyAtAll }) - -pAttribute_internal tks = happySomeParser where - happySomeParser = happyThen (happyParse action_9 tks) (\x -> case x of {HappyAbsSyn29 z -> happyReturn z; _other -> notHappyAtAll }) - -pListAttribute_internal tks = happySomeParser where - happySomeParser = happyThen (happyParse action_10 tks) (\x -> case x of {HappyAbsSyn30 z -> happyReturn z; _other -> notHappyAtAll }) - -pDisp_internal tks = happySomeParser where - happySomeParser = happyThen (happyParse action_11 tks) (\x -> case x of {HappyAbsSyn31 z -> happyReturn z; _other -> notHappyAtAll }) - -pListDisp_internal tks = happySomeParser where - happySomeParser = happyThen (happyParse action_12 tks) (\x -> case x of {HappyAbsSyn32 z -> happyReturn z; _other -> notHappyAtAll }) - -happySeq = happyDontSeq - - -type Err = Either String - -happyError :: [Token] -> Err a -happyError ts = Left $ - "syntax error at " ++ tokenPos ts ++ - case ts of - [] -> [] - [Err _] -> " due to lexer error" - t:_ -> " before `" ++ (prToken t) ++ "'" - -myLexer :: String -> [Token] -myLexer = tokens - --- Entrypoints - -pProgram :: [Token] -> Err Language.EO.Phi.Syntax.Abs.Program -pProgram = fmap snd . pProgram_internal - -pObject :: [Token] -> Err Language.EO.Phi.Syntax.Abs.Object -pObject = fmap snd . pObject_internal - -pAbstractObject :: [Token] -> Err Language.EO.Phi.Syntax.Abs.AbstractObject -pAbstractObject = fmap snd . pAbstractObject_internal - -pDispatchedObject :: [Token] -> Err Language.EO.Phi.Syntax.Abs.DispatchedObject -pDispatchedObject = fmap snd . pDispatchedObject_internal - -pBinding :: [Token] -> Err Language.EO.Phi.Syntax.Abs.Binding -pBinding = fmap snd . pBinding_internal - -pListBinding :: [Token] -> Err [Language.EO.Phi.Syntax.Abs.Binding] -pListBinding = fmap snd . pListBinding_internal - -pBindings :: [Token] -> Err Language.EO.Phi.Syntax.Abs.Bindings -pBindings = fmap snd . pBindings_internal - -pListBindings :: [Token] -> Err [Language.EO.Phi.Syntax.Abs.Bindings] -pListBindings = fmap snd . pListBindings_internal - -pDispatch :: [Token] -> Err Language.EO.Phi.Syntax.Abs.Dispatch -pDispatch = fmap snd . pDispatch_internal - -pAttribute :: [Token] -> Err Language.EO.Phi.Syntax.Abs.Attribute -pAttribute = fmap snd . pAttribute_internal - -pListAttribute :: [Token] -> Err [Language.EO.Phi.Syntax.Abs.Attribute] -pListAttribute = fmap snd . pListAttribute_internal - -pDisp :: [Token] -> Err Language.EO.Phi.Syntax.Abs.Disp -pDisp = fmap snd . pDisp_internal - -pListDisp :: [Token] -> Err [Language.EO.Phi.Syntax.Abs.Disp] -pListDisp = fmap snd . pListDisp_internal -{-# LINE 1 "templates/GenericTemplate.hs" #-} --- $Id: GenericTemplate.hs,v 1.26 2005/01/14 14:47:22 simonmar Exp $ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -data Happy_IntList = HappyCons Prelude.Int Happy_IntList - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -infixr 9 `HappyStk` -data HappyStk a = HappyStk a (HappyStk a) - ------------------------------------------------------------------------------ --- starting the parse - -happyParse start_state = happyNewToken start_state notHappyAtAll notHappyAtAll - ------------------------------------------------------------------------------ --- Accepting the parse - --- If the current token is ERROR_TOK, it means we've just accepted a partial --- parse (a %partial parser). We must ignore the saved token on the top of --- the stack in this case. -happyAccept (1) tk st sts (_ `HappyStk` ans `HappyStk` _) = - happyReturn1 ans -happyAccept j tk st sts (HappyStk ans _) = - (happyReturn1 ans) - ------------------------------------------------------------------------------ --- Arrays only: do the next action - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -indexShortOffAddr arr off = arr Happy_Data_Array.! off - - -{-# INLINE happyLt #-} -happyLt x y = (x Prelude.< y) - - - - - - -readArrayBit arr bit = - Bits.testBit (indexShortOffAddr arr (bit `Prelude.div` 16)) (bit `Prelude.mod` 16) - - - - - - ------------------------------------------------------------------------------ --- HappyState data type (not arrays) - - - -newtype HappyState b c = HappyState - (Prelude.Int -> -- token number - Prelude.Int -> -- token number (yes, again) - b -> -- token semantic value - HappyState b c -> -- current state - [HappyState b c] -> -- state stack - c) - - - ------------------------------------------------------------------------------ --- Shifting a token - -happyShift new_state (1) tk st sts stk@(x `HappyStk` _) = - let i = (case x of { HappyErrorToken (i) -> i }) in --- trace "shifting the error token" $ - new_state i i tk (HappyState (new_state)) ((st):(sts)) (stk) - -happyShift new_state i tk st sts stk = - happyNewToken new_state ((st):(sts)) ((HappyTerminal (tk))`HappyStk`stk) - --- happyReduce is specialised for the common cases. - -happySpecReduce_0 i fn (1) tk st sts stk - = happyFail [] (1) tk st sts stk -happySpecReduce_0 nt fn j tk st@((HappyState (action))) sts stk - = action nt j tk st ((st):(sts)) (fn `HappyStk` stk) - -happySpecReduce_1 i fn (1) tk st sts stk - = happyFail [] (1) tk st sts stk -happySpecReduce_1 nt fn j tk _ sts@(((st@(HappyState (action))):(_))) (v1`HappyStk`stk') - = let r = fn v1 in - happySeq r (action nt j tk st sts (r `HappyStk` stk')) - -happySpecReduce_2 i fn (1) tk st sts stk - = happyFail [] (1) tk st sts stk -happySpecReduce_2 nt fn j tk _ ((_):(sts@(((st@(HappyState (action))):(_))))) (v1`HappyStk`v2`HappyStk`stk') - = let r = fn v1 v2 in - happySeq r (action nt j tk st sts (r `HappyStk` stk')) - -happySpecReduce_3 i fn (1) tk st sts stk - = happyFail [] (1) tk st sts stk -happySpecReduce_3 nt fn j tk _ ((_):(((_):(sts@(((st@(HappyState (action))):(_))))))) (v1`HappyStk`v2`HappyStk`v3`HappyStk`stk') - = let r = fn v1 v2 v3 in - happySeq r (action nt j tk st sts (r `HappyStk` stk')) - -happyReduce k i fn (1) tk st sts stk - = happyFail [] (1) tk st sts stk -happyReduce k nt fn j tk st sts stk - = case happyDrop (k Prelude.- ((1) :: Prelude.Int)) sts of - sts1@(((st1@(HappyState (action))):(_))) -> - let r = fn stk in -- it doesn't hurt to always seq here... - happyDoSeq r (action nt j tk st1 sts1 r) - -happyMonadReduce k nt fn (1) tk st sts stk - = happyFail [] (1) tk st sts stk -happyMonadReduce k nt fn j tk st sts stk = - case happyDrop k ((st):(sts)) of - sts1@(((st1@(HappyState (action))):(_))) -> - let drop_stk = happyDropStk k stk in - happyThen1 (fn stk tk) (\r -> action nt j tk st1 sts1 (r `HappyStk` drop_stk)) - -happyMonad2Reduce k nt fn (1) tk st sts stk - = happyFail [] (1) tk st sts stk -happyMonad2Reduce k nt fn j tk st sts stk = - case happyDrop k ((st):(sts)) of - sts1@(((st1@(HappyState (action))):(_))) -> - let drop_stk = happyDropStk k stk - - - - - - _ = nt :: Prelude.Int - new_state = action - - in - happyThen1 (fn stk tk) (\r -> happyNewToken new_state sts1 (r `HappyStk` drop_stk)) - -happyDrop (0) l = l -happyDrop n ((_):(t)) = happyDrop (n Prelude.- ((1) :: Prelude.Int)) t - -happyDropStk (0) l = l -happyDropStk n (x `HappyStk` xs) = happyDropStk (n Prelude.- ((1)::Prelude.Int)) xs - ------------------------------------------------------------------------------ --- Moving to a new state after a reduction - - - - - - - - - -happyGoto action j tk st = action j j tk (HappyState action) - - ------------------------------------------------------------------------------ --- Error recovery (ERROR_TOK is the error token) - --- parse error if we are in recovery and we fail again -happyFail explist (1) tk old_st _ stk@(x `HappyStk` _) = - let i = (case x of { HappyErrorToken (i) -> i }) in --- trace "failing" $ - happyError_ explist i tk - -{- We don't need state discarding for our restricted implementation of - "error". In fact, it can cause some bogus parses, so I've disabled it - for now --SDM - --- discard a state -happyFail ERROR_TOK tk old_st CONS(HAPPYSTATE(action),sts) - (saved_tok `HappyStk` _ `HappyStk` stk) = --- trace ("discarding state, depth " ++ show (length stk)) $ - DO_ACTION(action,ERROR_TOK,tk,sts,(saved_tok`HappyStk`stk)) --} - --- Enter error recovery: generate an error token, --- save the old token and carry on. -happyFail explist i tk (HappyState (action)) sts stk = --- trace "entering error recovery" $ - action (1) (1) tk (HappyState (action)) sts ((HappyErrorToken (i)) `HappyStk` stk) - --- Internal happy errors: - -notHappyAtAll :: a -notHappyAtAll = Prelude.error "Internal Happy error\n" - ------------------------------------------------------------------------------ --- Hack to get the typechecker to accept our action functions - - - - - - - ------------------------------------------------------------------------------ --- Seq-ing. If the --strict flag is given, then Happy emits --- happySeq = happyDoSeq --- otherwise it emits --- happySeq = happyDontSeq - -happyDoSeq, happyDontSeq :: a -> b -> b -happyDoSeq a b = a `Prelude.seq` b -happyDontSeq a b = b - ------------------------------------------------------------------------------ --- Don't inline any functions from the template. GHC has a nasty habit --- of deciding to inline happyGoto everywhere, which increases the size of --- the generated parser quite a bit. - - - - - - - - - -{-# NOINLINE happyShift #-} -{-# NOINLINE happySpecReduce_0 #-} -{-# NOINLINE happySpecReduce_1 #-} -{-# NOINLINE happySpecReduce_2 #-} -{-# NOINLINE happySpecReduce_3 #-} -{-# NOINLINE happyReduce #-} -{-# NOINLINE happyMonadReduce #-} -{-# NOINLINE happyGoto #-} -{-# NOINLINE happyFail #-} - --- end of Happy Template. diff --git a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Par.info b/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Par.info deleted file mode 100644 index 145086b51..000000000 --- a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Par.info +++ /dev/null @@ -1,1227 +0,0 @@ ------------------------------------------------------------------------------ -Info file generated by Happy Version 1.20.1.1 from Par.y ------------------------------------------------------------------------------ - -state 15 contains 1 shift/reduce conflicts. -state 55 contains 1 reduce/reduce conflicts. -state 79 contains 1 shift/reduce conflicts. -state 80 contains 1 shift/reduce conflicts. -state 88 contains 1 reduce/reduce conflicts. -state 93 contains 1 shift/reduce conflicts. - -rule 14 is unused - -terminal L_Function is unused - ------------------------------------------------------------------------------ -Grammar ------------------------------------------------------------------------------ - %start_pProgram_internal -> Program (0) - %start_pObject_internal -> Object (1) - %start_pAbstractObject_internal -> AbstractObject (2) - %start_pDispatchedObject_internal -> DispatchedObject (3) - %start_pBinding_internal -> Binding (4) - %start_pListBinding_internal -> ListBinding (5) - %start_pBindings_internal -> Bindings (6) - %start_pListBindings_internal -> ListBindings (7) - %start_pDispatch_internal -> Dispatch (8) - %start_pAttribute_internal -> Attribute (9) - %start_pListAttribute_internal -> ListAttribute (10) - %start_pDisp_internal -> Disp (11) - %start_pListDisp_internal -> ListDisp (12) - Bytes -> L_Bytes (13) - Function -> L_Function (14) - LabelId -> L_LabelId (15) - AlphaIndex -> L_AlphaIndex (16) - Program -> '{' ListBinding '}' (17) - Object -> '{' ListBinding '}' (18) - Object -> AbstractObject '{' ListBinding '}' ListBindings (19) - Object -> Dispatch (20) - Object -> '⊥' (21) - AbstractObject -> '{' ListBinding '}' (22) - AbstractObject -> Dispatch (23) - AbstractObject -> '⊥' (24) - DispatchedObject -> '{' ListBinding '}' (25) - DispatchedObject -> '⊥' (26) - Binding -> Attribute '↦' Object (27) - Binding -> Attribute '↦' '∅' (28) - Binding -> 'Δ' '⤍' Bytes (29) - Binding -> 'λ' '⤍' (30) - ListBinding -> (31) - ListBinding -> Binding (32) - ListBinding -> Binding ',' ListBinding (33) - Bindings -> '{' ListBinding '}' (34) - ListBindings -> (35) - ListBindings -> Bindings ListBindings (36) - Dispatch -> DispatchedObject ListBindings '.' ListAttribute ListDisp (37) - Dispatch -> 'Φ' '.' ListAttribute ListDisp (38) - Dispatch -> 'ξ' '.' ListAttribute ListDisp (39) - Attribute -> 'φ' (40) - Attribute -> 'ρ' (41) - Attribute -> 'σ' (42) - Attribute -> 'ν' (43) - Attribute -> LabelId (44) - Attribute -> AlphaIndex (45) - ListAttribute -> Attribute (46) - ListAttribute -> Attribute '.' ListAttribute (47) - Disp -> '{' ListBinding '}' Bindings '.' ListAttribute (48) - ListDisp -> (49) - ListDisp -> Disp ListDisp (50) - ------------------------------------------------------------------------------ -Terminals ------------------------------------------------------------------------------ - ',' { PT _ (TS _ 1) } - '.' { PT _ (TS _ 2) } - '{' { PT _ (TS _ 3) } - '}' { PT _ (TS _ 4) } - 'Δ' { PT _ (TS _ 5) } - 'Φ' { PT _ (TS _ 6) } - 'λ' { PT _ (TS _ 7) } - 'ν' { PT _ (TS _ 8) } - 'ξ' { PT _ (TS _ 9) } - 'ρ' { PT _ (TS _ 10) } - 'σ' { PT _ (TS _ 11) } - 'φ' { PT _ (TS _ 12) } - '↦' { PT _ (TS _ 13) } - '∅' { PT _ (TS _ 14) } - '⊥' { PT _ (TS _ 15) } - '⤍' { PT _ (TS _ 16) } - L_Bytes { PT _ (T_Bytes _) } - L_Function { PT _ (T_Function _) } - L_LabelId { PT _ (T_LabelId _) } - L_AlphaIndex { PT _ (T_AlphaIndex _) } - ------------------------------------------------------------------------------ -Non-terminals ------------------------------------------------------------------------------ - %start_pProgram_internal rule 0 - %start_pObject_internal rule 1 - %start_pAbstractObject_internal rule 2 - %start_pDispatchedObject_internal rule 3 - %start_pBinding_internal rule 4 - %start_pListBinding_internal rule 5 - %start_pBindings_internal rule 6 - %start_pListBindings_internal rule 7 - %start_pDispatch_internal rule 8 - %start_pAttribute_internal rule 9 - %start_pListAttribute_internal rule 10 - %start_pDisp_internal rule 11 - %start_pListDisp_internal rule 12 - Bytes rule 13 - Function rule 14 - LabelId rule 15 - AlphaIndex rule 16 - Program rule 17 - Object rules 18, 19, 20, 21 - AbstractObject rules 22, 23, 24 - DispatchedObject rules 25, 26 - Binding rules 27, 28, 29, 30 - ListBinding rules 31, 32, 33 - Bindings rule 34 - ListBindings rules 35, 36 - Dispatch rules 37, 38, 39 - Attribute rules 40, 41, 42, 43, 44, 45 - ListAttribute rules 46, 47 - Disp rule 48 - ListDisp rules 49, 50 - ------------------------------------------------------------------------------ -States ------------------------------------------------------------------------------ -State 0 - - %start_pProgram_internal -> . Program (rule 0) - - '{' shift, and enter state 57 - - Program goto state 56 - -State 1 - - %start_pObject_internal -> . Object (rule 1) - - '{' shift, and enter state 54 - 'Φ' shift, and enter state 33 - 'ξ' shift, and enter state 34 - '⊥' shift, and enter state 55 - - Object goto state 51 - AbstractObject goto state 52 - DispatchedObjectgoto state 30 - Dispatch goto state 53 - -State 2 - - %start_pAbstractObject_internal -> . AbstractObject (rule 2) - - '{' shift, and enter state 49 - 'Φ' shift, and enter state 33 - 'ξ' shift, and enter state 34 - '⊥' shift, and enter state 50 - - AbstractObject goto state 47 - DispatchedObjectgoto state 30 - Dispatch goto state 48 - -State 3 - - %start_pDispatchedObject_internal -> . DispatchedObject (rule 3) - - '{' shift, and enter state 32 - '⊥' shift, and enter state 35 - - DispatchedObjectgoto state 46 - -State 4 - - %start_pBinding_internal -> . Binding (rule 4) - - 'Δ' shift, and enter state 43 - 'λ' shift, and enter state 44 - 'ν' shift, and enter state 23 - 'ρ' shift, and enter state 24 - 'σ' shift, and enter state 25 - 'φ' shift, and enter state 26 - L_LabelId shift, and enter state 27 - L_AlphaIndex shift, and enter state 28 - - LabelId goto state 19 - AlphaIndex goto state 20 - Binding goto state 45 - Attribute goto state 42 - -State 5 - - %start_pListBinding_internal -> . ListBinding (rule 5) - - 'Δ' shift, and enter state 43 - 'λ' shift, and enter state 44 - 'ν' shift, and enter state 23 - 'ρ' shift, and enter state 24 - 'σ' shift, and enter state 25 - 'φ' shift, and enter state 26 - L_LabelId shift, and enter state 27 - L_AlphaIndex shift, and enter state 28 - %eof reduce using rule 31 - - LabelId goto state 19 - AlphaIndex goto state 20 - Binding goto state 40 - ListBinding goto state 41 - Attribute goto state 42 - -State 6 - - %start_pBindings_internal -> . Bindings (rule 6) - - '{' shift, and enter state 38 - - Bindings goto state 39 - -State 7 - - %start_pListBindings_internal -> . ListBindings (rule 7) - - '{' shift, and enter state 38 - %eof reduce using rule 35 - - Bindings goto state 36 - ListBindings goto state 37 - -State 8 - - %start_pDispatch_internal -> . Dispatch (rule 8) - - '{' shift, and enter state 32 - 'Φ' shift, and enter state 33 - 'ξ' shift, and enter state 34 - '⊥' shift, and enter state 35 - - DispatchedObjectgoto state 30 - Dispatch goto state 31 - -State 9 - - %start_pAttribute_internal -> . Attribute (rule 9) - - 'ν' shift, and enter state 23 - 'ρ' shift, and enter state 24 - 'σ' shift, and enter state 25 - 'φ' shift, and enter state 26 - L_LabelId shift, and enter state 27 - L_AlphaIndex shift, and enter state 28 - - LabelId goto state 19 - AlphaIndex goto state 20 - Attribute goto state 29 - -State 10 - - %start_pListAttribute_internal -> . ListAttribute (rule 10) - - 'ν' shift, and enter state 23 - 'ρ' shift, and enter state 24 - 'σ' shift, and enter state 25 - 'φ' shift, and enter state 26 - L_LabelId shift, and enter state 27 - L_AlphaIndex shift, and enter state 28 - - LabelId goto state 19 - AlphaIndex goto state 20 - Attribute goto state 21 - ListAttribute goto state 22 - -State 11 - - %start_pDisp_internal -> . Disp (rule 11) - - '{' shift, and enter state 17 - - Disp goto state 18 - -State 12 - - %start_pListDisp_internal -> . ListDisp (rule 12) - - '{' shift, and enter state 17 - %eof reduce using rule 49 - - Disp goto state 15 - ListDisp goto state 16 - -State 13 - - Bytes -> . L_Bytes (rule 13) - - L_Bytes shift, and enter state 14 - - -State 14 - - Bytes -> L_Bytes . (rule 13) - - ',' reduce using rule 13 - '}' reduce using rule 13 - %eof reduce using rule 13 - - -State 15 - - ListDisp -> Disp . ListDisp (rule 50) - - ',' reduce using rule 49 - '{' shift, and enter state 17 - (reduce using rule 49) - - '}' reduce using rule 49 - %eof reduce using rule 49 - - Disp goto state 15 - ListDisp goto state 74 - -State 16 - - %start_pListDisp_internal -> ListDisp . (rule 12) - - %eof accept - - -State 17 - - Disp -> '{' . ListBinding '}' Bindings '.' ListAttribute (rule 48) - - '}' reduce using rule 31 - 'Δ' shift, and enter state 43 - 'λ' shift, and enter state 44 - 'ν' shift, and enter state 23 - 'ρ' shift, and enter state 24 - 'σ' shift, and enter state 25 - 'φ' shift, and enter state 26 - L_LabelId shift, and enter state 27 - L_AlphaIndex shift, and enter state 28 - - LabelId goto state 19 - AlphaIndex goto state 20 - Binding goto state 40 - ListBinding goto state 73 - Attribute goto state 42 - -State 18 - - %start_pDisp_internal -> Disp . (rule 11) - - %eof accept - - -State 19 - - Attribute -> LabelId . (rule 44) - - ',' reduce using rule 44 - '.' reduce using rule 44 - '{' reduce using rule 44 - '}' reduce using rule 44 - '↦' reduce using rule 44 - %eof reduce using rule 44 - - -State 20 - - Attribute -> AlphaIndex . (rule 45) - - ',' reduce using rule 45 - '.' reduce using rule 45 - '{' reduce using rule 45 - '}' reduce using rule 45 - '↦' reduce using rule 45 - %eof reduce using rule 45 - - -State 21 - - ListAttribute -> Attribute . (rule 46) - ListAttribute -> Attribute . '.' ListAttribute (rule 47) - - ',' reduce using rule 46 - '.' shift, and enter state 72 - '{' reduce using rule 46 - '}' reduce using rule 46 - %eof reduce using rule 46 - - -State 22 - - %start_pListAttribute_internal -> ListAttribute . (rule 10) - - %eof accept - - -State 23 - - Attribute -> 'ν' . (rule 43) - - ',' reduce using rule 43 - '.' reduce using rule 43 - '{' reduce using rule 43 - '}' reduce using rule 43 - '↦' reduce using rule 43 - %eof reduce using rule 43 - - -State 24 - - Attribute -> 'ρ' . (rule 41) - - ',' reduce using rule 41 - '.' reduce using rule 41 - '{' reduce using rule 41 - '}' reduce using rule 41 - '↦' reduce using rule 41 - %eof reduce using rule 41 - - -State 25 - - Attribute -> 'σ' . (rule 42) - - ',' reduce using rule 42 - '.' reduce using rule 42 - '{' reduce using rule 42 - '}' reduce using rule 42 - '↦' reduce using rule 42 - %eof reduce using rule 42 - - -State 26 - - Attribute -> 'φ' . (rule 40) - - ',' reduce using rule 40 - '.' reduce using rule 40 - '{' reduce using rule 40 - '}' reduce using rule 40 - '↦' reduce using rule 40 - %eof reduce using rule 40 - - -State 27 - - LabelId -> L_LabelId . (rule 15) - - ',' reduce using rule 15 - '.' reduce using rule 15 - '{' reduce using rule 15 - '}' reduce using rule 15 - '↦' reduce using rule 15 - %eof reduce using rule 15 - - -State 28 - - AlphaIndex -> L_AlphaIndex . (rule 16) - - ',' reduce using rule 16 - '.' reduce using rule 16 - '{' reduce using rule 16 - '}' reduce using rule 16 - '↦' reduce using rule 16 - %eof reduce using rule 16 - - -State 29 - - %start_pAttribute_internal -> Attribute . (rule 9) - - %eof accept - - -State 30 - - Dispatch -> DispatchedObject . ListBindings '.' ListAttribute ListDisp (rule 37) - - '.' reduce using rule 35 - '{' shift, and enter state 38 - - Bindings goto state 36 - ListBindings goto state 71 - -State 31 - - %start_pDispatch_internal -> Dispatch . (rule 8) - - %eof accept - - -State 32 - - DispatchedObject -> '{' . ListBinding '}' (rule 25) - - '}' reduce using rule 31 - 'Δ' shift, and enter state 43 - 'λ' shift, and enter state 44 - 'ν' shift, and enter state 23 - 'ρ' shift, and enter state 24 - 'σ' shift, and enter state 25 - 'φ' shift, and enter state 26 - L_LabelId shift, and enter state 27 - L_AlphaIndex shift, and enter state 28 - - LabelId goto state 19 - AlphaIndex goto state 20 - Binding goto state 40 - ListBinding goto state 70 - Attribute goto state 42 - -State 33 - - Dispatch -> 'Φ' . '.' ListAttribute ListDisp (rule 38) - - '.' shift, and enter state 69 - - -State 34 - - Dispatch -> 'ξ' . '.' ListAttribute ListDisp (rule 39) - - '.' shift, and enter state 68 - - -State 35 - - DispatchedObject -> '⊥' . (rule 26) - - '.' reduce using rule 26 - '{' reduce using rule 26 - %eof reduce using rule 26 - - -State 36 - - ListBindings -> Bindings . ListBindings (rule 36) - - ',' reduce using rule 35 - '.' reduce using rule 35 - '{' shift, and enter state 38 - '}' reduce using rule 35 - %eof reduce using rule 35 - - Bindings goto state 36 - ListBindings goto state 67 - -State 37 - - %start_pListBindings_internal -> ListBindings . (rule 7) - - %eof accept - - -State 38 - - Bindings -> '{' . ListBinding '}' (rule 34) - - '}' reduce using rule 31 - 'Δ' shift, and enter state 43 - 'λ' shift, and enter state 44 - 'ν' shift, and enter state 23 - 'ρ' shift, and enter state 24 - 'σ' shift, and enter state 25 - 'φ' shift, and enter state 26 - L_LabelId shift, and enter state 27 - L_AlphaIndex shift, and enter state 28 - - LabelId goto state 19 - AlphaIndex goto state 20 - Binding goto state 40 - ListBinding goto state 66 - Attribute goto state 42 - -State 39 - - %start_pBindings_internal -> Bindings . (rule 6) - - %eof accept - - -State 40 - - ListBinding -> Binding . (rule 32) - ListBinding -> Binding . ',' ListBinding (rule 33) - - ',' shift, and enter state 65 - '}' reduce using rule 32 - %eof reduce using rule 32 - - -State 41 - - %start_pListBinding_internal -> ListBinding . (rule 5) - - %eof accept - - -State 42 - - Binding -> Attribute . '↦' Object (rule 27) - Binding -> Attribute . '↦' '∅' (rule 28) - - '↦' shift, and enter state 64 - - -State 43 - - Binding -> 'Δ' . '⤍' Bytes (rule 29) - - '⤍' shift, and enter state 63 - - -State 44 - - Binding -> 'λ' . '⤍' (rule 30) - - '⤍' shift, and enter state 62 - - -State 45 - - %start_pBinding_internal -> Binding . (rule 4) - - %eof accept - - -State 46 - - %start_pDispatchedObject_internal -> DispatchedObject . (rule 3) - - %eof accept - - -State 47 - - %start_pAbstractObject_internal -> AbstractObject . (rule 2) - - %eof accept - - -State 48 - - AbstractObject -> Dispatch . (rule 23) - - %eof reduce using rule 23 - - -State 49 - - AbstractObject -> '{' . ListBinding '}' (rule 22) - DispatchedObject -> '{' . ListBinding '}' (rule 25) - - '}' reduce using rule 31 - 'Δ' shift, and enter state 43 - 'λ' shift, and enter state 44 - 'ν' shift, and enter state 23 - 'ρ' shift, and enter state 24 - 'σ' shift, and enter state 25 - 'φ' shift, and enter state 26 - L_LabelId shift, and enter state 27 - L_AlphaIndex shift, and enter state 28 - - LabelId goto state 19 - AlphaIndex goto state 20 - Binding goto state 40 - ListBinding goto state 61 - Attribute goto state 42 - -State 50 - - AbstractObject -> '⊥' . (rule 24) - DispatchedObject -> '⊥' . (rule 26) - - '.' reduce using rule 26 - '{' reduce using rule 26 - %eof reduce using rule 24 - - -State 51 - - %start_pObject_internal -> Object . (rule 1) - - %eof accept - - -State 52 - - Object -> AbstractObject . '{' ListBinding '}' ListBindings (rule 19) - - '{' shift, and enter state 60 - - -State 53 - - Object -> Dispatch . (rule 20) - AbstractObject -> Dispatch . (rule 23) - - ',' reduce using rule 20 - '{' reduce using rule 23 - '}' reduce using rule 20 - %eof reduce using rule 20 - - -State 54 - - Object -> '{' . ListBinding '}' (rule 18) - AbstractObject -> '{' . ListBinding '}' (rule 22) - DispatchedObject -> '{' . ListBinding '}' (rule 25) - - '}' reduce using rule 31 - 'Δ' shift, and enter state 43 - 'λ' shift, and enter state 44 - 'ν' shift, and enter state 23 - 'ρ' shift, and enter state 24 - 'σ' shift, and enter state 25 - 'φ' shift, and enter state 26 - L_LabelId shift, and enter state 27 - L_AlphaIndex shift, and enter state 28 - - LabelId goto state 19 - AlphaIndex goto state 20 - Binding goto state 40 - ListBinding goto state 59 - Attribute goto state 42 - -State 55 - - Object -> '⊥' . (rule 21) - AbstractObject -> '⊥' . (rule 24) - DispatchedObject -> '⊥' . (rule 26) - - ',' reduce using rule 21 - '.' reduce using rule 26 - '{' reduce using rule 26 - (reduce using rule 24) - - '}' reduce using rule 21 - %eof reduce using rule 21 - - -State 56 - - %start_pProgram_internal -> Program . (rule 0) - - %eof accept - - -State 57 - - Program -> '{' . ListBinding '}' (rule 17) - - '}' reduce using rule 31 - 'Δ' shift, and enter state 43 - 'λ' shift, and enter state 44 - 'ν' shift, and enter state 23 - 'ρ' shift, and enter state 24 - 'σ' shift, and enter state 25 - 'φ' shift, and enter state 26 - L_LabelId shift, and enter state 27 - L_AlphaIndex shift, and enter state 28 - - LabelId goto state 19 - AlphaIndex goto state 20 - Binding goto state 40 - ListBinding goto state 58 - Attribute goto state 42 - -State 58 - - Program -> '{' ListBinding . '}' (rule 17) - - '}' shift, and enter state 89 - - -State 59 - - Object -> '{' ListBinding . '}' (rule 18) - AbstractObject -> '{' ListBinding . '}' (rule 22) - DispatchedObject -> '{' ListBinding . '}' (rule 25) - - '}' shift, and enter state 88 - - -State 60 - - Object -> AbstractObject '{' . ListBinding '}' ListBindings (rule 19) - - '}' reduce using rule 31 - 'Δ' shift, and enter state 43 - 'λ' shift, and enter state 44 - 'ν' shift, and enter state 23 - 'ρ' shift, and enter state 24 - 'σ' shift, and enter state 25 - 'φ' shift, and enter state 26 - L_LabelId shift, and enter state 27 - L_AlphaIndex shift, and enter state 28 - - LabelId goto state 19 - AlphaIndex goto state 20 - Binding goto state 40 - ListBinding goto state 87 - Attribute goto state 42 - -State 61 - - AbstractObject -> '{' ListBinding . '}' (rule 22) - DispatchedObject -> '{' ListBinding . '}' (rule 25) - - '}' shift, and enter state 86 - - -State 62 - - Binding -> 'λ' '⤍' . (rule 30) - - ',' reduce using rule 30 - '}' reduce using rule 30 - %eof reduce using rule 30 - - -State 63 - - Binding -> 'Δ' '⤍' . Bytes (rule 29) - - L_Bytes shift, and enter state 14 - - Bytes goto state 85 - -State 64 - - Binding -> Attribute '↦' . Object (rule 27) - Binding -> Attribute '↦' . '∅' (rule 28) - - '{' shift, and enter state 54 - 'Φ' shift, and enter state 33 - 'ξ' shift, and enter state 34 - '∅' shift, and enter state 84 - '⊥' shift, and enter state 55 - - Object goto state 83 - AbstractObject goto state 52 - DispatchedObjectgoto state 30 - Dispatch goto state 53 - -State 65 - - ListBinding -> Binding ',' . ListBinding (rule 33) - - '}' reduce using rule 31 - 'Δ' shift, and enter state 43 - 'λ' shift, and enter state 44 - 'ν' shift, and enter state 23 - 'ρ' shift, and enter state 24 - 'σ' shift, and enter state 25 - 'φ' shift, and enter state 26 - L_LabelId shift, and enter state 27 - L_AlphaIndex shift, and enter state 28 - %eof reduce using rule 31 - - LabelId goto state 19 - AlphaIndex goto state 20 - Binding goto state 40 - ListBinding goto state 82 - Attribute goto state 42 - -State 66 - - Bindings -> '{' ListBinding . '}' (rule 34) - - '}' shift, and enter state 81 - - -State 67 - - ListBindings -> Bindings ListBindings . (rule 36) - - ',' reduce using rule 36 - '.' reduce using rule 36 - '}' reduce using rule 36 - %eof reduce using rule 36 - - -State 68 - - Dispatch -> 'ξ' '.' . ListAttribute ListDisp (rule 39) - - 'ν' shift, and enter state 23 - 'ρ' shift, and enter state 24 - 'σ' shift, and enter state 25 - 'φ' shift, and enter state 26 - L_LabelId shift, and enter state 27 - L_AlphaIndex shift, and enter state 28 - - LabelId goto state 19 - AlphaIndex goto state 20 - Attribute goto state 21 - ListAttribute goto state 80 - -State 69 - - Dispatch -> 'Φ' '.' . ListAttribute ListDisp (rule 38) - - 'ν' shift, and enter state 23 - 'ρ' shift, and enter state 24 - 'σ' shift, and enter state 25 - 'φ' shift, and enter state 26 - L_LabelId shift, and enter state 27 - L_AlphaIndex shift, and enter state 28 - - LabelId goto state 19 - AlphaIndex goto state 20 - Attribute goto state 21 - ListAttribute goto state 79 - -State 70 - - DispatchedObject -> '{' ListBinding . '}' (rule 25) - - '}' shift, and enter state 78 - - -State 71 - - Dispatch -> DispatchedObject ListBindings . '.' ListAttribute ListDisp (rule 37) - - '.' shift, and enter state 77 - - -State 72 - - ListAttribute -> Attribute '.' . ListAttribute (rule 47) - - 'ν' shift, and enter state 23 - 'ρ' shift, and enter state 24 - 'σ' shift, and enter state 25 - 'φ' shift, and enter state 26 - L_LabelId shift, and enter state 27 - L_AlphaIndex shift, and enter state 28 - - LabelId goto state 19 - AlphaIndex goto state 20 - Attribute goto state 21 - ListAttribute goto state 76 - -State 73 - - Disp -> '{' ListBinding . '}' Bindings '.' ListAttribute (rule 48) - - '}' shift, and enter state 75 - - -State 74 - - ListDisp -> Disp ListDisp . (rule 50) - - ',' reduce using rule 50 - '{' reduce using rule 50 - '}' reduce using rule 50 - %eof reduce using rule 50 - - -State 75 - - Disp -> '{' ListBinding '}' . Bindings '.' ListAttribute (rule 48) - - '{' shift, and enter state 38 - - Bindings goto state 94 - -State 76 - - ListAttribute -> Attribute '.' ListAttribute . (rule 47) - - ',' reduce using rule 47 - '{' reduce using rule 47 - '}' reduce using rule 47 - %eof reduce using rule 47 - - -State 77 - - Dispatch -> DispatchedObject ListBindings '.' . ListAttribute ListDisp (rule 37) - - 'ν' shift, and enter state 23 - 'ρ' shift, and enter state 24 - 'σ' shift, and enter state 25 - 'φ' shift, and enter state 26 - L_LabelId shift, and enter state 27 - L_AlphaIndex shift, and enter state 28 - - LabelId goto state 19 - AlphaIndex goto state 20 - Attribute goto state 21 - ListAttribute goto state 93 - -State 78 - - DispatchedObject -> '{' ListBinding '}' . (rule 25) - - '.' reduce using rule 25 - '{' reduce using rule 25 - %eof reduce using rule 25 - - -State 79 - - Dispatch -> 'Φ' '.' ListAttribute . ListDisp (rule 38) - - ',' reduce using rule 49 - '{' shift, and enter state 17 - (reduce using rule 49) - - '}' reduce using rule 49 - %eof reduce using rule 49 - - Disp goto state 15 - ListDisp goto state 92 - -State 80 - - Dispatch -> 'ξ' '.' ListAttribute . ListDisp (rule 39) - - ',' reduce using rule 49 - '{' shift, and enter state 17 - (reduce using rule 49) - - '}' reduce using rule 49 - %eof reduce using rule 49 - - Disp goto state 15 - ListDisp goto state 91 - -State 81 - - Bindings -> '{' ListBinding '}' . (rule 34) - - ',' reduce using rule 34 - '.' reduce using rule 34 - '{' reduce using rule 34 - '}' reduce using rule 34 - %eof reduce using rule 34 - - -State 82 - - ListBinding -> Binding ',' ListBinding . (rule 33) - - '}' reduce using rule 33 - %eof reduce using rule 33 - - -State 83 - - Binding -> Attribute '↦' Object . (rule 27) - - ',' reduce using rule 27 - '}' reduce using rule 27 - %eof reduce using rule 27 - - -State 84 - - Binding -> Attribute '↦' '∅' . (rule 28) - - ',' reduce using rule 28 - '}' reduce using rule 28 - %eof reduce using rule 28 - - -State 85 - - Binding -> 'Δ' '⤍' Bytes . (rule 29) - - ',' reduce using rule 29 - '}' reduce using rule 29 - %eof reduce using rule 29 - - -State 86 - - AbstractObject -> '{' ListBinding '}' . (rule 22) - DispatchedObject -> '{' ListBinding '}' . (rule 25) - - '.' reduce using rule 25 - '{' reduce using rule 25 - %eof reduce using rule 22 - - -State 87 - - Object -> AbstractObject '{' ListBinding . '}' ListBindings (rule 19) - - '}' shift, and enter state 90 - - -State 88 - - Object -> '{' ListBinding '}' . (rule 18) - AbstractObject -> '{' ListBinding '}' . (rule 22) - DispatchedObject -> '{' ListBinding '}' . (rule 25) - - ',' reduce using rule 18 - '.' reduce using rule 25 - '{' reduce using rule 25 - (reduce using rule 22) - - '}' reduce using rule 18 - %eof reduce using rule 18 - - -State 89 - - Program -> '{' ListBinding '}' . (rule 17) - - %eof reduce using rule 17 - - -State 90 - - Object -> AbstractObject '{' ListBinding '}' . ListBindings (rule 19) - - ',' reduce using rule 35 - '{' shift, and enter state 38 - '}' reduce using rule 35 - %eof reduce using rule 35 - - Bindings goto state 36 - ListBindings goto state 97 - -State 91 - - Dispatch -> 'ξ' '.' ListAttribute ListDisp . (rule 39) - - ',' reduce using rule 39 - '{' reduce using rule 39 - '}' reduce using rule 39 - %eof reduce using rule 39 - - -State 92 - - Dispatch -> 'Φ' '.' ListAttribute ListDisp . (rule 38) - - ',' reduce using rule 38 - '{' reduce using rule 38 - '}' reduce using rule 38 - %eof reduce using rule 38 - - -State 93 - - Dispatch -> DispatchedObject ListBindings '.' ListAttribute . ListDisp (rule 37) - - ',' reduce using rule 49 - '{' shift, and enter state 17 - (reduce using rule 49) - - '}' reduce using rule 49 - %eof reduce using rule 49 - - Disp goto state 15 - ListDisp goto state 96 - -State 94 - - Disp -> '{' ListBinding '}' Bindings . '.' ListAttribute (rule 48) - - '.' shift, and enter state 95 - - -State 95 - - Disp -> '{' ListBinding '}' Bindings '.' . ListAttribute (rule 48) - - 'ν' shift, and enter state 23 - 'ρ' shift, and enter state 24 - 'σ' shift, and enter state 25 - 'φ' shift, and enter state 26 - L_LabelId shift, and enter state 27 - L_AlphaIndex shift, and enter state 28 - - LabelId goto state 19 - AlphaIndex goto state 20 - Attribute goto state 21 - ListAttribute goto state 98 - -State 96 - - Dispatch -> DispatchedObject ListBindings '.' ListAttribute ListDisp . (rule 37) - - ',' reduce using rule 37 - '{' reduce using rule 37 - '}' reduce using rule 37 - %eof reduce using rule 37 - - -State 97 - - Object -> AbstractObject '{' ListBinding '}' ListBindings . (rule 19) - - ',' reduce using rule 19 - '}' reduce using rule 19 - %eof reduce using rule 19 - - -State 98 - - Disp -> '{' ListBinding '}' Bindings '.' ListAttribute . (rule 48) - - ',' reduce using rule 48 - '{' reduce using rule 48 - '}' reduce using rule 48 - %eof reduce using rule 48 - - ------------------------------------------------------------------------------ -Grammar Totals ------------------------------------------------------------------------------ -Number of rules: 51 -Number of terminals: 20 -Number of non-terminals: 30 -Number of states: 99 diff --git a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Par.y.bak b/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Par.y.bak deleted file mode 100644 index 0a687f005..000000000 --- a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Par.y.bak +++ /dev/null @@ -1,212 +0,0 @@ --- -*- haskell -*- File generated by the BNF Converter (bnfc 2.9.5). - --- Parser definition for use with Happy -{ -{-# OPTIONS_GHC -fno-warn-incomplete-patterns -fno-warn-overlapping-patterns #-} -{-# LANGUAGE PatternSynonyms #-} - -module Language.EO.Phi.Syntax.Par - ( happyError - , myLexer - , pProgram - , pObject - , pAbstractObject - , pDispatchedObject - , pBinding - , pListBinding - , pBindings - , pListBindings - , pDispatch - , pAttribute - , pListAttribute - , pDisp - , pListDisp - ) where - -import Prelude - -import qualified Language.EO.Phi.Syntax.Abs -import Language.EO.Phi.Syntax.Lex - -} - -%name pProgram_internal Program -%name pObject_internal Object -%name pAbstractObject_internal AbstractObject -%name pDispatchedObject_internal DispatchedObject -%name pBinding_internal Binding -%name pListBinding_internal ListBinding -%name pBindings_internal Bindings -%name pListBindings_internal ListBindings -%name pDispatch_internal Dispatch -%name pAttribute_internal Attribute -%name pListAttribute_internal ListAttribute -%name pDisp_internal Disp -%name pListDisp_internal ListDisp --- no lexer declaration -%monad { Err } { (>>=) } { return } -%tokentype {Token} -%token - ',' { PT _ (TS _ 1) } - '.' { PT _ (TS _ 2) } - '{' { PT _ (TS _ 3) } - '}' { PT _ (TS _ 4) } - 'Δ' { PT _ (TS _ 5) } - 'Φ' { PT _ (TS _ 6) } - 'λ' { PT _ (TS _ 7) } - 'ν' { PT _ (TS _ 8) } - 'ξ' { PT _ (TS _ 9) } - 'ρ' { PT _ (TS _ 10) } - 'σ' { PT _ (TS _ 11) } - 'φ' { PT _ (TS _ 12) } - '↦' { PT _ (TS _ 13) } - '∅' { PT _ (TS _ 14) } - '⊥' { PT _ (TS _ 15) } - '⤍' { PT _ (TS _ 16) } - L_Bytes { PT _ (T_Bytes _) } - L_Function { PT _ (T_Function _) } - L_LabelId { PT _ (T_LabelId _) } - L_AlphaIndex { PT _ (T_AlphaIndex _) } - -%% - -Bytes :: { (Language.EO.Phi.Syntax.Abs.BNFC'Position, Language.EO.Phi.Syntax.Abs.Bytes) } -Bytes : L_Bytes { (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1), Language.EO.Phi.Syntax.Abs.Bytes (tokenText $1)) } - -Function :: { (Language.EO.Phi.Syntax.Abs.BNFC'Position, Language.EO.Phi.Syntax.Abs.Function) } -Function : L_Function { (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1), Language.EO.Phi.Syntax.Abs.Function (tokenText $1)) } - -LabelId :: { (Language.EO.Phi.Syntax.Abs.BNFC'Position, Language.EO.Phi.Syntax.Abs.LabelId) } -LabelId : L_LabelId { (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1), Language.EO.Phi.Syntax.Abs.LabelId (tokenText $1)) } - -AlphaIndex :: { (Language.EO.Phi.Syntax.Abs.BNFC'Position, Language.EO.Phi.Syntax.Abs.AlphaIndex) } -AlphaIndex : L_AlphaIndex { (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1), Language.EO.Phi.Syntax.Abs.AlphaIndex (tokenText $1)) } - -Program :: { (Language.EO.Phi.Syntax.Abs.BNFC'Position, Language.EO.Phi.Syntax.Abs.Program) } -Program - : '{' ListBinding '}' { (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1), Language.EO.Phi.Syntax.Abs.Program (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1)) (snd $2)) } - -Object :: { (Language.EO.Phi.Syntax.Abs.BNFC'Position, Language.EO.Phi.Syntax.Abs.Object) } -Object - : '{' ListBinding '}' { (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1), Language.EO.Phi.Syntax.Abs.Formation (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1)) (snd $2)) } - | AbstractObject '{' ListBinding '}' ListBindings { (fst $1, Language.EO.Phi.Syntax.Abs.Application (fst $1) (snd $1) (snd $3) (snd $5)) } - | Dispatch { (fst $1, Language.EO.Phi.Syntax.Abs.Dispatch (fst $1) (snd $1)) } - | '⊥' { (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1), Language.EO.Phi.Syntax.Abs.Termination (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1))) } - -AbstractObject :: { (Language.EO.Phi.Syntax.Abs.BNFC'Position, Language.EO.Phi.Syntax.Abs.AbstractObject) } -AbstractObject - : '{' ListBinding '}' { (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1), Language.EO.Phi.Syntax.Abs.AbstractFormation (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1)) (snd $2)) } - | Dispatch { (fst $1, Language.EO.Phi.Syntax.Abs.AbstractDispatch (fst $1) (snd $1)) } - | '⊥' { (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1), Language.EO.Phi.Syntax.Abs.AbstractTermination (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1))) } - -DispatchedObject :: { (Language.EO.Phi.Syntax.Abs.BNFC'Position, Language.EO.Phi.Syntax.Abs.DispatchedObject) } -DispatchedObject - : '{' ListBinding '}' { (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1), Language.EO.Phi.Syntax.Abs.DispatchedFormation (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1)) (snd $2)) } - | '⊥' { (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1), Language.EO.Phi.Syntax.Abs.DispatchedTermination (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1))) } - -Binding :: { (Language.EO.Phi.Syntax.Abs.BNFC'Position, Language.EO.Phi.Syntax.Abs.Binding) } -Binding - : Attribute '↦' '∅' { (fst $1, Language.EO.Phi.Syntax.Abs.EmptyBinding (fst $1) (snd $1)) } - | 'Δ' '⤍' Bytes { (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1), Language.EO.Phi.Syntax.Abs.DeltaBinding (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1)) (snd $3)) } - | 'λ' '⤍' { (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1), Language.EO.Phi.Syntax.Abs.LambdaBinding (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1))) } - -ListBinding :: { (Language.EO.Phi.Syntax.Abs.BNFC'Position, [Language.EO.Phi.Syntax.Abs.Binding]) } -ListBinding - : {- empty -} { (Language.EO.Phi.Syntax.Abs.BNFC'NoPosition, []) } - | Binding { (fst $1, (:[]) (snd $1)) } - | Binding ',' ListBinding { (fst $1, (:) (snd $1) (snd $3)) } - -Bindings :: { (Language.EO.Phi.Syntax.Abs.BNFC'Position, Language.EO.Phi.Syntax.Abs.Bindings) } -Bindings - : '{' ListBinding '}' { (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1), Language.EO.Phi.Syntax.Abs.Bindings (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1)) (snd $2)) } - -ListBindings :: { (Language.EO.Phi.Syntax.Abs.BNFC'Position, [Language.EO.Phi.Syntax.Abs.Bindings]) } -ListBindings - : {- empty -} { (Language.EO.Phi.Syntax.Abs.BNFC'NoPosition, []) } - | Bindings ListBindings { (fst $1, (:) (snd $1) (snd $2)) } - -Dispatch :: { (Language.EO.Phi.Syntax.Abs.BNFC'Position, Language.EO.Phi.Syntax.Abs.Dispatch) } -Dispatch - : 'Φ' '.' ListAttribute ListDisp { (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1), Language.EO.Phi.Syntax.Abs.HomeDispatch (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1)) (snd $3) (snd $4)) } - | 'ξ' '.' ListAttribute ListDisp { (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1), Language.EO.Phi.Syntax.Abs.ThisDispatch (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1)) (snd $3) (snd $4)) } - -Attribute :: { (Language.EO.Phi.Syntax.Abs.BNFC'Position, Language.EO.Phi.Syntax.Abs.Attribute) } -Attribute - : 'φ' { (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1), Language.EO.Phi.Syntax.Abs.Phi (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1))) } - | 'ρ' { (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1), Language.EO.Phi.Syntax.Abs.Rho (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1))) } - | 'σ' { (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1), Language.EO.Phi.Syntax.Abs.Sigma (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1))) } - | 'ν' { (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1), Language.EO.Phi.Syntax.Abs.VTX (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1))) } - | LabelId { (fst $1, Language.EO.Phi.Syntax.Abs.Label (fst $1) (snd $1)) } - | AlphaIndex { (fst $1, Language.EO.Phi.Syntax.Abs.Alpha (fst $1) (snd $1)) } - -ListAttribute :: { (Language.EO.Phi.Syntax.Abs.BNFC'Position, [Language.EO.Phi.Syntax.Abs.Attribute]) } -ListAttribute - : Attribute { (fst $1, (:[]) (snd $1)) } - | Attribute '.' ListAttribute { (fst $1, (:) (snd $1) (snd $3)) } - -Disp :: { (Language.EO.Phi.Syntax.Abs.BNFC'Position, Language.EO.Phi.Syntax.Abs.Disp) } -Disp - : '{' ListBinding '}' Bindings '.' ListAttribute { (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1), Language.EO.Phi.Syntax.Abs.Disp (uncurry Language.EO.Phi.Syntax.Abs.BNFC'Position (tokenLineCol $1)) (snd $2) (snd $4) (snd $6)) } - -ListDisp :: { (Language.EO.Phi.Syntax.Abs.BNFC'Position, [Language.EO.Phi.Syntax.Abs.Disp]) } -ListDisp - : {- empty -} { (Language.EO.Phi.Syntax.Abs.BNFC'NoPosition, []) } - | Disp ListDisp { (fst $1, (:) (snd $1) (snd $2)) } - -{ - -type Err = Either String - -happyError :: [Token] -> Err a -happyError ts = Left $ - "syntax error at " ++ tokenPos ts ++ - case ts of - [] -> [] - [Err _] -> " due to lexer error" - t:_ -> " before `" ++ (prToken t) ++ "'" - -myLexer :: String -> [Token] -myLexer = tokens - --- Entrypoints - -pProgram :: [Token] -> Err Language.EO.Phi.Syntax.Abs.Program -pProgram = fmap snd . pProgram_internal - -pObject :: [Token] -> Err Language.EO.Phi.Syntax.Abs.Object -pObject = fmap snd . pObject_internal - -pAbstractObject :: [Token] -> Err Language.EO.Phi.Syntax.Abs.AbstractObject -pAbstractObject = fmap snd . pAbstractObject_internal - -pDispatchedObject :: [Token] -> Err Language.EO.Phi.Syntax.Abs.DispatchedObject -pDispatchedObject = fmap snd . pDispatchedObject_internal - -pBinding :: [Token] -> Err Language.EO.Phi.Syntax.Abs.Binding -pBinding = fmap snd . pBinding_internal - -pListBinding :: [Token] -> Err [Language.EO.Phi.Syntax.Abs.Binding] -pListBinding = fmap snd . pListBinding_internal - -pBindings :: [Token] -> Err Language.EO.Phi.Syntax.Abs.Bindings -pBindings = fmap snd . pBindings_internal - -pListBindings :: [Token] -> Err [Language.EO.Phi.Syntax.Abs.Bindings] -pListBindings = fmap snd . pListBindings_internal - -pDispatch :: [Token] -> Err Language.EO.Phi.Syntax.Abs.Dispatch -pDispatch = fmap snd . pDispatch_internal - -pAttribute :: [Token] -> Err Language.EO.Phi.Syntax.Abs.Attribute -pAttribute = fmap snd . pAttribute_internal - -pListAttribute :: [Token] -> Err [Language.EO.Phi.Syntax.Abs.Attribute] -pListAttribute = fmap snd . pListAttribute_internal - -pDisp :: [Token] -> Err Language.EO.Phi.Syntax.Abs.Disp -pDisp = fmap snd . pDisp_internal - -pListDisp :: [Token] -> Err [Language.EO.Phi.Syntax.Abs.Disp] -pListDisp = fmap snd . pListDisp_internal -} - diff --git a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Print.hs.bak b/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Print.hs.bak deleted file mode 100644 index 53893f89d..000000000 --- a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Print.hs.bak +++ /dev/null @@ -1,214 +0,0 @@ --- File generated by the BNF Converter (bnfc 2.9.5). - -{-# LANGUAGE CPP #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE LambdaCase #-} -#if __GLASGOW_HASKELL__ <= 708 -{-# LANGUAGE OverlappingInstances #-} -#endif - --- | Pretty-printer for Language. - -module Language.EO.Phi.Syntax.Print where - -import Prelude - ( ($), (.) - , Bool(..), (==), (<) - , Int, Integer, Double, (+), (-), (*) - , String, (++) - , ShowS, showChar, showString - , all, elem, foldr, id, map, null, replicate, shows, span - ) -import Data.Char ( Char, isSpace ) -import qualified Language.EO.Phi.Syntax.Abs - --- | The top-level printing method. - -printTree :: Print a => a -> String -printTree = render . prt 0 - -type Doc = [ShowS] -> [ShowS] - -doc :: ShowS -> Doc -doc = (:) - -render :: Doc -> String -render d = rend 0 False (map ($ "") $ d []) "" - where - rend - :: Int -- ^ Indentation level. - -> Bool -- ^ Pending indentation to be output before next character? - -> [String] - -> ShowS - rend i p = \case - "[" :ts -> char '[' . rend i False ts - "(" :ts -> char '(' . rend i False ts - "{" :ts -> onNewLine i p . showChar '{' . new (i+1) ts - "}" : ";":ts -> onNewLine (i-1) p . showString "};" . new (i-1) ts - "}" :ts -> onNewLine (i-1) p . showChar '}' . new (i-1) ts - [";"] -> char ';' - ";" :ts -> char ';' . new i ts - t : ts@(s:_) | closingOrPunctuation s - -> pending . showString t . rend i False ts - t :ts -> pending . space t . rend i False ts - [] -> id - where - -- Output character after pending indentation. - char :: Char -> ShowS - char c = pending . showChar c - - -- Output pending indentation. - pending :: ShowS - pending = if p then indent i else id - - -- Indentation (spaces) for given indentation level. - indent :: Int -> ShowS - indent i = replicateS (2*i) (showChar ' ') - - -- Continue rendering in new line with new indentation. - new :: Int -> [String] -> ShowS - new j ts = showChar '\n' . rend j True ts - - -- Make sure we are on a fresh line. - onNewLine :: Int -> Bool -> ShowS - onNewLine i p = (if p then id else showChar '\n') . indent i - - -- Separate given string from following text by a space (if needed). - space :: String -> ShowS - space t s = - case (all isSpace t, null spc, null rest) of - (True , _ , True ) -> [] -- remove trailing space - (False, _ , True ) -> t -- remove trailing space - (False, True, False) -> t ++ ' ' : s -- add space if none - _ -> t ++ s - where - (spc, rest) = span isSpace s - - closingOrPunctuation :: String -> Bool - closingOrPunctuation [c] = c `elem` closerOrPunct - closingOrPunctuation _ = False - - closerOrPunct :: String - closerOrPunct = ")],;" - -parenth :: Doc -> Doc -parenth ss = doc (showChar '(') . ss . doc (showChar ')') - -concatS :: [ShowS] -> ShowS -concatS = foldr (.) id - -concatD :: [Doc] -> Doc -concatD = foldr (.) id - -replicateS :: Int -> ShowS -> ShowS -replicateS n f = concatS (replicate n f) - --- | The printer class does the job. - -class Print a where - prt :: Int -> a -> Doc - -instance {-# OVERLAPPABLE #-} Print a => Print [a] where - prt i = concatD . map (prt i) - -instance Print Char where - prt _ c = doc (showChar '\'' . mkEsc '\'' c . showChar '\'') - -instance Print String where - prt _ = printString - -printString :: String -> Doc -printString s = doc (showChar '"' . concatS (map (mkEsc '"') s) . showChar '"') - -mkEsc :: Char -> Char -> ShowS -mkEsc q = \case - s | s == q -> showChar '\\' . showChar s - '\\' -> showString "\\\\" - '\n' -> showString "\\n" - '\t' -> showString "\\t" - s -> showChar s - -prPrec :: Int -> Int -> Doc -> Doc -prPrec i j = if j < i then parenth else id - -instance Print Integer where - prt _ x = doc (shows x) - -instance Print Double where - prt _ x = doc (shows x) - -instance Print Language.EO.Phi.Syntax.Abs.Bytes where - prt _ (Language.EO.Phi.Syntax.Abs.Bytes i) = doc $ showString i -instance Print Language.EO.Phi.Syntax.Abs.Function where - prt _ (Language.EO.Phi.Syntax.Abs.Function i) = doc $ showString i -instance Print Language.EO.Phi.Syntax.Abs.LabelId where - prt _ (Language.EO.Phi.Syntax.Abs.LabelId i) = doc $ showString i -instance Print Language.EO.Phi.Syntax.Abs.AlphaIndex where - prt _ (Language.EO.Phi.Syntax.Abs.AlphaIndex i) = doc $ showString i -instance Print (Language.EO.Phi.Syntax.Abs.Program' a) where - prt i = \case - Language.EO.Phi.Syntax.Abs.Program _ bindings -> prPrec i 0 (concatD [doc (showString "{"), prt 0 bindings, doc (showString "}")]) - -instance Print (Language.EO.Phi.Syntax.Abs.Object' a) where - prt i = \case - Language.EO.Phi.Syntax.Abs.Formation _ bindings -> prPrec i 0 (concatD [doc (showString "{"), prt 0 bindings, doc (showString "}")]) - Language.EO.Phi.Syntax.Abs.Application _ abstractobject bindings bindingss -> prPrec i 0 (concatD [prt 0 abstractobject, doc (showString "{"), prt 0 bindings, doc (showString "}"), prt 0 bindingss]) - Language.EO.Phi.Syntax.Abs.Dispatch _ dispatch -> prPrec i 0 (concatD [prt 0 dispatch]) - Language.EO.Phi.Syntax.Abs.Termination _ -> prPrec i 0 (concatD [doc (showString "\8869")]) - -instance Print (Language.EO.Phi.Syntax.Abs.AbstractObject' a) where - prt i = \case - Language.EO.Phi.Syntax.Abs.AbstractFormation _ bindings -> prPrec i 0 (concatD [doc (showString "{"), prt 0 bindings, doc (showString "}")]) - Language.EO.Phi.Syntax.Abs.AbstractDispatch _ dispatch -> prPrec i 0 (concatD [prt 0 dispatch]) - Language.EO.Phi.Syntax.Abs.AbstractTermination _ -> prPrec i 0 (concatD [doc (showString "\8869")]) - -instance Print (Language.EO.Phi.Syntax.Abs.DispatchedObject' a) where - prt i = \case - Language.EO.Phi.Syntax.Abs.DispatchedFormation _ bindings -> prPrec i 0 (concatD [doc (showString "{"), prt 0 bindings, doc (showString "}")]) - Language.EO.Phi.Syntax.Abs.DispatchedTermination _ -> prPrec i 0 (concatD [doc (showString "\8869")]) - -instance Print (Language.EO.Phi.Syntax.Abs.Binding' a) where - prt i = \case - Language.EO.Phi.Syntax.Abs.EmptyBinding _ attribute -> prPrec i 0 (concatD [prt 0 attribute, doc (showString "\8614"), doc (showString "\8709")]) - Language.EO.Phi.Syntax.Abs.DeltaBinding _ bytes -> prPrec i 0 (concatD [doc (showString "\916"), doc (showString "\10509"), prt 0 bytes]) - Language.EO.Phi.Syntax.Abs.LambdaBinding _ -> prPrec i 0 (concatD [doc (showString "\955"), doc (showString "\10509")]) - -instance Print [Language.EO.Phi.Syntax.Abs.Binding' a] where - prt _ [] = concatD [] - prt _ [x] = concatD [prt 0 x] - prt _ (x:xs) = concatD [prt 0 x, doc (showString ","), prt 0 xs] - -instance Print (Language.EO.Phi.Syntax.Abs.Bindings' a) where - prt i = \case - Language.EO.Phi.Syntax.Abs.Bindings _ bindings -> prPrec i 0 (concatD [doc (showString "{"), prt 0 bindings, doc (showString "}")]) - -instance Print [Language.EO.Phi.Syntax.Abs.Bindings' a] where - prt _ [] = concatD [] - prt _ (x:xs) = concatD [prt 0 x, prt 0 xs] - -instance Print (Language.EO.Phi.Syntax.Abs.Dispatch' a) where - prt i = \case - Language.EO.Phi.Syntax.Abs.HomeDispatch _ attributes disps -> prPrec i 0 (concatD [doc (showString "\934"), doc (showString "."), prt 0 attributes, prt 0 disps]) - Language.EO.Phi.Syntax.Abs.ThisDispatch _ attributes disps -> prPrec i 0 (concatD [doc (showString "\958"), doc (showString "."), prt 0 attributes, prt 0 disps]) - -instance Print (Language.EO.Phi.Syntax.Abs.Attribute' a) where - prt i = \case - Language.EO.Phi.Syntax.Abs.Phi _ -> prPrec i 0 (concatD [doc (showString "\966")]) - Language.EO.Phi.Syntax.Abs.Rho _ -> prPrec i 0 (concatD [doc (showString "\961")]) - Language.EO.Phi.Syntax.Abs.Sigma _ -> prPrec i 0 (concatD [doc (showString "\963")]) - Language.EO.Phi.Syntax.Abs.VTX _ -> prPrec i 0 (concatD [doc (showString "\957")]) - Language.EO.Phi.Syntax.Abs.Label _ labelid -> prPrec i 0 (concatD [prt 0 labelid]) - Language.EO.Phi.Syntax.Abs.Alpha _ alphaindex -> prPrec i 0 (concatD [prt 0 alphaindex]) - -instance Print [Language.EO.Phi.Syntax.Abs.Attribute' a] where - prt _ [] = concatD [] - prt _ [x] = concatD [prt 0 x] - prt _ (x:xs) = concatD [prt 0 x, doc (showString "."), prt 0 xs] - -instance Print (Language.EO.Phi.Syntax.Abs.Disp' a) where - prt i = \case - Language.EO.Phi.Syntax.Abs.Disp _ bindings1 bindings2 attributes -> prPrec i 0 (concatD [doc (showString "{"), prt 0 bindings1, doc (showString "}"), prt 0 bindings2, doc (showString "."), prt 0 attributes]) - -instance Print [Language.EO.Phi.Syntax.Abs.Disp' a] where - prt _ [] = concatD [] - prt _ (x:xs) = concatD [prt 0 x, prt 0 xs] diff --git a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Skel.hs.bak b/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Skel.hs.bak deleted file mode 100644 index 5c0ec9611..000000000 --- a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Skel.hs.bak +++ /dev/null @@ -1,82 +0,0 @@ --- File generated by the BNF Converter (bnfc 2.9.5). - --- Templates for pattern matching on abstract syntax - -{-# OPTIONS_GHC -fno-warn-unused-matches #-} - -module Language.EO.Phi.Syntax.Skel where - -import Prelude (($), Either(..), String, (++), Show, show) -import qualified Language.EO.Phi.Syntax.Abs - -type Err = Either String -type Result = Err String - -failure :: Show a => a -> Result -failure x = Left $ "Undefined case: " ++ show x - -transBytes :: Language.EO.Phi.Syntax.Abs.Bytes -> Result -transBytes x = case x of - Language.EO.Phi.Syntax.Abs.Bytes string -> failure x - -transFunction :: Language.EO.Phi.Syntax.Abs.Function -> Result -transFunction x = case x of - Language.EO.Phi.Syntax.Abs.Function string -> failure x - -transLabelId :: Language.EO.Phi.Syntax.Abs.LabelId -> Result -transLabelId x = case x of - Language.EO.Phi.Syntax.Abs.LabelId string -> failure x - -transAlphaIndex :: Language.EO.Phi.Syntax.Abs.AlphaIndex -> Result -transAlphaIndex x = case x of - Language.EO.Phi.Syntax.Abs.AlphaIndex string -> failure x - -transProgram :: Show a => Language.EO.Phi.Syntax.Abs.Program' a -> Result -transProgram x = case x of - Language.EO.Phi.Syntax.Abs.Program _ bindings -> failure x - -transObject :: Show a => Language.EO.Phi.Syntax.Abs.Object' a -> Result -transObject x = case x of - Language.EO.Phi.Syntax.Abs.Formation _ bindings -> failure x - Language.EO.Phi.Syntax.Abs.Application _ abstractobject bindings bindingss -> failure x - Language.EO.Phi.Syntax.Abs.Dispatch _ dispatch -> failure x - Language.EO.Phi.Syntax.Abs.Termination _ -> failure x - -transAbstractObject :: Show a => Language.EO.Phi.Syntax.Abs.AbstractObject' a -> Result -transAbstractObject x = case x of - Language.EO.Phi.Syntax.Abs.AbstractFormation _ bindings -> failure x - Language.EO.Phi.Syntax.Abs.AbstractDispatch _ dispatch -> failure x - Language.EO.Phi.Syntax.Abs.AbstractTermination _ -> failure x - -transDispatchedObject :: Show a => Language.EO.Phi.Syntax.Abs.DispatchedObject' a -> Result -transDispatchedObject x = case x of - Language.EO.Phi.Syntax.Abs.DispatchedFormation _ bindings -> failure x - Language.EO.Phi.Syntax.Abs.DispatchedTermination _ -> failure x - -transBinding :: Show a => Language.EO.Phi.Syntax.Abs.Binding' a -> Result -transBinding x = case x of - Language.EO.Phi.Syntax.Abs.EmptyBinding _ attribute -> failure x - Language.EO.Phi.Syntax.Abs.DeltaBinding _ bytes -> failure x - Language.EO.Phi.Syntax.Abs.LambdaBinding _ -> failure x - -transBindings :: Show a => Language.EO.Phi.Syntax.Abs.Bindings' a -> Result -transBindings x = case x of - Language.EO.Phi.Syntax.Abs.Bindings _ bindings -> failure x - -transDispatch :: Show a => Language.EO.Phi.Syntax.Abs.Dispatch' a -> Result -transDispatch x = case x of - Language.EO.Phi.Syntax.Abs.HomeDispatch _ attributes disps -> failure x - Language.EO.Phi.Syntax.Abs.ThisDispatch _ attributes disps -> failure x - -transAttribute :: Show a => Language.EO.Phi.Syntax.Abs.Attribute' a -> Result -transAttribute x = case x of - Language.EO.Phi.Syntax.Abs.Phi _ -> failure x - Language.EO.Phi.Syntax.Abs.Rho _ -> failure x - Language.EO.Phi.Syntax.Abs.Sigma _ -> failure x - Language.EO.Phi.Syntax.Abs.VTX _ -> failure x - Language.EO.Phi.Syntax.Abs.Label _ labelid -> failure x - Language.EO.Phi.Syntax.Abs.Alpha _ alphaindex -> failure x - -transDisp :: Show a => Language.EO.Phi.Syntax.Abs.Disp' a -> Result -transDisp x = case x of - Language.EO.Phi.Syntax.Abs.Disp _ bindings1 bindings2 attributes -> failure x diff --git a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Test.hs.bak b/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Test.hs.bak deleted file mode 100644 index b93523a56..000000000 --- a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Test.hs.bak +++ /dev/null @@ -1,76 +0,0 @@ --- File generated by the BNF Converter (bnfc 2.9.5). - --- | Program to test parser. - -module Main where - -import Prelude - ( ($), (.) - , Either(..) - , Int, (>) - , String, (++), concat, unlines - , Show, show - , IO, (>>), (>>=), mapM_, putStrLn - , FilePath - , getContents, readFile - ) -import System.Environment ( getArgs ) -import System.Exit ( exitFailure ) -import Control.Monad ( when ) - -import Language.EO.Phi.Syntax.Abs () -import Language.EO.Phi.Syntax.Lex ( Token, mkPosToken ) -import Language.EO.Phi.Syntax.Par ( pAbstractObject, myLexer ) -import Language.EO.Phi.Syntax.Print ( Print, printTree ) -import Language.EO.Phi.Syntax.Skel () - -type Err = Either String -type ParseFun a = [Token] -> Err a -type Verbosity = Int - -putStrV :: Verbosity -> String -> IO () -putStrV v s = when (v > 1) $ putStrLn s - -runFile :: (Print a, Show a) => Verbosity -> ParseFun a -> FilePath -> IO () -runFile v p f = putStrLn f >> readFile f >>= run v p - -run :: (Print a, Show a) => Verbosity -> ParseFun a -> String -> IO () -run v p s = - case p ts of - Left err -> do - putStrLn "\nParse Failed...\n" - putStrV v "Tokens:" - mapM_ (putStrV v . showPosToken . mkPosToken) ts - putStrLn err - exitFailure - Right tree -> do - putStrLn "\nParse Successful!" - showTree v tree - where - ts = myLexer s - showPosToken ((l,c),t) = concat [ show l, ":", show c, "\t", show t ] - -showTree :: (Show a, Print a) => Int -> a -> IO () -showTree v tree = do - putStrV v $ "\n[Abstract Syntax]\n\n" ++ show tree - putStrV v $ "\n[Linearized tree]\n\n" ++ printTree tree - -usage :: IO () -usage = do - putStrLn $ unlines - [ "usage: Call with one of the following argument combinations:" - , " --help Display this help message." - , " (no arguments) Parse stdin verbosely." - , " (files) Parse content of files verbosely." - , " -s (files) Silent mode. Parse content of files silently." - ] - -main :: IO () -main = do - args <- getArgs - case args of - ["--help"] -> usage - [] -> getContents >>= run 2 pAbstractObject - "-s":fs -> mapM_ (runFile 0 pAbstractObject) fs - fs -> mapM_ (runFile 2 pAbstractObject) fs -