| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
This module contains functions for manipulating SDF terms. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Synopsis | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
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. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
collectCfProductions :: SDF -> [Production] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Collect all context-free productions from an SDF grammar. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
collectProductions :: SDF -> [Production] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Collect all productions from an SDF grammar. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
collectProductionsKernel :: Term a => a -> [Production] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Collect all productions from an SDF grammar. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
collectLexProductions :: SDF -> [Production] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Collect all lexical productions from an SDF grammar. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
collectRanges :: SDF -> [CharRanges] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Collect ranges that are non-primitive, i.e. not of the form [c]. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
collectCfPriorities :: SDF -> [Priority] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Collect all Context-free priority sections. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
collectSortNames :: Term a => a -> [String] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Collect all sorts of an SDF grammar. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Transforming specific SDF parts | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
normalizeCharClass :: SDF -> SDF | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Normalize Character Classes | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
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. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
getSortName :: Symbol -> [String] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Get the sort name of an Sdf_sort or | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
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. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Check for properties of specific elements | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
isRejectOrBracket :: Production -> Bool | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Test whether production has reject or bracket attributes. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
isReject :: Production -> Bool | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Test whether production has reject attribute | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Conversion helpers | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
dequote :: String -> String | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Turn a quoted literal into a non-quoted string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
module Language.Sdf.Syntax | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
module Language.Sdf.SyntaxPP | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
module Language.Sdf.Pretty | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
module Language.Sdf.EqInstances | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
module Language.Sdf.OrdInstances | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
module Language.Sdf.ShowInstances | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
module Language.Sdf.ReadInstances | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
module Language.Sdf.TermInstances | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
module Language.Sdf.ATermInstances | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Produced by Haddock version 0.6 |