Skip to content
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

Wrong first/follow? #20

Closed
Specy opened this issue Nov 11, 2024 · 1 comment · Fixed by #21
Closed

Wrong first/follow? #20

Specy opened this issue Nov 11, 2024 · 1 comment · Fixed by #21

Comments

@Specy
Copy link
Collaborator

Specy commented Nov 11, 2024

S->A B
A-> C
C-> D
D -> ''
B->'x'

This grammar produces follow/first table:

+--------+-----------+------------+
| Symbol | First Set | Follow Set |
+--------+-----------+------------+
| C      | { ε }     | { 'x' }    |
+--------+-----------+------------+
| D      | { ε }     | { 'x' }    |
+--------+-----------+------------+
| B      | { 'x' }   | { $ }      |
+--------+-----------+------------+
@Specy
Copy link
Collaborator Author

Specy commented Nov 11, 2024

Looking at the output it seems like the Follow table is constucted correctly, but the FIRST table is missing the symbols "S,A"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant