LR: Difference between revisions

From Lojban
Jump to navigation Jump to search
mNo edit summary
 
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
''LR parsers'' are a type of [https://en.wikipedia.org/wiki/Bottom-up_parsing bottom-up] [https://en.wikipedia.org/wiki/Parser parsers] that efficiently handle [[context free grammars|context-free languages]] in guaranteed linear time. The [https://en.wikipedia.org/wiki/LALR_parser ''LALR'' parsers] and the [https://en.wikipedia.org/wiki/SLR_parser ''SLR'' parsers] are common variants of LR parsers. LR parsers are often mechanically generated from a [https://en.wikipedia.org/wiki/Formal_grammar formal grammar] for the language by a [https://en.wikipedia.org/wiki/Parser_generator parser generator] tool. They are very widely used for the processing of [https://en.wikipedia.org/wiki/Computer_language computer languages], more than other kinds of generated parsers.
attempted translation of the excellent short story Little Things
 
by Raymond Carver.
 
translation by [[jbocre: Jordan DeLong|Jordan DeLong]]
 
(redone Jun  5, 2002)
 
(edited Oct 16, 2002)
 
----------------------------------------------------------------------
 
tu'a loi cmalu
 
.i clira ca le djedi fa lenu ge le tcima cu cenba gi lei snime cu
 
runme gi'e toljinsa djacu binxo .i lei linji pe ri mo'ini'a sakli
 
terka'a le cmalu je galtu be tai le'e janco be'o canko poi se crane
 
le trixyfoi .i le karce zo'a flecu klama fo le dargu pe le bartu
 
noi ca'o manku binxo .iku'i ne'iku ji'a manku pe'a binxo
 
.i ko'a ne'i le sipku'a ca'o setca lei taxfu le li'urta'e ca lenu
 
ko'e klama le vorme
 
.i lu mi gleki lenu do cliva .i mi gleki lenu do cliva sei ko'e
 
cusku .i je'e pei li'u
 
.i leza'i ko'a setca da po ko'a le li'urta'e cu ranji
 
.i lu do bersa lo malpre .i mi mutce gleki lenu do cliva sei ko'e
 
co'a klaku .i do na'eka'e catlu le flira be mi .i xu go'i li'u
 
.ibaku ko'e zgana le pixra be le cifnu be'o poi cpana le ckana ku'o
 
.ije lebna le sego'i
 
.i ko'a catlu ko'e .ije ko'e lumci le kanla gi'e caicta ko'a pu'o
 
lenu carna gi'e xruti fi le zutku'a
 
.i lu ko xruti ta sei ko'a cusku li'u
 
.i lu ko cpacu le selponse be do gi'e cliva po'o sei ko'e cusku li'u
 
.i ko'a na spuda .i ko'a jai rinka lenu ganlo le li'urta'e kei gi'e
 
co'a dasni le kosta gi'e catlu le sipku'a pu lenu manri'a le gustci
 
.ibaku ko'a barkla fu le zutku'a
 
.i ko'e sanli bu'u le vorme be le cmalu jupku'a fi'o se bevri le
 
cifnu
 
.i lu mi djica tu'a le cifnu sei ko'a cusku li'u
 
.i lu xu do jai fenki li'u
 
.i lu na go'i .iku'i mi djica tu'a le cifnu .i mi ba tesete cpedu
 
lo prenu lenu klama gi'e cpacu le selponse be cy. li'u
 
.i lu na curmi lenu do pencu le vi cifnu sei ko'e cusku li'u
 
.i le cifnu goi ko'i puco'a klaku .ije ko'e vimcu le cifybu'u le
 
sruri be le stedu be ko'i
 
.i lu cau'e cau'e sei ko'e fi'o catlu ko'i cusku li'u
 
.i ko'a muvdu fa'a ko'e
 
.i lu pe'ucai sei ko'e cusku li'u .i ko'e xrustapa fa'a le jupku'a
 
.i lu mi djica le cifnu li'u
 
.i lu .o'onai ko ti cliva li'u
 
.i ko'e carna gi'e troci co bevri le cifnu le kumfa kojna noi trixe
 
le toknu
 
.iku'i ko'a klama .i ko'a birka kuspe le toknu gi'e jai rinka lenu
 
lei ko'a xance cu tagji le cifnu
 
.i lu ko cliva .i ko cliva sei ko'e krixa li'u
 
.i le cifnu cu xunre flira jeke carmi klaku .i ca'o le terbradi
 
ko'a joi ko'e tikpa le xrula patxu noi dandu ti'a le toknu
 
.i ko'a catke ko'e fa'a le bitmu baku gi'e troci lenu jai daspo le
 
za'i ko'e la'arjai .i ko'a jgari le cifnu gi'e catke sepi'o piro
 
lei junta be ko'a
 
.i lu ko jgari be cy. sisti sei ko'a cusku li'u
 
.i lu ko na zukte sei ko'e cusku .i do gasnu lenu le cifnu cu cortu
 
li'u
 
.i lu naku mi gasnu lenu le cifnu cu cortu sei ko'a cusku li'u
 
.i le canko pe le jupku'a cu sabji no gusni .i va'o le jbimanku
 
ko'a gunka tu'a lei ko'e jairxa'e degji sepi'o pa le xance .ije fi
 
le drata xance fa ko'a jgari le carmi klaku cifnu ni'a le birka vi
 
le janco
 
.i ko'e zgana lenu lei ko'e degji cu jai kalri selbapli .i ko'e
 
zgana lenu le cifnu cu cliva vo'a
 
.i lu naku li'u ko'e se camki'a ca lemu'e lei xance be ko'e cu kluza
 
binxo
 
.i ko'e djica lenu ponse ko'i goi le vi cifnu .i ko'e troci co jgari
 
le drata birka be le cifnu .i ko'e kavbu le cifnu ru'u le xanterjo'e
 
gi'e lacpu
 
.iku'i ko'a na jgari sisti .i ko'a zgana lenu le cifnu cu sakli
 
mo'ize'o lei xance .ije ko'a mutce vlipa lacpu
 
.i ta'iku jdice
 
----------------------------------------------------------------------
 
original english text. this text is Copyright (c) 1980, 1981 Raymond Carver
 
Little Things, by Raymond Carver
 
Early that day the weather turned and the snow was melting into
 
dirty water.  Streaks of it ran down from the little shoulder-high
 
window that faced the backyard. Cars slushed by on the street
 
outside, where it was getting dark. But it was getting dark on the
 
inside too.
 
He was in the bedroom pushing clothes into a suitcase when she came
 
to the door.
 
I'm glad you're leaving!  I'm glad you're leaving! she said. Do
 
you hear?
 
He kept on putting his things into the suitcase.
 
Son of a bitch!  I'm so glad you're leaving!  She began to cry.
 
You can't even look me in the face, can you?
 
Then she noticed the baby's picture on the bed and picked it up.
 
He looked at her and she whiped her eyes and stared at him before
 
turning and going back to the living room.
 
Bring that back, he said.
 
Just get your things and get out, she said.
 
He did not answer.  He fastened the suitcase, put on his coat,
 
looked around the bedroom before turning off the light.  Then he
 
went out to the living room.
 
She stood in the doorway of the little kitchen, holding the baby.
 
I want the baby, he said.
 
Are you crazy?
 
No, but I want the baby.  I'll get someone to come by for his things.
 
You're not touching this baby, she said.
 
The baby had begun to cry and she uncovered the blanket from around
 
his head.
 
Oh, oh, she said, looking at the baby.
 
He moved toward her.
 
For God's sake! she said.  She took a step back into the kitchen.
 
I want the baby.
 
Get out of here!
 
She turned and tried to hold the baby over in a corner behind the
 
stove.
 
But he came up. He reached across the stove and tightened his hands
 
on the baby.
 
Get away, get away! she cried.
 
The baby was red-faced and screaming.  In the scuffle they knocked
 
down a flowerpot that hung behind the stove.
 
He crowded her into the wall then, trying to break her grip.  He
 
held onto the baby and pushed with all his weight.
 
Let go of him, he said.
 
Don't, she said. You're hurting the baby, she said.
 
I'm not hurting the baby, he said.
 
The kitchen window gave no light.  In the near-dark he worked on
 
her fisted fingers with one hand and with the other hand he gripped
 
the screaming baby up under an arm near the shoulder.
 
She felt her fingers being forced open.  She felt the baby going
 
from her.
 
No! she screamed just as her hands came loose.
 
She would have it, this baby.  She grabbed for the baby's other
 
arm.  She caught the baby around the wrist and leaned back.
 
But he would not let go.  He felt the baby slipping out of his hands
 
and he pulled back very hard.
 
In this manner, the issue was decided.

Latest revision as of 06:50, 22 July 2014

LR parsers are a type of bottom-up parsers that efficiently handle context-free languages in guaranteed linear time. The LALR parsers and the SLR parsers are common variants of LR parsers. LR parsers are often mechanically generated from a formal grammar for the language by a parser generator tool. They are very widely used for the processing of computer languages, more than other kinds of generated parsers.