<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 03 Jan 2013, at 07:52, Andrzej Borucki wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: monospace; ">I look to fpc-2.6.0.source.zip, directory fpc-2.6.0\compiler. I see array<br>arraytokeninfo in file tokens.pas where are keywords like 'repeat' and<br>'until'. But I can't find any parser (and lexer, dfa etc). How FreePascal<br>compiler proceed with grammar?<br></span></span></blockquote></div><br><div>The lexer is mostly in scanner.pas</div><div><br></div><div>The parser is in pbase.pas (base parser routines), pstatmnt.pas (parsing statements), pexpr.pas (parsing expressions), pdecl.pas (generic declaration parsing), pdecvar.pas (parsing variable and property declarations), pdecsub.pas (parsing procedure/method declarations), pdecobj.pas (parsing object/class declarations), ptype.pas (generic type parsing).</div><div><br></div><div>The parser is a manually written recursive-descent parser. There is no formal grammar.</div><div><br></div><div><br></div><div>Jonas</div></body></html>