Hex Artifact Content
Not logged in

Artifact 84dd973836e11f277f5a88ddc8933cc2a43a2f8e:


0000: 49 20 63 6f 6d 70 6c 65 74 65 64 20 61 6e 20 4c  I completed an L
0010: 41 4c 52 28 31 29 20 70 61 72 73 65 72 20 67 65  ALR(1) parser ge
0020: 6e 65 72 61 74 6f 72 20 61 20 63 6f 75 70 6c 65  nerator a couple
0030: 20 6f 66 20 77 65 65 6b 73 20 61 67 6f 2c 0a 61   of weeks ago,.a
0040: 6e 64 20 49 20 74 68 6f 75 67 68 74 20 69 74 20  nd I thought it 
0050: 6d 69 67 68 74 20 62 65 20 75 73 65 66 75 6c 20  might be useful 
0060: 74 6f 20 73 6f 6d 65 20 6f 66 20 79 6f 75 2e 20  to some of you. 
0070: 20 28 4d 79 20 43 6f 6d 6d 6f 6e 4c 69 73 70 0a   (My CommonLisp.
0080: 76 65 72 73 69 6f 6e 20 73 65 65 6d 73 20 74 6f  version seems to
0090: 20 62 65 20 77 65 6c 6c 2d 75 73 65 64 29 2e 20   be well-used). 
00a0: 20 20 41 6e 79 77 61 79 2c 20 68 65 72 65 20 69    Anyway, here i
00b0: 74 20 69 73 3b 20 69 74 20 68 61 73 0a 62 65 65  t is; it has.bee
00c0: 6e 20 74 65 73 74 65 64 20 6f 6e 20 61 20 63 6f  n tested on a co
00d0: 75 70 6c 65 20 6f 66 20 73 6d 61 6c 6c 20 67 72  uple of small gr
00e0: 61 6d 6d 61 72 73 20 61 6e 64 20 6f 6e 20 61 20  ammars and on a 
00f0: 6c 61 72 67 65 72 20 6f 6e 65 0a 28 74 68 65 20  larger one.(the 
0100: 70 75 72 70 6f 73 65 20 66 6f 72 20 77 68 69 63  purpose for whic
0110: 68 20 69 74 20 77 61 73 20 77 72 69 74 74 65 6e  h it was written
0120: 29 20 61 6e 64 20 73 65 65 6d 73 20 74 6f 20 77  ) and seems to w
0130: 6f 72 6b 20 66 69 6e 65 2e 0a 53 74 69 6c 6c 2c  ork fine..Still,
0140: 20 74 68 65 72 65 20 6d 61 79 20 62 65 20 65 72   there may be er
0150: 72 6f 72 73 20 69 6e 20 69 74 2e 0a 0a 49 74 27  rors in it...It'
0160: 73 20 6f 66 66 65 72 65 64 20 6d 6f 72 65 20 6f  s offered more o
0170: 72 20 6c 65 73 73 20 6f 6e 20 61 6e 20 61 73 2d  r less on an as-
0180: 69 73 20 62 61 73 69 73 3b 20 69 74 27 73 20 61  is basis; it's a
0190: 20 74 6f 6f 6c 20 74 68 61 74 0a 49 20 68 61 76   tool that.I hav
01a0: 65 20 66 6f 75 6e 64 20 75 73 65 66 75 6c 2c 20  e found useful, 
01b0: 61 6e 64 20 49 20 74 68 6f 75 67 68 74 20 74 68  and I thought th
01c0: 61 74 20 6f 74 68 65 72 73 20 6d 69 67 68 74 20  at others might 
01d0: 61 73 20 77 65 6c 6c 2e 0a 0a 54 68 69 73 20 6d  as well...This m
01e0: 65 73 73 61 67 65 20 63 6f 6e 74 61 69 6e 73 20  essage contains 
01f0: 74 68 72 65 65 20 66 69 6c 65 73 3b 20 6c 61 6c  three files; lal
0200: 72 2e 73 73 2c 20 6c 61 6c 72 2d 74 65 73 74 2e  r.ss, lalr-test.
0210: 73 73 2c 20 61 6e 64 0a 61 20 75 74 69 6c 69 74  ss, and.a utilit
0220: 79 20 63 61 6c 6c 65 64 20 61 73 73 6f 63 2e 73  y called assoc.s
0230: 73 20 28 74 68 69 73 20 69 73 20 6f 6e 6c 79 20  s (this is only 
0240: 6e 65 65 64 65 64 20 66 6f 72 20 70 61 72 73 65  needed for parse
0250: 20 74 61 62 6c 65 0a 63 6f 6e 73 74 72 75 63 74   table.construct
0260: 69 6f 6e 29 2e 20 20 49 74 20 6e 65 65 64 73 20  ion).  It needs 
0270: 74 68 65 20 73 6f 72 74 20 75 74 69 6c 69 74 79  the sort utility
0280: 20 64 69 73 74 72 69 62 75 74 65 64 20 69 6e 20   distributed in 
0290: 53 4c 49 42 2e 0a                                SLIB..