From 8fcffcc668f4782447beb64a823cc15961cea9ab Mon Sep 17 00:00:00 2001 From: George Lebl Date: Wed, 31 May 2000 11:07:00 -0800 Subject: [PATCH] Release 1.0.0 --- ChangeLog | 13 ++ NEWS | 4 + configure | 2 +- configure.in | 2 +- doc/gob.1.in | 37 ++++ gob.m4 | 3 +- gob.spec | 2 +- src/lexer.c | 564 ++++++++++++++++++++++++++------------------------- src/lexer.l | 2 +- src/test.gob | 2 + 10 files changed, 348 insertions(+), 283 deletions(-) diff --git a/ChangeLog b/ChangeLog index 50ec230..321e0fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +Wed May 31 01:50:25 2000 George Lebl + + * Relased 1.0.0 + +Wed May 31 01:47:23 2000 George Lebl + + * src/gob.1.in: documentation of makefile rules for gob. + +Tue May 30 11:02:36 2000 George Lebl + + * src/lexer.l: Accept identifiers in array dimensions, this is so + that you can make these some constants. + Sat May 20 18:22:33 2000 George Lebl * Release 0.93.5 diff --git a/NEWS b/NEWS index 64aaa46..a203af0 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +1.0.0 + * accept an identifier such as a constant in array dimensions + * updated manpage with build instructions + 0.93.5 * destructors run after destroy, not before finalize, * zero out data after destruction diff --git a/configure b/configure index 1ae471e..753ec48 100755 --- a/configure +++ b/configure @@ -703,7 +703,7 @@ fi PACKAGE=gob -VERSION=0.93.5 +VERSION=1.0.0 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } diff --git a/configure.in b/configure.in index 2072a16..ef35700 100644 --- a/configure.in +++ b/configure.in @@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.2) AC_INIT(src/treefuncs.h) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(gob,0.93.5) +AM_INIT_AUTOMAKE(gob,1.0.0) if test -f ../NOINST_GOB ; then DOINSTGOB= diff --git a/doc/gob.1.in b/doc/gob.1.in index 34ad853..aa9b45d 100644 --- a/doc/gob.1.in +++ b/doc/gob.1.in @@ -900,6 +900,43 @@ Another way to get out of this problem is if you can use those types only in the private members, in which case they won't be in the generated public header. +.SH BUILDING WITH MAKE +.PP +If you are using normal makefiles, what you need to do is to add a generic +rule for .gob files. So you would include the following in the Makefile +and then just use the .c and .h files as usual (make sure the space +before the 'gob' is a tab, not spaces): +.nf + + %.c %.h %-private.h: %.gob + gob $< + +.fi + +.SH BUILDING WITH AUTOCONF and AUTOMAKE +.PP +This is a little bit more involved. Basically the first thing to do is to +check for GOB in your configure.in file. You can use the supplied m4 macro +which will also check the version of gob. Basically you include this: +.nf + + GOB_CHECK(0.93.4) + +.fi +This will replace @GOB@ in your makefiles with the full path of gob. Thus +when adding the generic rule to your Makefile.am file, it should look like: +.nf + + %.c %.h %-private.h: %.gob + @GOB@ $< + +.fi +.PP +For Makefile.am you have to set up a couple more things. First you have to +include the generated .c and .h files into BUILT_SOURCES variable. You +have to include both the .gob and the .c and .h files in the SOURCES for your +program. + .SH BUGS .PP Also the lexer does not actually parse the C code, so I'm sure that some corner diff --git a/gob.m4 b/gob.m4 index 7a86c9b..cb5ee77 100644 --- a/gob.m4 +++ b/gob.m4 @@ -49,11 +49,10 @@ AC_DEFUN([GOB_HOOK],[ AC_SUBST(GOB) $2 else - AC_MSG_ERROR([Cannot find GOB, check http://www.5z.com/jirka/gob.html]) $3 fi ]) AC_DEFUN([GOB_CHECK],[ - GOB_HOOK($1,[],[]) + GOB_HOOK($1,[],[AC_MSG_ERROR([Cannot find GOB, check http://www.5z.com/jirka/gob.html])]) ]) diff --git a/gob.spec b/gob.spec index ecefba4..94e0fd3 100644 --- a/gob.spec +++ b/gob.spec @@ -1,4 +1,4 @@ -%define ver 0.93.5 +%define ver 1.0.0 %define rel 1 %define prefix /usr diff --git a/src/lexer.c b/src/lexer.c index 3cd236c..bbab92d 100644 --- a/src/lexer.c +++ b/src/lexer.c @@ -334,7 +334,7 @@ static yyconst short int yy_acclist[399] = } ; -static yyconst short int yy_accept[356] = +static yyconst short int yy_accept[358] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, @@ -350,31 +350,31 @@ static yyconst short int yy_accept[356] = 215, 215, 215, 215, 215, 216, 216, 217, 217, 217, 218, 219, 220, 220, 221, 222, 223, 224, 225, 226, 226, 227, 228, 228, 228, 229, 229, 229, 230, 230, - 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, - 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, - 250, 250, 250, 251, 251, 252, 252, 252, 252, 253, - 254, 254, 256, 257, 258, 258, 259, 259, 259, 259, - 260, 260, 260, 261, 261, 261, 261, 261, 262, 262, - 262, 262, 263, 264, 264, 265, 265, 265, 266, 267, - 268, 269, 270, 271, 272, 273, 274, 274, 274, 275, - - 276, 277, 277, 278, 279, 280, 281, 282, 283, 284, - 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, - 296, 297, 298, 298, 299, 299, 299, 300, 300, 301, - 302, 302, 302, 302, 303, 304, 305, 305, 306, 307, - 309, 311, 311, 312, 313, 315, 316, 317, 318, 320, - 321, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 333, 335, 335, 336, 336, 336, 337, 337, 337, - 337, 337, 337, 337, 338, 340, 342, 343, 345, 346, - 347, 348, 349, 351, 352, 353, 354, 356, 357, 358, - 358, 358, 358, 358, 358, 358, 359, 360, 362, 363, - - 364, 365, 367, 369, 371, 373, 374, 375, 375, 375, - 375, 375, 375, 376, 377, 378, 380, 381, 382, 384, - 384, 384, 384, 384, 384, 386, 387, 389, 390, 392, - 392, 392, 392, 392, 392, 392, 394, 396, 396, 396, - 396, 397, 397, 397, 397, 397, 398, 398, 398, 398, - 398, 398, 398, 399, 399 + 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, + 250, 250, 250, 250, 251, 251, 252, 252, 252, 252, + 253, 254, 254, 256, 257, 258, 258, 259, 259, 259, + 259, 260, 260, 260, 261, 261, 261, 261, 261, 262, + 262, 262, 262, 263, 264, 264, 265, 265, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, 274, 274, + + 275, 276, 277, 277, 277, 278, 279, 280, 281, 282, + 283, 284, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 298, 299, 299, 299, 300, + 300, 301, 302, 302, 302, 302, 303, 304, 305, 305, + 306, 307, 309, 311, 311, 312, 313, 315, 316, 317, + 318, 320, 321, 323, 324, 325, 326, 327, 328, 329, + 330, 331, 332, 333, 335, 335, 336, 336, 336, 337, + 337, 337, 337, 337, 337, 337, 338, 340, 342, 343, + 345, 346, 347, 348, 349, 351, 352, 353, 354, 356, + 357, 358, 358, 358, 358, 358, 358, 358, 359, 360, + + 362, 363, 364, 365, 367, 369, 371, 373, 374, 375, + 375, 375, 375, 375, 375, 376, 377, 378, 380, 381, + 382, 384, 384, 384, 384, 384, 384, 386, 387, 389, + 390, 392, 392, 392, 392, 392, 392, 392, 394, 396, + 396, 396, 396, 397, 397, 397, 397, 397, 398, 398, + 398, 398, 398, 398, 398, 399, 399 } ; static yyconst int yy_ec[256] = @@ -413,300 +413,310 @@ static yyconst int yy_meta[55] = { 0, 1, 2, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 5, 1, - 1, 6, 6, 7, 7, 7, 7, 1, 1, 1, + 1, 6, 6, 7, 7, 7, 7, 1, 1, 8, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1, 1 } ; -static yyconst short int yy_base[379] = +static yyconst short int yy_base[383] = { 0, 0, 4, 7, 13, 17, 69, 24, 36, 123, 0, - 165, 0, 31, 52, 48, 77, 55, 81, 822, 823, - 823, 823, 823, 1, 781, 42, 56, 785, 823, 823, - 823, 805, 791, 823, 823, 823, 823, 57, 10, 0, - 823, 823, 27, 763, 823, 823, 823, 823, 0, 78, - 0, 797, 22, 49, 77, 823, 86, 93, 171, 101, + 165, 0, 31, 52, 48, 77, 55, 81, 848, 849, + 849, 849, 849, 1, 807, 42, 56, 811, 849, 849, + 849, 831, 817, 849, 849, 849, 849, 57, 10, 0, + 849, 849, 27, 789, 849, 849, 849, 849, 0, 78, + 0, 823, 22, 49, 77, 849, 86, 93, 171, 101, 209, 171, 173, 26, 55, 72, 178, 187, 172, 183, - 202, 191, 209, 823, 823, 823, 823, 801, 232, 233, - 823, 823, 800, 241, 252, 810, 809, 228, 823, 808, - 779, 254, 774, 220, 210, 75, 823, 763, 823, 0, - - 798, 243, 797, 796, 823, 801, 823, 260, 761, 823, - 823, 823, 799, 782, 781, 780, 17, 232, 242, 785, - 254, 785, 793, 261, 267, 273, 0, 288, 277, 767, - 166, 30, 89, 268, 279, 283, 290, 289, 292, 294, - 296, 175, 293, 301, 295, 303, 297, 305, 823, 343, - 316, 344, 823, 349, 823, 351, 355, 359, 823, 363, - 780, 823, 823, 823, 790, 823, 745, 751, 737, 823, - 758, 735, 823, 734, 747, 736, 758, 823, 774, 773, - 772, 823, 823, 777, 823, 746, 775, 823, 758, 757, - 756, 312, 351, 352, 823, 357, 374, 771, 823, 365, - - 0, 370, 359, 365, 370, 371, 298, 372, 374, 754, - 375, 376, 377, 378, 379, 382, 383, 384, 387, 385, - 388, 306, 418, 823, 725, 361, 823, 737, 823, 823, - 720, 730, 743, 823, 823, 823, 727, 747, 391, 746, - 745, 429, 823, 410, 744, 396, 397, 416, 743, 420, - 742, 421, 422, 423, 425, 427, 428, 429, 430, 433, - 431, 741, 452, 823, 471, 476, 823, 716, 723, 726, - 710, 0, 706, 442, 441, 735, 447, 734, 446, 450, - 464, 467, 733, 465, 468, 469, 732, 452, 470, 706, - 703, 700, 712, 723, 711, 472, 474, 721, 476, 477, - - 480, 714, 699, 698, 694, 484, 485, 458, 643, 611, - 641, 560, 488, 489, 496, 575, 497, 490, 574, 549, - 553, 321, 504, 524, 570, 499, 566, 508, 555, 520, - 527, 528, 522, 536, 529, 531, 308, 243, 542, 550, - 823, 535, 233, 554, 542, 823, 160, 560, 60, 564, - 581, 585, 823, 823, 599, 606, 613, 620, 627, 634, - 641, 648, 655, 657, 661, 668, 675, 682, 689, 693, - 697, 704, 708, 713, 717, 723, 730, 737 + 202, 191, 209, 849, 849, 849, 849, 827, 232, 233, + 849, 849, 826, 241, 252, 836, 835, 228, 849, 834, + 805, 254, 800, 220, 210, 75, 849, 789, 849, 0, + + 824, 243, 823, 822, 849, 827, 849, 260, 787, 849, + 849, 849, 825, 808, 807, 806, 17, 232, 242, 811, + 254, 811, 819, 261, 267, 273, 0, 288, 277, 791, + 792, 166, 30, 89, 268, 279, 283, 290, 289, 292, + 294, 296, 175, 293, 301, 295, 303, 297, 305, 849, + 343, 316, 344, 849, 349, 849, 351, 355, 359, 849, + 363, 805, 849, 849, 849, 815, 849, 770, 776, 762, + 849, 783, 760, 849, 759, 772, 761, 783, 849, 799, + 798, 797, 849, 849, 802, 849, 771, 800, 849, 783, + 782, 781, 312, 351, 352, 849, 357, 374, 796, 849, + + 365, 0, 768, 370, 359, 365, 370, 371, 298, 372, + 374, 778, 375, 376, 377, 378, 379, 382, 383, 384, + 387, 385, 388, 306, 418, 849, 749, 361, 849, 761, + 849, 849, 744, 754, 767, 849, 849, 849, 751, 771, + 391, 770, 769, 429, 849, 410, 768, 396, 397, 416, + 767, 420, 766, 421, 422, 423, 425, 427, 428, 429, + 430, 433, 431, 765, 452, 849, 471, 476, 849, 740, + 747, 750, 734, 0, 730, 442, 441, 759, 447, 758, + 446, 450, 464, 467, 757, 465, 468, 469, 756, 452, + 470, 730, 727, 724, 736, 742, 723, 472, 474, 723, + + 476, 477, 480, 722, 716, 713, 674, 484, 485, 458, + 644, 619, 648, 560, 488, 489, 496, 575, 497, 490, + 574, 549, 553, 321, 504, 524, 570, 499, 566, 508, + 555, 520, 527, 528, 522, 536, 529, 531, 308, 243, + 542, 550, 849, 535, 233, 554, 542, 849, 160, 560, + 60, 564, 581, 585, 849, 849, 599, 607, 615, 623, + 631, 639, 647, 655, 663, 666, 670, 674, 682, 690, + 698, 706, 711, 715, 722, 727, 730, 737, 741, 747, + 754, 762 } ; -static yyconst short int yy_def[379] = +static yyconst short int yy_def[383] = { 0, - 355, 355, 356, 356, 357, 357, 358, 358, 354, 9, - 9, 11, 359, 359, 360, 360, 361, 361, 354, 354, - 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, - 354, 354, 354, 354, 354, 354, 354, 354, 354, 362, - 354, 354, 354, 354, 354, 354, 354, 354, 363, 354, - 364, 365, 365, 365, 365, 354, 354, 354, 354, 354, - 354, 365, 365, 365, 365, 365, 365, 365, 365, 365, - 365, 365, 365, 354, 354, 354, 354, 354, 354, 354, - 354, 354, 354, 354, 354, 354, 354, 354, 354, 366, - 354, 354, 354, 354, 354, 354, 354, 354, 354, 367, - - 354, 354, 354, 354, 354, 368, 354, 354, 354, 354, - 354, 354, 369, 370, 365, 371, 365, 365, 365, 354, - 354, 354, 372, 354, 354, 354, 373, 354, 354, 354, - 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, - 365, 365, 365, 365, 365, 365, 365, 365, 354, 354, - 354, 354, 354, 374, 354, 354, 354, 354, 354, 354, - 354, 354, 354, 354, 366, 354, 354, 354, 354, 354, - 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, - 354, 354, 354, 368, 354, 354, 369, 354, 370, 375, - 371, 365, 365, 365, 354, 354, 354, 372, 354, 354, - - 373, 354, 365, 365, 365, 365, 365, 365, 365, 365, - 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, - 365, 365, 376, 354, 354, 354, 354, 354, 354, 354, - 354, 354, 354, 354, 354, 354, 354, 375, 365, 365, - 365, 354, 354, 365, 365, 365, 365, 365, 365, 365, - 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, - 365, 365, 354, 354, 376, 354, 354, 354, 354, 354, - 354, 377, 354, 365, 365, 365, 365, 365, 365, 365, - 365, 365, 365, 365, 365, 365, 365, 365, 365, 354, - 354, 354, 354, 354, 354, 365, 365, 365, 365, 365, - - 365, 365, 365, 365, 365, 365, 365, 354, 354, 354, - 354, 354, 365, 365, 365, 365, 365, 365, 365, 354, - 354, 354, 354, 354, 365, 365, 365, 365, 365, 354, - 354, 354, 354, 354, 354, 365, 365, 354, 354, 354, - 354, 378, 354, 354, 378, 354, 354, 354, 354, 354, - 354, 354, 354, 0, 354, 354, 354, 354, 354, 354, - 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, - 354, 354, 354, 354, 354, 354, 354, 354 + 357, 357, 358, 358, 359, 359, 360, 360, 356, 9, + 9, 11, 361, 361, 362, 362, 363, 363, 356, 356, + 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, + 356, 356, 356, 356, 356, 356, 356, 356, 356, 364, + 356, 356, 356, 356, 356, 356, 356, 356, 365, 356, + 366, 367, 367, 367, 367, 356, 356, 356, 356, 356, + 368, 367, 367, 367, 367, 367, 367, 367, 367, 367, + 367, 367, 367, 356, 356, 356, 356, 356, 356, 356, + 356, 356, 356, 356, 356, 356, 356, 356, 356, 369, + 356, 356, 356, 356, 356, 356, 356, 356, 356, 370, + + 356, 356, 356, 356, 356, 371, 356, 356, 356, 356, + 356, 356, 372, 373, 367, 374, 367, 367, 367, 356, + 356, 356, 375, 356, 356, 356, 376, 356, 356, 377, + 356, 367, 367, 367, 367, 367, 367, 367, 367, 367, + 367, 367, 367, 367, 367, 367, 367, 367, 367, 356, + 356, 356, 356, 356, 378, 356, 356, 356, 356, 356, + 356, 356, 356, 356, 356, 369, 356, 356, 356, 356, + 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, + 356, 356, 356, 356, 371, 356, 356, 372, 356, 373, + 379, 374, 367, 367, 367, 356, 356, 356, 375, 356, + + 356, 376, 377, 368, 367, 367, 367, 367, 367, 367, + 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, + 367, 367, 367, 367, 380, 356, 356, 356, 356, 356, + 356, 356, 356, 356, 356, 356, 356, 356, 356, 379, + 367, 367, 367, 356, 356, 367, 367, 367, 367, 367, + 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, + 367, 367, 367, 367, 356, 356, 380, 356, 356, 356, + 356, 356, 356, 381, 356, 367, 367, 367, 367, 367, + 367, 367, 367, 367, 367, 367, 367, 367, 367, 367, + 367, 356, 356, 356, 356, 356, 356, 367, 367, 367, + + 367, 367, 367, 367, 367, 367, 367, 367, 367, 356, + 356, 356, 356, 356, 367, 367, 367, 367, 367, 367, + 367, 356, 356, 356, 356, 356, 367, 367, 367, 367, + 367, 356, 356, 356, 356, 356, 356, 367, 367, 356, + 356, 356, 356, 382, 356, 356, 382, 356, 356, 356, + 356, 356, 356, 356, 356, 0, 356, 356, 356, 356, + 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, + 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, + 356, 356 } ; -static yyconst short int yy_nxt[878] = +static yyconst short int yy_nxt[904] = { 0, - 354, 21, 22, 23, 21, 26, 22, 23, 26, 30, + 356, 21, 22, 23, 21, 26, 22, 23, 26, 30, 31, 27, 89, 24, 90, 30, 31, 24, 32, 35, 36, 105, 37, 106, 32, 38, 46, 47, 108, 48, 39, 108, 25, 22, 77, 116, 25, 33, 46, 47, - 116, 48, 78, 92, 116, 40, 92, 192, 116, 28, + 116, 48, 78, 92, 116, 40, 92, 193, 116, 28, 22, 82, 49, 79, 22, 77, 79, 22, 87, 83, - 204, 117, 101, 80, 49, 109, 88, 116, 135, 41, + 206, 117, 101, 80, 49, 109, 88, 116, 136, 41, 42, 35, 36, 116, 37, 43, 44, 38, 84, 22, 82, 84, 39, 22, 87, 102, 94, 93, 85, 112, - 116, 113, 88, 95, 118, 116, 136, 40, 120, 96, + 116, 113, 88, 95, 118, 116, 137, 40, 120, 96, - 121, 121, 121, 121, 122, 174, 123, 116, 97, 103, - 104, 137, 174, 124, 119, 128, 128, 128, 128, 205, - 175, 41, 42, 20, 21, 22, 23, 21, 20, 20, + 121, 121, 121, 121, 122, 175, 123, 116, 97, 103, + 104, 138, 175, 124, 119, 128, 128, 128, 128, 207, + 176, 41, 42, 20, 21, 22, 23, 21, 20, 20, 20, 20, 20, 20, 20, 20, 50, 20, 20, 20, 20, 51, 20, 20, 52, 52, 52, 52, 52, 52, 20, 20, 20, 52, 52, 53, 52, 52, 54, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 55, 52, 52, 52, 52, 56, 20, 57, 58, 59, 60, 60, 60, 124, 116, 125, 125, 125, 126, 116, - 116, 116, 61, 116, 349, 62, 116, 63, 64, 65, - - 66, 116, 203, 67, 68, 116, 215, 69, 70, 116, - 132, 71, 133, 72, 73, 134, 131, 74, 75, 138, - 116, 140, 127, 129, 129, 129, 129, 116, 141, 139, - 163, 142, 146, 150, 152, 153, 150, 154, 130, 143, - 144, 164, 156, 151, 171, 156, 149, 147, 179, 145, - 116, 148, 157, 158, 159, 92, 160, 172, 92, 168, - 116, 108, 173, 161, 108, 162, 347, 169, 196, 196, - 196, 196, 170, 343, 193, 200, 200, 200, 200, 124, - 194, 125, 125, 125, 126, 124, 116, 126, 126, 126, - 126, 129, 129, 129, 129, 180, 181, 116, 109, 93, - - 124, 116, 128, 128, 128, 128, 130, 116, 116, 206, - 116, 116, 116, 116, 116, 116, 116, 152, 153, 116, - 154, 116, 332, 116, 116, 332, 116, 207, 212, 248, - 116, 208, 209, 211, 213, 216, 210, 217, 214, 262, - 218, 219, 221, 222, 150, 152, 153, 150, 152, 220, - 152, 153, 156, 152, 151, 156, 158, 159, 239, 160, - 158, 159, 157, 158, 158, 159, 161, 158, 224, 116, - 116, 196, 196, 196, 196, 242, 243, 116, 242, 200, - 200, 200, 200, 116, 129, 129, 129, 129, 116, 116, - 116, 240, 116, 116, 116, 116, 116, 116, 241, 130, - - 116, 116, 116, 116, 250, 116, 116, 244, 268, 116, - 245, 251, 249, 170, 116, 116, 246, 247, 255, 263, - 264, 252, 263, 260, 257, 254, 253, 256, 116, 259, - 242, 243, 258, 242, 116, 261, 266, 241, 116, 116, - 116, 116, 275, 116, 276, 116, 116, 116, 116, 116, - 274, 116, 280, 263, 264, 277, 263, 281, 284, 116, - 116, 286, 285, 282, 116, 116, 279, 278, 116, 288, - 116, 287, 263, 264, 283, 263, 296, 263, 264, 289, - 263, 298, 116, 116, 299, 116, 116, 116, 116, 266, - 116, 297, 116, 306, 116, 116, 301, 300, 116, 302, - - 307, 304, 116, 116, 303, 320, 116, 116, 116, 315, - 173, 316, 314, 313, 116, 116, 305, 116, 318, 333, - 334, 334, 326, 329, 319, 335, 116, 317, 335, 332, - 327, 328, 332, 336, 342, 325, 340, 340, 340, 340, - 346, 337, 339, 339, 339, 339, 341, 346, 342, 116, - 340, 340, 340, 340, 344, 346, 339, 339, 339, 339, - 341, 338, 346, 172, 340, 340, 340, 340, 348, 348, - 348, 348, 350, 116, 348, 348, 348, 348, 351, 351, - 351, 351, 352, 353, 116, 352, 352, 353, 116, 352, - 331, 330, 116, 116, 324, 351, 351, 351, 351, 20, - - 20, 20, 20, 20, 20, 20, 29, 29, 29, 29, - 29, 29, 29, 34, 34, 34, 34, 34, 34, 34, - 45, 45, 45, 45, 45, 45, 45, 76, 76, 76, - 76, 76, 76, 76, 81, 81, 81, 81, 81, 81, - 81, 86, 86, 86, 86, 86, 86, 86, 107, 107, - 323, 107, 107, 107, 107, 111, 111, 322, 111, 111, - 111, 111, 114, 114, 115, 115, 115, 115, 165, 165, - 165, 165, 165, 165, 165, 177, 177, 321, 177, 177, - 177, 177, 184, 184, 184, 184, 184, 184, 184, 187, - 187, 187, 187, 187, 187, 187, 189, 189, 189, 189, - - 191, 191, 191, 191, 198, 198, 198, 198, 198, 198, - 198, 201, 116, 201, 223, 223, 116, 116, 223, 223, - 238, 238, 238, 238, 265, 265, 265, 265, 265, 265, - 294, 294, 116, 294, 294, 294, 294, 345, 345, 116, - 345, 345, 345, 345, 312, 311, 310, 309, 308, 169, - 116, 116, 116, 116, 295, 293, 292, 291, 290, 116, - 116, 116, 116, 116, 116, 190, 273, 272, 271, 270, - 269, 267, 116, 199, 116, 190, 190, 188, 237, 185, - 236, 235, 234, 233, 232, 231, 230, 229, 228, 227, - 226, 225, 166, 224, 202, 199, 197, 195, 116, 116, - - 190, 188, 186, 185, 183, 182, 178, 176, 98, 167, - 166, 163, 163, 155, 149, 116, 110, 100, 99, 98, - 91, 354, 19, 354, 354, 354, 354, 354, 354, 354, - 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, - 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, - 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, - 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, - 354, 354, 354, 354, 354, 354, 354 + 116, 116, 61, 116, 351, 62, 116, 63, 64, 65, + + 66, 116, 205, 67, 68, 116, 217, 69, 70, 116, + 133, 71, 134, 72, 73, 135, 132, 74, 75, 139, + 116, 141, 127, 129, 129, 129, 129, 116, 142, 140, + 164, 143, 147, 151, 153, 154, 151, 155, 131, 144, + 145, 165, 157, 152, 172, 157, 150, 148, 180, 146, + 116, 149, 158, 159, 160, 92, 161, 173, 92, 169, + 116, 108, 174, 162, 108, 163, 349, 170, 197, 197, + 197, 197, 171, 345, 194, 201, 201, 201, 201, 124, + 195, 125, 125, 125, 126, 124, 116, 126, 126, 126, + 126, 129, 129, 129, 129, 181, 182, 116, 109, 93, + + 124, 116, 128, 128, 128, 128, 131, 116, 116, 208, + 116, 116, 116, 116, 116, 116, 116, 153, 154, 116, + 155, 116, 334, 116, 116, 334, 116, 209, 214, 250, + 116, 210, 211, 213, 215, 218, 212, 219, 216, 264, + 220, 221, 223, 224, 151, 153, 154, 151, 153, 222, + 153, 154, 157, 153, 152, 157, 159, 160, 241, 161, + 159, 160, 158, 159, 159, 160, 162, 159, 226, 116, + 116, 197, 197, 197, 197, 244, 245, 116, 244, 201, + 201, 201, 201, 116, 129, 129, 129, 129, 116, 116, + 116, 242, 116, 116, 116, 116, 116, 116, 243, 131, + + 116, 116, 116, 116, 252, 116, 116, 246, 270, 116, + 247, 253, 251, 171, 116, 116, 248, 249, 257, 265, + 266, 254, 265, 262, 259, 256, 255, 258, 116, 261, + 244, 245, 260, 244, 116, 263, 268, 243, 116, 116, + 116, 116, 277, 116, 278, 116, 116, 116, 116, 116, + 276, 116, 282, 265, 266, 279, 265, 283, 286, 116, + 116, 288, 287, 284, 116, 116, 281, 280, 116, 290, + 116, 289, 265, 266, 285, 265, 298, 265, 266, 291, + 265, 300, 116, 116, 301, 116, 116, 116, 116, 268, + 116, 299, 116, 308, 116, 116, 303, 302, 116, 304, + + 309, 306, 116, 116, 305, 322, 116, 116, 116, 317, + 174, 318, 316, 315, 116, 116, 307, 116, 320, 335, + 336, 336, 328, 331, 321, 337, 116, 319, 337, 334, + 329, 330, 334, 338, 344, 327, 342, 342, 342, 342, + 348, 339, 341, 341, 341, 341, 343, 348, 344, 116, + 342, 342, 342, 342, 346, 348, 341, 341, 341, 341, + 343, 340, 348, 173, 342, 342, 342, 342, 350, 350, + 350, 350, 352, 116, 350, 350, 350, 350, 353, 353, + 353, 353, 354, 355, 116, 354, 354, 355, 116, 354, + 333, 332, 116, 116, 326, 353, 353, 353, 353, 20, + + 20, 20, 20, 20, 20, 20, 20, 29, 29, 29, + 29, 29, 29, 29, 29, 34, 34, 34, 34, 34, + 34, 34, 34, 45, 45, 45, 45, 45, 45, 45, + 45, 76, 76, 76, 76, 76, 76, 76, 76, 81, + 81, 81, 81, 81, 81, 81, 81, 86, 86, 86, + 86, 86, 86, 86, 86, 107, 107, 325, 107, 107, + 107, 107, 107, 111, 111, 324, 111, 111, 111, 111, + 111, 114, 114, 115, 115, 115, 115, 130, 323, 130, + 130, 130, 166, 166, 166, 166, 166, 166, 166, 166, + 178, 178, 116, 178, 178, 178, 178, 178, 185, 185, + + 185, 185, 185, 185, 185, 185, 188, 188, 188, 188, + 188, 188, 188, 188, 190, 190, 190, 190, 192, 192, + 192, 192, 199, 199, 199, 199, 199, 199, 199, 199, + 202, 116, 202, 203, 116, 203, 203, 203, 225, 225, + 116, 116, 225, 225, 240, 240, 240, 240, 267, 267, + 267, 267, 267, 267, 296, 296, 314, 296, 296, 296, + 296, 296, 347, 347, 313, 347, 347, 347, 347, 347, + 312, 311, 310, 170, 116, 116, 116, 116, 297, 295, + 294, 293, 292, 116, 116, 116, 116, 116, 116, 191, + 275, 274, 273, 272, 271, 269, 116, 131, 200, 116, + + 191, 191, 189, 239, 186, 238, 237, 236, 235, 234, + 233, 232, 231, 230, 229, 228, 227, 167, 226, 204, + 131, 200, 198, 196, 116, 116, 191, 189, 187, 186, + 184, 183, 179, 177, 98, 168, 167, 164, 164, 156, + 150, 116, 110, 100, 99, 98, 91, 356, 19, 356, + 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, + 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, + 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, + 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, + 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, + + 356, 356, 356 } ; -static yyconst short int yy_chk[878] = +static yyconst short int yy_chk[904] = { 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 2, 24, 1, 24, 4, 4, 2, 3, 5, 5, 39, 5, 39, 4, 5, 7, 7, 43, 7, 5, 43, 1, 13, 13, 117, 2, 4, 8, 8, - 53, 8, 13, 26, 64, 5, 26, 117, 132, 2, + 53, 8, 13, 26, 64, 5, 26, 117, 133, 2, 15, 15, 7, 14, 14, 14, 14, 17, 17, 15, - 132, 53, 38, 14, 8, 43, 17, 54, 64, 5, + 133, 53, 38, 14, 8, 43, 17, 54, 64, 5, 5, 6, 6, 65, 6, 6, 6, 6, 16, 16, 16, 16, 6, 18, 18, 38, 27, 26, 16, 50, 66, 50, 18, 27, 54, 55, 65, 6, 57, 27, - 57, 57, 57, 57, 58, 349, 58, 133, 27, 38, - 38, 66, 96, 60, 55, 60, 60, 60, 60, 133, + 57, 57, 57, 57, 58, 351, 58, 134, 27, 38, + 38, 66, 96, 60, 55, 60, 60, 60, 60, 134, 96, 6, 6, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 11, 11, 11, - 11, 11, 11, 59, 131, 59, 59, 59, 59, 62, - 69, 63, 11, 142, 347, 11, 67, 11, 11, 11, + 11, 11, 11, 59, 132, 59, 59, 59, 59, 62, + 69, 63, 11, 143, 349, 11, 67, 11, 11, 11, - 11, 70, 131, 11, 11, 68, 142, 11, 11, 72, + 11, 70, 132, 11, 11, 68, 143, 11, 11, 72, 63, 11, 63, 11, 11, 63, 62, 11, 11, 67, 71, 69, 59, 61, 61, 61, 61, 73, 70, 68, 88, 70, 72, 79, 80, 80, 79, 80, 61, 71, 71, 88, 84, 79, 95, 84, 80, 73, 102, 71, 118, 73, 84, 85, 85, 92, 85, 95, 92, 94, - 119, 108, 95, 85, 108, 85, 343, 94, 121, 121, - 121, 121, 94, 338, 118, 124, 124, 124, 124, 125, - 119, 125, 125, 125, 125, 126, 134, 126, 126, 126, - 126, 129, 129, 129, 129, 102, 102, 135, 108, 92, - - 128, 136, 128, 128, 128, 128, 129, 138, 137, 134, - 139, 143, 140, 145, 141, 147, 207, 151, 151, 144, - 151, 146, 322, 148, 222, 322, 337, 135, 140, 207, - 192, 136, 137, 139, 141, 143, 138, 144, 141, 222, - 145, 146, 147, 148, 150, 152, 152, 150, 152, 146, - 154, 154, 156, 154, 150, 156, 157, 157, 192, 157, - 158, 158, 156, 158, 160, 160, 157, 160, 157, 193, - 194, 196, 196, 196, 196, 197, 197, 203, 197, 200, - 200, 200, 200, 204, 202, 202, 202, 202, 205, 206, - 208, 193, 209, 211, 212, 213, 214, 215, 194, 202, - - 216, 217, 218, 220, 209, 219, 221, 203, 226, 239, - 204, 211, 208, 226, 246, 247, 205, 206, 215, 223, - 223, 212, 223, 220, 217, 214, 213, 216, 244, 219, - 242, 242, 218, 242, 248, 221, 223, 239, 250, 252, - 253, 254, 246, 255, 247, 256, 257, 258, 259, 261, - 244, 260, 253, 263, 263, 248, 263, 254, 257, 275, - 274, 258, 257, 255, 279, 277, 252, 250, 280, 260, - 288, 259, 265, 265, 256, 265, 274, 266, 266, 261, - 266, 277, 281, 284, 279, 282, 285, 286, 289, 265, - 296, 275, 297, 288, 299, 300, 281, 280, 301, 282, - - 289, 285, 306, 307, 284, 308, 313, 314, 318, 299, - 308, 300, 297, 296, 315, 317, 286, 326, 306, 323, - 323, 323, 314, 318, 307, 324, 328, 301, 324, 332, - 315, 317, 332, 326, 335, 313, 333, 333, 333, 333, - 342, 328, 332, 332, 332, 332, 334, 345, 335, 336, - 334, 334, 334, 334, 339, 342, 339, 339, 339, 339, - 340, 331, 345, 330, 340, 340, 340, 340, 344, 344, - 344, 344, 348, 329, 348, 348, 348, 348, 350, 350, - 350, 350, 351, 351, 327, 351, 352, 352, 325, 352, - 321, 320, 319, 316, 312, 351, 351, 351, 351, 355, - - 355, 355, 355, 355, 355, 355, 356, 356, 356, 356, - 356, 356, 356, 357, 357, 357, 357, 357, 357, 357, - 358, 358, 358, 358, 358, 358, 358, 359, 359, 359, - 359, 359, 359, 359, 360, 360, 360, 360, 360, 360, - 360, 361, 361, 361, 361, 361, 361, 361, 362, 362, - 311, 362, 362, 362, 362, 363, 363, 310, 363, 363, - 363, 363, 364, 364, 365, 365, 365, 365, 366, 366, - 366, 366, 366, 366, 366, 367, 367, 309, 367, 367, - 367, 367, 368, 368, 368, 368, 368, 368, 368, 369, - 369, 369, 369, 369, 369, 369, 370, 370, 370, 370, - - 371, 371, 371, 371, 372, 372, 372, 372, 372, 372, - 372, 373, 305, 373, 374, 374, 304, 303, 374, 374, - 375, 375, 375, 375, 376, 376, 376, 376, 376, 376, - 377, 377, 302, 377, 377, 377, 377, 378, 378, 298, - 378, 378, 378, 378, 295, 294, 293, 292, 291, 290, - 287, 283, 278, 276, 273, 271, 270, 269, 268, 262, - 251, 249, 245, 241, 240, 238, 237, 233, 232, 231, - 228, 225, 210, 198, 191, 190, 189, 187, 186, 184, - 181, 180, 179, 177, 176, 175, 174, 172, 171, 169, - 168, 167, 165, 161, 130, 123, 122, 120, 116, 115, - - 114, 113, 109, 106, 104, 103, 101, 98, 93, 91, - 90, 87, 86, 83, 78, 52, 44, 33, 32, 28, - 25, 19, 354, 354, 354, 354, 354, 354, 354, 354, - 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, - 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, - 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, - 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, - 354, 354, 354, 354, 354, 354, 354 + 119, 108, 95, 85, 108, 85, 345, 94, 121, 121, + 121, 121, 94, 340, 118, 124, 124, 124, 124, 125, + 119, 125, 125, 125, 125, 126, 135, 126, 126, 126, + 126, 129, 129, 129, 129, 102, 102, 136, 108, 92, + + 128, 137, 128, 128, 128, 128, 129, 139, 138, 135, + 140, 144, 141, 146, 142, 148, 209, 152, 152, 145, + 152, 147, 324, 149, 224, 324, 339, 136, 141, 209, + 193, 137, 138, 140, 142, 144, 139, 145, 142, 224, + 146, 147, 148, 149, 151, 153, 153, 151, 153, 147, + 155, 155, 157, 155, 151, 157, 158, 158, 193, 158, + 159, 159, 157, 159, 161, 161, 158, 161, 158, 194, + 195, 197, 197, 197, 197, 198, 198, 205, 198, 201, + 201, 201, 201, 206, 204, 204, 204, 204, 207, 208, + 210, 194, 211, 213, 214, 215, 216, 217, 195, 204, + + 218, 219, 220, 222, 211, 221, 223, 205, 228, 241, + 206, 213, 210, 228, 248, 249, 207, 208, 217, 225, + 225, 214, 225, 222, 219, 216, 215, 218, 246, 221, + 244, 244, 220, 244, 250, 223, 225, 241, 252, 254, + 255, 256, 248, 257, 249, 258, 259, 260, 261, 263, + 246, 262, 255, 265, 265, 250, 265, 256, 259, 277, + 276, 260, 259, 257, 281, 279, 254, 252, 282, 262, + 290, 261, 267, 267, 258, 267, 276, 268, 268, 263, + 268, 279, 283, 286, 281, 284, 287, 288, 291, 267, + 298, 277, 299, 290, 301, 302, 283, 282, 303, 284, + + 291, 287, 308, 309, 286, 310, 315, 316, 320, 301, + 310, 302, 299, 298, 317, 319, 288, 328, 308, 325, + 325, 325, 316, 320, 309, 326, 330, 303, 326, 334, + 317, 319, 334, 328, 337, 315, 335, 335, 335, 335, + 344, 330, 334, 334, 334, 334, 336, 347, 337, 338, + 336, 336, 336, 336, 341, 344, 341, 341, 341, 341, + 342, 333, 347, 332, 342, 342, 342, 342, 346, 346, + 346, 346, 350, 331, 350, 350, 350, 350, 352, 352, + 352, 352, 353, 353, 329, 353, 354, 354, 327, 354, + 323, 322, 321, 318, 314, 353, 353, 353, 353, 357, + + 357, 357, 357, 357, 357, 357, 357, 358, 358, 358, + 358, 358, 358, 358, 358, 359, 359, 359, 359, 359, + 359, 359, 359, 360, 360, 360, 360, 360, 360, 360, + 360, 361, 361, 361, 361, 361, 361, 361, 361, 362, + 362, 362, 362, 362, 362, 362, 362, 363, 363, 363, + 363, 363, 363, 363, 363, 364, 364, 313, 364, 364, + 364, 364, 364, 365, 365, 312, 365, 365, 365, 365, + 365, 366, 366, 367, 367, 367, 367, 368, 311, 368, + 368, 368, 369, 369, 369, 369, 369, 369, 369, 369, + 370, 370, 307, 370, 370, 370, 370, 370, 371, 371, + + 371, 371, 371, 371, 371, 371, 372, 372, 372, 372, + 372, 372, 372, 372, 373, 373, 373, 373, 374, 374, + 374, 374, 375, 375, 375, 375, 375, 375, 375, 375, + 376, 306, 376, 377, 305, 377, 377, 377, 378, 378, + 304, 300, 378, 378, 379, 379, 379, 379, 380, 380, + 380, 380, 380, 380, 381, 381, 297, 381, 381, 381, + 381, 381, 382, 382, 296, 382, 382, 382, 382, 382, + 295, 294, 293, 292, 289, 285, 280, 278, 275, 273, + 272, 271, 270, 264, 253, 251, 247, 243, 242, 240, + 239, 235, 234, 233, 230, 227, 212, 203, 199, 192, + + 191, 190, 188, 187, 185, 182, 181, 180, 178, 177, + 176, 175, 173, 172, 170, 169, 168, 166, 162, 131, + 130, 123, 122, 120, 116, 115, 114, 113, 109, 106, + 104, 103, 101, 98, 93, 91, 90, 87, 86, 83, + 78, 52, 44, 33, 32, 28, 25, 19, 356, 356, + 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, + 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, + 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, + 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, + 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, + + 356, 356, 356 } ; static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; @@ -825,7 +835,7 @@ add_gtk_doc_func(void) #define GTK_DOC_LINE 8 -#line 829 "lex.yy.c" +#line 839 "lex.yy.c" /* Macros after this point can all be overridden by user definitions in * section 1. @@ -982,7 +992,7 @@ YY_DECL #line 98 "lexer.l" -#line 986 "lex.yy.c" +#line 996 "lex.yy.c" if ( yy_init ) { @@ -1031,14 +1041,14 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 355 ) + if ( yy_current_state >= 357 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; *yy_state_ptr++ = yy_current_state; ++yy_cp; } - while ( yy_base[yy_current_state] != 823 ); + while ( yy_base[yy_current_state] != 849 ); yy_find_action: yy_current_state = *--yy_state_ptr; @@ -1784,7 +1794,7 @@ YY_RULE_SETUP #line 453 "lexer.l" ECHO; YY_BREAK -#line 1788 "lex.yy.c" +#line 1798 "lex.yy.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(COMMENT): case YY_STATE_EOF(C_CODE): @@ -2082,7 +2092,7 @@ static yy_state_type yy_get_previous_state() while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 355 ) + if ( yy_current_state >= 357 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -2112,11 +2122,11 @@ yy_state_type yy_current_state; while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 355 ) + if ( yy_current_state >= 357 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 354); + yy_is_jam = (yy_current_state == 356); if ( ! yy_is_jam ) *yy_state_ptr++ = yy_current_state; diff --git a/src/lexer.l b/src/lexer.l index 1e7de53..f3a0f2e 100644 --- a/src/lexer.l +++ b/src/lexer.l @@ -419,7 +419,7 @@ class { return TOKEN; } -(\[[0-9]*\])+ { +(\[[0-9]*\]|\[[A-Za-z_][A-Za-z0-9_]*\])+ { yylval.id = g_strdup(yytext); return ARRAY_DIM; } diff --git a/src/test.gob b/src/test.gob index d603930..e31319b 100644 --- a/src/test.gob +++ b/src/test.gob @@ -41,9 +41,11 @@ void bubu(void); %} %header{ /* this should be in the header, just under bubu prototype */ +#define TEST_ARRAY 5 %} class Gtk:Weird:Button from Gtk:Button { + public int test_array[TEST_ARRAY]; public int i; argument INT i set { self->i = ARG; } get { ARG = self->i; } ; -- 2.43.0