Skip to content

Commit

Permalink
Updated readme with more design info
Browse files Browse the repository at this point in the history
  • Loading branch information
zman0900 committed May 10, 2012
1 parent b015bcd commit b0a27ac
Showing 1 changed file with 39 additions and 10 deletions.
49 changes: 39 additions & 10 deletions README.txt
@@ -1,18 +1,47 @@
Dan Ziemba
Required file 'Runfile' is generated by Makefile

Required file 'Runfile' is generated by the Makefile.
Code is also available at https://github.com/zman0900/cse755-lisp
Javadoc is available by running `make doc`


Design Information:

<S> ::= <E>
I used the LL(1) grammar from the project description with whitespace removed
since my lexer handles ensuring required whitespace is where it belongs.

LL(1) Grammar with numbered rules:
1. <S> ::= <E>
2. <E> ::= atom
3. | (<X>
4. <X> ::= )
5. | <E><Y>
6. <Y> ::= .<E>)
7. | <R>)
8. <R> ::= <E><R>
9. | empty

<E> ::= atom
| (<X>
I constructed an LL(1) parse table based on the info from wikipedia's LL parser
page: http://en.wikipedia.org/wiki/LL_parser

<X> ::= )
| <E> <Y>
First-sets:
E - { atom, ( }
R - { empty, atom, ( }
S - { atom, ( }
X - { ), atom, ( }
Y - { ), atom, (, . }

<Y> ::= . <E>)
| <R>)
Follow-sets:
E - { ), $, atom, (, . }
R - { c }
S - { $ }
X - { ), $, atom, (, . }
Y - { ), $, atom, (, . }

<R> ::= <E> <R>
| empty
Parse table:
. atom ) ( $
E 2 3
R 8 9 8
S 1 1
X 5 4 5
Y 6 7 7 7

0 comments on commit b0a27ac

Please sign in to comment.