/[rtmk]/rtmk/rig/lexxer.c
ViewVC logotype

Diff of /rtmk/rig/lexxer.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by jrydberg, Mon Dec 17 21:45:13 2001 UTC revision 1.3 by jrydberg, Fri Jan 4 23:56:40 2002 UTC
# Line 516  static char *yy_last_accepting_cpos; Line 516  static char *yy_last_accepting_cpos;
516  char *yytext;  char *yytext;
517  #line 1 "../../rtmk/rig/lexxer.l"  #line 1 "../../rtmk/rig/lexxer.l"
518  #define INITIAL 0  #define INITIAL 0
519  /*  /*
520   * rtmk - A single address space real-time micro-kernel.     Copyright 1999-2002 Johan Rydberg, jrydberg@rtmk.org.
521   * Copyright (c) 1999, 2000 Johan Rydberg.  
522   *  This program is free software; you can redistribute it and/or modify
523   * This program is free software; you can redistribute it and/or modify  it under the terms of the GNU General Public License as published by
524   * it under the terms of the GNU General Public License as published by  the Free Software Foundation; either version 2 of the License, or
525   * the Free Software Foundation; either version 2, or (at your option)  (at your option) any later version.
526   * any later version.  
527   *  This program is distributed in the hope that it will be useful,
528   * This program is distributed in the hope that it will be useful,  but WITHOUT ANY WARRANTY; without even the implied warranty of
529   * but WITHOUT ANY WARRANTY; without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
530   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License for more details.
531   * GNU General Public License for more details.  
532   *  You should have received a copy of the GNU General Public License
533   * You should have received a copy of the GNU General Public License  along with this program; if not, write to the Free Software
534   * along with this program; if not, write to the Free Software  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
535   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  #line 19 "../../rtmk/rig/lexxer.l"
  * 02111-1307, USA.  
  */  
 /*  
  * $Id$  
  */  
 #line 26 "../../rtmk/rig/lexxer.l"  
