 | hets -- a heterogenous Specification (CASL) tool set | Contents | Index |
|
Common.Earley | Portability | portable | Stability | experimental | Maintainer | hets@tzi.de |
|
|
|
|
|
Description |
generic mixfix analysis
|
|
Synopsis |
|
|
|
|
special tokens for special ids |
|
varTok :: Token |
token for a fixed (or recursively resolved) argument expression |
|
exprTok :: Token |
token for a fixed (or recursively resolved) operator expression |
|
typeTok :: Token |
token for type annotations |
|
applId :: Id |
the invisible application rule with two places |
|
parenId :: Id |
parenthesis around one place |
|
typeId :: Id |
see typeTok |
|
exprId :: Id |
see exprTok |
|
varId :: Id |
see varTok |
|
tupleId :: Id |
id for tuples with at least two arguments |
|
unitId :: Id |
id for the emtpy tuple |
|
unknownId :: Id |
see unknownTok |
|
isUnknownId :: Id -> Bool |
test if an unknownId was matched |
|
unToken :: Id -> Token |
get unknown token from an unknownId |
|
type Knowns = Set String |
a set of strings that do not match a unknownTok |
|
mkId :: [Token] -> Id |
construct an Id from a token list |
|
protect :: Id -> Id |
interpret placeholders as literal places |
|
listRules :: b -> GlobalAnnos -> [(Id, b, [Token])] |
construct the list rules |
|
mixRule :: b -> Id -> (Id, b, [Token]) |
construct a rule for a mixfix |
|
getTokenPlaceList :: Id -> [Token] |
extract tokens with the non-terminal for places |
|
endPlace :: Id -> Bool |
Id ends with a place |
|
begPlace :: Id -> Bool |
Id starts with a place |
|
resolution chart |
|
data Chart a b |
the whole state for mixfix resolution | Instances | |
|
|
mixDiags :: [Diagnosis] -> Chart a b -> Chart a b |
add intermediate diagnostic messages |
|
type ToExpr a b = Id -> b -> [a] -> [Pos] -> a |
shortcut for a function that constructs an expression |
|
initChart :: [(Id, b, [Token])] -> Knowns -> Chart a b |
create the initial chart |
|
nextChart :: (a -> a -> a) -> (b -> b -> Maybe Bool) -> ToExpr a b -> GlobalAnnos -> Chart a b -> (a, Token) -> Chart a b |
make one scan, complete, and predict step.
The first function adds a type to the result.
The second function filters based on argument and operator info.
If filtering yields Nothing further filtering by precedence is applied. |
|
getResolved :: PosItem a => (a -> ShowS) -> Pos -> ToExpr a b -> Chart a b -> Result a |
extract resolved result |
|
Produced by Haddock version 0.6 |