Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > LL(2) to LL(1) conversion

Reply
Thread Tools

LL(2) to LL(1) conversion

 
 
Matthew Bowman
Guest
Posts: n/a
 
      11-18-2003
I'm in need of some assistance in converting an LL(2) grammar to an
LL(1) grammar. I'm having difficulties with this. Note: this is for
a school project and the grammar is not my choice. Thanks in advance
for any help. The grammar follows:

<program> ::= <explist>
<explist> ::= <exp> <explist> | E
<idlist> ::= ID <idlist> | E
<exp> ::= '(' ')'
| ID
| NUM
| '(' LAMBDA '(' <idlist> ')' <exp> ')'
| '(' DEFINE '(' ID <idlist> ')' <exp> ')'
| '(' IF <exp> <exp> <exp> ')'
| '(' <exp> <explist> ')'

note: E <=> epsilon

thanks in advance!!!
 
Reply With Quote
 
 
 
 
Artie Gold
Guest
Posts: n/a
 
      11-18-2003
Matthew Bowman wrote:
> I'm in need of some assistance in converting an LL(2) grammar to an
> LL(1) grammar. I'm having difficulties with this. Note: this is for
> a school project and the grammar is not my choice. Thanks in advance
> for any help. The grammar follows:
>
> <program> ::= <explist>
> <explist> ::= <exp> <explist> | E
> <idlist> ::= ID <idlist> | E
> <exp> ::= '(' ')'
> | ID
> | NUM
> | '(' LAMBDA '(' <idlist> ')' <exp> ')'
> | '(' DEFINE '(' ID <idlist> ')' <exp> ')'
> | '(' IF <exp> <exp> <exp> ')'
> | '(' <exp> <explist> ')'
>
> note: E <=> epsilon
>

Alas, as you have no question about the standard C programming
language, you're OFF TOPIC here (which you would have known had
you read the FAQ, etc. etc.)

Try news:comp.compilers.

HTH,
--ag




--
Artie Gold -- Austin, Texas
Oh, for the good old days of regular old SPAM.

 
Reply With Quote
 
 
 
 
Matthew Bowman
Guest
Posts: n/a
 
      11-18-2003
Artie Gold wrote:
> Alas, as you have no question about the standard C programming
> language, you're OFF TOPIC here


My sincere apologises

--
Matthew Bowman
http://www.velocityreviews.com/forums/(E-Mail Removed)
Computer Science Undergraduate
Georgia Institute of Technology

"Imagination Rules The World!"

 
Reply With Quote
 
navil@emuzed.com
Guest
Posts: n/a
 
      11-18-2003
Try posting to comp.theory some one there may help!
 
Reply With Quote
 
Derk Gwen
Guest
Posts: n/a
 
      11-18-2003
(E-Mail Removed) (Matthew Bowman) wrote:
# I'm in need of some assistance in converting an LL(2) grammar to an
# LL(1) grammar. I'm having difficulties with this. Note: this is for
# a school project and the grammar is not my choice. Thanks in advance
# for any help. The grammar follows:
#
# <program> ::= <explist>
# <explist> ::= <exp> <explist> | E
# <idlist> ::= ID <idlist> | E
# <exp> ::= '(' ')'
# | ID
# | NUM
# | '(' LAMBDA '(' <idlist> ')' <exp> ')'
# | '(' DEFINE '(' ID <idlist> ')' <exp> ')'
# | '(' IF <exp> <exp> <exp> ')'
# | '(' <exp> <explist> ')'

Left factor.

<exp> ::= (<exp1> | ID | NUM
<exp1> ::= ) | LAMBDA (<idlist>) <exp>) | DEFINE (....................


--
Derk Gwen http://derkgwen.250free.com/html/index.html
I ASSURE YOU WE'RE OPEN!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PSD to XHTML Conversion Services and PSD to HTML CSS ConversionServices, PSD to Joomla, Drupal, Wordpress Conversion xhtml champs Python 0 06-21-2011 11:59 AM
PSD to XHTML Conversion Services and PSD to HTML CSS ConversionServices, PSD to Joomla, Drupal, Wordpress Conversion PSD to XHTML Conversion Services and PSD to HTML CSS Conversion Services, PSD to Joomla, Drupal, Wor VHDL 0 04-25-2011 06:43 AM
conversion operator and conversion ctor subramanian100in@yahoo.com, India C++ 2 09-15-2009 12:46 PM
Date conversion problem with OE importing saroxonline76@vodafone.it Firefox 0 07-12-2005 07:38 PM
Framework 1.0 to 1.1 conversion Luc Bisson ASP .Net 2 11-19-2003 02:40 AM



Advertisments