Grammars for Pascal and Borland Delphi
(When you misspell 'grammar' as 'gramar' or 'grammer' you will surely not find valuable material!)
There are some grammars around.
You can look up the various versions of TPYacc-distributions,
they should contain a simple sample grammar.
Standard Pascal, Extended Pascal and Object-Oriented Pascal Grammars should also be available at Pascal Central.
File: pascal.grm (taken from file isopas12.zip), Grammar of PASCAL Language. Programmer: Iew Ayaragarnchanakul. Generator: LLGEN version 2.0.
pascal.zip (http://www.ucse.edu.ar/fma/compiladores/grams/pascal.zip): Standard Pascal grammar. Author: Lori Simcox, Homework and various other Standard Pascal grammars.
ftp://iecc.com/pub/files/pascal-grammar shell archive file containing ISO standard Pascal grammar with lexer.
GRM_Pascal.ZIP Turbo Pascal 5.5 Grammar (with lexical grammar) modified for use by LRGen 5.0 by Paul Mann.
Borland Delphi grammars I know of are:
Other grammars were mentioned in newsgroups, but I couldn't find them.
NewsGroups / Listserver for that topic:
-
Decam
(http://www.egroups.com/group/decam/info.html is out of date moved to
http://www.onelist.com/ the decam list there is now closed due to
low participation.
Have a look at http://www.mwpages.com )
-
Delphi Grammar on Yahoo Groups
This group is intended to discuss grammars for Borland Delphi and bugfixes.
http://groups.yahoo.com/group/DelphiGrammar/
-
Pascal compiler for the Macintosh (PowerPC), now another port of FPC
(
http://www.egroups.com/group/pascalcompiler/info.html)
They switched to avalon, see http://pascal-central.com/osp/osp.html
(Open Source Macintosh Pascal Compiler Project).
My modifications to TPYacc to generate my Delphi4.0
grammar were the following (the grammar is really large):
-
in file yaccbase.pas:
const
max_elems {: word} = 100; {50} (* maximum size of integer sets *)
-
in file yacctabl.pas:
const
(* Maximum table sizes: *)
max_keys {: word} = 997; (* size of hash symbol table (prime number!) *)
max_nts {: word} = 2000;{300} (* maximum number of nonterminals *)
max_lits {: word} = max_nts + 256; (* number of literals ( (max_nts) 300+256) *)
max_rules {: word} = max_nts + 1; (* number of rules ( (max_nts) 300+1) *)
max_types {: word} = 100; (* number of type tags *)
max_prec {: word} = 50; (* maximum precedence level *)
max_states {: word} = 1600;{600} (* number of LR(0) states *)
max_items {: word} = 9000;{3000} (* number of items *)
max_trans {: word} = 9000;{3000} (* number of transitions *)
max_redns {: word} = 1200; (* number of reductions *)
max_rule_len {: word} = 64; {64} (* maximum length of rules *)
max_set_items {: word} = 200; {100} (* maximum number of items in an item set *)
Back to my homepage.
Updated 15.January.2004