536  #include <string.h>  #include <string.h>
537  #include "rig.h"  #include "rig.h"
538  #include "routine.h"  #include "routine.h"
# Line 555  extern struct parsedfile *currfile; Line 549  extern struct parsedfile *currfile;
549  /* forward:  */  /* forward:  */
550  extern  void parse_filename(char *);  extern  void parse_filename(char *);
551    
552  #line 559 "lex.yy.c"  #line 553 "lex.yy.c"
553    
554  /* Macros after this point can all be overridden by user definitions in  /* Macros after this point can all be overridden by user definitions in
555   * section 1.   * section 1.
# Line 709  YY_DECL Line 703  YY_DECL
703          register char *yy_cp = NULL, *yy_bp = NULL;          register char *yy_cp = NULL, *yy_bp = NULL;
704          register int yy_act;          register int yy_act;
705    
706  #line 50 "../../rtmk/rig/lexxer.l"  #line 43 "../../rtmk/rig/lexxer.l"
707    
708    
709  #line 716 "lex.yy.c"  #line 710 "lex.yy.c"
710    
711          if ( yy_init )          if ( yy_init )
712                  {                  {
# Line 798  do_action:     /* This label is used only to Line 792  do_action:     /* This label is used only to
792    
793  case 1:  case 1:
794  YY_RULE_SETUP  YY_RULE_SETUP
795  #line 52 "../../rtmk/rig/lexxer.l"  #line 45 "../../rtmk/rig/lexxer.l"
796  ADRETURN(AD_OUT);  ADRETURN(AD_OUT);
797          YY_BREAK          YY_BREAK
798  case 2:  case 2:
799  YY_RULE_SETUP  YY_RULE_SETUP
800  #line 53 "../../rtmk/rig/lexxer.l"  #line 46 "../../rtmk/rig/lexxer.l"
801  ADRETURN(AD_IN);  ADRETURN(AD_IN);
802          YY_BREAK          YY_BREAK
803  case 3:  case 3:
804  YY_RULE_SETUP  YY_RULE_SETUP
805  #line 54 "../../rtmk/rig/lexxer.l"  #line 47 "../../rtmk/rig/lexxer.l"
806  ADRETURN(AD_INOUT);  ADRETURN(AD_INOUT);
807          YY_BREAK          YY_BREAK
808  case 4:  case 4:
809  YY_RULE_SETUP  YY_RULE_SETUP
810  #line 56 "../../rtmk/rig/lexxer.l"  #line 49 "../../rtmk/rig/lexxer.l"
811  SRETURN(import);  SRETURN(import);
812          YY_BREAK          YY_BREAK
813  case 5:  case 5:
814  YY_RULE_SETUP  YY_RULE_SETUP
815  #line 57 "../../rtmk/rig/lexxer.l"  #line 50 "../../rtmk/rig/lexxer.l"
816  SRETURN(return_type);  SRETURN(return_type);
817          YY_BREAK          YY_BREAK
818  case 6:  case 6:
819  YY_RULE_SETUP  YY_RULE_SETUP
820  #line 58 "../../rtmk/rig/lexxer.l"  #line 51 "../../rtmk/rig/lexxer.l"
821  SRETURN(arguments);  SRETURN(arguments);
822          YY_BREAK          YY_BREAK
823  case 7:  case 7:
824  YY_RULE_SETUP  YY_RULE_SETUP
825  #line 59 "../../rtmk/rig/lexxer.l"  #line 52 "../../rtmk/rig/lexxer.l"
826  { yylval.value = currfile->lineno;  { yylval.value = currfile->lineno;
827                                                                                          SRETURN(define_routine); }                                                                                          SRETURN(define_routine); }
828          YY_BREAK          YY_BREAK
829  case 8:  case 8:
830  YY_RULE_SETUP  YY_RULE_SETUP
831  #line 61 "../../rtmk/rig/lexxer.l"  #line 54 "../../rtmk/rig/lexxer.l"
832  SRETURN(define_interface);  SRETURN(define_interface);
833          YY_BREAK          YY_BREAK
834  case 9:  case 9:
835  YY_RULE_SETUP  YY_RULE_SETUP
836  #line 62 "../../rtmk/rig/lexxer.l"  #line 55 "../../rtmk/rig/lexxer.l"
837  SRETURN(define_type);  SRETURN(define_type);
838          YY_BREAK          YY_BREAK
839  case 10:  case 10:
840  YY_RULE_SETUP  YY_RULE_SETUP
841  #line 63 "../../rtmk/rig/lexxer.l"  #line 56 "../../rtmk/rig/lexxer.l"
842  SRETURN(name);  SRETURN(name);
843          YY_BREAK          YY_BREAK
844  case 11:  case 11:
845  YY_RULE_SETUP  YY_RULE_SETUP
846  #line 64 "../../rtmk/rig/lexxer.l"  #line 57 "../../rtmk/rig/lexxer.l"
847  SRETURN(attrs);  SRETURN(attrs);
848          YY_BREAK          YY_BREAK
849  case 12:  case 12:
850  YY_RULE_SETUP  YY_RULE_SETUP
851  #line 65 "../../rtmk/rig/lexxer.l"  #line 58 "../../rtmk/rig/lexxer.l"
852  SRETURN(comment);  SRETURN(comment);
853          YY_BREAK          YY_BREAK
854  case 13:  case 13:
855  YY_RULE_SETUP  YY_RULE_SETUP
856  #line 66 "../../rtmk/rig/lexxer.l"  #line 59 "../../rtmk/rig/lexxer.l"
857  SRETURN(dni);  SRETURN(dni);
858          YY_BREAK          YY_BREAK
859  case 14:  case 14:
860  YY_RULE_SETUP  YY_RULE_SETUP
861  #line 67 "../../rtmk/rig/lexxer.l"  #line 60 "../../rtmk/rig/lexxer.l"
862  SRETURN(offset);  SRETURN(offset);
863          YY_BREAK          YY_BREAK
864  case 15:  case 15:
865  YY_RULE_SETUP  YY_RULE_SETUP
866  #line 68 "../../rtmk/rig/lexxer.l"  #line 61 "../../rtmk/rig/lexxer.l"
867  SRETURN(cname);  SRETURN(cname);
868          YY_BREAK          YY_BREAK
869  case 16:  case 16:
870  YY_RULE_SETUP  YY_RULE_SETUP
871  #line 69 "../../rtmk/rig/lexxer.l"  #line 62 "../../rtmk/rig/lexxer.l"
872  SRETURN(nativetype);  SRETURN(nativetype);
873          YY_BREAK          YY_BREAK
874  case 17:  case 17:
875  YY_RULE_SETUP  YY_RULE_SETUP
876  #line 70 "../../rtmk/rig/lexxer.l"  #line 63 "../../rtmk/rig/lexxer.l"
877  SRETURN(arraysize);  SRETURN(arraysize);
878          YY_BREAK          YY_BREAK
879  case 18:  case 18:
880  YY_RULE_SETUP  YY_RULE_SETUP
881  #line 71 "../../rtmk/rig/lexxer.l"  #line 64 "../../rtmk/rig/lexxer.l"
882  SRETURN(encode);  SRETURN(encode);
883          YY_BREAK          YY_BREAK
884  case 19:  case 19:
885  YY_RULE_SETUP  YY_RULE_SETUP
886  #line 72 "../../rtmk/rig/lexxer.l"  #line 65 "../../rtmk/rig/lexxer.l"
887  SRETURN(decode);  SRETURN(decode);
888          YY_BREAK          YY_BREAK
889  case 20:  case 20:
890  YY_RULE_SETUP  YY_RULE_SETUP
891  #line 74 "../../rtmk/rig/lexxer.l"  #line 67 "../../rtmk/rig/lexxer.l"
892  TYPERETURN(0);  TYPERETURN(0);
893          YY_BREAK          YY_BREAK
894  case 21:  case 21:
895  YY_RULE_SETUP  YY_RULE_SETUP
896  #line 75 "../../rtmk/rig/lexxer.l"  #line 68 "../../rtmk/rig/lexxer.l"
897  TYPERETURN(1);  TYPERETURN(1);
898          YY_BREAK          YY_BREAK
899  case 22:  case 22:
900  YY_RULE_SETUP  YY_RULE_SETUP
901  #line 76 "../../rtmk/rig/lexxer.l"  #line 69 "../../rtmk/rig/lexxer.l"
902  TYPERETURN(2);  TYPERETURN(2);
903          YY_BREAK          YY_BREAK
904  case 23:  case 23:
905  YY_RULE_SETUP  YY_RULE_SETUP
906  #line 77 "../../rtmk/rig/lexxer.l"  #line 70 "../../rtmk/rig/lexxer.l"
907  TYPERETURN(3);  TYPERETURN(3);
908          YY_BREAK          YY_BREAK
909  case 24:  case 24:
910  YY_RULE_SETUP  YY_RULE_SETUP
911  #line 78 "../../rtmk/rig/lexxer.l"  #line 71 "../../rtmk/rig/lexxer.l"
912  TYPERETURN(4);  TYPERETURN(4);
913          YY_BREAK          YY_BREAK
914  case 25:  case 25:
915  YY_RULE_SETUP  YY_RULE_SETUP
916  #line 79 "../../rtmk/rig/lexxer.l"  #line 72 "../../rtmk/rig/lexxer.l"
917  TYPERETURN(5);  TYPERETURN(5);
918          YY_BREAK          YY_BREAK
919  case 26:  case 26:
920  YY_RULE_SETUP  YY_RULE_SETUP
921  #line 80 "../../rtmk/rig/lexxer.l"  #line 73 "../../rtmk/rig/lexxer.l"
922  TYPERETURN(6);  TYPERETURN(6);
923          YY_BREAK          YY_BREAK
924  case 27:  case 27:
925  YY_RULE_SETUP  YY_RULE_SETUP
926  #line 81 "../../rtmk/rig/lexxer.l"  #line 74 "../../rtmk/rig/lexxer.l"
927  TYPERETURN(7);  TYPERETURN(7);
928          YY_BREAK          YY_BREAK
929  case 28:  case 28:
930  YY_RULE_SETUP  YY_RULE_SETUP
931  #line 83 "../../rtmk/rig/lexxer.l"  #line 76 "../../rtmk/rig/lexxer.l"
932  { yylval.value = strtol(yytext, NULL, 0);  { yylval.value = strtol(yytext, NULL, 0);
933                  TRETURN(integer); }                  TRETURN(integer); }
934          YY_BREAK          YY_BREAK
935  case 29:  case 29:
936  YY_RULE_SETUP  YY_RULE_SETUP
937  #line 85 "../../rtmk/rig/lexxer.l"  #line 78 "../../rtmk/rig/lexxer.l"
938  { yylval.value = strtol(yytext, NULL, 16);  { yylval.value = strtol(yytext, NULL, 16);
939                  TRETURN(integer); }                  TRETURN(integer); }
940          YY_BREAK          YY_BREAK
941  case 30:  case 30:
942  YY_RULE_SETUP  YY_RULE_SETUP
943  #line 87 "../../rtmk/rig/lexxer.l"  #line 80 "../../rtmk/rig/lexxer.l"
944  { yylval.string = strdup(yytext);  { yylval.string = strdup(yytext);
945                  TRETURN(symbol); }                  TRETURN(symbol); }
946          YY_BREAK          YY_BREAK
947  case 31:  case 31:
948  YY_RULE_SETUP  YY_RULE_SETUP
949  #line 89 "../../rtmk/rig/lexxer.l"  #line 82 "../../rtmk/rig/lexxer.l"
950  { yylval.string = strdup(yytext+1);  { yylval.string = strdup(yytext+1);
951                                                                  yylval.string [strlen (yylval.string) - 1] = '\0';                                                                  yylval.string [strlen (yylval.string) - 1] = '\0';
952                  TRETURN(qstring); }                  TRETURN(qstring); }
953          YY_BREAK          YY_BREAK
954  case 32:  case 32:
955  YY_RULE_SETUP  YY_RULE_SETUP
956  #line 92 "../../rtmk/rig/lexxer.l"  #line 85 "../../rtmk/rig/lexxer.l"
957  { yylval.string = strdup(yytext);  { yylval.string = strdup(yytext);
958                  TRETURN(pstring); }                  TRETURN(pstring); }
959          YY_BREAK          YY_BREAK
960  case 33:  case 33:
961  YY_RULE_SETUP  YY_RULE_SETUP
962  #line 95 "../../rtmk/rig/lexxer.l"  #line 88 "../../rtmk/rig/lexxer.l"
963  { parse_filename(yytext+1); }  { parse_filename(yytext+1); }
964          YY_BREAK          YY_BREAK
965  case 34:  case 34:
966  YY_RULE_SETUP  YY_RULE_SETUP
967  #line 96 "../../rtmk/rig/lexxer.l"  #line 89 "../../rtmk/rig/lexxer.l"
968  { parse_filename(yytext+1); }  { parse_filename(yytext+1); }
969          YY_BREAK          YY_BREAK
970  case 35:  case 35:
971  YY_RULE_SETUP  YY_RULE_SETUP
972  #line 97 "../../rtmk/rig/lexxer.l"  #line 90 "../../rtmk/rig/lexxer.l"
973  { parse_filename(yytext+1); }  { parse_filename(yytext+1); }
974          YY_BREAK          YY_BREAK
975  case 36:  case 36:
# Line 983  case 36: Line 977  case 36:
977  yy_c_buf_p = yy_cp -= 1;  yy_c_buf_p = yy_cp -= 1;
978  YY_DO_BEFORE_ACTION; /* set up yytext again */  YY_DO_BEFORE_ACTION; /* set up yytext again */
979  YY_RULE_SETUP  YY_RULE_SETUP
980  #line 99 "../../rtmk/rig/lexxer.l"  #line 92 "../../rtmk/rig/lexxer.l"
981  /* EMPTY */  /* EMPTY */
982          YY_BREAK          YY_BREAK
983  case 37:  case 37:
984  YY_RULE_SETUP  YY_RULE_SETUP
985  #line 100 "../../rtmk/rig/lexxer.l"  #line 93 "../../rtmk/rig/lexxer.l"
986  { ++currfile->lineno; }  { ++currfile->lineno; }
987          YY_BREAK          YY_BREAK
988  case 38:  case 38:
989  YY_RULE_SETUP  YY_RULE_SETUP
990  #line 101 "../../rtmk/rig/lexxer.l"  #line 94 "../../rtmk/rig/lexxer.l"
991  /*EMPTY*/  /*EMPTY*/
992          YY_BREAK          YY_BREAK
993  case 39:  case 39:
994  YY_RULE_SETUP  YY_RULE_SETUP
995  #line 102 "../../rtmk/rig/lexxer.l"  #line 95 "../../rtmk/rig/lexxer.l"
996  { return yytext[0]; }  { return yytext[0]; }
997          YY_BREAK          YY_BREAK
998  case 40:  case 40:
999  YY_RULE_SETUP  YY_RULE_SETUP
1000  #line 103 "../../rtmk/rig/lexxer.l"  #line 96 "../../rtmk/rig/lexxer.l"
1001  ECHO;  ECHO;
1002          YY_BREAK          YY_BREAK
1003  #line 1010 "lex.yy.c"  #line 1004 "lex.yy.c"
1004  case YY_STATE_EOF(INITIAL):  case YY_STATE_EOF(INITIAL):
1005          yyterminate();          yyterminate();
1006    
# Line 1889  int main() Line 1883  int main()
1883          return 0;          return 0;
1884          }          }
1885  #endif  #endif
1886  #line 103 "../../rtmk/rig/lexxer.l"  #line 96 "../../rtmk/rig/lexxer.l"
1887    
1888    
1889  void  void

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26