Skip to content

dead link and spelling. #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions src/Example5/LexerUtil.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down