Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CS320
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LARA
CS320
Commits
48ed9daf
Verified
Commit
48ed9daf
authored
3 weeks ago
by
Sankalp Gambhir
Browse files
Options
Downloads
Patches
Plain Diff
Correct lexing result ex 1.6
parent
75f86361
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
info/exercises/ex-01-sol.pdf
+0
-0
0 additions, 0 deletions
info/exercises/ex-01-sol.pdf
info/exercises/ex-01.pdf
+0
-0
0 additions, 0 deletions
info/exercises/ex-01.pdf
info/exercises/src/ex-01/ex/lexer.tex
+3
-4
3 additions, 4 deletions
info/exercises/src/ex-01/ex/lexer.tex
with
3 additions
and
4 deletions
info/exercises/ex-01-sol.pdf
+
0
−
0
View file @
48ed9daf
No preview for this file type
This diff is collapsed.
Click to expand it.
info/exercises/ex-01.pdf
+
0
−
0
View file @
48ed9daf
No preview for this file type
This diff is collapsed.
Click to expand it.
info/exercises/src/ex-01/ex/lexer.tex
+
3
−
4
View file @
48ed9daf
...
...
@@ -144,10 +144,9 @@ lexer drops any \texttt{skip} tokens.
There are many possible solutions. The key is to notice which tokens have
overlapping prefixes.
An example is
\texttt
{
letx1in
}
, which would be lexed as
\texttt
{
[keyword("let"), id("x1"), keyword("in")]
}
if we check acceptance in
order of priority, but as
\texttt
{
[id("letx1in")]
}
if we run them in
parallel.
An example is
\texttt
{
letx1
}
, which would be lexed as
\texttt
{
[keyword("let"), id("x1")]
}
if we check acceptance in order of
priority, but as
\texttt
{
[id("letx1")]
}
if we run them in parallel.
\end{solution}
\end{exercise}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment