-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Parser and Pretty Printer for the Web IDL Language
--
-- Web IDL is a dialect of OMG IDL used by the Web App group to specify
-- component interfaces of Web applications. See also:
--
-- http://www.w3.org/TR/WebIDL/ - working draft of the
-- specification
--
-- http://www.w3.org/2008/webapps/wiki/Main_Page - Web App group
-- wiki
--
-- http://code.google.com/p/es-operating-system/ - an experimental
-- Google - Nintendo project from which the lexer/parser files for Web
-- IDL are borrowed.
--
-- The package provides a Web IDL parsing/pretty-printing library, and
-- the two executable programs:
--
--
-- - idltestlex: a debugging program which reads a Web IDL
-- source from its standard input, and prints the list of tokens in raw
-- format, as returned from the lexer.
-- - idlppr: a debugging program which reads a Web IDL source
-- from its standard input, parses, and pretty-prints it on its standard
-- output. Non-JavaDoc comments, and preprocessor directives that the
-- input might contain will not appear in the output. The program may be
-- used to test the parser and pretty printer in the way that when
-- idlppr reads a pretty-printed Web IDL source, the output
-- should be identical to the input.
--
@package webidl
@version 0.1
-- | Web IDL syntax representation. It is built based on the original
-- yacc/bison parser found in the es-operating-system project. The source
-- of the original parser (written in C++) is located here:
--
--
-- http://es-operating-system.googlecode.com/svn/trunk/esidl/src/parser.yy
module Language.WebIDL.Syntax
type IDLSpecification = [IDLDefinition]
newtype JavaDoc
JavaDoc :: String -> JavaDoc
data IDLDefinition
IDLDefinition :: SourcePos -> JavaDoc -> IDLDef -> IDLDefinition
data IDLDef
IDLDefModule :: String -> [IDLExtAttr] -> [IDLDefinition] -> IDLDef
IDLDefInterface :: String -> [IDLExtAttr] -> [IDLScopedName] -> (Maybe IDLInterfaceBody) -> IDLDef
IDLDefExcept :: IDLExceptDcl -> IDLDef
IDLDefType :: IDLTypeDcl -> IDLDef
IDLDefConst :: IDLConstDcl -> IDLDef
IDLDefValue :: String -> (Maybe IDLTypeSpec) -> IDLDef
IDLDefPP :: IDLDef
data IDLScopedName
IDLScopedName :: [String] -> IDLScopedName
data IDLExtAttr
IDLExtAttr :: JavaDoc -> String -> (Maybe IDLExtAttrDetails) -> IDLExtAttr
data IDLExtAttrDetails
IDLDetailSN :: IDLScopedName -> IDLExtAttrDetails
IDLDetailID :: String -> [IDLParamDcl] -> IDLExtAttrDetails
IDLDetailPD :: [IDLParamDcl] -> IDLExtAttrDetails
data IDLParamAttr
IDLParamIn :: IDLParamAttr
IDLParamOut :: IDLParamAttr
IDLParamInOut :: IDLParamAttr
data IDLParamTypeSpec
IDLParamBaseSpec :: IDLBaseTypeSpec -> IDLParamTypeSpec
IDLParamStringSpec :: IDLStringType -> IDLParamTypeSpec
IDLParamScopedSpec :: IDLScopedName -> IDLParamTypeSpec
IDLParamVoid :: IDLParamTypeSpec
data IDLBaseTypeSpec
IDLBaseTypeFloat :: IDLFloatingType -> IDLBaseTypeSpec
IDLBaseTypeInt :: IDLIntegerType -> IDLBaseTypeSpec
IDLBaseTypeChar :: IDLBaseTypeSpec
IDLBaseTypeBool :: IDLBaseTypeSpec
IDLBaseTypeOctet :: IDLBaseTypeSpec
IDLBaseTypeAny :: IDLBaseTypeSpec
data IDLFloatingType
IDLFloat :: IDLFloatingType
IDLDouble :: IDLFloatingType
IDLLongDouble :: IDLFloatingType
data IDLIntegerType
IDLSigned :: IDLInteger -> IDLIntegerType
IDLUnsigned :: IDLInteger -> IDLIntegerType
data IDLInteger
IDLShortInt :: IDLInteger
IDLLongInt :: IDLInteger
IDLLongLongInt :: IDLInteger
data IDLInterfaceBody
IDLInterfaceBody :: [IDLExport] -> IDLInterfaceBody
data IDLExport
IDLExport :: SourcePos -> JavaDoc -> IDLExp -> IDLExport
data IDLExp
IDLExpType :: IDLTypeDcl -> IDLExp
IDLExpConst :: IDLConstDcl -> IDLExp
IDLExpExcept :: IDLExceptDcl -> IDLExp
IDLExpAttr :: IDLAttrDcl -> IDLExp
IDLExpOp :: IDLOpDcl -> IDLExp
IDLExpPP :: IDLExp
data IDLTypeDcl
IDLTypeDef :: IDLTypeSpec -> [IDLDeclarator] -> IDLTypeDcl
IDLNative :: String -> IDLTypeDcl
IDLStruct :: IDLStructType -> IDLTypeDcl
IDLConstrFwd :: String -> IDLTypeDcl
data IDLTypeSpec
IDLSimpleSpec :: IDLSimpleTypeSpec -> IDLTypeSpec
IDLStructSpec :: IDLStructType -> IDLTypeSpec
data IDLSimpleTypeSpec
IDLSimpleBase :: IDLBaseTypeSpec -> IDLSimpleTypeSpec
IDLSimpleTmpl :: IDLTemplateTypeSpec -> IDLSimpleTypeSpec
IDLSimpleScoped :: IDLScopedName -> IDLSimpleTypeSpec
data IDLTemplateTypeSpec
IDLTmplSequence :: IDLSequenceType -> IDLTemplateTypeSpec
IDLTmplString :: IDLStringType -> IDLTemplateTypeSpec
IDLTmplFixed :: IDLFixedType -> IDLTemplateTypeSpec
data IDLSequenceType
IDLSequenceType :: IDLSimpleTypeSpec -> (Maybe IDLConstExp) -> IDLSequenceType
data IDLStringType
IDLStringType :: (Maybe IDLConstExp) -> IDLStringType
data IDLFixedType
IDLFixedType :: IDLConstExp -> IDLConstExp -> IDLFixedType
data IDLStructType
IDLStructType :: String -> [IDLMember] -> IDLStructType
data IDLMember
IDLMember :: IDLTypeSpec -> [IDLDeclarator] -> IDLMember
data IDLConstDcl
IDLConstDcl :: IDLConstType -> String -> IDLConstExp -> IDLConstDcl
data IDLConstType
IDLConstTypeFloat :: IDLFloatingType -> IDLConstType
IDLConstTypeInt :: IDLIntegerType -> IDLConstType
IDLConstTypeString :: IDLStringType -> IDLConstType
IDLConstTypeChar :: IDLConstType
IDLConstTypeBool :: IDLConstType
IDLConstTypeFixed :: IDLConstType
IDLConstTypeOctet :: IDLConstType
IDLConstTypeScoped :: IDLScopedName -> IDLConstType
data IDLExceptDcl
IDLExceptDcl :: String -> [IDLMember] -> IDLExceptDcl
data IDLAttrDcl
IDLAttrDcl :: [IDLExtAttr] -> Bool -> IDLParamTypeSpec -> String -> [IDLScopedName] -> [IDLScopedName] -> IDLAttrDcl
data IDLOpDcl
IDLOpDcl :: [IDLExtAttr] -> (Maybe IDLOpAttr) -> IDLParamTypeSpec -> String -> [IDLParamDcl] -> [IDLScopedName] -> IDLOpDcl
data IDLOpAttr
IDLOneWay :: IDLOpAttr
data IDLParamDcl
IDLParamDcl :: [IDLExtAttr] -> IDLParamAttr -> IDLParamTypeSpec -> String -> IDLParamDcl
data IDLDeclarator
IDLSimpleDecl :: String -> IDLDeclarator
IDLComplexDecl :: IDLArrayDeclarator -> IDLDeclarator
data IDLArrayDeclarator
IDLArrayDeclarator :: String -> [IDLConstExp] -> IDLArrayDeclarator
data IDLConstExp
IDLBinExp :: IDLBinaryOp -> IDLConstExp -> IDLConstExp -> IDLConstExp
IDLUnaryExp :: IDLUnaryOp -> IDLConstExp -> IDLConstExp
IDLPrimScoped :: IDLScopedName -> IDLConstExp
IDLPrimLit :: IDLLiteral -> IDLConstExp
IDLParenExp :: IDLConstExp -> IDLConstExp
data IDLBinaryOp
IDLOr :: IDLBinaryOp
IDLXor :: IDLBinaryOp
IDLAnd :: IDLBinaryOp
IDLShiftL :: IDLBinaryOp
IDLShiftR :: IDLBinaryOp
IDLAdd :: IDLBinaryOp
IDLSub :: IDLBinaryOp
IDLMult :: IDLBinaryOp
IDLDiv :: IDLBinaryOp
IDLRem :: IDLBinaryOp
data IDLUnaryOp
IDLPos :: IDLUnaryOp
IDLNeg :: IDLUnaryOp
IDLNot :: IDLUnaryOp
data IDLLiteral
IDLIntLit :: String -> IDLLiteral
IDLStringLit :: String -> IDLLiteral
IDLCharLit :: String -> IDLLiteral
IDLFixedLit :: String -> IDLLiteral
IDLFloatLit :: String -> IDLLiteral
IDLBoolLit :: String -> IDLLiteral
instance Show IDLLiteral
instance Show IDLUnaryOp
instance Show IDLBinaryOp
instance Show IDLConstExp
instance Show IDLArrayDeclarator
instance Show IDLDeclarator
instance Show IDLParamDcl
instance Show IDLOpAttr
instance Show IDLOpDcl
instance Show IDLAttrDcl
instance Show IDLExceptDcl
instance Show IDLConstType
instance Show IDLConstDcl
instance Show IDLMember
instance Show IDLStructType
instance Show IDLFixedType
instance Show IDLStringType
instance Show IDLSequenceType
instance Show IDLTemplateTypeSpec
instance Show IDLSimpleTypeSpec
instance Show IDLTypeSpec
instance Show IDLTypeDcl
instance Show IDLExp
instance Show IDLExport
instance Show IDLInterfaceBody
instance Show IDLInteger
instance Show IDLIntegerType
instance Show IDLFloatingType
instance Show IDLBaseTypeSpec
instance Show IDLParamTypeSpec
instance Show IDLParamAttr
instance Show IDLExtAttrDetails
instance Show IDLExtAttr
instance Show IDLScopedName
instance Show IDLDef
instance Show IDLDefinition
instance Show JavaDoc
-- | Pretty printer for the IDL parsed syntax.
module Language.WebIDL.PrettyPrint
-- | Pretty print a parsed IDL specification.
prettyPrint :: IDLSpecification -> String
-- | FFI access to the WebIDL lexer from the es-operating-system project.
module Language.WebIDL.Lexer
-- | Data type to represent IDL tokens.
data Token
Token :: Int -> Int -> Int -> String -> Token
-- | whatever yylex() returns
tag :: Token -> Int
-- | starting line
line :: Token -> Int
-- | starting column
column :: Token -> Int
-- | token value or an empty string
name :: Token -> String
-- | Get a token from the lexer. Upon EOF, token with tag 0 will be
-- returned.
pickToken :: IO Token
-- | Tokenize the standard input.
lexStdin :: IO [Token]
instance Show Token
-- | Parser of the tokenized IDL.
module Language.WebIDL.Parser
-- | Run the parser, return IDL definitions.
parseIDL :: [Token] -> Either ParseError IDLSpecification
-- | Re-export commonly used modules.
module Language.WebIDL