berto
Posts: 20708
Joined: 3/13/2002 From: metro Chicago, Illinois, USA Status: offline
|
quote:
ORIGINAL: berto When first coding txt.y, whenever I saw many usage counterexamples (where "many" is loosely defined), I inferred that the counterexamples might be acceptable alternative usages. It could be that - The AGEWiki doc is just flat out wrong; the actual usages are right.
... In the AGElint README file, I write: quote:
When deciding the txt.y parser rules, I am guided primarily by the AGE Wiki documentation (where it exists, which is not always), and secondarily by actual usage as demonstrated by the game data files. They are not always in agreement! And there is much ambiguity and nuance. Bear that in mind when reviewing/critiquing the txt.y parser specification. Going forward, and as I review and refine the txt.y parser, I will have to base "truth" on - The AGEWiki pages.
- Actual usage (across all games).
- Experienced dev/modder feedback (now possible, since I at least have your attention and active cooperation).
- Actual experimentation (don't just speculate; "look in the horse's mouth!") (but I really don't have time for it).
in that order of authority. Here are three good examples (there are others) of where the AGEWiki pages appear to be "flat out wrong": ChgPopContent ChgPopEducation ChgPopMilitancy In any case, the AGEWiki says nothing about using the ALL parameter. But the actual usage evidence suggests otherwise. Here for example is the actual usage of ChgPopEducation (used in PON only): [root@berto agelint]# ./kwddat.pl ChgPopEducation pon 43 ChgPopEducation = 15 2 ChgPopEducation = 30 8 ChgPopEducationEx = 0;1;2;3;5;5;ALL 14 ChgPopEducationEx = 0;1;3;3;5;5;ALL 8 ChgPopEducationEx = 0;1;3;7;7;7;ALL 9 ChgPopEducationEx = 0;1;5;3;2;0;ALL 8 ChgPopEducationEx = 0;5;7;10;5;5;ALL I encounter such disagreement between the AGEWiki docs and actual usage not infrequently. These here are unusual cases where actual usage trumps the AGEWiki docs. So here is how I code ChgPopEducation[Ex] in the txt.y parser: chgpopeducation: _CHGPOPEDUCATION eq intpos
{
/*
http://www.ageod.net/agewiki/ChgPopEducation
Syntax: ChgPopEducation = Value Or ChgPopEducationEx = Servile|Peasant|Worker|Middle|Upper|Aristocrat
*/
}
; and also: chgpopeducationex: _CHGPOPEDUCATIONEX eq int sc int sc int sc int sc int sc int all
{ CHKINT( $3, -999, -999, 999, 999);
CHKINT( $5, -999, -999, 999, 999);
CHKINT( $7, -999, -999, 999, 999);
CHKINT( $9, -999, -999, 999, 999);
CHKINT($11, -999, -999, 999, 999);
CHKINT($13, -999, -999, 999, 999);
/*
http://www.ageod.net/agewiki/ChgPopEducation
Syntax: ChgPopEducation = Value Or ChgPopEducationEx = Servile|Peasant|Worker|Middle|Upper|Aristocrat
documented | but ; in actual usage
the appended 'all' is undocumented but conforms to actual usage
*/
}
; Note the inclusion of the 'all' in chgpopeducationex (ChgPopEducationEx), where 'all' is specified in the txt.y parser as
all: /* empty, no problem */
| sc _ALL
; Note also the specification of 'sc' (semi-colon) in the chgpopeducationex specification, despite the AGEWiki docs suggesting 'vb' (vertical bar)! Getting it all right is tricky. Please bear with me (and forgive false positives!) as I continue to code and debug AGElint.
< Message edited by berto -- 1/5/2012 8:21:03 AM >
_____________________________
|