Safe Haskell | None |
---|---|
Language | Haskell98 |
Language.Java.Parser
- type P = Parsec [L Token] ()
- data ParseError :: *
- class Parsable l where
- parseCompilationUnit :: String -> Either ParseError (CompilationUnitNode Segment)
- parser :: P a -> String -> Either ParseError a
- parserS :: P (a Segment) -> String -> Either ParseError (a Segment)
- compilationUnitNode :: Parsable l => P (CompilationUnitNode l)
- compilationUnit :: Parsable l => P (CompilationUnit l)
- packageDeclParser :: Parsable l => P (PackageDecl l)
- importDecl :: Parsable l => P (ImportDecl l)
- typeDeclParser :: Parsable l => P (Maybe (TypeDeclNode l))
- classDeclParser :: Parsable l => P (Mod l (ClassDeclNode l))
- interfaceDeclParser :: Parsable l => P (Mod l (InterfaceDecl l))
- memberDecl :: Parsable l => P (Mod l (MemberDeclNode l))
- fieldDecl :: Parsable l => P (Mod l (FieldDecl l))
- methodDecl :: Parsable l => P (Mod l (MethodDecl l))
- constrDecl :: Parsable l => P (Mod l (ConstructorDecl l))
- interfaceMemberDecl :: Parsable l => P (Mod l (MemberDeclNode l))
- absMethodDecl :: Parsable l => P (Mod l (MethodDecl l))
- formalParams :: Parsable l => P [FormalParam l]
- formalParam :: Parsable l => P (FormalParam l)
- modifier :: Parsable l => P (Modifier l)
- varDecls :: Parsable l => P [VarDecl l]
- varDecl :: Parsable l => P (VarDecl l)
- blockParser :: Parsable l => P (Block l)
- blockStmt :: Parsable l => P (BlockStmtNode l)
- stmt :: Parsable l => P (StmtNode l)
- stmtExp :: Parsable l => P (ExpNode l)
- expParser :: Parsable l => P (ExpNode l)
- primaryParser :: Parsable l => P (ExpNode l)
- literalParser :: P Literal
- ttype :: P Type
- primType :: P PrimType
- refType :: P RefType
- classType :: P ClassType
- resultType :: P (Maybe Type)
- typeDeclSpecifier :: P TypeDeclSpecifier
- lambdaExp :: Parsable l => P (ExpNode l)
- methodRef :: Parsable l => P (ExpNode l)
- typeParams :: P [TypeParam]
- typeParam :: P TypeParam
- name :: P Name
- ident :: P Ident
- empty :: P ()
- list :: P a -> P [a]
- list1 :: P a -> P [a]
- seplist :: P a -> P sep -> P [a]
- seplist1 :: P a -> P sep -> P [a]
- opt :: P a -> P (Maybe a)
- bopt :: P a -> P Bool
- lopt :: P [a] -> P [a]
- comma :: P ()
- semiColon :: P ()
- period :: P ()
- colon :: P ()
Documentation
data ParseError :: * #
The abstract data type ParseError
represents parse errors. It
provides the source position (SourcePos
) of the error
and a list of error messages (Message
). A ParseError
can be returned by the function parse
. ParseError
is an
instance of the Show
and Eq
classes.
Instances
compilationUnitNode :: Parsable l => P (CompilationUnitNode l) Source #
compilationUnit :: Parsable l => P (CompilationUnit l) Source #
packageDeclParser :: Parsable l => P (PackageDecl l) Source #
importDecl :: Parsable l => P (ImportDecl l) Source #
typeDeclParser :: Parsable l => P (Maybe (TypeDeclNode l)) Source #
classDeclParser :: Parsable l => P (Mod l (ClassDeclNode l)) Source #
interfaceDeclParser :: Parsable l => P (Mod l (InterfaceDecl l)) Source #
memberDecl :: Parsable l => P (Mod l (MemberDeclNode l)) Source #
methodDecl :: Parsable l => P (Mod l (MethodDecl l)) Source #
constrDecl :: Parsable l => P (Mod l (ConstructorDecl l)) Source #
interfaceMemberDecl :: Parsable l => P (Mod l (MemberDeclNode l)) Source #
absMethodDecl :: Parsable l => P (Mod l (MethodDecl l)) Source #
formalParams :: Parsable l => P [FormalParam l] Source #
formalParam :: Parsable l => P (FormalParam l) Source #
literalParser :: P Literal Source #
typeParams :: P [TypeParam] Source #