module OperatorGraph where

import qualified Data.Graph.Inductive as Graph

type OperatorGraph = Graph.Gr Operator Integer

data Associativity
  = LeftAssoc
  | RightAssoc
  | NoneAssoc
  deriving (Show, Eq, Enum, Read)

data Fixity
  = Prefix
  | Postfix
  | Infix
  | Closed
  deriving (Show, Eq, Enum, Read)

data Operator
  = Operator { fixity        :: Fixity,
               associativity :: Associativity,
               symbols       :: [String],
               opNodeID      :: Graph.Node }
  deriving (Show, Eq)
