threaded lexer
This commit is contained in:
28
src/Rlp/Parse.y
Normal file
28
src/Rlp/Parse.y
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
module Rlp.Parse
|
||||
(
|
||||
)
|
||||
where
|
||||
import Rlp.Lex
|
||||
}
|
||||
|
||||
%name rlp
|
||||
%monad { P }
|
||||
%lexer { lexer } { Located _ TokenEOF }
|
||||
%error { parseError }
|
||||
%tokentype { Located RlpToken }
|
||||
|
||||
%token
|
||||
t { Located _ _ }
|
||||
|
||||
%%
|
||||
|
||||
P :: { () }
|
||||
P : { error "aa" }
|
||||
|
||||
{
|
||||
|
||||
parseError :: Located RlpToken -> P a
|
||||
parseError = error "aaaaah"
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user