answersLogoWhite

0

Justfy that LALR parsers are faster than LR parsers?

Updated: 8/16/2019
User Avatar

Wiki User

14y ago

Best Answer

LALR parsers have an equal number of states as an LR(0) parser. LR(1) parsers have a number of states dependent on the lookahead. Often different states are identical, except they have a different lookahead. i.e.

Sample LR(1) item sets:


1)
A -> B.C,'x'
A -> E.C,'y'


2)
A -> B.C,'g'
A -> E.C,'h'


Equivalent LALR(1) item set:


1)
A -> B.C,'x'
A -> E.C,'y'
A -> B.C,'g'
A -> E.C,'h'


Fewer states means fewer shifts and reduces. And at least as importantly, a much smaller parse table.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Justfy that LALR parsers are faster than LR parsers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is syntactic clues?

Syntactic clues are aids to parsing. The amount of nondeterminism in parsers for pairs of homomorphically related semithue language systems is compared. If the parsers are without lookahead, the domain language system parser has no more nondeterminism than the codomain language system parser. The domain language system has at least as many clues. If the parsers have lookahead and the homomorphism is nondecreasing the same results hold. If the homomorphism is nonincreasing, an example shows the codomain language system may have the better clues.


Do you say more faster than him or faster than him?

It would be more accurate to say "faster than him."


How fast can Yoshi go?

Faster than Mario. Faster than Luigi. Faster than Peach. Faster than Daisy. But not as fast as Sonic.


Is light faster than sound or sound is faster than light?

Light is faster than sound


What is a gray wolf faster than?

faster than a leopard


Can a yz85 go faster than a kx65?

they are not faster than a race tuned kx65 but they are faster than a normal kx65


How do you run faster than a Ninja?

You would need to be as agile as and faster than a Ninja to run faster than one.


Can a horse help you get to go faster?

Faster than you can run, but not faster than you can drive a car.


Does a snowboard go faster if a child is on it?

Faster than with no weight on it, yes. Faster than with an adult on it, no.


Why are some objects are faster than the others?

some objects faster than the others because its due to the movement of the earth.... hahah joke lang :))


Is a ferrari enzo faster than a lamborghini aventador?

No its not but its faster than a corvette and mustang No, but they are close, and you're right about the enzo being faster than the mustang but it's not faster than the corvette ZR1. And the lingenfelter c5 corvette is faster than both of them.


Conconde flies faster than the speed of light?

No. The Concorde flew faster than the speed of sound. Nothing can move faster than the speed of light.