From: pimjager Date: Tue, 1 Mar 2016 10:14:42 +0000 (+0100) Subject: Comments nu mogelijk X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=3d1c57710eb0b86f13df392f03131157aec22c21;p=cc1516.git Comments nu mogelijk --- diff --git a/src/lex.icl b/src/lex.icl index e3c8484..fd4b564 100644 --- a/src/lex.icl +++ b/src/lex.icl @@ -20,6 +20,9 @@ lexProgram = some lexToken <* many (satisfy isSpace) <* eof lexToken :: Parser Char TokenValue lexToken = + //Comments + (list (fromString "//") >>| until top (item '\n') >>| lexToken) <|> + (list (fromString "/*") >>| until top (list (fromString "*/")) >>| lexToken) <|> //Keyword tokens (lexKw "var" VarToken) <|> (lexKw "Void" VoidToken) <|> @@ -41,8 +44,9 @@ lexToken = (lexOp "<=" LesserEqToken) <|> (lexOp ">=" GreaterEqToken) <|> (lexOp "==" EqualsToken) <|> (lexOp "&&" AmpersandsToken) <|> (lexOp "||" PipesToken) <|> (lexOp "[]" EmptyListToken) <|> - (lexOp "->" ArrowToken) <|> (lexOp "(" BraceOpenToken) <|> + (lexOp "->" ArrowToken) <|> //One char ops tokens + (lexOp "(" BraceOpenToken) <|> (lexOp ")" BraceCloseToken) <|> (lexOp "{" CBraceOpenToken) <|> (lexOp "}" CBraceCloseToken) <|> (lexOp "[" SquareOpenToken) <|> (lexOp "]" SquareCloseToken) <|> (lexOp "," CommaToken) <|> @@ -56,7 +60,7 @@ lexToken = (liftM (NumberToken o toInt o toString) $ some $ satisfy isDigit) <|> //Ident tokens (liftM IdentToken $ some $ satisfy isIdentChar) <|> - (satisfy isSpace >>| lexToken) //<|> + (satisfy isSpace >>| lexToken) // (eof >>| pure EndOfFileToken) where isIdentChar c = isAlphanum c || c == '_' diff --git a/src/main.prj b/src/main.prj index d7bf8d0..e181dc1 100644 --- a/src/main.prj +++ b/src/main.prj @@ -31,6 +31,7 @@ Global Link LinkMethod: Static GenerateRelocations: False + GenerateSymbolTable: False GenerateLinkMap: False LinkResources: False ResourceSource: @@ -364,8 +365,8 @@ OtherModules ReuseUniqueNodes: True Fusion: False Module - Name: Control.Applicative - Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent + Name: System.OS + Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Linux-64 Compiler NeverMemoryProfile: False NeverTimeProfile: False @@ -378,8 +379,8 @@ OtherModules ReuseUniqueNodes: True Fusion: False Module - Name: Control.Monad - Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent + Name: System.OS + Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Linux-64 Compiler NeverMemoryProfile: False NeverTimeProfile: False @@ -392,8 +393,8 @@ OtherModules ReuseUniqueNodes: True Fusion: False Module - Name: Data.Either - Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent + Name: Control.Applicative + Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent Compiler NeverMemoryProfile: False NeverTimeProfile: False @@ -406,8 +407,8 @@ OtherModules ReuseUniqueNodes: True Fusion: False Module - Name: Data.Func - Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent + Name: Control.Monad + Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent Compiler NeverMemoryProfile: False NeverTimeProfile: False @@ -420,8 +421,8 @@ OtherModules ReuseUniqueNodes: True Fusion: False Module - Name: Data.Functor - Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent + Name: Data.Either + Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent Compiler NeverMemoryProfile: False NeverTimeProfile: False @@ -434,8 +435,8 @@ OtherModules ReuseUniqueNodes: True Fusion: False Module - Name: Data.List - Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent + Name: Data.Func + Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent Compiler NeverMemoryProfile: False NeverTimeProfile: False @@ -448,8 +449,8 @@ OtherModules ReuseUniqueNodes: True Fusion: False Module - Name: Data.Maybe - Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent + Name: Data.Functor + Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent Compiler NeverMemoryProfile: False NeverTimeProfile: False @@ -462,8 +463,8 @@ OtherModules ReuseUniqueNodes: True Fusion: False Module - Name: Data.Monoid - Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent + Name: Data.List + Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent Compiler NeverMemoryProfile: False NeverTimeProfile: False @@ -476,8 +477,8 @@ OtherModules ReuseUniqueNodes: True Fusion: False Module - Name: Data.Void - Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent + Name: Data.Maybe + Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent Compiler NeverMemoryProfile: False NeverTimeProfile: False @@ -490,8 +491,8 @@ OtherModules ReuseUniqueNodes: True Fusion: False Module - Name: System.CommandLine - Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent + Name: Data.Monoid + Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent Compiler NeverMemoryProfile: False NeverTimeProfile: False @@ -504,8 +505,8 @@ OtherModules ReuseUniqueNodes: True Fusion: False Module - Name: System.IO - Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent + Name: Data.Void + Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent Compiler NeverMemoryProfile: False NeverTimeProfile: False @@ -518,8 +519,8 @@ OtherModules ReuseUniqueNodes: True Fusion: False Module - Name: System._Pointer - Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent + Name: System.CommandLine + Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent Compiler NeverMemoryProfile: False NeverTimeProfile: False @@ -532,8 +533,8 @@ OtherModules ReuseUniqueNodes: True Fusion: False Module - Name: Text - Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent + Name: System.IO + Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent Compiler NeverMemoryProfile: False NeverTimeProfile: False @@ -546,8 +547,8 @@ OtherModules ReuseUniqueNodes: True Fusion: False Module - Name: System.OS - Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Linux-64 + Name: System._Pointer + Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent Compiler NeverMemoryProfile: False NeverTimeProfile: False @@ -560,8 +561,8 @@ OtherModules ReuseUniqueNodes: True Fusion: False Module - Name: System.OS - Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Linux-64 + Name: Text + Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent Compiler NeverMemoryProfile: False NeverTimeProfile: False @@ -574,8 +575,8 @@ OtherModules ReuseUniqueNodes: True Fusion: False Module - Name: _SystemDynamic - Dir: {Application}/lib/iTasks-SDK/Patches/Dynamics + Name: StdMaybe + Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent/Deprecated/StdLib Compiler NeverMemoryProfile: False NeverTimeProfile: False @@ -588,8 +589,8 @@ OtherModules ReuseUniqueNodes: True Fusion: False Module - Name: GenEq - Dir: {Application}/lib/iTasks-SDK/Patches/Generics + Name: _SystemDynamic + Dir: {Application}/lib/iTasks-SDK/Patches/Dynamics Compiler NeverMemoryProfile: False NeverTimeProfile: False @@ -602,7 +603,7 @@ OtherModules ReuseUniqueNodes: True Fusion: False Module - Name: GenPrint + Name: GenEq Dir: {Application}/lib/iTasks-SDK/Patches/Generics Compiler NeverMemoryProfile: False @@ -616,8 +617,8 @@ OtherModules ReuseUniqueNodes: True Fusion: False Module - Name: StdGeneric - Dir: {Application}/lib/iTasks-SDK/Patches/StdEnv + Name: GenPrint + Dir: {Application}/lib/iTasks-SDK/Patches/Generics Compiler NeverMemoryProfile: False NeverTimeProfile: False @@ -630,8 +631,8 @@ OtherModules ReuseUniqueNodes: True Fusion: False Module - Name: StdMaybe - Dir: {Application}/lib/iTasks-SDK/Server/lib + Name: StdGeneric + Dir: {Application}/lib/iTasks-SDK/Patches/StdEnv Compiler NeverMemoryProfile: False NeverTimeProfile: False