home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 12 / BBS in a box XII-2.iso / Files II / Prog / B-C / C++Source Code Fmtr.sit / Src / ParserActions.h < prev    next >
MacBinary  |  1992-04-27  |  10.3 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: ParserActions.h

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Mon Apr 27 21:19:34 1992, modified Mon Apr 27 21:19:34 1992, creator 'MPS ', type ASCII, 9103 bytes "ParserActions.h" , at 0x240f 1104 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0f 50 61 72 73 65 72 | 41 63 74 69 6f 6e 73 2e |..Parser|Actions.|
|00000010| 68 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |h.......|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 00 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 23 8f 00 | 00 04 50 a6 22 58 a6 a6 |.....#..|..P."X..|
|00000060| 22 58 a6 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |"X......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 7c fa 00 00 |........|....|...|
|00000080| 23 69 66 6e 64 65 66 20 | 5f 5f 50 41 52 53 45 52 |#ifndef |__PARSER|
|00000090| 41 43 54 49 4f 4e 53 5f | 5f 0d 23 64 65 66 69 6e |ACTIONS_|_.#defin|
|000000a0| 65 20 5f 5f 50 41 52 53 | 45 52 41 43 54 49 4f 4e |e __PARS|ERACTION|
|000000b0| 53 5f 5f 09 31 0d 0d 23 | 69 66 6e 64 65 66 20 5f |S__.1..#|ifndef _|
|000000c0| 5f 43 53 43 41 4e 4e 45 | 52 5f 5f 0d 23 69 6e 63 |_CSCANNE|R__.#inc|
|000000d0| 6c 75 64 65 20 22 43 53 | 63 61 6e 6e 65 72 2e 68 |lude "CS|canner.h|
|000000e0| 22 0d 23 65 6e 64 69 66 | 09 0d 0d 23 69 66 6e 64 |".#endif|...#ifnd|
|000000f0| 65 66 20 5f 5f 50 41 52 | 53 45 52 5f 5f 0d 23 69 |ef __PAR|SER__.#i|
|00000100| 6e 63 6c 75 64 65 20 22 | 50 61 72 73 65 72 2e 68 |nclude "|Parser.h|
|00000110| 22 0d 23 65 6e 64 69 66 | 09 0d 0d 0d 23 70 72 61 |".#endif|....#pra|
|00000120| 67 6d 61 20 73 65 67 6d | 65 6e 74 20 50 61 72 73 |gma segm|ent Pars|
|00000130| 65 72 41 63 74 69 6f 6e | 73 0d 0d 0d 2f 2a 0d 2a |erAction|s.../*.*|
|00000140| 2a 20 44 65 66 69 6e 65 | 20 74 68 65 20 74 79 70 |* Define| the typ|
|00000150| 65 73 20 74 68 61 74 20 | 70 61 72 73 65 20 69 74 |es that |parse it|
|00000160| 65 6d 73 20 63 61 6e 20 | 62 65 2e 0d 2a 2f 0d 65 |ems can |be..*/.e|
|00000170| 6e 75 6d 20 7b 0d 09 6b | 53 4c 65 78 5f 46 6c 75 |num {..k|SLex_Flu|
|00000180| 73 68 20 3d 20 6b 53 4c | 65 78 5f 4c 61 73 74 20 |sh = kSL|ex_Last |
|00000190| 2b 20 31 09 09 09 09 2f | 2f 20 55 6e 62 6c 6f 63 |+ 1..../|/ Unbloc|
|000001a0| 6b 73 20 50 72 73 5f 49 | 64 2f 50 72 73 5f 44 65 |ks Prs_I|d/Prs_De|
|000001b0| 63 6c 4f 70 65 72 61 74 | 6f 72 0d 09 2c 20 6b 53 |clOperat|or.., kS|
|000001c0| 4c 65 78 5f 43 6f 6e 74 | 65 78 74 09 09 09 09 09 |Lex_Cont|ext.....|
|000001d0| 09 09 09 2f 2f 20 46 6f | 72 6d 61 74 74 69 6e 67 |...// Fo|rmatting|
|000001e0| 20 63 6f 6e 74 65 78 74 | 20 6d 61 72 6b 65 72 0d | context| marker.|
|000001f0| 0d 09 2c 20 6b 53 50 72 | 73 5f 49 64 20 3d 20 6b |.., kSPr|s_Id = k|
|00000200| 53 50 72 73 09 09 09 09 | 09 09 09 2f 2f 20 42 61 |SPrs....|...// Ba|
|00000210| 73 65 20 70 61 72 73 65 | 20 74 79 70 65 0d 09 2c |se parse| type..,|
|00000220| 20 6b 53 50 72 73 5f 53 | 74 6d 74 4c 69 73 74 09 | kSPrs_S|tmtList.|
|00000230| 09 09 09 09 09 09 2f 2f | 0d 09 2c 20 6b 53 50 72 |......//|.., kSPr|
|00000240| 73 5f 44 65 63 6c 4c 69 | 73 74 09 09 09 09 09 09 |s_DeclLi|st......|
|00000250| 09 2f 2f 0d 09 2c 20 6b | 53 50 72 73 5f 44 65 63 |.//.., k|SPrs_Dec|
|00000260| 6c 54 79 70 65 09 09 09 | 09 09 09 09 2f 2f 0d 09 |lType...|....//..|
|00000270| 2c 20 6b 53 50 72 73 5f | 53 74 6d 74 09 09 09 09 |, kSPrs_|Stmt....|
|00000280| 09 09 09 09 2f 2f 0d 09 | 2c 20 6b 53 50 72 73 5f |....//..|, kSPrs_|
|00000290| 44 65 63 6c 09 09 09 09 | 09 09 09 09 2f 2f 0d 09 |Decl....|....//..|
|000002a0| 2c 20 6b 53 50 72 73 5f | 44 6f 09 09 09 09 09 09 |, kSPrs_|Do......|
|000002b0| 09 09 09 2f 2f 0d 09 2c | 20 6b 53 50 72 73 5f 49 |...//..,| kSPrs_I|
|000002c0| 66 09 09 09 09 09 09 09 | 09 09 2f 2f 0d 09 2c 20 |f.......|..//.., |
|000002d0| 6b 53 50 72 73 5f 45 6c | 73 65 09 09 09 09 09 09 |kSPrs_El|se......|
|000002e0| 09 09 2f 2f 0d 09 2c 20 | 6b 53 50 72 73 5f 46 6f |..//.., |kSPrs_Fo|
|000002f0| 72 09 09 09 09 09 09 09 | 09 09 2f 2f 0d 09 2c 20 |r.......|..//.., |
|00000300| 6b 53 50 72 73 5f 53 74 | 72 75 63 74 09 09 09 09 |kSPrs_St|ruct....|
|00000310| 09 09 09 09 2f 2f 0d 09 | 2c 20 6b 53 50 72 73 5f |....//..|, kSPrs_|
|00000320| 53 77 69 74 63 68 09 09 | 09 09 09 09 09 09 2f 2f |Switch..|......//|
|00000330| 0d 09 2c 20 6b 53 50 72 | 73 5f 57 68 69 6c 65 09 |.., kSPr|s_While.|
|00000340| 09 09 09 09 09 09 09 2f | 2f 0d 09 2c 20 6b 53 50 |......./|/.., kSP|
|00000350| 72 73 5f 45 78 70 72 09 | 09 09 09 09 09 09 09 2f |rs_Expr.|......./|
|00000360| 2f 0d 09 2c 20 6b 53 50 | 72 73 5f 44 65 63 6c 4f |/.., kSP|rs_DeclO|
|00000370| 70 65 72 61 74 6f 72 09 | 09 09 09 09 09 2f 2f 0d |perator.|.....//.|
|00000380| 09 2c 20 6b 53 50 72 73 | 5f 4e 65 77 4c 69 6e 65 |., kSPrs|_NewLine|
|00000390| 09 09 09 09 09 09 09 09 | 2f 2f 0d 7d 3b 0d 0d 0d |........|//.};...|
|000003a0| 2f 2a b5 20 63 6c 61 73 | 73 20 53 79 6e 74 61 63 |/*. clas|s Syntac|
|000003b0| 74 69 63 50 72 73 0d 2a | 2a 09 54 68 69 73 20 63 |ticPrs.*|*.This c|
|000003c0| 6c 61 73 73 20 69 73 20 | 74 68 65 20 61 62 73 74 |lass is |the abst|
|000003d0| 72 61 63 74 20 62 61 73 | 65 20 63 6c 61 73 73 20 |ract bas|e class |
|000003e0| 66 6f 72 20 67 72 61 6d | 6d 61 72 20 64 65 72 69 |for gram|mar deri|
|000003f0| 76 65 64 20 69 74 65 6d | 73 2e 20 20 41 73 0d 2a |ved item|s. As.*|
|00000400| 2a 20 73 75 63 68 2c 20 | 6e 6f 6e 65 20 6f 66 20 |* such, |none of |
|00000410| 74 68 65 20 69 74 65 6d | 73 20 61 72 65 20 73 65 |the item|s are se|
|00000420| 70 61 72 61 74 6f 72 73 | 2e 20 20 54 68 65 20 64 |parators|. The d|
|00000430| 65 66 61 75 6c 74 20 62 | 65 68 61 76 69 6f 72 20 |efault b|ehavior |
|00000440| 66 6f 72 20 53 61 76 65 | 43 6f 70 79 0d 2a 2a 20 |for Save|Copy.** |
|00000450| 69 73 20 74 6f 20 72 65 | 74 75 72 6e 20 69 74 73 |is to re|turn its|
|00000460| 65 6c 66 3b 20 74 68 69 | 73 20 77 69 6c 6c 20 62 |elf; thi|s will b|
|00000470| 65 20 6f 76 65 72 72 69 | 64 64 65 6e 20 69 6e 20 |e overri|dden in |
|00000480| 64 65 72 69 76 65 64 20 | 63 6c 61 73 73 65 73 20 |derived |classes |
|00000490| 77 68 69 63 68 0d 2a 2a | 20 63 6f 6e 74 61 69 6e |which.**| contain|
|000004a0| 20 73 74 61 74 65 20 69 | 6e 66 6f 72 6d 61 74 69 | state i|nformati|
|000004b0| 6f 6e 2e 20 20 54 68 65 | 20 44 69 73 70 6c 61 79 |on. The| Display|
|000004c0| 20 6d 65 74 68 6f 64 20 | 77 69 6c 6c 20 64 65 66 | method |will def|
|000004d0| 69 6e 69 74 65 6c 79 20 | 62 65 20 6f 76 65 72 72 |initely |be overr|
|000004e0| 69 64 64 65 6e 2e 0d 2a | 2f 0d 0d 63 6c 61 73 73 |idden..*|/..class|
|000004f0| 20 53 79 6e 74 61 63 74 | 69 63 50 72 73 20 3a 20 | Syntact|icPrs : |
|00000500| 70 75 62 6c 69 63 20 53 | 79 6e 74 61 63 74 69 63 |public S|yntactic|
|00000510| 20 7b 0d 70 75 62 6c 69 | 63 3a 0d 09 53 79 6e 74 | {.publi|c:..Synt|
|00000520| 61 63 74 69 63 50 72 73 | 28 69 6e 74 20 61 54 79 |acticPrs|(int aTy|
|00000530| 70 65 29 3b 0d 0d 09 76 | 69 72 74 75 61 6c 20 42 |pe);...v|irtual B|
|00000540| 6f 6f 6c 65 61 6e 20 49 | 73 53 65 70 61 72 61 74 |oolean I|sSeparat|
|00000550| 6f 72 28 29 20 63 6f 6e | 73 74 3b 0d 09 2f 2a 0d |or() con|st;../*.|
|00000560| 09 2a 2a 20 52 65 74 75 | 72 6e 73 20 66 61 6c 73 |.** Retu|rns fals|
|00000570| 65 2e 0d 09 2a 2f 0d 0d | 09 76 69 72 74 75 61 6c |e...*/..|.virtual|
|00000580| 20 63 6f 6e 73 74 20 53 | 79 6e 74 61 63 74 69 63 | const S|yntactic|
|00000590| 20 2a 53 61 76 65 43 6f | 70 79 28 29 20 63 6f 6e | *SaveCo|py() con|
|000005a0| 73 74 3b 0d 09 2f 2a 0d | 09 2a 2a 20 52 65 74 75 |st;../*.|.** Retu|
|000005b0| 72 6e 73 20 69 74 73 65 | 6c 66 2e 0d 09 2a 2f 0d |rns itse|lf...*/.|
|000005c0| 0d 09 76 69 72 74 75 61 | 6c 20 42 6f 6f 6c 65 61 |..virtua|l Boolea|
|000005d0| 6e 20 44 69 73 70 6c 61 | 79 28 46 6f 72 6d 61 74 |n Displa|y(Format|
|000005e0| 74 69 6e 67 20 2a 61 46 | 6f 72 6d 61 74 29 3b 0d |ting *aF|ormat);.|
|000005f0| 09 2f 2a 0d 09 2a 2a 20 | 44 69 73 70 6c 61 79 20 |./*..** |Display |
|00000600| 69 73 20 6e 6f 74 20 64 | 6f 6e 65 20 62 79 20 74 |is not d|one by t|
|00000610| 68 65 20 6f 62 6a 65 63 | 74 2e 20 20 44 69 73 70 |he objec|t. Disp|
|00000620| 6c 61 79 20 69 73 20 64 | 6f 6e 65 20 62 79 20 74 |lay is d|one by t|
|00000630| 68 65 0d 09 2a 2a 20 61 | 63 63 65 70 74 20 6d 65 |he..** a|ccept me|
|00000640| 74 68 6f 64 2e 0d 09 2a | 2f 0d 0d 0d 09 76 69 72 |thod...*|/....vir|
|00000650| 74 75 61 6c 20 42 6f 6f | 6c 65 61 6e 20 41 63 63 |tual Boo|lean Acc|
|00000660| 65 70 74 28 53 79 6e 74 | 61 63 74 69 63 20 2a 61 |ept(Synt|actic *a|
|00000670| 54 6f 6b 65 6e 2c 20 50 | 61 72 73 65 72 20 2a 61 |Token, P|arser *a|
|00000680| 50 61 72 73 65 72 29 20 | 3d 20 30 3b 0d 09 2f 2a |Parser) |= 0;../*|
|00000690| 0d 09 2a 2a 20 54 68 65 | 20 6d 61 6a 6f 72 20 70 |..** The| major p|
|000006a0| 61 72 73 65 20 6d 65 74 | 68 6f 64 2e 20 20 49 74 |arse met|hod. It|
|000006b0| 65 6d 73 20 6f 6e 20 74 | 68 65 20 73 74 61 63 6b |ems on t|he stack|
|000006c0| 20 61 72 65 20 68 61 6e | 64 65 64 20 74 6f 6b 65 | are han|ded toke|
|000006d0| 6e 73 0d 09 2a 2a 20 61 | 6e 64 20 74 68 65 20 63 |ns..** a|nd the c|
|000006e0| 75 72 72 65 6e 74 20 70 | 61 72 73 65 72 2e 20 20 |urrent p|arser. |
|000006f0| 49 66 20 74 68 65 20 74 | 6f 6b 65 6e 20 63 61 6e |If the t|oken can|
|00000700| 20 62 65 20 75 73 65 64 | 2c 20 74 68 65 20 6d 65 | be used|, the me|
|00000710| 74 68 6f 64 0d 09 2a 2a | 20 28 70 6f 73 73 69 62 |thod..**| (possib|
|00000720| 6c 79 29 20 6d 6f 64 69 | 66 69 65 73 20 61 50 61 |ly) modi|fies aPa|
|00000730| 72 73 65 72 20 61 6e 64 | 20 72 65 74 75 72 6e 73 |rser and| returns|
|00000740| 20 74 72 75 65 2e 20 20 | 49 66 20 74 68 65 20 74 | true. |If the t|
|00000750| 6f 6b 65 6e 0d 09 2a 2a | 20 63 61 6e 6e 6f 74 20 |oken..**| cannot |
|00000760| 62 65 20 75 73 65 64 2c | 20 74 68 65 20 6d 65 74 |be used,| the met|
|00000770| 68 6f 64 20 72 65 74 75 | 72 6e 73 20 66 61 6c 73 |hod retu|rns fals|
|00000780| 65 2e 20 20 54 68 65 20 | 70 61 72 73 65 72 20 74 |e. The |parser t|
|00000790| 68 65 6e 0d 09 2a 2a 20 | 74 72 69 65 73 20 74 68 |hen..** |tries th|
|000007a0| 65 20 6e 65 78 74 20 53 | 79 6e 74 61 63 74 69 63 |e next S|yntactic|
|000007b0| 2a 20 6f 6e 20 74 68 65 | 20 70 61 72 73 65 20 73 |* on the| parse s|
|000007c0| 74 61 63 6b 20 75 6e 74 | 69 6c 20 74 68 65 20 73 |tack unt|il the s|
|000007d0| 74 61 63 6b 0d 09 2a 2a | 20 69 73 20 65 6d 70 74 |tack..**| is empt|
|000007e0| 79 2c 20 61 74 20 77 68 | 69 63 68 20 70 6f 69 6e |y, at wh|ich poin|
|000007f0| 74 20 74 68 65 20 74 6f | 6b 65 6e 20 69 73 20 70 |t the to|ken is p|
|00000800| 75 73 68 65 64 20 6f 6e | 74 6f 20 74 68 65 20 73 |ushed on|to the s|
|00000810| 74 61 63 6b 0d 09 2a 2a | 20 75 6e 74 69 6c 20 73 |tack..**| until s|
|00000820| 75 63 68 20 74 69 6d 65 | 20 61 73 20 69 74 20 63 |uch time| as it c|
|00000830| 61 6e 20 62 65 20 75 73 | 65 64 2e 0d 09 2a 2f 0d |an be us|ed...*/.|
|00000840| 7d 3b 0d 0d 0d 2f 2f b5 | 20 20 20 53 79 6e 74 61 |};...//.| Synta|
|00000850| 63 74 69 63 50 72 73 3a | 3a 53 79 6e 74 61 63 74 |cticPrs:|:Syntact|
|00000860| 69 63 50 72 73 0d 23 70 | 72 61 67 6d 61 20 73 65 |icPrs.#p|ragma se|
|00000870| 67 6d 65 6e 74 20 50 61 | 72 73 65 72 41 63 74 69 |gment Pa|rserActi|
|00000880| 6f 6e 73 0d 69 6e 6c 69 | 6e 65 20 53 79 6e 74 61 |ons.inli|ne Synta|
|00000890| 63 74 69 63 50 72 73 3a | 3a 53 79 6e 74 61 63 74 |cticPrs:|:Syntact|
|000008a0| 69 63 50 72 73 28 69 6e | 74 20 61 54 79 70 65 29 |icPrs(in|t aType)|
|000008b0| 0d 09 3a 20 53 79 6e 74 | 61 63 74 69 63 28 61 54 |..: Synt|actic(aT|
|000008c0| 79 70 65 29 0d 09 7b 0d | 09 7d 0d 0d 0d 0d 2f 2a |ype)..{.|.}..../*|
|000008d0| b5 20 63 6c 61 73 73 20 | 50 72 73 50 6c 61 63 65 |. class |PrsPlace|
|000008e0| 48 6f 6c 64 65 72 0d 2a | 2a 09 54 68 69 73 20 63 |Holder.*|*.This c|
|000008f0| 6c 61 73 73 20 64 6f 65 | 73 20 6e 6f 74 68 69 6e |lass doe|s nothin|
|00000900| 67 20 65 78 63 65 70 74 | 20 63 6f 6e 74 61 69 6e |g except| contain|
|00000910| 20 61 20 74 79 70 65 2e | 20 20 49 6e 73 74 61 6e | a type.| Instan|
|00000920| 63 65 73 20 6f 66 20 74 | 68 69 73 20 74 79 70 65 |ces of t|his type|
|00000930| 20 61 72 65 0d 2a 2a 20 | 75 73 65 64 20 61 73 20 | are.** |used as |
|00000940| 70 6c 61 63 65 20 68 6f | 6c 64 65 72 73 20 6f 6e |place ho|lders on|
|00000950| 20 74 68 65 20 70 61 72 | 73 65 20 73 74 61 63 6b | the par|se stack|
|00000960| 2e 0d 2a 2f 0d 0d 63 6c | 61 73 73 20 50 72 73 50 |..*/..cl|ass PrsP|
|00000970| 6c 61 63 65 48 6f 6c 64 | 65 72 20 3a 20 70 75 62 |laceHold|er : pub|
|00000980| 6c 69 63 20 53 79 6e 74 | 61 63 74 69 63 50 72 73 |lic Synt|acticPrs|
|00000990| 20 7b 0d 70 75 62 6c 69 | 63 3a 0d 09 50 72 73 50 | {.publi|c:..PrsP|
|000009a0| 6c 61 63 65 48 6f 6c 64 | 65 72 28 69 6e 74 20 61 |laceHold|er(int a|
|000009b0| 54 79 70 65 29 3b 0d 09 | 50 72 73 50 6c 61 63 65 |Type);..|PrsPlace|
|000009c0| 48 6f 6c 64 65 72 28 69 | 6e 74 20 61 54 79 70 65 |Holder(i|nt aType|
|000009d0| 2c 20 63 6f 6e 73 74 20 | 63 68 61 72 20 2a 61 53 |, const |char *aS|
|000009e0| 74 72 69 6e 67 29 3b 0d | 0d 09 76 69 72 74 75 61 |tring);.|..virtua|
|000009f0| 6c 20 42 6f 6f 6c 65 61 | 6e 20 44 69 73 70 6c 61 |l Boolea|n Displa|
|00000a00| 79 28 46 6f 72 6d 61 74 | 74 69 6e 67 20 2a 61 46 |y(Format|ting *aF|
|00000a10| 6f 72 6d 61 74 29 3b 0d | 09 76 69 72 74 75 61 6c |ormat);.|.virtual|
|00000a20| 20 42 6f 6f 6c 65 61 6e | 20 41 63 63 65 70 74 28 | Boolean| Accept(|
|00000a30| 53 79 6e 74 61 63 74 69 | 63 20 2a 2c 20 50 61 72 |Syntacti|c *, Par|
|00000a40| 73 65 72 20 2a 29 3b 0d | 0d 70 72 69 76 61 74 65 |ser *);.|.private|
|00000a50| 3a 0d 09 63 6f 6e 73 74 | 20 63 68 61 72 20 2a 66 |:..const| char *f|
|00000a60| 53 74 72 69 6e 67 3b 09 | 09 09 09 09 09 2f 2f 20 |String;.|.....// |
|00000a70| 4f 70 74 69 6f 6e 61 6c | 20 73 74 72 69 6e 67 20 |Optional| string |
|00000a80| 74 6f 20 64 69 73 70 6c | 61 79 0d 7d 3b 0d 0d 0d |to displ|ay.};...|
|00000a90| 2f 2f b5 20 20 20 50 72 | 73 50 6c 61 63 65 48 6f |//. Pr|sPlaceHo|
|00000aa0| 6c 64 65 72 3a 3a 50 72 | 73 50 6c 61 63 65 48 6f |lder::Pr|sPlaceHo|
|00000ab0| 6c 64 65 72 0d 23 70 72 | 61 67 6d 61 20 73 65 67 |lder.#pr|agma seg|
|00000ac0| 6d 65 6e 74 20 50 61 72 | 73 65 72 41 63 74 69 6f |ment Par|serActio|
|00000ad0| 6e 73 0d 69 6e 6c 69 6e | 65 20 50 72 73 50 6c 61 |ns.inlin|e PrsPla|
|00000ae0| 63 65 48 6f 6c 64 65 72 | 3a 3a 50 72 73 50 6c 61 |ceHolder|::PrsPla|
|00000af0| 63 65 48 6f 6c 64 65 72 | 28 69 6e 74 20 61 54 79 |ceHolder|(int aTy|
|00000b00| 70 65 29 0d 09 3a 20 53 | 79 6e 74 61 63 74 69 63 |pe)..: S|yntactic|
|00000b10| 50 72 73 28 61 54 79 70 | 65 29 2c 0d 09 20 20 66 |Prs(aTyp|e),.. f|
|00000b20| 53 74 72 69 6e 67 28 30 | 29 0d 09 7b 0d 09 7d 0d |String(0|)..{..}.|
|00000b30| 0d 0d 69 6e 6c 69 6e 65 | 20 50 72 73 50 6c 61 63 |..inline| PrsPlac|
|00000b40| 65 48 6f 6c 64 65 72 3a | 3a 50 72 73 50 6c 61 63 |eHolder:|:PrsPlac|
|00000b50| 65 48 6f 6c 64 65 72 28 | 69 6e 74 20 61 54 79 70 |eHolder(|int aTyp|
|00000b60| 65 2c 20 63 6f 6e 73 74 | 20 63 68 61 72 20 2a 61 |e, const| char *a|
|00000b70| 53 74 72 69 6e 67 29 0d | 09 3a 20 53 79 6e 74 61 |String).|.: Synta|
|00000b80| 63 74 69 63 50 72 73 28 | 61 54 79 70 65 29 2c 0d |cticPrs(|aType),.|
|00000b90| 09 20 20 66 53 74 72 69 | 6e 67 28 61 53 74 72 69 |. fStri|ng(aStri|
|00000ba0| 6e 67 29 0d 09 7b 0d 09 | 7d 0d 0d 0d 0d 2f 2a b5 |ng)..{..|}..../*.|
|00000bb0| 20 63 6c 61 73 73 20 50 | 72 73 49 64 0d 2a 2a 09 | class P|rsId.**.|
|00000bc0| 54 68 69 73 20 63 6c 61 | 73 73 20 65 6e 63 61 70 |This cla|ss encap|
|00000bd0| 73 75 6c 61 74 65 73 20 | 74 68 65 20 63 6f 6e 63 |sulates |the conc|
|00000be0| 65 70 74 20 6f 66 20 61 | 20 71 75 61 6c 69 66 69 |ept of a| qualifi|
|00000bf0| 65 64 20 6e 61 6d 65 2c | 20 6f 6e 65 20 77 69 74 |ed name,| one wit|
|00000c00| 68 20 61 0d 2a 2a 20 22 | 3a 3a 22 20 6f 72 20 22 |h a.** "|::" or "|
|00000c10| 3a 3a 2a 22 20 69 6e 20 | 69 74 2e 20 20 49 74 20 |::*" in |it. It |
|00000c20| 69 73 20 74 68 72 6f 75 | 67 68 20 74 68 69 73 20 |is throu|gh this |
|00000c30| 63 6c 61 73 73 20 74 68 | 61 74 20 6b 53 4c 65 78 |class th|at kSLex|
|00000c40| 5f 49 64 20 61 72 65 0d | 2a 2a 20 74 72 61 6e 73 |_Id are.|** trans|
|00000c50| 66 6f 72 6d 65 64 20 69 | 6e 74 6f 20 6b 53 4c 65 |formed i|nto kSLe|
|00000c60| 78 5f 50 61 72 73 65 64 | 49 64 2e 0d 2a 2f 0d 63 |x_Parsed|Id..*/.c|
|00000c70| 6c 61 73 73 20 50 72 73 | 49 64 20 3a 20 70 75 62 |lass Prs|Id : pub|
|00000c80| 6c 69 63 20 53 79 6e 74 | 61 63 74 69 63 50 72 73 |lic Synt|acticPrs|
|00000c90| 20 7b 0d 70 75 62 6c 69 | 63 3a 0d 09 50 72 73 49 | {.publi|c:..PrsI|
|00000ca0| 64 28 29 3b 0d 09 50 72 | 73 49 64 28 53 79 6e 74 |d();..Pr|sId(Synt|
|00000cb0| 61 63 74 69 63 20 2a 61 | 43 6c 61 73 73 4e 61 6d |actic *a|ClassNam|
|00000cc0| 65 2c 20 53 79 6e 74 61 | 63 74 69 63 20 2a 61 4d |e, Synta|ctic *aM|
|00000cd0| 65 6d 62 65 72 4e 61 6d | 65 2c 20 53 79 6e 74 61 |emberNam|e, Synta|
|00000ce0| 63 74 69 63 20 2a 61 43 | 6c 61 73 73 4f 70 29 3b |ctic *aC|lassOp);|
|00000cf0| 0d 0d 09 76 69 72 74 75 | 61 6c 20 42 6f 6f 6c 65 |...virtu|al Boole|
|00000d00| 61 6e 20 44 69 73 70 6c | 61 79 28 46 6f 72 6d 61 |an Displ|ay(Forma|
|00000d10| 74 74 69 6e 67 20 2a 61 | 46 6f 72 6d 61 74 29 3b |tting *a|Format);|
|00000d20| 0d 09 76 69 72 74 75 61 | 6c 20 42 6f 6f 6c 65 61 |..virtua|l Boolea|
|00000d30| 6e 20 41 63 63 65 70 74 | 28 53 79 6e 74 61 63 74 |n Accept|(Syntact|
|00000d40| 69 63 20 2a 61 54 6f 6b | 65 6e 2c 20 50 61 72 73 |ic *aTok|en, Pars|
|00000d50| 65 72 20 2a 61 50 61 72 | 73 65 72 29 3b 0d 0d 70 |er *aPar|ser);..p|
|00000d60| 72 69 76 61 74 65 3a 0d | 09 53 79 6e 74 61 63 74 |rivate:.|.Syntact|
|00000d70| 69 63 20 2a 66 43 6c 61 | 73 73 4e 61 6d 65 3b 0d |ic *fCla|ssName;.|
|00000d80| 09 53 79 6e 74 61 63 74 | 69 63 20 2a 66 4d 65 6d |.Syntact|ic *fMem|
|00000d90| 62 65 72 4e 61 6d 65 3b | 0d 09 53 79 6e 74 61 63 |berName;|..Syntac|
|00000da0| 74 69 63 20 2a 66 43 6c | 61 73 73 4f 70 3b 0d 7d |tic *fCl|assOp;.}|
|00000db0| 3b 0d 0d 0d 2f 2f b5 20 | 20 20 50 72 73 49 64 3a |;...//. | PrsId:|
|00000dc0| 3a 50 72 73 49 64 0d 23 | 70 72 61 67 6d 61 20 73 |:PrsId.#|pragma s|
|00000dd0| 65 67 6d 65 6e 74 20 50 | 61 72 73 65 72 41 63 74 |egment P|arserAct|
|00000de0| 69 6f 6e 73 0d 69 6e 6c | 69 6e 65 20 50 72 73 49 |ions.inl|ine PrsI|
|00000df0| 64 3a 3a 50 72 73 49 64 | 28 29 0d 09 3a 20 53 79 |d::PrsId|()..: Sy|
|00000e00| 6e 74 61 63 74 69 63 50 | 72 73 28 6b 53 50 72 73 |ntacticP|rs(kSPrs|
|00000e10| 5f 49 64 29 2c 0d 09 20 | 20 66 43 6c 61 73 73 4e |_Id),.. | fClassN|
|00000e20| 61 6d 65 28 30 29 2c 0d | 09 20 20 66 4d 65 6d 62 |ame(0),.|. fMemb|
|00000e30| 65 72 4e 61 6d 65 28 30 | 29 2c 0d 09 20 20 66 43 |erName(0|),.. fC|
|00000e40| 6c 61 73 73 4f 70 28 30 | 29 0d 09 7b 0d 09 7d 0d |lassOp(0|)..{..}.|
|00000e50| 0d 0d 69 6e 6c 69 6e 65 | 20 50 72 73 49 64 3a 3a |..inline| PrsId::|
|00000e60| 50 72 73 49 64 28 53 79 | 6e 74 61 63 74 69 63 20 |PrsId(Sy|ntactic |
|00000e70| 2a 61 43 6c 61 73 73 4e | 61 6d 65 2c 20 53 79 6e |*aClassN|ame, Syn|
|00000e80| 74 61 63 74 69 63 20 2a | 61 4d 65 6d 62 65 72 4e |tactic *|aMemberN|
|00000e90| 61 6d 65 2c 20 53 79 6e | 74 61 63 74 69 63 20 2a |ame, Syn|tactic *|
|00000ea0| 61 43 6c 61 73 73 4f 70 | 29 0d 09 3a 20 53 79 6e |aClassOp|)..: Syn|
|00000eb0| 74 61 63 74 69 63 50 72 | 73 28 6b 53 4c 65 78 5f |tacticPr|s(kSLex_|
|00000ec0| 50 61 72 73 65 64 49 64 | 29 2c 0d 09 20 20 66 43 |ParsedId|),.. fC|
|00000ed0| 6c 61 73 73 4e 61 6d 65 | 28 61 43 6c 61 73 73 4e |lassName|(aClassN|
|00000ee0| 61 6d 65 29 2c 0d 09 20 | 20 66 4d 65 6d 62 65 72 |ame),.. | fMember|
|00000ef0| 4e 61 6d 65 28 61 4d 65 | 6d 62 65 72 4e 61 6d 65 |Name(aMe|mberName|
|00000f00| 29 2c 0d 09 20 20 66 43 | 6c 61 73 73 4f 70 28 61 |),.. fC|lassOp(a|
|00000f10| 43 6c 61 73 73 4f 70 29 | 0d 09 7b 0d 09 7d 0d 0d |ClassOp)|..{..}..|
|00000f20| 0d 0d 2f 2a b5 20 63 6c | 61 73 73 20 50 72 73 41 |../*. cl|ass PrsA|
|00000f30| 73 49 64 0d 2a 2a 09 54 | 68 69 73 20 63 6c 61 73 |sId.**.T|his clas|
|00000f40| 73 20 63 6c 6f 61 6b 73 | 20 6b 53 4c 65 78 5f 50 |s cloaks| kSLex_P|
|00000f50| 75 62 6c 69 63 20 6b 65 | 79 77 6f 72 64 73 20 61 |ublic ke|ywords a|
|00000f60| 73 20 72 65 73 70 65 63 | 74 61 62 6c 65 20 6b 53 |s respec|table kS|
|00000f70| 4c 65 78 5f 50 61 72 73 | 65 64 49 64 0d 2a 2a 20 |Lex_Pars|edId.** |
|00000f80| 6b 65 79 77 6f 72 64 73 | 2e 20 20 55 73 65 64 20 |keywords|. Used |
|00000f90| 74 6f 20 73 75 70 70 6f | 72 74 20 43 20 63 6f 64 |to suppo|rt C cod|
|00000fa0| 65 20 77 68 69 63 68 20 | 68 61 73 20 76 61 72 69 |e which |has vari|
|00000fb0| 61 62 6c 65 73 20 63 61 | 6c 6c 65 64 20 22 70 75 |ables ca|lled "pu|
|00000fc0| 62 6c 69 63 22 2c 0d 2a | 2a 20 22 70 72 69 76 61 |blic",.*|* "priva|
|00000fd0| 74 65 22 20 61 6e 64 20 | 22 70 72 6f 74 65 63 74 |te" and |"protect|
|00000fe0| 65 64 22 2e 0d 2a 2f 0d | 63 6c 61 73 73 20 50 72 |ed"..*/.|class Pr|
|00000ff0| 73 41 73 49 64 20 3a 20 | 70 75 62 6c 69 63 20 50 |sAsId : |public P|
|00001000| 72 73 50 6c 61 63 65 48 | 6f 6c 64 65 72 20 7b 0d |rsPlaceH|older {.|
|00001010| 70 75 62 6c 69 63 3a 0d | 09 50 72 73 41 73 49 64 |public:.|.PrsAsId|
|00001020| 28 53 79 6e 74 61 63 74 | 69 63 20 2a 61 4e 61 6d |(Syntact|ic *aNam|
|00001030| 65 29 3b 0d 0d 09 76 69 | 72 74 75 61 6c 20 42 6f |e);...vi|rtual Bo|
|00001040| 6f 6c 65 61 6e 20 44 69 | 73 70 6c 61 79 28 46 6f |olean Di|splay(Fo|
|00001050| 72 6d 61 74 74 69 6e 67 | 20 2a 61 46 6f 72 6d 61 |rmatting| *aForma|
|00001060| 74 29 3b 0d 0d 70 72 69 | 76 61 74 65 3a 0d 09 53 |t);..pri|vate:..S|
|00001070| 79 6e 74 61 63 74 69 63 | 20 2a 66 54 6f 6b 65 6e |yntactic| *fToken|
|00001080| 3b 09 09 09 09 09 09 09 | 2f 2f 20 54 68 65 20 74 |;.......|// The t|
|00001090| 6f 6b 65 6e 20 6f 66 20 | 69 6e 74 65 72 65 73 74 |oken of |interest|
|000010a0| 2e 0d 7d 3b 0d 0d 0d 2f | 2f b5 20 20 20 50 72 73 |..};.../|/. Prs|
|000010b0| 41 73 49 64 3a 3a 50 72 | 73 41 73 49 64 0d 23 70 |AsId::Pr|sAsId.#p|
|000010c0| 72 61 67 6d 61 20 73 65 | 67 6d 65 6e 74 20 50 72 |ragma se|gment Pr|
|000010d0| 73 41 73 49 64 0d 69 6e | 6c 69 6e 65 20 50 72 73 |sAsId.in|line Prs|
|000010e0| 41 73 49 64 3a 3a 50 72 | 73 41 73 49 64 28 53 79 |AsId::Pr|sAsId(Sy|
|000010f0| 6e 74 61 63 74 69 63 20 | 2a 61 4e 61 6d 65 29 0d |ntactic |*aName).|
|00001100| 09 3a 20 50 72 73 50 6c | 61 63 65 48 6f 6c 64 65 |.: PrsPl|aceHolde|
|00001110| 72 28 6b 53 4c 65 78 5f | 50 61 72 73 65 64 49 64 |r(kSLex_|ParsedId|
|00001120| 29 2c 0d 09 20 20 66 54 | 6f 6b 65 6e 28 61 4e 61 |),.. fT|oken(aNa|
|00001130| 6d 65 29 0d 09 7b 0d 09 | 7d 0d 0d 0d 0d 2f 2a b5 |me)..{..|}..../*.|
|00001140| 20 63 6c 61 73 73 20 50 | 72 73 44 65 73 74 72 75 | class P|rsDestru|
|00001150| 63 74 6f 72 0d 2a 2a 09 | 54 68 69 73 20 63 6c 61 |ctor.**.|This cla|
|00001160| 73 73 20 64 69 73 70 6c | 61 79 73 20 64 65 73 74 |ss displ|ays dest|
|00001170| 72 75 63 74 6f 72 20 6e | 61 6d 65 73 2e 20 20 54 |ructor n|ames. T|
|00001180| 68 61 74 27 73 20 61 6c | 6c 2e 20 20 54 68 61 6e |hat's al|l. Than|
|00001190| 6b 20 79 6f 75 2e 0d 2a | 2f 0d 63 6c 61 73 73 20 |k you..*|/.class |
|000011a0| 50 72 73 44 65 73 74 72 | 75 63 74 6f 72 20 3a 20 |PrsDestr|uctor : |
|000011b0| 70 75 62 6c 69 63 20 50 | 72 73 50 6c 61 63 65 48 |public P|rsPlaceH|
|000011c0| 6f 6c 64 65 72 20 7b 0d | 70 75 62 6c 69 63 3a 0d |older {.|public:.|
|000011d0| 09 50 72 73 44 65 73 74 | 72 75 63 74 6f 72 28 53 |.PrsDest|ructor(S|
|000011e0| 79 6e 74 61 63 74 69 63 | 20 2a 61 4d 65 6d 62 65 |yntactic| *aMembe|
|000011f0| 72 4e 61 6d 65 29 3b 0d | 0d 09 76 69 72 74 75 61 |rName);.|..virtua|
|00001200| 6c 20 42 6f 6f 6c 65 61 | 6e 20 44 69 73 70 6c 61 |l Boolea|n Displa|
|00001210| 79 28 46 6f 72 6d 61 74 | 74 69 6e 67 20 2a 61 46 |y(Format|ting *aF|
|00001220| 6f 72 6d 61 74 29 3b 0d | 0d 70 72 69 76 61 74 65 |ormat);.|.private|
|00001230| 3a 0d 09 53 79 6e 74 61 | 63 74 69 63 20 2a 66 4d |:..Synta|ctic *fM|
|00001240| 65 6d 62 65 72 4e 61 6d | 65 3b 0d 7d 3b 0d 0d 0d |emberNam|e;.};...|
|00001250| 2f 2f b5 20 20 20 50 72 | 73 44 65 73 74 72 75 63 |//. Pr|sDestruc|
|00001260| 74 6f 72 3a 3a 50 72 73 | 44 65 73 74 72 75 63 74 |tor::Prs|Destruct|
|00001270| 6f 72 0d 23 70 72 61 67 | 6d 61 20 73 65 67 6d 65 |or.#prag|ma segme|
|00001280| 6e 74 20 50 61 72 73 65 | 72 41 63 74 69 6f 6e 73 |nt Parse|rActions|
|00001290| 0d 69 6e 6c 69 6e 65 20 | 50 72 73 44 65 73 74 72 |.inline |PrsDestr|
|000012a0| 75 63 74 6f 72 3a 3a 50 | 72 73 44 65 73 74 72 75 |uctor::P|rsDestru|
|000012b0| 63 74 6f 72 28 53 79 6e | 74 61 63 74 69 63 20 2a |ctor(Syn|tactic *|
|000012c0| 61 4d 65 6d 62 65 72 4e | 61 6d 65 29 0d 09 3a 20 |aMemberN|ame)..: |
|000012d0| 50 72 73 50 6c 61 63 65 | 48 6f 6c 64 65 72 28 6b |PrsPlace|Holder(k|
|000012e0| 53 4c 65 78 5f 50 61 72 | 73 65 64 49 64 29 2c 0d |SLex_Par|sedId),.|
|000012f0| 09 20 20 66 4d 65 6d 62 | 65 72 4e 61 6d 65 28 61 |. fMemb|erName(a|
|00001300| 4d 65 6d 62 65 72 4e 61 | 6d 65 29 0d 09 7b 0d 09 |MemberNa|me)..{..|
|00001310| 7d 0d 0d 0d 0d 2f 2f b5 | 20 63 6c 61 73 73 20 50 |}....//.| class P|
|00001320| 72 73 53 74 6d 74 4c 69 | 73 74 0d 63 6c 61 73 73 |rsStmtLi|st.class|
|00001330| 20 50 72 73 53 74 6d 74 | 4c 69 73 74 20 3a 20 70 | PrsStmt|List : p|
|00001340| 75 62 6c 69 63 20 53 79 | 6e 74 61 63 74 69 63 50 |ublic Sy|ntacticP|
|00001350| 72 73 20 7b 0d 70 75 62 | 6c 69 63 3a 0d 09 50 72 |rs {.pub|lic:..Pr|
|00001360| 73 53 74 6d 74 4c 69 73 | 74 28 29 0d 09 09 3a 20 |sStmtLis|t()...: |
|00001370| 53 79 6e 74 61 63 74 69 | 63 50 72 73 28 6b 53 50 |Syntacti|cPrs(kSP|
|00001380| 72 73 5f 53 74 6d 74 4c | 69 73 74 29 0d 09 09 7b |rs_StmtL|ist)...{|
|00001390| 0d 09 09 7d 0d 0d 09 76 | 69 72 74 75 61 6c 20 42 |...}...v|irtual B|
|000013a0| 6f 6f 6c 65 61 6e 20 41 | 63 63 65 70 74 28 53 79 |oolean A|ccept(Sy|
|000013b0| 6e 74 61 63 74 69 63 20 | 2a 61 54 6f 6b 65 6e 2c |ntactic |*aToken,|
|000013c0| 20 50 61 72 73 65 72 20 | 2a 61 50 61 72 73 65 72 | Parser |*aParser|
|000013d0| 29 3b 0d 7d 3b 0d 0d 0d | 0d 2f 2f b5 20 63 6c 61 |);.};...|.//. cla|
|000013e0| 73 73 20 50 72 73 44 65 | 63 6c 4c 69 73 74 0d 63 |ss PrsDe|clList.c|
|000013f0| 6c 61 73 73 20 50 72 73 | 44 65 63 6c 4c 69 73 74 |lass Prs|DeclList|
|00001400| 20 3a 20 70 75 62 6c 69 | 63 20 53 79 6e 74 61 63 | : publi|c Syntac|
|00001410| 74 69 63 50 72 73 20 7b | 0d 70 75 62 6c 69 63 3a |ticPrs {|.public:|
|00001420| 0d 09 50 72 73 44 65 63 | 6c 4c 69 73 74 28 29 0d |..PrsDec|lList().|
|00001430| 09 09 3a 20 53 79 6e 74 | 61 63 74 69 63 50 72 73 |..: Synt|acticPrs|
|00001440| 28 6b 53 50 72 73 5f 44 | 65 63 6c 4c 69 73 74 29 |(kSPrs_D|eclList)|
|00001450| 0d 09 09 7b 0d 09 09 7d | 0d 0d 09 76 69 72 74 75 |...{...}|...virtu|
|00001460| 61 6c 20 42 6f 6f 6c 65 | 61 6e 20 41 63 63 65 70 |al Boole|an Accep|
|00001470| 74 28 53 79 6e 74 61 63 | 74 69 63 20 2a 61 54 6f |t(Syntac|tic *aTo|
|00001480| 6b 65 6e 2c 20 50 61 72 | 73 65 72 20 2a 61 50 61 |ken, Par|ser *aPa|
|00001490| 72 73 65 72 29 3b 0d 7d | 3b 0d 0d 0d 0d 2f 2f b5 |rser);.}|;....//.|
|000014a0| 20 63 6c 61 73 73 20 50 | 72 73 53 74 6d 74 0d 63 | class P|rsStmt.c|
|000014b0| 6c 61 73 73 20 50 72 73 | 53 74 6d 74 20 3a 20 70 |lass Prs|Stmt : p|
|000014c0| 75 62 6c 69 63 20 53 79 | 6e 74 61 63 74 69 63 50 |ublic Sy|ntacticP|
|000014d0| 72 73 20 7b 0d 70 75 62 | 6c 69 63 3a 0d 09 50 72 |rs {.pub|lic:..Pr|
|000014e0| 73 53 74 6d 74 28 29 0d | 09 09 3a 20 53 79 6e 74 |sStmt().|..: Synt|
|000014f0| 61 63 74 69 63 50 72 73 | 28 6b 53 50 72 73 5f 53 |acticPrs|(kSPrs_S|
|00001500| 74 6d 74 29 0d 09 09 7b | 0d 09 09 7d 0d 0d 09 76 |tmt)...{|...}...v|
|00001510| 69 72 74 75 61 6c 20 42 | 6f 6f 6c 65 61 6e 20 41 |irtual B|oolean A|
|00001520| 63 63 65 70 74 28 53 79 | 6e 74 61 63 74 69 63 20 |ccept(Sy|ntactic |
|00001530| 2a 61 54 6f 6b 65 6e 2c | 20 50 61 72 73 65 72 20 |*aToken,| Parser |
|00001540| 2a 61 50 61 72 73 65 72 | 29 3b 0d 7d 3b 0d 0d 0d |*aParser|);.};...|
|00001550| 0d 2f 2f b5 20 63 6c 61 | 73 73 20 50 72 73 44 65 |.//. cla|ss PrsDe|
|00001560| 63 6c 0d 63 6c 61 73 73 | 20 50 72 73 44 65 63 6c |cl.class| PrsDecl|
|00001570| 20 3a 20 70 75 62 6c 69 | 63 20 53 79 6e 74 61 63 | : publi|c Syntac|
|00001580| 74 69 63 50 72 73 20 7b | 0d 70 75 62 6c 69 63 3a |ticPrs {|.public:|
|00001590| 0d 09 50 72 73 44 65 63 | 6c 28 29 0d 09 09 3a 20 |..PrsDec|l()...: |
|000015a0| 53 79 6e 74 61 63 74 69 | 63 50 72 73 28 6b 53 50 |Syntacti|cPrs(kSP|
|000015b0| 72 73 5f 44 65 63 6c 29 | 0d 09 09 7b 0d 09 09 7d |rs_Decl)|...{...}|
|000015c0| 0d 0d 09 76 69 72 74 75 | 61 6c 20 42 6f 6f 6c 65 |...virtu|al Boole|
|000015d0| 61 6e 20 41 63 63 65 70 | 74 28 53 79 6e 74 61 63 |an Accep|t(Syntac|
|000015e0| 74 69 63 20 2a 61 54 6f | 6b 65 6e 2c 20 50 61 72 |tic *aTo|ken, Par|
|000015f0| 73 65 72 20 2a 61 50 61 | 72 73 65 72 29 3b 0d 7d |ser *aPa|rser);.}|
|00001600| 3b 0d 0d 0d 0d 2f 2f b5 | 20 63 6c 61 73 73 20 50 |;....//.| class P|
|00001610| 72 73 44 6f 0d 63 6c 61 | 73 73 20 50 72 73 44 6f |rsDo.cla|ss PrsDo|
|00001620| 20 3a 20 70 75 62 6c 69 | 63 20 53 79 6e 74 61 63 | : publi|c Syntac|
|00001630| 74 69 63 50 72 73 20 7b | 0d 70 75 62 6c 69 63 3a |ticPrs {|.public:|
|00001640| 0d 09 50 72 73 44 6f 28 | 29 0d 09 09 3a 20 53 79 |..PrsDo(|)...: Sy|
|00001650| 6e 74 61 63 74 69 63 50 | 72 73 28 6b 53 50 72 73 |ntacticP|rs(kSPrs|
|00001660| 5f 44 6f 29 0d 09 09 7b | 0d 09 09 7d 0d 0d 09 76 |_Do)...{|...}...v|
|00001670| 69 72 74 75 61 6c 20 42 | 6f 6f 6c 65 61 6e 20 41 |irtual B|oolean A|
|00001680| 63 63 65 70 74 28 53 79 | 6e 74 61 63 74 69 63 20 |ccept(Sy|ntactic |
|00001690| 2a 61 54 6f 6b 65 6e 2c | 20 50 61 72 73 65 72 20 |*aToken,| Parser |
|000016a0| 2a 61 50 61 72 73 65 72 | 29 3b 0d 7d 3b 0d 0d 0d |*aParser|);.};...|
|000016b0| 0d 2f 2f b5 20 63 6c 61 | 73 73 20 50 72 73 49 66 |.//. cla|ss PrsIf|
|000016c0| 0d 63 6c 61 73 73 20 50 | 72 73 49 66 20 3a 20 70 |.class P|rsIf : p|
|000016d0| 75 62 6c 69 63 20 53 79 | 6e 74 61 63 74 69 63 50 |ublic Sy|ntacticP|
|000016e0| 72 73 20 7b 0d 70 75 62 | 6c 69 63 3a 0d 09 50 72 |rs {.pub|lic:..Pr|
|000016f0| 73 49 66 28 29 0d 09 09 | 3a 20 53 79 6e 74 61 63 |sIf()...|: Syntac|
|00001700| 74 69 63 50 72 73 28 6b | 53 50 72 73 5f 49 66 29 |ticPrs(k|SPrs_If)|
|00001710| 0d 09 09 7b 0d 09 09 7d | 0d 0d 09 76 69 72 74 75 |...{...}|...virtu|
|00001720| 61 6c 20 42 6f 6f 6c 65 | 61 6e 20 41 63 63 65 70 |al Boole|an Accep|
|00001730| 74 28 53 79 6e 74 61 63 | 74 69 63 20 2a 61 54 6f |t(Syntac|tic *aTo|
|00001740| 6b 65 6e 2c 20 50 61 72 | 73 65 72 20 2a 61 50 61 |ken, Par|ser *aPa|
|00001750| 72 73 65 72 29 3b 0d 7d | 3b 0d 0d 0d 0d 2f 2f b5 |rser);.}|;....//.|
|00001760| 20 63 6c 61 73 73 20 50 | 72 73 45 6c 73 65 0d 63 | class P|rsElse.c|
|00001770| 6c 61 73 73 20 50 72 73 | 45 6c 73 65 20 3a 20 70 |lass Prs|Else : p|
|00001780| 75 62 6c 69 63 20 53 79 | 6e 74 61 63 74 69 63 50 |ublic Sy|ntacticP|
|00001790| 72 73 20 7b 0d 70 75 62 | 6c 69 63 3a 0d 09 50 72 |rs {.pub|lic:..Pr|
|000017a0| 73 45 6c 73 65 28 29 0d | 09 09 3a 20 53 79 6e 74 |sElse().|..: Synt|
|000017b0| 61 63 74 69 63 50 72 73 | 28 6b 53 50 72 73 5f 45 |acticPrs|(kSPrs_E|
|000017c0| 6c 73 65 29 0d 09 09 7b | 0d 09 09 7d 0d 0d 09 76 |lse)...{|...}...v|
|000017d0| 69 72 74 75 61 6c 20 42 | 6f 6f 6c 65 61 6e 20 41 |irtual B|oolean A|
|000017e0| 63 63 65 70 74 28 53 79 | 6e 74 61 63 74 69 63 20 |ccept(Sy|ntactic |
|000017f0| 2a 61 54 6f 6b 65 6e 2c | 20 50 61 72 73 65 72 20 |*aToken,| Parser |
|00001800| 2a 61 50 61 72 73 65 72 | 29 3b 0d 7d 3b 0d 0d 0d |*aParser|);.};...|
|00001810| 0d 2f 2f b5 20 63 6c 61 | 73 73 20 50 72 73 46 6f |.//. cla|ss PrsFo|
|00001820| 72 0d 63 6c 61 73 73 20 | 50 72 73 46 6f 72 20 3a |r.class |PrsFor :|
|00001830| 20 70 75 62 6c 69 63 20 | 53 79 6e 74 61 63 74 69 | public |Syntacti|
|00001840| 63 50 72 73 20 7b 0d 70 | 75 62 6c 69 63 3a 0d 09 |cPrs {.p|ublic:..|
|00001850| 50 72 73 46 6f 72 28 29 | 0d 09 09 3a 20 53 79 6e |PrsFor()|...: Syn|
|00001860| 74 61 63 74 69 63 50 72 | 73 28 6b 53 50 72 73 5f |tacticPr|s(kSPrs_|
|00001870| 46 6f 72 29 0d 09 09 7b | 0d 09 09 7d 0d 0d 09 76 |For)...{|...}...v|
|00001880| 69 72 74 75 61 6c 20 42 | 6f 6f 6c 65 61 6e 20 41 |irtual B|oolean A|
|00001890| 63 63 65 70 74 28 53 79 | 6e 74 61 63 74 69 63 20 |ccept(Sy|ntactic |
|000018a0| 2a 61 54 6f 6b 65 6e 2c | 20 50 61 72 73 65 72 20 |*aToken,| Parser |
|000018b0| 2a 61 50 61 72 73 65 72 | 29 3b 0d 7d 3b 0d 0d 0d |*aParser|);.};...|
|000018c0| 0d 2f 2f b5 20 63 6c 61 | 73 73 20 50 72 73 53 74 |.//. cla|ss PrsSt|
|000018d0| 72 75 63 74 0d 63 6c 61 | 73 73 20 50 72 73 53 74 |ruct.cla|ss PrsSt|
|000018e0| 72 75 63 74 20 3a 20 70 | 75 62 6c 69 63 20 53 79 |ruct : p|ublic Sy|
|000018f0| 6e 74 61 63 74 69 63 50 | 72 73 20 7b 0d 70 75 62 |ntacticP|rs {.pub|
|00001900| 6c 69 63 3a 0d 09 50 72 | 73 53 74 72 75 63 74 28 |lic:..Pr|sStruct(|
|00001910| 29 0d 09 09 3a 20 53 79 | 6e 74 61 63 74 69 63 50 |)...: Sy|ntacticP|
|00001920| 72 73 28 6b 53 50 72 73 | 5f 53 74 72 75 63 74 29 |rs(kSPrs|_Struct)|
|00001930| 0d 09 09 7b 0d 09 09 7d | 0d 0d 09 76 69 72 74 75 |...{...}|...virtu|
|00001940| 61 6c 20 42 6f 6f 6c 65 | 61 6e 20 41 63 63 65 70 |al Boole|an Accep|
|00001950| 74 28 53 79 6e 74 61 63 | 74 69 63 20 2a 61 54 6f |t(Syntac|tic *aTo|
|00001960| 6b 65 6e 2c 20 50 61 72 | 73 65 72 20 2a 61 50 61 |ken, Par|ser *aPa|
|00001970| 72 73 65 72 29 3b 0d 7d | 3b 0d 0d 0d 0d 2f 2f b5 |rser);.}|;....//.|
|00001980| 20 63 6c 61 73 73 20 50 | 72 73 53 77 69 74 63 68 | class P|rsSwitch|
|00001990| 0d 63 6c 61 73 73 20 50 | 72 73 53 77 69 74 63 68 |.class P|rsSwitch|
|000019a0| 20 3a 20 70 75 62 6c 69 | 63 20 53 79 6e 74 61 63 | : publi|c Syntac|
|000019b0| 74 69 63 50 72 73 20 7b | 0d 70 75 62 6c 69 63 3a |ticPrs {|.public:|
|000019c0| 0d 09 50 72 73 53 77 69 | 74 63 68 28 29 0d 09 09 |..PrsSwi|tch()...|
|000019d0| 3a 20 53 79 6e 74 61 63 | 74 69 63 50 72 73 28 6b |: Syntac|ticPrs(k|
|000019e0| 53 50 72 73 5f 53 77 69 | 74 63 68 29 0d 09 09 7b |SPrs_Swi|tch)...{|
|000019f0| 0d 09 09 7d 0d 0d 09 76 | 69 72 74 75 61 6c 20 42 |...}...v|irtual B|
|00001a00| 6f 6f 6c 65 61 6e 20 41 | 63 63 65 70 74 28 53 79 |oolean A|ccept(Sy|
|00001a10| 6e 74 61 63 74 69 63 20 | 2a 61 54 6f 6b 65 6e 2c |ntactic |*aToken,|
|00001a20| 20 50 61 72 73 65 72 20 | 2a 61 50 61 72 73 65 72 | Parser |*aParser|
|00001a30| 29 3b 0d 7d 3b 0d 0d 0d | 0d 2f 2f b5 20 63 6c 61 |);.};...|.//. cla|
|00001a40| 73 73 20 50 72 73 57 68 | 69 6c 65 0d 63 6c 61 73 |ss PrsWh|ile.clas|
|00001a50| 73 20 50 72 73 57 68 69 | 6c 65 20 3a 20 70 75 62 |s PrsWhi|le : pub|
|00001a60| 6c 69 63 20 53 79 6e 74 | 61 63 74 69 63 50 72 73 |lic Synt|acticPrs|
|00001a70| 20 7b 0d 70 75 62 6c 69 | 63 3a 0d 09 50 72 73 57 | {.publi|c:..PrsW|
|00001a80| 68 69 6c 65 28 29 0d 09 | 09 3a 20 53 79 6e 74 61 |hile()..|.: Synta|
|00001a90| 63 74 69 63 50 72 73 28 | 6b 53 50 72 73 5f 57 68 |cticPrs(|kSPrs_Wh|
|00001aa0| 69 6c 65 29 0d 09 09 7b | 0d 09 09 7d 0d 0d 09 76 |ile)...{|...}...v|
|00001ab0| 69 72 74 75 61 6c 20 42 | 6f 6f 6c 65 61 6e 20 41 |irtual B|oolean A|
|00001ac0| 63 63 65 70 74 28 53 79 | 6e 74 61 63 74 69 63 20 |ccept(Sy|ntactic |
|00001ad0| 2a 61 54 6f 6b 65 6e 2c | 20 50 61 72 73 65 72 20 |*aToken,| Parser |
|00001ae0| 2a 61 50 61 72 73 65 72 | 29 3b 0d 7d 3b 0d 0d 0d |*aParser|);.};...|
|00001af0| 0d 2f 2f b5 20 63 6c 61 | 73 73 20 50 72 73 45 78 |.//. cla|ss PrsEx|
|00001b00| 70 72 0d 63 6c 61 73 73 | 20 50 72 73 45 78 70 72 |pr.class| PrsExpr|
|00001b10| 20 3a 20 70 75 62 6c 69 | 63 20 53 79 6e 74 61 63 | : publi|c Syntac|
|00001b20| 74 69 63 50 72 73 20 7b | 0d 70 75 62 6c 69 63 3a |ticPrs {|.public:|
|00001b30| 0d 09 50 72 73 45 78 70 | 72 28 29 0d 09 09 3a 20 |..PrsExp|r()...: |
|00001b40| 53 79 6e 74 61 63 74 69 | 63 50 72 73 28 6b 53 50 |Syntacti|cPrs(kSP|
|00001b50| 72 73 5f 45 78 70 72 29 | 0d 09 09 7b 0d 09 09 7d |rs_Expr)|...{...}|
|00001b60| 0d 0d 09 76 69 72 74 75 | 61 6c 20 42 6f 6f 6c 65 |...virtu|al Boole|
|00001b70| 61 6e 20 41 63 63 65 70 | 74 28 53 79 6e 74 61 63 |an Accep|t(Syntac|
|00001b80| 74 69 63 20 2a 61 54 6f | 6b 65 6e 2c 20 50 61 72 |tic *aTo|ken, Par|
|00001b90| 73 65 72 20 2a 61 50 61 | 72 73 65 72 29 3b 0d 7d |ser *aPa|rser);.}|
|00001ba0| 3b 0d 0d 0d 0d 2f 2f b5 | 20 63 6c 61 73 73 20 50 |;....//.| class P|
|00001bb0| 72 73 44 65 63 6c 4f 70 | 65 72 61 74 6f 72 0d 63 |rsDeclOp|erator.c|
|00001bc0| 6c 61 73 73 20 50 72 73 | 44 65 63 6c 4f 70 65 72 |lass Prs|DeclOper|
|00001bd0| 61 74 6f 72 20 3a 20 70 | 75 62 6c 69 63 20 53 79 |ator : p|ublic Sy|
|00001be0| 6e 74 61 63 74 69 63 50 | 72 73 20 7b 0d 70 75 62 |ntacticP|rs {.pub|
|00001bf0| 6c 69 63 3a 0d 09 50 72 | 73 44 65 63 6c 4f 70 65 |lic:..Pr|sDeclOpe|
|00001c00| 72 61 74 6f 72 28 69 6e | 74 20 61 54 79 70 65 20 |rator(in|t aType |
|00001c10| 3d 20 6b 53 50 72 73 5f | 44 65 63 6c 4f 70 65 72 |= kSPrs_|DeclOper|
|00001c20| 61 74 6f 72 29 0d 09 09 | 3a 20 53 79 6e 74 61 63 |ator)...|: Syntac|
|00001c30| 74 69 63 50 72 73 28 61 | 54 79 70 65 29 0d 09 09 |ticPrs(a|Type)...|
|00001c40| 7b 0d 09 09 7d 0d 0d 09 | 76 69 72 74 75 61 6c 20 |{...}...|virtual |
|00001c50| 42 6f 6f 6c 65 61 6e 20 | 44 69 73 70 6c 61 79 28 |Boolean |Display(|
|00001c60| 46 6f 72 6d 61 74 74 69 | 6e 67 20 2a 61 46 6f 72 |Formatti|ng *aFor|
|00001c70| 6d 61 74 29 3b 0d 09 76 | 69 72 74 75 61 6c 20 42 |mat);..v|irtual B|
|00001c80| 6f 6f 6c 65 61 6e 20 41 | 63 63 65 70 74 28 53 79 |oolean A|ccept(Sy|
|00001c90| 6e 74 61 63 74 69 63 20 | 2a 2c 20 50 61 72 73 65 |ntactic |*, Parse|
|00001ca0| 72 20 2a 29 3b 0d 0d 70 | 72 69 76 61 74 65 3a 0d |r *);..p|rivate:.|
|00001cb0| 09 53 79 6e 74 61 63 74 | 69 63 20 2a 66 54 6f 6b |.Syntact|ic *fTok|
|00001cc0| 65 6e 3b 09 09 09 09 09 | 09 09 2f 2f 20 54 68 65 |en;.....|..// The|
|00001cd0| 20 74 6f 6b 65 6e 20 6f | 66 20 69 6e 74 65 72 65 | token o|f intere|
|00001ce0| 73 74 2e 0d 7d 3b 0d 0d | 0d 0d 2f 2a b5 20 63 6c |st..};..|../*. cl|
|00001cf0| 61 73 73 20 50 72 73 4e | 65 77 4c 69 6e 65 0d 2a |ass PrsN|ewLine.*|
|00001d00| 2a 09 54 68 69 73 20 63 | 6c 61 73 73 20 69 6d 70 |*.This c|lass imp|
|00001d10| 6c 65 6d 65 6e 74 73 20 | 22 64 65 66 65 72 72 65 |lements |"deferre|
|00001d20| 64 20 6e 65 77 6c 69 6e | 65 73 22 2e 20 20 57 68 |d newlin|es". Wh|
|00001d30| 65 6e 20 73 6f 75 72 63 | 65 20 6e 65 77 6c 69 6e |en sourc|e newlin|
|00001d40| 65 73 20 61 72 65 20 6e | 6f 74 0d 2a 2a 20 62 65 |es are n|ot.** be|
|00001d50| 69 6e 67 20 70 61 73 73 | 65 64 20 64 69 72 65 63 |ing pass|ed direc|
|00001d60| 74 6c 79 20 74 68 72 6f | 75 67 68 20 74 6f 20 74 |tly thro|ugh to t|
|00001d70| 68 65 20 6f 75 74 70 75 | 74 20 28 61 46 6f 72 6d |he outpu|t (aForm|
|00001d80| 61 74 2d 3e 50 61 73 73 | 53 6f 75 72 63 65 4e 65 |at->Pass|SourceNe|
|00001d90| 77 4c 69 6e 65 73 28 29 | 0d 2a 2a 20 69 73 20 66 |wLines()|.** is f|
|00001da0| 61 6c 73 65 29 2c 20 61 | 20 6e 65 77 6c 69 6e 65 |alse), a| newline|
|00001db0| 20 63 61 6e 20 62 65 20 | 61 6d 62 69 67 75 6f 75 | can be |ambiguou|
|00001dc0| 73 2e 20 20 46 6f 72 20 | 65 78 61 6d 70 6c 65 2c |s. For |example,|
|00001dd0| 20 69 66 20 77 65 20 61 | 72 65 20 74 6f 0d 2a 2a | if we a|re to.**|
|00001de0| 20 66 6f 72 6d 61 74 20 | 22 69 66 28 29 7b 7d 65 | format |"if(){}e|
|00001df0| 6c 73 65 22 20 61 73 0d | 2a 2a 0d 2a 2a 09 09 69 |lse" as.|**.**..i|
|00001e00| 66 20 28 29 20 7b 0d 2a | 2a 09 09 7d 20 65 6c 73 |f () {.*|*..} els|
|00001e10| 65 0d 2a 2a 0d 2a 2a 20 | 61 6e 64 20 66 6f 72 6d |e.**.** |and form|
|00001e20| 61 74 20 22 69 66 28 29 | 7b 7d 66 6f 6f 2b 2b 3b |at "if()|{}foo++;|
|00001e30| 22 20 61 73 0d 2a 2a 0d | 2a 2a 09 09 69 66 20 28 |" as.**.|**..if (|
|00001e40| 29 20 7b 0d 2a 2a 09 09 | 7d 0d 2a 2a 09 09 66 6f |) {.**..|}.**..fo|
|00001e50| 6f 2b 2b 3b 0d 2a 2a 0d | 2a 2a 20 61 6e 64 20 74 |o++;.**.|** and t|
|00001e60| 68 65 20 69 6e 70 75 74 | 20 69 73 20 22 69 66 28 |he input| is "if(|
|00001e70| 29 7b 7d 20 3c 6e 65 77 | 6c 69 6e 65 3e 22 2c 20 |){} <new|line>", |
|00001e80| 77 65 20 64 6f 6e 27 74 | 20 6b 6e 6f 77 20 77 68 |we don't| know wh|
|00001e90| 61 74 20 74 6f 20 64 6f | 2e 20 20 42 65 63 61 75 |at to do|. Becau|
|00001ea0| 73 65 20 77 65 0d 2a 2a | 20 65 6d 69 74 20 61 72 |se we.**| emit ar|
|00001eb0| 65 20 74 77 6f 20 6f 72 | 20 6d 6f 72 65 20 63 6f |e two or| more co|
|00001ec0| 6e 73 65 63 75 74 69 76 | 65 20 6e 65 77 6c 69 6e |nsecutiv|e newlin|
|00001ed0| 65 73 2c 20 77 65 20 61 | 72 65 20 6e 6f 74 20 61 |es, we a|re not a|
|00001ee0| 74 20 6c 69 62 65 72 74 | 79 20 74 6f 20 69 67 6e |t libert|y to ign|
|00001ef0| 6f 72 65 0d 2a 2a 20 74 | 68 69 73 20 6e 65 77 6c |ore.** t|his newl|
|00001f00| 69 6e 65 2e 20 20 57 65 | 20 63 6f 75 6c 64 20 65 |ine. We| could e|
|00001f10| 78 74 65 6e 64 20 74 68 | 65 20 67 72 61 6d 6d 61 |xtend th|e gramma|
|00001f20| 72 20 61 6e 64 20 73 61 | 76 65 20 74 68 65 20 6e |r and sa|ve the n|
|00001f30| 65 77 6c 69 6e 65 2c 20 | 62 75 74 20 74 68 69 73 |ewline, |but this|
|00001f40| 0d 2a 2a 20 62 65 63 6f | 6d 65 73 20 76 65 72 79 |.** beco|mes very|
|00001f50| 20 63 6f 6d 70 6c 69 63 | 61 74 65 64 20 61 73 20 | complic|ated as |
|00001f60| 69 6e 20 74 68 65 20 70 | 61 72 74 69 63 75 6c 61 |in the p|articula|
|00001f70| 72 20 63 61 73 65 20 61 | 62 6f 76 65 20 74 68 65 |r case a|bove the|
|00001f80| 20 63 6c 6f 73 65 20 63 | 75 72 6c 79 0d 2a 2a 20 | close c|urly.** |
|00001f90| 68 61 73 20 6e 6f 74 20 | 62 65 65 6e 20 65 6d 69 |has not |been emi|
|00001fa0| 74 74 65 64 20 79 65 74 | 2c 20 61 73 20 69 74 20 |tted yet|, as it |
|00001fb0| 69 73 20 61 77 61 69 74 | 69 6e 67 20 74 68 65 20 |is await|ing the |
|00001fc0| 22 65 6c 73 65 22 20 6f | 72 20 3c 6f 74 68 65 72 |"else" o|r <other|
|00001fd0| 3e 20 74 6f 0d 2a 2a 20 | 64 65 74 65 72 6d 69 6e |> to.** |determin|
|00001fe0| 65 20 77 68 69 63 68 20 | 67 6c 75 65 20 74 6f 20 |e which |glue to |
|00001ff0| 75 73 65 20 66 6f 72 20 | 64 69 73 70 6c 61 79 69 |use for |displayi|
|00002000| 6e 67 20 69 74 2e 0d 2a | 2a 0d 2a 2a 09 43 6f 6e |ng it..*|*.**.Con|
|00002010| 73 65 71 75 65 6e 74 6c | 79 2c 20 67 72 61 6d 6d |sequentl|y, gramm|
|00002020| 61 72 20 61 63 74 69 6f | 6e 73 20 73 65 6e 73 69 |ar actio|ns sensi|
|00002030| 74 69 76 65 20 74 6f 20 | 74 68 65 73 65 20 70 6f |tive to |these po|
|00002040| 69 6e 74 73 20 70 75 73 | 68 20 61 6e 20 69 6e 73 |ints pus|h an ins|
|00002050| 74 61 6e 63 65 0d 2a 2a | 20 6f 66 20 74 68 69 73 |tance.**| of this|
|00002060| 20 63 6c 61 73 73 20 6f | 6e 74 6f 20 74 68 65 20 | class o|nto the |
|00002070| 73 74 61 63 6b 20 77 68 | 65 6e 20 74 68 65 20 69 |stack wh|en the i|
|00002080| 6e 70 75 74 20 74 6f 6b | 65 6e 20 69 73 20 6f 66 |nput tok|en is of|
|00002090| 20 74 79 70 65 20 6b 53 | 4c 65 78 5f 4e 65 77 4c | type kS|Lex_NewL|
|000020a0| 69 6e 65 2e 0d 2a 2a 20 | 49 66 20 74 68 65 20 6e |ine..** |If the n|
|000020b0| 65 77 6c 69 6e 65 20 73 | 68 6f 75 6c 64 20 68 61 |ewline s|hould ha|
|000020c0| 76 65 20 62 65 65 6e 20 | 69 67 6e 6f 72 65 64 2c |ve been |ignored,|
|000020d0| 20 69 74 20 77 69 6c 6c | 20 62 65 20 69 67 6e 6f | it will| be igno|
|000020e0| 72 65 64 2e 20 20 49 66 | 20 74 68 65 20 6e 65 77 |red. If| the new|
|000020f0| 6c 69 6e 65 0d 2a 2a 20 | 73 68 6f 75 6c 64 20 6e |line.** |should n|
|00002100| 6f 74 20 62 65 20 69 67 | 6e 6f 72 65 64 2c 20 69 |ot be ig|nored, i|
|00002110| 74 20 77 69 6c 6c 20 63 | 6f 6d 65 20 62 61 63 6b |t will c|ome back|
|00002120| 20 61 73 20 62 65 69 6e | 67 20 6f 66 20 74 79 70 | as bein|g of typ|
|00002130| 65 20 6b 53 50 72 73 5f | 4e 65 77 4c 69 6e 65 2e |e kSPrs_|NewLine.|
|00002140| 0d 2a 2f 0d 63 6c 61 73 | 73 20 50 72 73 4e 65 77 |.*/.clas|s PrsNew|
|00002150| 4c 69 6e 65 20 3a 20 70 | 75 62 6c 69 63 20 53 79 |Line : p|ublic Sy|
|00002160| 6e 74 61 63 74 69 63 50 | 72 73 20 7b 0d 70 75 62 |ntacticP|rs {.pub|
|00002170| 6c 69 63 3a 0d 09 50 72 | 73 4e 65 77 4c 69 6e 65 |lic:..Pr|sNewLine|
|00002180| 28 29 0d 09 09 3a 20 53 | 79 6e 74 61 63 74 69 63 |()...: S|yntactic|
|00002190| 50 72 73 28 6b 53 50 72 | 73 5f 4e 65 77 4c 69 6e |Prs(kSPr|s_NewLin|
|000021a0| 65 29 0d 09 09 7b 0d 09 | 09 7d 0d 0d 09 76 69 72 |e)...{..|.}...vir|
|000021b0| 74 75 61 6c 20 42 6f 6f | 6c 65 61 6e 20 49 73 53 |tual Boo|lean IsS|
|000021c0| 65 70 61 72 61 74 6f 72 | 28 29 20 63 6f 6e 73 74 |eparator|() const|
|000021d0| 3b 0d 09 76 69 72 74 75 | 61 6c 20 42 6f 6f 6c 65 |;..virtu|al Boole|
|000021e0| 61 6e 20 44 69 73 70 6c | 61 79 28 46 6f 72 6d 61 |an Displ|ay(Forma|
|000021f0| 74 74 69 6e 67 20 2a 61 | 46 6f 72 6d 61 74 29 3b |tting *a|Format);|
|00002200| 0d 09 76 69 72 74 75 61 | 6c 20 42 6f 6f 6c 65 61 |..virtua|l Boolea|
|00002210| 6e 20 41 63 63 65 70 74 | 28 53 79 6e 74 61 63 74 |n Accept|(Syntact|
|00002220| 69 63 20 2a 61 54 6f 6b | 65 6e 2c 20 50 61 72 73 |ic *aTok|en, Pars|
|00002230| 65 72 20 2a 61 50 61 72 | 73 65 72 29 3b 0d 7d 3b |er *aPar|ser);.};|
|00002240| 0d 0d 0d 2f 2a b5 20 63 | 6c 61 73 73 20 50 72 73 |.../*. c|lass Prs|
|00002250| 4e 65 77 4c 69 6e 65 49 | 66 0d 2a 2a 09 4c 69 6b |NewLineI|f.**.Lik|
|00002260| 65 20 50 72 73 4e 65 77 | 4c 69 6e 65 2c 20 65 78 |e PrsNew|Line, ex|
|00002270| 63 65 70 74 20 69 74 20 | 61 6c 73 6f 20 69 67 6e |cept it |also ign|
|00002280| 6f 72 65 73 20 74 68 65 | 20 6e 65 77 6c 69 6e 65 |ores the| newline|
|00002290| 20 69 66 20 69 74 20 69 | 73 20 66 6f 6c 6c 6f 77 | if it i|s follow|
|000022a0| 65 64 20 62 79 0d 2a 2a | 20 22 69 66 22 2e 20 20 |ed by.**| "if". |
|000022b0| 55 73 65 64 20 69 6e 20 | 74 68 65 20 63 6f 6e 74 |Used in |the cont|
|000022c0| 65 78 74 20 6f 66 20 22 | 65 6c 73 65 20 3c 6e 65 |ext of "|else <ne|
|000022d0| 77 6c 69 6e 65 3e 20 69 | 66 22 20 74 6f 20 74 72 |wline> i|f" to tr|
|000022e0| 65 61 74 20 69 74 20 61 | 73 20 22 65 6c 73 65 20 |eat it a|s "else |
|000022f0| 69 66 22 0d 2a 2f 0d 63 | 6c 61 73 73 20 50 72 73 |if".*/.c|lass Prs|
|00002300| 4e 65 77 4c 69 6e 65 49 | 66 20 3a 20 70 75 62 6c |NewLineI|f : publ|
|00002310| 69 63 20 50 72 73 4e 65 | 77 4c 69 6e 65 20 7b 0d |ic PrsNe|wLine {.|
|00002320| 70 75 62 6c 69 63 3a 0d | 09 50 72 73 4e 65 77 4c |public:.|.PrsNewL|
|00002330| 69 6e 65 49 66 28 29 0d | 09 09 3a 20 50 72 73 4e |ineIf().|..: PrsN|
|00002340| 65 77 4c 69 6e 65 28 29 | 0d 09 09 7b 0d 09 09 7d |ewLine()|...{...}|
|00002350| 0d 0d 09 76 69 72 74 75 | 61 6c 20 42 6f 6f 6c 65 |...virtu|al Boole|
|00002360| 61 6e 20 41 63 63 65 70 | 74 28 53 79 6e 74 61 63 |an Accep|t(Syntac|
|00002370| 74 69 63 20 2a 61 54 6f | 6b 65 6e 2c 20 50 61 72 |tic *aTo|ken, Par|
|00002380| 73 65 72 20 2a 61 50 61 | 72 73 65 72 29 3b 0d 7d |ser *aPa|rser);.}|
|00002390| 3b 0d 0d 0d 0d 2f 2a 0d | 2a 2a 20 45 78 74 65 72 |;..../*.|** Exter|
|000023a0| 6e 65 64 20 69 74 65 6d | 73 0d 2a 2f 0d 65 78 74 |ned item|s.*/.ext|
|000023b0| 65 72 6e 20 50 72 73 44 | 65 63 6c 4c 69 73 74 20 |ern PrsD|eclList |
|000023c0| 67 50 72 73 44 65 63 6c | 4c 69 73 74 3b 0d 65 78 |gPrsDecl|List;.ex|
|000023d0| 74 65 72 6e 20 50 72 73 | 49 64 20 67 50 72 73 49 |tern Prs|Id gPrsI|
|000023e0| 64 3b 0d 65 78 74 65 72 | 6e 20 50 72 73 50 6c 61 |d;.exter|n PrsPla|
|000023f0| 63 65 48 6f 6c 64 65 72 | 20 67 4c 65 78 46 6c 75 |ceHolder| gLexFlu|
|00002400| 73 68 3b 0d 0d 23 65 6e | 64 69 66 09 0d 0d 0d 00 |sh;..#en|dif.....|
|00002410| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002470| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002480| 00 00 01 00 00 00 04 06 | 00 00 03 06 00 00 00 4a |........|.......J|
|00002490| 61 6c 44 61 74 61 08 6d | 61 74 68 2e 63 2e 6f 0e |alData.m|ath.c.o.|
|000024a0| 5f 66 69 78 65 78 63 65 | 70 74 69 6f 6e 73 04 4d |_fixexce|ptions.M|
|000024b0| 0f 50 61 72 73 65 72 41 | 63 74 69 6f 6e 73 2e 68 |.ParserA|ctions.h|
|000024c0| 02 00 00 00 50 61 72 74 | 53 49 54 78 00 00 00 00 |....Part|SITx....|
|000024d0| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|000024e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024f0| 00 00 a9 80 16 a1 00 00 | 00 00 00 00 04 50 63 6f |........|.....Pco|
|00002500| 70 79 73 69 67 6e 07 73 | 69 67 6e 6e 75 6d 04 66 |pysign.s|ignnum.f|
|00002510| 61 62 73 09 72 65 6d 61 | 69 6e 64 65 72 04 74 61 |abs.rema|inder.ta|
|00002520| 6e 68 08 70 72 6f 63 65 | 78 69 74 04 65 78 70 31 |nh.proce|xit.exp1|
|00002530| 09 70 72 6f 63 65 6e 74 | 72 79 05 5f 73 65 61 6d |.procent|ry._seam|
|00002540| 04 73 69 6e 68 03 69 6e | 66 04 63 6f 73 68 03 65 |.sinh.in|f.cosh.e|
|00002550| 78 70 0c 5f 61 74 72 69 | 67 63 6f 6d 6d 6f 6e 03 |xp._atri|gcommon.|
|00002560| 6e 61 6e 0d 74 65 73 74 | 65 78 63 65 70 74 69 6f |nan.test|exceptio|
|00002570| 6e 04 61 73 69 6e 04 73 | 71 72 74 04 61 74 61 6e |n.asin.s|qrt.atan|
|00002580| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 14 |...H..Mo|naco....|
|00002590| 00 01 3b 04 00 0a 00 00 | 04 56 03 66 04 80 08 73 |..;.....|.V.f...s|
|000025a0| 00 00 00 14 00 01 00 06 | 00 04 00 27 00 02 01 76 |........|...'...v|
|000025b0| 01 fe 00 27 00 02 01 76 | 01 fe a6 22 12 56 00 00 |...'...v|...".V..|
|000025c0| 0e a6 00 00 0e b3 00 00 | 00 36 01 00 00 00 02 94 |........|.6......|
|000025d0| 00 19 00 00 03 24 00 00 | 03 36 13 63 6c 61 73 73 |.....$..|.6.class|
|000025e0| 20 53 79 6e 74 61 63 74 | 69 63 50 72 73 00 00 00 | Syntact|icPrs...|
|000025f0| 07 c9 00 00 07 e5 1d 20 | 20 53 79 6e 74 61 63 74 |....... | Syntact|
|00002600| 69 63 50 72 73 3a 3a 53 | 79 6e 74 61 63 74 69 63 |icPrs::S|yntactic|
|00002610| 50 72 73 00 00 00 08 52 | 00 00 08 66 15 63 6c 61 |Prs....R|...f.cla|
|00002620| 73 73 20 50 72 73 50 6c | 61 63 65 48 6f 6c 64 65 |ss PrsPl|aceHolde|
|00002630| 72 00 00 00 0a 14 00 00 | 0a 34 21 20 20 50 72 73 |r.......|.4! Prs|
|00002640| 50 6c 61 63 65 48 6f 6c | 64 65 72 3a 3a 50 72 73 |PlaceHol|der::Prs|
|00002650| 50 6c 61 63 65 48 6f 6c | 64 65 72 00 00 00 0b 31 |PlaceHol|der....1|
|00002660| 00 00 0b 3c 0b 63 6c 61 | 73 73 20 50 72 73 49 64 |...<.cla|ss PrsId|
|00002670| 00 00 0d 38 00 00 0d 46 | 0f 20 20 50 72 73 49 64 |...8...F|. PrsId|
|00002680| 3a 3a 50 72 73 49 64 00 | 00 00 0e a6 00 00 0e b3 |::PrsId.|........|
|00002690| 0d 63 6c 61 73 73 20 50 | 72 73 41 73 49 64 00 00 |.class P|rsAsId..|
|000026a0| 10 2b 00 00 10 3d 13 20 | 20 50 72 73 41 73 49 64 |.+...=. | PrsAsId|
|000026b0| 3a 3a 50 72 73 41 73 49 | 64 00 00 00 10 c1 00 00 |::PrsAsI|d.......|
|000026c0| 10 d4 13 63 6c 61 73 73 | 20 50 72 73 44 65 73 74 |...class| PrsDest|
|000026d0| 72 75 63 74 6f 72 00 00 | 11 d4 00 00 11 f2 1f 20 |ructor..|....... |
|000026e0| 20 50 72 73 44 65 73 74 | 72 75 63 74 6f 72 3a 3a | PrsDest|ructor::|
|000026f0| 50 72 73 44 65 73 74 72 | 75 63 74 6f 72 00 00 00 |PrsDestr|uctor...|
|00002700| 12 99 00 00 12 aa 11 63 | 6c 61 73 73 20 50 72 73 |.......c|lass Prs|
|00002710| 53 74 6d 74 4c 69 73 74 | 00 00 13 5d 00 00 13 6e |StmtList|...]...n|
|00002720| 11 63 6c 61 73 73 20 50 | 72 73 44 65 63 6c 4c 69 |.class P|rsDeclLi|
|00002730| 73 74 00 00 14 21 00 00 | 14 2e 0d 63 6c 61 73 73 |st...!..|...class|
|00002740| 20 50 72 73 53 74 6d 74 | 00 00 14 d5 00 00 14 e2 | PrsStmt|........|
|00002750| 0d 63 6c 61 73 73 20 50 | 72 73 44 65 63 6c 00 00 |.class P|rsDecl..|
|00002760| 15 89 00 00 15 94 0b 63 | 6c 61 73 73 20 50 72 73 |.......c|lass Prs|
|00002770| 44 6f 00 00 16 35 00 00 | 16 40 0b 63 6c 61 73 73 |Do...5..|.@.class|
|00002780| 20 50 72 73 49 66 00 00 | 16 e1 00 00 16 ee 0d 63 | PrsIf..|.......c|
|00002790| 6c 61 73 73 20 50 72 73 | 45 6c 73 65 00 00 17 95 |lass Prs|Else....|
|000027a0| 00 00 17 a1 0d 63 6c 61 | 73 73 20 50 72 73 46 6f |.....cla|ss PrsFo|
|000027b0| 72 00 00 00 18 45 00 00 | 18 54 0f 63 6c 61 73 73 |r....E..|.T.class|
|000027c0| 20 50 72 73 53 74 72 75 | 63 74 00 00 19 01 00 00 | PrsStru|ct......|
|000027d0| 19 10 0f 63 6c 61 73 73 | 20 50 72 73 53 77 69 74 |...class| PrsSwit|
|000027e0| 63 68 00 00 19 bd 00 00 | 19 cb 0f 63 6c 61 73 73 |ch......|...class|
|000027f0| 20 50 72 73 57 68 69 6c | 65 00 00 00 1a 75 00 00 | PrsWhil|e....u..|
|00002800| 1a 82 0d 63 6c 61 73 73 | 20 50 72 73 45 78 70 72 |...class| PrsExpr|
|00002810| 00 00 1b 29 00 00 1b 3e | 15 63 6c 61 73 73 20 50 |...)...>|.class P|
|00002820| 72 73 44 65 63 6c 4f 70 | 65 72 61 74 6f 72 00 00 |rsDeclOp|erator..|
|00002830| 1c 6e 00 00 1c 7e 11 63 | 6c 61 73 73 20 50 72 73 |.n...~.c|lass Prs|
|00002840| 4e 65 77 4c 69 6e 65 00 | 00 00 21 c7 00 00 21 d9 |NewLine.|..!...!.|
|00002850| 13 63 6c 61 73 73 20 50 | 72 73 4e 65 77 4c 69 6e |.class P|rsNewLin|
|00002860| 65 49 66 00 00 00 00 1e | 00 27 00 02 01 76 01 fe |eIf.....|.'...v..|
|00002870| 00 27 00 02 01 76 01 fe | 00 00 00 36 00 00 00 00 |.'...v..|...6....|
|00002880| 00 00 00 00 00 00 00 00 | 01 00 00 00 04 06 00 00 |........|........|
|00002890| 03 06 00 00 00 4a 01 14 | 17 0c 13 78 00 00 00 1c |.....J..|...x....|
|000028a0| 00 4a 00 00 4d 50 53 52 | 00 02 00 0a 03 ed ff ff |.J..MPSR|........|
|000028b0| 00 00 00 00 00 00 00 00 | 03 ef ff ff 00 00 00 4c |........|.......L|
|000028c0| 00 00 00 00 03 f0 ff ff | 00 00 02 e4 01 1a 34 cc |........|......4.|
|000028d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000028e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000028f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+