Re: Nekoliko pitanja
Dana Sat, 23 Apr 2005 22:37:44 +0200, Zeljko Nase <ZNase@Sezampro.yu> napisa:
For each label, two more variables accessible to the user are declared. A left and right value labels are passed to the code string, so that the user can find out where the left and right side of each terminal or non-terminal is in the input stream. The name of these variables is the label name, plus left or right. for example, given the right hand side of a production expr:e1 PLUS expr:e2 the user could not only access variables e1 and e2, but also e1left, e1right, e2left and e2right. these variables are of type int.
1. Kako vracati poziciju tokena radi obrade u CUP-u?
Ovo mogu da uradim jedino ako iskoristim neko ili oba polja LEFT i RIGHT
u okviru java_cup.runntime.Symbol-a, a nisam siguran da li su one potrebne
parseru kako bi pravilno radio.
For each label, two more variables accessible to the user are declared. A left and right value labels are passed to the code string, so that the user can find out where the left and right side of each terminal or non-terminal is in the input stream. The name of these variables is the label name, plus left or right. for example, given the right hand side of a production expr:e1 PLUS expr:e2 the user could not only access variables e1 and e2, but also e1left, e1right, e2left and e2right. these variables are of type int.
- Follow-Ups:
- Re: Nekoliko pitanja
- From: Zeljko Nase <ZNase@Sezampro.yu>
- Re: Nekoliko pitanja
- From: Dragan Marjanovic <marecare2@gmail.com>
- Re: Nekoliko pitanja
- References:
- Nekoliko pitanja
- From: Zeljko Nase <ZNase@Sezampro.yu>
- Nekoliko pitanja
Previous by date: Nekoliko pitanja
Next by date: Re: Nekoliko pitanja
Previous by thread: Nekoliko pitanja Next by thread: Re: Nekoliko pitanja
Previous by thread: Nekoliko pitanja Next by thread: Re: Nekoliko pitanja