Sdf2HaskellContentsIndex
SdfLib
Portability portable
Stability experimental
Maintainer Joost Visser
Contents
Collect specific elements from grammars
Select subelements from specific grammar elements
Test for properties of specific elements
Conversion helpers
Description
This module is part of Sdf2Haskell, a tool for generating Haskell code from an SDF grammar. This module contains functions for manipulating SDF terms.
Synopsis
collectLexSorts :: SDF -> [Symbol]
collectCfSorts :: SDF -> [Symbol]
collectProductions :: SDF -> [Production]
getSyms :: Production -> [Symbol]
getSort :: Production -> Symbol
getAttributes :: Production -> Attributes
getConsAttr :: Attributes -> Maybe String
getProds :: Productions -> [Production]
isRejectOrBracket :: Production -> Bool
dequote :: String -> String
module Sdf
Collect specific elements from grammars
collectLexSorts :: SDF -> [Symbol]
Collect all lexically defined sorts from an SDF grammar.
collectCfSorts :: SDF -> [Symbol]
Collect all defined context-free symbols from an SDF grammar.
collectProductions :: SDF -> [Production]
Collect all context-free productions from an SDF grammar.
Select subelements from specific grammar elements
getSyms :: Production -> [Symbol]
Obtain the argument symbols from a production.
getSort :: Production -> Symbol
Obtain the result sort from a production.
getAttributes :: Production -> Attributes
Obtain the attributes of a production
getConsAttr :: Attributes -> Maybe String
Obtain the constructor attribute from an attribute list, if it exists.
getProds :: Productions -> [Production]
Get list of productions from Productions.
Test for properties of specific elements
isRejectOrBracket :: Production -> Bool
Test whether production has reject or bracket attributes.
Conversion helpers
dequote :: String -> String
Turn a quoted literal into a non-quoted string
module Sdf
Produced by Haddock version 0.6