Path: news.daimi.aau.dk!news.daimi.aau.dk!eernst From: eernst@fraxinus.daimi.aau.dk (Erik Ernst) Newsgroups: comp.lang.beta Subject: Re: Metaprogramming System Date: 12 Aug 1995 03:57:58 GMT Organization: DAIMI, Computer Science Dept. of Aarhus Univ. Lines: 59 Distribution: world Message-ID: References: <40a09e$j8n@fbi-news.informatik.uni-dortmund.de> NNTP-Posting-Host: fraxinus.daimi.aau.dk In-reply-to: zardi@ohio.informatik.uni-dortmund.de's message of 9 Aug 1995 09:48:30 GMT (this posting had been 5 days on the wires before showing up here; is that normal?) In article <40a09e$j8n@fbi-news.informatik.uni-dortmund.de> zardi@ohio.informatik.uni-dortmund.de (Ahmed Zardi) writes: > [..] > I am writing a parser with a MPS and i' ve used the MPS-Reference > Manual to do this. I have problems to understand how i generate a parser. > My question is, how do i generate the parser > (in MPS-Reference Manual: mylang-parser.bet)? Try (assuming >ls -1 mylang-meta.gram ) to execute >generator mylang which should ensure something like >ls -1 mylang-meta.ast mylang-meta.gram mylang-parser.bobs mylang.ast mylangcfl.bet and then >bobsit mylang >ls -1 mylang-meta.ast mylang-meta.gram mylang-parser.bobs mylang-parser.btab <-- Parser table mylang-parser.lst <-- Parser generation log mylang.ast mylangcfl.bet tables <-- Parser table which makes it possible for MPS to parse files when opening them. This happens transparently and it ensures that there is an up to date abstract syntax tree representation of any fragment group opened (like '(fragmentGroupName[],someOutputStream[])->myAstInterface.top.open'). So there is no mylang-parser.bet---the parser is table driven. The parser generation log describes the parser table generation process. Look at it in case of problems with your grammar (it may be non-parseable even though 'generator' accepts it). hth, -- Erik Ernst eernst@daimi.aau.dk Computer Science Department of Aarhus University, Denmark