3 //****************************************************************
5 //* Lex.l : Reg. Exp. for the LOGLAN-82 and the LOGLAN-93 *
8 //* (c) LITA, university of PAU (France), summer 1993. *
9 //****************************************************************
13 #define TOKENS_DEBUG_printf(a) fprintf(stderr,a)
14 #define TOKENS_DEBUG_printf2(a,b) fprintf(stderr,a,b)
16 #define TOKENS_DEBUG_printf(a)
17 #define TOKENS_DEBUG_printf2(a,b)
21 #define TOKENS_ERROR_printf(a) fprintf(stderr,a)
23 #define TOKENS_ERROR_printf(a)
47 void LexAdvanceCursor( int length );
56 %x CondComment CondLineComment
60 IdLetter {Letter}|[_0-9]
63 Identifier {Letter}({IdLetter}*)
94 TOKENS_DEBUG_printf2("%s.\n",yytext);
95 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
96 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
101 TOKENS_DEBUG_printf2("%s.\n",yytext);
102 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
103 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
107 {P}{R}{O}{G}{R}{A}{M} {
108 TOKENS_DEBUG_printf2("%s.\n",yytext);
109 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
110 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
115 TOKENS_DEBUG_printf2("%s.\n",yytext);
116 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
117 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
122 TOKENS_DEBUG_printf2("%s.\n",yytext);
123 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
124 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
128 {P}{R}{O}{C}{E}{D}{U}{R}{E} {
129 TOKENS_DEBUG_printf2("%s.\n",yytext);
130 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
131 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
135 {F}{U}{N}{C}{T}{I}{O}{N} {
136 TOKENS_DEBUG_printf2("%s.\n",yytext);
137 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
138 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
142 {C}{O}{R}{O}{U}{T}{I}{N}{E} {
143 TOKENS_DEBUG_printf2("%s.\n",yytext);
144 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
145 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
148 {P}{R}{O}{C}{E}{S}{S} {
149 TOKENS_DEBUG_printf2("%s.\n",yytext);
150 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
151 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
156 TOKENS_DEBUG_printf2("%s.\n",yytext);
157 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
158 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
163 TOKENS_DEBUG_printf2("%s.\n",yytext);
164 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
165 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
169 {H}{A}{N}{D}{L}{E}{R}{S} {
170 TOKENS_DEBUG_printf2("%s.\n",yytext);
171 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
172 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
177 TOKENS_DEBUG_printf2("%s.\n",yytext);
178 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
179 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
184 TOKENS_DEBUG_printf2("%s.\n",yytext);
185 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
186 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
191 TOKENS_DEBUG_printf2("%s.\n",yytext);
192 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
193 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
197 {V}{I}{R}{T}{U}{A}{L} {
198 TOKENS_DEBUG_printf2("%s.\n",yytext);
199 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
200 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
205 TOKENS_DEBUG_printf2("%s.\n",yytext);
206 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
207 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
211 {O}{T}{H}{E}{R}{W}{I}{S}{E} {
212 TOKENS_DEBUG_printf2("%s.\n",yytext);
213 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
214 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
219 TOKENS_DEBUG_printf2("%s.\n",yytext);
220 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
221 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
226 TOKENS_DEBUG_printf2("%s.\n",yytext);
227 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
228 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
233 TOKENS_DEBUG_printf2("%s.\n",yytext);
234 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
235 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
239 {O}{T}{H}{E}{R}{W}{I}{S}{E} {
240 TOKENS_DEBUG_printf2("%s.\n",yytext);
241 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
242 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
246 {I}{N}{T}{E}{G}{E}{R} {
247 TOKENS_DEBUG_printf2("%s.\n",yytext);
248 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
249 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
254 TOKENS_DEBUG_printf2("%s.\n",yytext);
255 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
256 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
260 {B}{O}{O}{L}{E}{A}{N} {
261 TOKENS_DEBUG_printf2("%s.\n",yytext);
262 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
263 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
267 {C}{H}{A}{R}{A}{C}{T}{E}{R} {
268 TOKENS_DEBUG_printf2("%s.\n",yytext);
269 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
270 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
275 TOKENS_DEBUG_printf2("%s.\n",yytext);
276 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
277 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
282 TOKENS_DEBUG_printf2("%s.\n",yytext);
283 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
284 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
288 {P}{R}{O}{C}{E}{S}{S} {
289 TOKENS_DEBUG_printf2("%s.\n",yytext);
290 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
291 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
295 {C}{O}{R}{O}{U}{T}{I}{N}{E} {
296 TOKENS_DEBUG_printf2("%s.\n",yytext);
297 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
298 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
302 {A}{R}{R}{A}{Y}{O}{F} {
303 TOKENS_DEBUG_printf2("%s.\n",yytext);
304 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
305 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
310 TOKENS_DEBUG_printf2("%s.\n",yytext);
311 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
312 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
317 TOKENS_DEBUG_printf2("%s.\n",yytext);
318 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
319 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
324 TOKENS_DEBUG_printf2("%s.\n",yytext);
325 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
326 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
331 TOKENS_DEBUG_printf2("%s.\n",yytext);
332 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
333 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
338 TOKENS_DEBUG_printf2("%s.\n",yytext);
339 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
340 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
345 TOKENS_DEBUG_printf2("%s.\n",yytext);
346 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
347 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
352 TOKENS_DEBUG_printf2("%s.\n",yytext);
353 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
354 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
359 TOKENS_DEBUG_printf2("%s.\n",yytext);
360 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
361 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
366 TOKENS_DEBUG_printf2("%s.\n",yytext);
367 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
368 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
373 TOKENS_DEBUG_printf2("%s.\n",yytext);
374 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
375 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
380 TOKENS_DEBUG_printf2("%s.\n",yytext);
381 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
382 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
387 TOKENS_DEBUG_printf2("%s.\n",yytext);
388 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
389 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
394 TOKENS_DEBUG_printf2("%s.\n",yytext);
395 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
396 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
401 TOKENS_DEBUG_printf2("%s.\n",yytext);
402 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
403 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
408 TOKENS_DEBUG_printf2("%s.\n",yytext);
409 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
410 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
415 TOKENS_DEBUG_printf2("%s.\n",yytext);
416 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
417 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
422 TOKENS_DEBUG_printf2("%s.\n",yytext);
423 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
424 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
428 {T}{E}{R}{M}{I}{N}{A}{T}{E} {
429 TOKENS_DEBUG_printf2("%s.\n",yytext);
430 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
431 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
436 TOKENS_DEBUG_printf2("%s.\n",yytext);
437 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
438 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
443 TOKENS_DEBUG_printf2("%s.\n",yytext);
444 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
445 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
450 TOKENS_DEBUG_printf2("%s.\n",yytext);
451 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
452 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
457 TOKENS_DEBUG_printf2("%s.\n",yytext);
458 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
459 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
464 TOKENS_DEBUG_printf2("%s.\n",yytext);
465 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
466 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
470 {W}{R}{I}{T}{E}{L}{N} {
471 TOKENS_DEBUG_printf2("%s.\n",yytext);
472 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
473 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
478 TOKENS_DEBUG_printf2("%s.\n",yytext);
479 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
480 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
485 TOKENS_DEBUG_printf2("%s.\n",yytext);
486 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
487 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
492 TOKENS_DEBUG_printf2("%s.\n",yytext);
493 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
494 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
499 TOKENS_DEBUG_printf2("%s.\n",yytext);
500 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
501 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
506 TOKENS_DEBUG_printf2("%s.\n",yytext);
507 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
508 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
513 TOKENS_DEBUG_printf2("%s.\n",yytext);
514 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
515 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
520 TOKENS_DEBUG_printf2("%s.\n",yytext);
521 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
522 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
527 TOKENS_DEBUG_printf2("%s.\n",yytext);
528 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
529 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
534 TOKENS_DEBUG_printf2("%s.\n",yytext);
535 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
536 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
541 TOKENS_DEBUG_printf2("%s.\n",yytext);
542 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
543 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
548 TOKENS_DEBUG_printf2("%s.\n",yytext);
549 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
550 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
555 TOKENS_DEBUG_printf2("%s.\n",yytext);
556 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
557 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
562 TOKENS_DEBUG_printf2("%s.\n",yytext);
563 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
564 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
569 TOKENS_DEBUG_printf2("%s.\n",yytext);
570 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
571 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
576 TOKENS_DEBUG_printf2("%s.\n",yytext);
577 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
578 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
583 TOKENS_DEBUG_printf2("%s.\n",yytext);
584 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
585 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
590 TOKENS_DEBUG_printf2("%s.\n",yytext);
591 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
592 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
597 TOKENS_DEBUG_printf2("%s.\n",yytext);
598 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
599 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
604 TOKENS_DEBUG_printf2("%s.\n",yytext);
605 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
606 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
611 TOKENS_DEBUG_printf2("%s.\n",yytext);
612 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
613 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
618 TOKENS_DEBUG_printf2("%s.\n",yytext);
619 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
620 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
625 TOKENS_DEBUG_printf2("%s.\n",yytext);
626 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
627 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
632 TOKENS_DEBUG_printf2("%s.\n",yytext);
633 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
634 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
639 TOKENS_DEBUG_printf2("%s.\n",yytext);
640 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
641 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
646 TOKENS_DEBUG_printf2("%s.\n",yytext);
647 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
648 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
653 TOKENS_DEBUG_printf2("%s.\n",yytext);
654 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
655 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
660 TOKENS_DEBUG_printf2("%s.\n",yytext);
661 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
662 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
667 TOKENS_DEBUG_printf2("%s.\n",yytext);
668 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
669 SEMANTIC(( yylval.ThisBool.Bool = 1 ));
670 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
675 TOKENS_DEBUG_printf2("%s.\n",yytext);
676 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
677 SEMANTIC(( yylval.ThisBool.Bool = 0 ));
678 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
683 TOKENS_DEBUG_printf2("%s.\n",yytext);
684 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
685 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
690 TOKENS_DEBUG_printf2("%s.\n",yytext);
691 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
692 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
697 TOKENS_DEBUG_printf2("%s.\n",yytext);
698 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
699 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
704 TOKENS_DEBUG_printf2("%s.\n",yytext);
705 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
706 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
711 TOKENS_DEBUG_printf2("%s.\n",yytext);
712 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
713 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
718 TOKENS_DEBUG_printf2("%s.\n",yytext);
719 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
720 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
725 TOKENS_DEBUG_printf2("%s.\n",yytext);
726 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
727 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
732 TOKENS_DEBUG_printf2("%s.\n",yytext);
733 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
734 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
739 TOKENS_DEBUG_printf2("%s.\n",yytext);
740 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
741 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
742 return(GREATEROREQUAL);
746 TOKENS_DEBUG_printf2("%s.\n",yytext);
747 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
748 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
753 TOKENS_DEBUG_printf2("%s.\n",yytext);
754 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
755 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
756 return(OPENINGBRACKET);
760 TOKENS_DEBUG_printf2("%s.\n",yytext);
761 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
762 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
763 return(CLOSINGBRACKET);
767 TOKENS_DEBUG_printf2("%s.\n",yytext);
768 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
769 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
770 return(LIST_SEPARATOR);
774 TOKENS_DEBUG_printf2("%s.\n",yytext);
775 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
776 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
777 return(VARSEPARATOR);
781 TOKENS_DEBUG_printf2("%s.\n",yytext);
782 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
783 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
788 TOKENS_DEBUG_printf2("%s.\n",yytext);
789 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
790 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
795 TOKENS_DEBUG_printf2("%s.\n",yytext);
796 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
797 SEMANTIC(( yylval.ThisLoc = new Location( ThisPlace ) ));
802 SEMANTIC(( ThisPlace.Tab(1) ));
806 SEMANTIC(( BeginningOfLine = 1 ));
807 SEMANTIC(( ThisPlace.Cr() ));
812 TOKENS_DEBUG_printf2("%s.\n",yytext);
813 SEMANTIC(( yylval.ThisString.Str = new String ( yytext ) ));
814 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
815 SEMANTIC(( yylval.ThisString.Loc = new Location( ThisPlace ) ));
820 TOKENS_DEBUG_printf("DigitSequence.\n");
821 SEMANTIC(( yylval.ThisInt.Int = atoi(yytext) ));
822 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
823 SEMANTIC(( yylval.ThisInt.Loc = new Location( ThisPlace ) ));
824 return(DIGITSEQUENCE);
828 TOKENS_DEBUG_printf("CharConst.\n");
829 SEMANTIC(( yylval.ThisChar.Char = yytext[1] ));
830 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
831 SEMANTIC(( yylval.ThisChar.Loc = new Location( ThisPlace ) ));
836 TOKENS_ERROR_printf("Error : Multiple Character constant.\n");
837 SEMANTIC(( yylval.ThisChar.Char = yytext[1] ));
838 SEMANTIC(( LexAdvanceCursor( strlen(yytext) ) ));
839 SEMANTIC(( yylval.ThisChar.Loc = new Location( ThisPlace ) ));
845 SEMANTIC(( ThisPlace.Tab( 1 ) ));
851 SEMANTIC(( ThisPlace.Tab( 2 ) ));
856 TOKENS_ERROR_printf("Erreur d'entree.\n");
857 SEMANTIC(( ThisPlace.Select( 1 ) ));
861 BEGIN(CondLineComment);
862 SEMANTIC(( ThisPlace.Tab( 2 ) ));
866 <CondLineComment>.*\n {
868 SEMANTIC(( ThisPlace.Cr() ));
869 SEMANTIC(( BeginningOfLine = 1 ));
874 TOKENS_DEBUG_printf2("String :%s\n",yytext);
878 yylval.ThisString.Str = new String(yytext);
879 ThisPlace.Select( strlen(yytext) );
880 yylval.ThisString.Loc = new Location( ThisPlace );
890 TOKENS_ERROR_printf("Error : Unterminated String.\n");
893 SEMANTIC(( ThisPlace.Cr() ));
894 SEMANTIC(( BeginningOfLine = 1 ));
903 SEMANTIC(( ThisPlace.Tab( 2 ) ));
908 SEMANTIC(( ThisPlace.Select( 2 ) ));
912 SEMANTIC(( ThisPlace.Tab( 1 ) ));
917 void LexAdvanceCursor( int length )
920 if ( !BeginningOfLine )
922 ThisPlace.Select( length );
926 #endif /* SYNTAX_ONLY */