X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=lex.dcl;h=46c17135c5f21695a0e5d962a81cedb8d3588c43;hb=cbc9411e930abac7d85badaaf16c6d0f39a6bed5;hp=e78d495a938dfe2fe934934f3a2bc168333f4329;hpb=6b3981fb80952fe2c510b6f9b849adb0dff77d2c;p=cc1516.git diff --git a/lex.dcl b/lex.dcl index e78d495..46c1713 100644 --- a/lex.dcl +++ b/lex.dcl @@ -2,11 +2,9 @@ definition module lex from Data.Either import :: Either from yard import :: Error +from AST import :: Pos -:: Token = { - line :: Int, - column :: Int, - token :: TokenValue} +:: Token :== (Pos, TokenValue) :: TokenValue //Value tokens = IdentToken String // Identifier @@ -54,8 +52,6 @@ from yard import :: Error | LesserToken // < | BiggerToken // > | ExclamationToken // ! - //Special tokens - | EndOfFileToken // EOF :: LexerOutput :== Either Error [Token]