From 9f906631f76251ff619a98dd456e1cc506ed802d Mon Sep 17 00:00:00 2001 From: sijmen_v_b <64913742+sijmenvb@users.noreply.github.com> Date: Wed, 3 Apr 2024 01:05:58 +0200 Subject: [PATCH 1/2] updated (dead) link to the tutorial. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6fbf17a..f824075 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Write-You-A-Lexer is a project that implements a lexer for Python 3.9 version. This project has five `Example` folders. Each `Example` folder builds on the previous version. But, each `Example` folder can be run and tested indepenently. -This project is used in the tutorial [Alex By Example (Write-You-A-Python-Lexer)](https://devanla.com/posts/wya-lexer.html) and it can be understood by going through the tutorial. +This project is used in the tutorial [Alex By Example (Write-You-A-Python-Lexer)](https://gdevanla.github.io/posts/wya-lexer.html) and it can be understood by going through the tutorial. # Layout of the Project From bb72fa77a705df533a9ade807eaf122da0cc34cd Mon Sep 17 00:00:00 2001 From: sijmen_v_b <64913742+sijmenvb@users.noreply.github.com> Date: Wed, 3 Apr 2024 01:09:34 +0200 Subject: [PATCH 2/2] spelling LexerUtil.hs --- src/Example5/LexerUtil.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Example5/LexerUtil.hs b/src/Example5/LexerUtil.hs index 220eb88..e1805d8 100644 --- a/src/Example5/LexerUtil.hs +++ b/src/Example5/LexerUtil.hs @@ -249,7 +249,7 @@ startWhite inp inp_len = do is <- userStateIndentStack <$> alexGetUserState let cur = case is of c:_ -> c - _ -> error "Indentation stack is not set, alteast one element should be present. Empty list found" + _ -> error "Indentation stack is not set, at least one element should be present. Empty list found" parenDepth <- length . userStateParenStack <$> alexGetUserState let (AlexPosn _ line _, _, _,s) = inp @@ -266,7 +266,7 @@ startWhite inp inp_len = do | otherwise -> do -- at this point we have an indentation, but this -- indentation could starting on different line based on - -- preceding empty lines. For all precedin empty lines we + -- preceding empty lines. For all preceding empty lines we -- will insert an NL token let parts = L.map T.length . T.splitOn "\n" . T.pack . take inp_len $ s let pos = L.last parts + 1