Matrix Games Forums

Characters of World War 1Sign of for the Pike and Shot Beta!More Games are Coming to Steam! Deal of the Week: Combat Command Return to the Moon on October 31st! Commander: The Great War iPad Wallpapers Generals of the Great WarDeal of the Week Panzer CorpsNew Strategy Titles Join the FamilyTablet Version of Qvadriga gets new patch
Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

RE: txt.y -- the AGElint parser

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [Current Games From Matrix.] >> [World War I] >> Revolution Under Siege >> Mods and Scenarios >> RE: txt.y -- the AGElint parser Page: <<   < prev  1 2 [3] 4 5   next >   >>
Login
Message << Older Topic   Newer Topic >>
RE: txt.y -- the AGElint parser - 12/22/2011 4:30:23 PM   
berto


Posts: 4185
Joined: 3/13/2002
From: metro Chicago, Illinois, USA
Status: offline

quote:

ORIGINAL: Chliperic

Are you realizing we are currently building a better way to create data in AGE game than in the official way?

...

I just can't wait to apply this for SVF 2.0; Development time divided by 4 to 5 at least.

In developing AGElint, that was one of my chief aims: to clean up the "small" stuff, drastically reduce the support time devoted to bug reporting/hunting/fixing/responding, thereby freeing up dev/modder time for the "big" stuff.

berto

_____________________________

Early MusiChicago, http://earlymusichicago.org
PIKT, http://pikt.org
Campaign Series Lead Programmer, http://www.matrixgames.com/forums/tt.asp?forumid=226
AGElint debugging toolkit, http://www.matrixgames.com/forums/tm.asp?m=2978333

(in reply to Chliperic)
Post #: 61
RE: txt.y -- the AGElint parser - 12/22/2011 5:13:53 PM   
Chliperic


Posts: 955
Joined: 3/21/2010
Status: offline
Another false positive

WARNING: in /cygdrive/c/Revolution under Siege/Revolution Under Siege/RUS/Events/BalticSetup.sct, at (or before) line 224: suspicious, undocumented usage of ; as field separator

in event evt_nam_WHI_Baltarmydeploymentconditionfulfilled:

221
222 SelectRegion = $Liepaja
223
224> ChangeAssetsProd = 10;5;0;0;0;0
225
226 SelectFaction = $WHI
227 SelectRegion = $Valga

Syntax: ChangeAssetsProd = Supply|Ammo|Power|Money|WSU|Conscripts

; may be used in events as stated in the wiki

_____________________________

Fatal Years mod for RUS version 1.07
Struggle for a Vast Future 2.0 for AACW in advanced beta:

http://moddercorner.com/

(in reply to berto)
Post #: 62
RE: txt.y -- the AGElint parser - 12/22/2011 5:32:58 PM   
berto


Posts: 4185
Joined: 3/13/2002
From: metro Chicago, Illinois, USA
Status: offline

quote:

ORIGINAL: Chliperic

Another false positive

WARNING: in /cygdrive/c/Revolution under Siege/Revolution Under Siege/RUS/Events/BalticSetup.sct, at (or before) line 224: suspicious, undocumented usage of ; as field separator

in event evt_nam_WHI_Baltarmydeploymentconditionfulfilled:

221
222 SelectRegion = $Liepaja
223
224> ChangeAssetsProd = 10;5;0;0;0;0
225
226 SelectFaction = $WHI
227 SelectRegion = $Valga

Syntax: ChangeAssetsProd = Supply|Ammo|Power|Money|WSU|Conscripts

; may be used in events as stated in the wiki

Indeed.

I see at:

http://www.ageod.net/agewiki/ChangeAssetsProd

where it says:

quote:

(NB: it works also like this : 0;0;0;0;10;0 in an event file)

Again, the fix is fairly simple.

In txt.y, before:



changeassetsprod: _CHANGEASSETSPROD eq int sc int sc int sc int sc int sc int {
                    txterrmsg(_WARNING, TRUE, linenorhs, "suspicious, undocumented usage of ; as field separator");
                  }
                | _CHANGEASSETSPROD eq int vb int vb int vb int vb int vb int
                {
                /*                                                              
                http://www.ageod.net/agewiki/ChangeAssetsProd                   
                Syntax:  ChangeAssetsProd = Supply|Ammo|Power|Money|WSU|Conscripts
                */
                }
                ;


And after:



changeassetsprod: _CHANGEASSETSPROD eq int sc int sc int sc int sc int sc int {
                  if (filetype != FILETYPE_EVENTS)
                      txterrmsg(_WARNING, TRUE, linenorhs, "suspicious, undocumented usage of ; as field separator");
                  }
                | _CHANGEASSETSPROD eq int vb int vb int vb int vb int vb int
                {
                /*
                http://www.ageod.net/agewiki/ChangeAssetsProd
                Syntax:  ChangeAssetsProd = Supply|Ammo|Power|Money|WSU|Conscripts
                (NB: in an event file, it works also like this: 0;0;0;0;10;0)
                */
                }
                ;


To be fixed in the next release.

Another great catch!

But why didn't I get this kind of cooperation and feedback months before? ...

_____________________________

Early MusiChicago, http://earlymusichicago.org
PIKT, http://pikt.org
Campaign Series Lead Programmer, http://www.matrixgames.com/forums/tt.asp?forumid=226
AGElint debugging toolkit, http://www.matrixgames.com/forums/tm.asp?m=2978333

(in reply to Chliperic)
Post #: 63
RE: txt.y -- the AGElint parser - 12/22/2011 5:48:10 PM   
berto


Posts: 4185
Joined: 3/13/2002
From: metro Chicago, Illinois, USA
Status: offline

Investigating further (on my development system; don't try this at home, kids!):



[root@telemann agewiki]# pwd
/home/berto/games/ageod/agewiki/www.ageod.net/agewiki

[root@telemann agewiki]# egrep -i "works also like this" * | awk -F= '{print $2}' | awk -F\& '{print $1}' | sort | uniq

ChangeAssetsProd

[root@telemann agewiki]# egrep -i "is also a valid syntax" * | awk -F= '{print $2}' | awk -F\& '{print $1}' | sort | uniq

AI.SetPoolRatio
AlterCuSubUnit
ChangeVPCount


Looks like there might be details I missed, alternative syntaxes, also in AI.SetPoolRatio & ChangeVPCount. I will look into it.

Unix/Linux, how do I love thee? Let me count the ways...


_____________________________

Early MusiChicago, http://earlymusichicago.org
PIKT, http://pikt.org
Campaign Series Lead Programmer, http://www.matrixgames.com/forums/tt.asp?forumid=226
AGElint debugging toolkit, http://www.matrixgames.com/forums/tm.asp?m=2978333

(in reply to berto)
Post #: 64
RE: txt.y -- the AGElint parser - 12/22/2011 6:21:31 PM   
Chliperic


Posts: 955
Joined: 3/21/2010
Status: offline
ANother false positive

in /cygdrive/c/Revolution under Siege/Revolution Under Siege/RUS/Events/RUS F4 Options Politics.sct, at (or before) line 1770: syntax error: #-# (0x2d), #-999#

in event evt_nam_DonCossack_infighting:

1767 Actions
1768 ChgFacEngagementPts = -9
1769
1770> SetEvtOccurs = evt_nam_DonCossack_infighting;MaxOccurs;-999
1771 SetEvtOccurs = evt_nam_DonCossack_infighting;CuOccurs;0
1772 GenTextMsg = opt_notify_WHI_setting_strategy;1;NULL;NULL;NULL
1773

Syntax: SetEvtOccurs = EventName; OccParam; Value


-999 is a correct value to avoid an event to fire

_____________________________

Fatal Years mod for RUS version 1.07
Struggle for a Vast Future 2.0 for AACW in advanced beta:

http://moddercorner.com/

(in reply to Chliperic)
Post #: 65
RE: txt.y -- the AGElint parser - 12/22/2011 6:24:55 PM   
Chliperic


Posts: 955
Joined: 3/21/2010
Status: offline

quote:

ORIGINAL: berto



But why didn't I get this kind of cooperation and feedback months before? ...


http://www.ageod-forum.com/showthread.php?p=224720#post224720




_____________________________

Fatal Years mod for RUS version 1.07
Struggle for a Vast Future 2.0 for AACW in advanced beta:

http://moddercorner.com/

(in reply to berto)
Post #: 66
RE: txt.y -- the AGElint parser - 12/22/2011 7:44:56 PM   
berto


Posts: 4185
Joined: 3/13/2002
From: metro Chicago, Illinois, USA
Status: offline

quote:

ORIGINAL: Chliperic

ANother false positive

in /cygdrive/c/Revolution under Siege/Revolution Under Siege/RUS/Events/RUS F4 Options Politics.sct, at (or before) line 1770: syntax error: #-# (0x2d), #-999#

in event evt_nam_DonCossack_infighting:

1767 Actions
1768 ChgFacEngagementPts = -9
1769
1770> SetEvtOccurs = evt_nam_DonCossack_infighting;MaxOccurs;-999
1771 SetEvtOccurs = evt_nam_DonCossack_infighting;CuOccurs;0
1772 GenTextMsg = opt_notify_WHI_setting_strategy;1;NULL;NULL;NULL
1773

Syntax: SetEvtOccurs = EventName; OccParam; Value


-999 is a correct value to avoid an event to fire

A very easy fix.

In txt.y, before:



setevtoccurs:   _SETEVTOCCURS eq evtnam sc occurs sc intpos
                {
                /*
                http://www.ageod.net/agewiki/SetEvtOccurs
                Syntax:  SetEvtOccurs = EventName; OccParam; Value
                */
                }
                ;


And after:



setevtoccurs:   _SETEVTOCCURS eq evtnam sc occurs sc int
                {
                /*
                http://www.ageod.net/agewiki/SetEvtOccurs
                Syntax:  SetEvtOccurs = EventName; OccParam; Value
                */
                }
                ;


with possibly also a CHKINT() call for that last int parameter.

Will be part of the next AGElint release.

_____________________________

Early MusiChicago, http://earlymusichicago.org
PIKT, http://pikt.org
Campaign Series Lead Programmer, http://www.matrixgames.com/forums/tt.asp?forumid=226
AGElint debugging toolkit, http://www.matrixgames.com/forums/tm.asp?m=2978333

(in reply to Chliperic)
Post #: 67
RE: txt.y -- the AGElint parser - 12/22/2011 7:52:49 PM   
berto


Posts: 4185
Joined: 3/13/2002
From: metro Chicago, Illinois, USA
Status: offline

An invocation of the kwddat program, and the kwd database:



[root@telemann agelint]# ./kwddat SetEvtOccurs | egrep -cv 999
1044
[root@telemann agelint]# ./kwddat SetEvtOccurs | egrep -c 999
11


That is, across all AGEOD games, just 11 instances of SetEvtOccurs with (-)999, and 1044 instances without.

kwd, kwddat.pl, kwddat, and so on I relied on greatly for "advice" about proper AGE command and argument usage. (The AGEWiki was another important, and more authoritative, advisor.) But informed human advice is so much better!

The kwd database, and support programs, I'll have more to say about in future.

_____________________________

Early MusiChicago, http://earlymusichicago.org
PIKT, http://pikt.org
Campaign Series Lead Programmer, http://www.matrixgames.com/forums/tt.asp?forumid=226
AGElint debugging toolkit, http://www.matrixgames.com/forums/tm.asp?m=2978333

(in reply to berto)
Post #: 68
RE: txt.y -- the AGElint parser - 12/22/2011 8:14:17 PM   
Chliperic


Posts: 955
Joined: 3/21/2010
Status: offline
not so sure for -999. I have maybe a wrong rememberance

< Message edited by Chliperic -- 12/22/2011 8:52:06 PM >


_____________________________

Fatal Years mod for RUS version 1.07
Struggle for a Vast Future 2.0 for AACW in advanced beta:

http://moddercorner.com/

(in reply to berto)
Post #: 69
RE: txt.y -- the AGElint parser - 12/22/2011 9:33:28 PM   
Chliperic


Posts: 955
Joined: 3/21/2010
Status: offline
Not sure if this one is a false positive

ERROR: in /cygdrive/c/Revolution under Siege/Revolution Under Siege/RUS/GameData/RgnDecisions/6-Nep.rgd, at (or before) line 16: syntax error: #I# (0x49), #Inp_Abs_EngagementPts#

13 Duration = 4
14 Inp_Rel_Morale = 1
15 Inp_Abs_Money = 13
16> Inp_Abs_EngagementPts = 3
17 RelBaseFlatValue = 100
18 RelBaseOwnAreaCityLevel = 1
19 SpecialOutputGain_Loyalty = 36

Regional decisions excel file has a column named by this expression,so I wonder why it is marked as wrong.

For the rest, I've almost achieved my search of false positives...Not that much, in conclusion :-) And so much almost invisible bugs solved in so few time...


_____________________________

Fatal Years mod for RUS version 1.07
Struggle for a Vast Future 2.0 for AACW in advanced beta:

http://moddercorner.com/

(in reply to Chliperic)
Post #: 70
RE: txt.y -- the AGElint parser - 12/22/2011 9:58:11 PM   
berto


Posts: 4185
Joined: 3/13/2002
From: metro Chicago, Illinois, USA
Status: offline

According to:

http://www.ageod.net/agewiki/SetEvtOccurs

the SetEvtOccurs arguments are:

quote:


EventName

String; Name (alias) of the event

OccParam

String; [MaxOccurs, CuOccurs];

* MaxOccurs - Changes the allowed amount of occurences.

MaxOccurs=0: Event never fires.

MaxOccurs=999: Event fires infinite times.

* CuOccurs - Changes the counter for how often the event already has occured.

Value

Integer; [0, 999]

The AGEWiki suggests that the third parameter must be between 0 to (positive) 999 only.

More from the kwd database:



[root@telemann agelint]# for g in acw ncp pon rop rus wia; do echo $g; ./kwddat SetEvtOccurs $g | egrep -cv 999; ./kwddat SetEvtOccurs $g | egrep -c ";999"; ./kwddat SetEvtOccurs $g | egrep -c ";-999"; echo; done
acw
0
0
0

ncp
0
0
0

pon
419
8
0

rop
85
0
0

rus
511
3
0

wia
29
0
0



The first figure is no 999, the second is positive 999, the third is -999.

As you can see, there is no instance of -999.

In fact:



[root@telemann agelint]# for g in acw ncp pon rop rus wia; do echo $g; ./kwddat SetEvtOccurs $g | awk -F\; '$NF>=0' | wc -l; ./kwddat SetEvtOccurs $g | awk -F\; '$NF<0' | wc -l; echo; done
acw
0
0

ncp
0
0

pon
427
0

rop
85
0

rus
510
4

wia
29
0



The only game with negative final value is rus, with 4 instances. They are:



[root@telemann agelint]# ./kwddat SetEvtOccurs rus | awk -F\; '$NF<0'
1 SetEvtOccurs = $evt_nam_RED_PartialMobilization_AIActivate2;CuOccurs;-1
1 SetEvtOccurs = $evt_nam_RED_PartialMobilization_AIActivate3;CuOccurs;-1
1 SetEvtOccurs = $evt_nam_RED_PartialMobilization_AIActivate;CuOccurs;-1
1 SetEvtOccurs = evt_nam_RED_UralTheaterprevendcountcons;CuOccurs;0;



Hmm, actually the fourth instance is bogus; see the spurious extra line-ending semi-colon.

A complete set of kwddat SevEvtOccurs data is available here:

SetEvtOccurs.dat.zip

(That's the sort of data I hope one day to make available for common reference on the Web.)

That's all the info I have on this.

What do you think? Should it be 'int' (positive or negative) or 'intpos' for that last parameter value?

_____________________________

Early MusiChicago, http://earlymusichicago.org
PIKT, http://pikt.org
Campaign Series Lead Programmer, http://www.matrixgames.com/forums/tt.asp?forumid=226
AGElint debugging toolkit, http://www.matrixgames.com/forums/tm.asp?m=2978333

(in reply to Chliperic)
Post #: 71
RE: txt.y -- the AGElint parser - 12/22/2011 10:03:37 PM   
Chliperic


Posts: 955
Joined: 3/21/2010
Status: offline
Let do it easy: I'm writing an event I will test soon. So we'll know if -999 work or not

_____________________________

Fatal Years mod for RUS version 1.07
Struggle for a Vast Future 2.0 for AACW in advanced beta:

http://moddercorner.com/

(in reply to berto)
Post #: 72
RE: txt.y -- the AGElint parser - 12/22/2011 10:12:18 PM   
berto


Posts: 4185
Joined: 3/13/2002
From: metro Chicago, Illinois, USA
Status: offline

quote:

ORIGINAL: Chliperic

Not sure if this one is a false positive

ERROR: in /cygdrive/c/Revolution under Siege/Revolution Under Siege/RUS/GameData/RgnDecisions/6-Nep.rgd, at (or before) line 16: syntax error: #I# (0x49), #Inp_Abs_EngagementPts#

13 Duration = 4
14 Inp_Rel_Morale = 1
15 Inp_Abs_Money = 13
16> Inp_Abs_EngagementPts = 3
17 RelBaseFlatValue = 100
18 RelBaseOwnAreaCityLevel = 1
19 SpecialOutputGain_Loyalty = 36

Regional decisions excel file has a column named by this expression,so I wonder why it is marked as wrong.


The page

http://www.ageod.net/agewiki/Engagement_Points

references only

http://www.ageod.net/agewiki/EvalEngagementPts
http://www.ageod.net/agewiki/ChgFacEngagementPts

and at the AGEWiki nowhere do I see mention of Inp_Abs_EngagementPts:



[root@telemann agewiki]# pwd
/home/berto/games/ageod/agewiki/www.ageod.net/agewiki

[root@telemann agewiki]# egrep -il Inp_Abs_EngagementPts *
[nil]



Here are all the Inp_ commands/keywords that I know of:



[root@telemann agelint]# egrep -i "^inp_" txt.l | awk '{print $1}'
Inp_Abs_CAPITAL
Inp_Abs_COAL
Inp_Abs_CONSCRIPT
Inp_Abs_Diplomat
Inp_Abs_Mfg
Inp_Abs_Money
Inp_Abs_Officer
Inp_Abs_Steel
Inp_Abs_VP
Inp_Capital
Inp_Coal
Inp_Goods{D}+
Inp_Mfg
Inp_Minerals
Inp_Money
Inp_Oil
Inp_Rel_Morale
Inp_Rel_Conscript
Inp_Steel



???

(Between the kwd database of actual usage and the AGEWiki, do you begin to see how I decided what is "true" and "legal" usage?)

_____________________________

Early MusiChicago, http://earlymusichicago.org
PIKT, http://pikt.org
Campaign Series Lead Programmer, http://www.matrixgames.com/forums/tt.asp?forumid=226
AGElint debugging toolkit, http://www.matrixgames.com/forums/tm.asp?m=2978333

(in reply to Chliperic)
Post #: 73
RE: txt.y -- the AGElint parser - 12/22/2011 10:20:02 PM   
berto


Posts: 4185
Joined: 3/13/2002
From: metro Chicago, Illinois, USA
Status: offline

quote:

ORIGINAL: Chliperic

Let do it easy: I'm writing an event I will test soon. So we'll know if -999 work or not

That was part of my original plan: When still in doubt between the kwd usage and the AGEWiki docs, I had planned to decide issues with real-game experimentation. But my initial attempts were undercut by the clumsy, cumbersome, time-draining "official" procedure: .xls DB -> .csv saved file -> CSV Splitter -> run in game -> inspect log files. Life is too short for that!

But, yes, no speculating about the number of teeth a horse has, rather "Look in the Horse's Mouth"!

_____________________________

Early MusiChicago, http://earlymusichicago.org
PIKT, http://pikt.org
Campaign Series Lead Programmer, http://www.matrixgames.com/forums/tt.asp?forumid=226
AGElint debugging toolkit, http://www.matrixgames.com/forums/tm.asp?m=2978333

(in reply to Chliperic)
Post #: 74
RE: txt.y -- the AGElint parser - 12/22/2011 10:27:13 PM   
berto


Posts: 4185
Joined: 3/13/2002
From: metro Chicago, Illinois, USA
Status: offline

quote:

ORIGINAL: Chliperic

For the rest, I've almost achieved my search of false positives...Not that much, in conclusion :-) And so much almost invisible bugs solved in so few time...


I'm relieved to know that, in your estimation, there are not so many false positives.

And to think: Across all six AGEOD AGE system games, using (imperfect) AGElint, by now I have discovered thousands of "almost invisible bugs"!

(And remember: As AGElint performs still more data checks and loses some genericness, as we drill deeper into syntactical and semantic and logical complexities, there are how many -- what, maybe XXX? Y,YYY? -- bugs still to be discovered?)

_____________________________

Early MusiChicago, http://earlymusichicago.org
PIKT, http://pikt.org
Campaign Series Lead Programmer, http://www.matrixgames.com/forums/tt.asp?forumid=226
AGElint debugging toolkit, http://www.matrixgames.com/forums/tm.asp?m=2978333

(in reply to Chliperic)
Post #: 75
why the "small" stuff matters - 12/22/2011 10:59:42 PM   
berto


Posts: 4185
Joined: 3/13/2002
From: metro Chicago, Illinois, USA
Status: offline

Why does the "small" stuff matter?

http://en.wikipedia.org/wiki/For_Want_of_a_Nail_%28proverb%29

For Want of a Nail

For want of a nail the shoe was lost.
For want of a shoe the horse was lost.
For want of a horse the rider was lost.
For want of a rider the message was lost.
For want of a message the battle was lost.
For want of a battle the kingdom was lost.
And all for the want of a horseshoe nail.

Another analogy:

It's like the space agency of the Duchy of Grand Fenwick (http://en.wikipedia.org/wiki/The_mouse_that_roared) is planning a moon shot. Except in their fictional fantasy universe, 2+2 sometimes equals 4, sometimes 4.5, sometimes 3.5, and numbers in between. Their calculating devices malfunction (sticky #7 calculator key, glitchy LED display, etc.), most of the time giving right answers, but very often giving wrong ones. On the first and third Tuesday of every odd month, addition becomes subtraction. Between the hours of 9 PM and 10 PM, up becomes down. On snowy days in January, right becomes left. And so on.

Do you think they will hit their target, the moon? Or send their astronauts to Mars or deep space instead? Or crash them into the moon's surface? Or blow them up on liftoff? ...

How can you explore the moon and decide the really "big" stuff -- were did the moon come from? is there water on the moon? is the moon made of green cheese? ... -- when the basics fail you?

Nails matter. The laws of mathematics and physics matter. The "small" stuff matters.

QA matters.

Sweat the small stuff!

< Message edited by berto -- 12/27/2011 2:26:32 PM >


_____________________________

Early MusiChicago, http://earlymusichicago.org
PIKT, http://pikt.org
Campaign Series Lead Programmer, http://www.matrixgames.com/forums/tt.asp?forumid=226
AGElint debugging toolkit, http://www.matrixgames.com/forums/tm.asp?m=2978333

(in reply to berto)
Post #: 76
RE: why the "small" stuff matters - 12/22/2011 11:05:10 PM   
Chliperic


Posts: 955
Joined: 3/21/2010
Status: offline
BTW, lokk at the last RED AI stunning manuevers in my test game. Even myself I'm amazed...

The xls files for RUS have all infos about regional policies. There are almost endless parameters for them.

_____________________________

Fatal Years mod for RUS version 1.07
Struggle for a Vast Future 2.0 for AACW in advanced beta:

http://moddercorner.com/

(in reply to berto)
Post #: 77
RE: txt.y -- the AGElint parser - 12/22/2011 11:23:18 PM   
Chliperic


Posts: 955
Joined: 3/21/2010
Status: offline

quote:

ORIGINAL: berto


quote:

ORIGINAL: Chliperic

Let do it easy: I'm writing an event I will test soon. So we'll know if -999 work or not

That was part of my original plan: When still in doubt between the kwd usage and the AGEWiki docs, I had planned to decide issues with real-game experimentation. But my initial attempts were undercut by the clumsy, cumbersome, time-draining "official" procedure: .xls DB -> .csv saved file -> CSV Splitter -> run in game -> inspect log files. Life is too short for that!

But, yes, no speculating about the number of teeth a horse has, rather "Look in the Horse's Mouth"!


Yes, I write in notepad and test immediatly. 10 minutes needed. If I had used the xls for FY, I would yet be at version 0.99


_____________________________

Fatal Years mod for RUS version 1.07
Struggle for a Vast Future 2.0 for AACW in advanced beta:

http://moddercorner.com/

(in reply to berto)
Post #: 78
RE: txt.y -- the AGElint parser - 12/22/2011 11:26:50 PM   
Chliperic


Posts: 955
Joined: 3/21/2010
Status: offline

quote:

ORIGINAL: berto


quote:

ORIGINAL: Chliperic

For the rest, I've almost achieved my search of false positives...Not that much, in conclusion :-) And so much almost invisible bugs solved in so few time...


I'm relieved to know that, in your estimation, there are not so many false positives.

And to think: Across all six AGEOD AGE system games, using (imperfect) AGElint, by now I have discovered thousands of "almost invisible bugs"!

(And remember: As AGElint performs still more data checks and loses some genericness, as we drill deeper into syntactical and semantic and logical complexities, there are how many -- what, maybe XXX? Y,YYY? -- bugs still to be discovered?)


Certainly some more. How much? I guess from my own experience higher level bugs to be more rare as the scriptreport and player's experience point them out quickly. The worst in AGE script language, due to its verbosty and lack of full coherence, are the small errors unreproted by the official tools having great effects like wrong terrains, etc.


_____________________________

Fatal Years mod for RUS version 1.07
Struggle for a Vast Future 2.0 for AACW in advanced beta:

http://moddercorner.com/

(in reply to berto)
Post #: 79
RE: txt.y -- the AGElint parser - 12/22/2011 11:35:23 PM   
berto


Posts: 4185
Joined: 3/13/2002
From: metro Chicago, Illinois, USA
Status: offline

quote:

ORIGINAL: Chliperic


quote:

ORIGINAL: berto

(And remember: As AGElint performs still more data checks and loses some genericness, as we drill deeper into syntactical and semantic and logical complexities, there are how many -- what, maybe XXX? Y,YYY? -- bugs still to be discovered?)


Certainly some more. How much? I guess from my own experience higher level bugs to be more rare as the scriptreport and player's experience point them out quickly. The worst in AGE script language, due to its verbosty and lack of full coherence, are the small errors unreproted by the official tools having great effects like wrong terrains, etc.


Maybe. But how do you account for:

The Friendly Skies of Delaware etc. -- A Major WIA Weathers Bug

I was, frankly, stunned that neither devs nor beta testers nor players had detected that bug for so very long. I would think that after a bit of serious game play, surely somebody would have noticed (and reported) it.

The bug was entirely due to data file errors, of course.

_____________________________

Early MusiChicago, http://earlymusichicago.org
PIKT, http://pikt.org
Campaign Series Lead Programmer, http://www.matrixgames.com/forums/tt.asp?forumid=226
AGElint debugging toolkit, http://www.matrixgames.com/forums/tm.asp?m=2978333

(in reply to Chliperic)
Post #: 80
RE: txt.y -- the AGElint parser - 12/23/2011 12:28:09 AM   
Chliperic


Posts: 955
Joined: 3/21/2010
Status: offline
2 more news:

- EvalEvent = xxx;>;13 doesn't work, contrary to EvalEvent = xxx;=>;13. The wiki is mentionning quite the reverse, but the Scriptreport is rejecting >...

- SetEvtOccur: MaxOccurs may be set to -999...Scriptreport again.


Line 163480: SelectFaction, selected: Southern Whites
Line 163482: Started processing event: evt_nam_test
Line 163482: This event is not yet referenced, base number of allowed occurences 0
Line 163484: Too many occurences for event evt_nam_test further processing aborted.
Line 163499: Finished processing event: evt_nam_test
Line 163499: ------------------------------
Line 163502: SelectFaction, selected: Southern Whites
Line 163504: Started processing event: evt_nam_test2
Line 163504: This event is not yet referenced, base number of allowed occurences 1
Line 163508: Min date evaluated: 1919/01/01 converted to turn 4057 current turn 4066 True
Line 163509: Max date evaluated: 1922/01/30 converted to turn 4131 current turn 4066 True
Line 163514: Entering triggered actions for event evt_nam_test2
Line 163519: Set Event Occurs command: evt_nam_test Max Occurences: -999 Current Occurences: 0
Line 163521: Finished processing event: evt_nam_test2


_____________________________

Fatal Years mod for RUS version 1.07
Struggle for a Vast Future 2.0 for AACW in advanced beta:

http://moddercorner.com/

(in reply to berto)
Post #: 81
FY 1.06 errors - 12/27/2011 9:17:54 AM   
berto


Posts: 4185
Joined: 3/13/2002
From: metro Chicago, Illinois, USA
Status: offline

I did a



[root@berto agelint]# ./chkaliases.pl +i +E -g rus 2>&1 > junk3



on RUS FY 1.06, and among other things (excluded in the 'egrep -v' below), this is what I found:



[root@berto agelint]# egrep -v "mdl_|uni_" junk3 | egrep "Grand\ Campaign.sct"
Events/Grand Campaign.sct:587: Tzarytsin not found
Events/Grand Campaign.sct:604: Tzarytsin not found
Events/Grand Campaign.sct:621: Tzarytsin not found
Events/Grand Campaign.sct:638: Tzarytsin not found
Events/Grand Campaign.sct:4597: Fergana not found
Events/Grand Campaign.sct:5569: Tzarytsin not found
Events/Grand Campaign.sct:16397: Area_Tzaritsyn not found
Events/Grand Campaign.sct:17178: Khakhib not found



For the 'Tzarytsin not found', in Grand Campaign.sct I see:



[root@berto Aliases]# egrep "Tzarytsin" ../Events/Grand\ Campaign.sct
Objectives = $Petrograd;10;$Moscow;20;$Warsaw;20;$Poznan;15;$Kiev;10;$Riga;10;$Kaunas;10;$Tallinn;10;$Smolensk;5;$Pskov;5;$Minsk;5;$Novgorod;5;$Odessa;2;$Kharkov;2;$Rostov;2;$Samara;2;$Kazan;2;$Tzarytsin;2;$Tver;2;$Tula;1;$Sevastopol;2;$Ivanovo;1;$Voronezh;1;$Kursk;1;
Objectives = $Petrograd;10;$Moscow;20;$Warsaw;20;$Poznan;15;$Kiev;10;$Riga;10;$Kaunas;10;$Tallinn;10;$Smolensk;5;$Pskov;5;$Minsk;5;$Novgorod;5;$Odessa;2;$Kharkov;2;$Rostov;2;$Samara;2;$Kazan;2;$Tzarytsin;2;$Tver;2;$Tula;1;$Sevastopol;2;$Ivanovo;1;$Voronezh;1;$Kursk;1;
Objectives = $Petrograd;10;$Moscow;20;$Warsaw;20;$Poznan;15;$Kiev;10;$Riga;10;$Kaunas;10;$Tallinn;10;$Smolensk;5;$Pskov;5;$Minsk;5;$Novgorod;5;$Odessa;2;$Kharkov;2;$Rostov;2;$Samara;2;$Kazan;2;$Tzarytsin;2;$Tver;2;$Tula;1;$Sevastopol;2;$Ivanovo;1;$Voronezh;1;$Kursk;1;
Objectives = $Petrograd;10;$Moscow;20;$Warsaw;20;$Poznan;15;$Kiev;10;$Riga;10;$Kaunas;10;$Tallinn;10;$Smolensk;5;$Pskov;5;$Minsk;5;$Novgorod;5;$Odessa;2;$Kharkov;2;$Rostov;2;$Samara;2;$Kazan;2;$Tzarytsin;2;$Tver;2;$Tula;1;$Sevastopol;2;$Ivanovo;1;$Voronezh;1;$Kursk;1;
Objectives = $Petrograd;10;$Moscow;20;$Warsaw;20;$Poznan;15;$Kiev;10;$Riga;10;$Kaunas;10;$Tallinn;10;$Smolensk;5;$Pskov;5;$Minsk;5;$Novgorod;5;$Odessa;2;$Kharkov;2;$Rostov;2;$Samara;2;$Kazan;2;$Tzarytsin;2;$Tver;2;$Tula;1;$Sevastopol;2;$Ivanovo;1;$Voronezh;1;$Kursk;1;



And in Aliases *.ini I see:



[root@berto Aliases]# egrep -i tzar *.ini
MetaAreas_Aliases.ini:$EventArea_Close_to_Tzaritsyn = 139
MetaAreas_Aliases.ini:$Tzaritsyn_check = 164
Regions.ini:$Tzaritsyn = 661



Note the differences in spelling: In the Grand Campaign.sct file, it is 'Tzarytsin', but in Aliases.ini it is 'Tzaritsyn' -- i.e., see how the 'i' and 'y' were inverted.

For 'Area_Tzaritsyn not found':



[root@berto Aliases]# egrep "Area_Tzaritsyn" ../Events/Grand\ Campaign.sct
SelectRegInArea = $Area_Tzaritsyn



I don't see the exactly corresponding Area_*:



[root@berto Aliases]# egrep -i tzar *.ini
MetaAreas_Aliases.ini:$EventArea_Close_to_Tzaritsyn = 139
MetaAreas_Aliases.ini:$Tzaritsyn_check = 164
Regions.ini:$Tzaritsyn = 661



For Fergana & Khakhib, I have:



[root@berto Aliases]# egrep -i "fergana|khakhib" ../Events/Grand\ Campaign.sct
AddToRegList = $Fergana
AddToRegList = $Vladikavkaz;$Argun;$Nalchik;$Khakhib

[root@berto Aliases]# egrep -i "fergana|khakhib" *.ini
Regions.ini:// $Fergana = $Olmalik



That is, no alias spec for $Fergana (commented out in Regions.ini, no?), and no mention at all of $Khakhib in any Aliases *.ini file.

(Forgive me if I am mistaken in any of this. I just want to compare notes with you, to ensure that we see eye to eye, and to validate my own code.)

But aside from these few possible remaining errors, congratulations on -- for the most part -- cleaning up all "bad" alias refs in FY Grand\ Campaign.sct. (There are still bad refs in other files, as I'm sure you're well aware.)

< Message edited by berto -- 12/27/2011 2:00:02 PM >


_____________________________

Early MusiChicago, http://earlymusichicago.org
PIKT, http://pikt.org
Campaign Series Lead Programmer, http://www.matrixgames.com/forums/tt.asp?forumid=226
AGElint debugging toolkit, http://www.matrixgames.com/forums/tm.asp?m=2978333

(in reply to Chliperic)
Post #: 82
RE: FY 1.06 errors - 12/27/2011 9:34:08 PM   
Chliperic


Posts: 955
Joined: 3/21/2010
Status: offline
Fixed in the new version I've uploaded toniht. Thanks. I was sure to have fixed them, but I guess I forgot to save the GC file .

BTW, the Anarchist bug was created by an event which didn't worked, in spite of correct syntax. I've found how to change the event to get the same result, but I'm going to look deeper at this later.

_____________________________

Fatal Years mod for RUS version 1.07
Struggle for a Vast Future 2.0 for AACW in advanced beta:

http://moddercorner.com/

(in reply to berto)
Post #: 83
AGElint future focus - 12/28/2011 10:48:12 PM   
berto


Posts: 4185
Joined: 3/13/2002
From: metro Chicago, Illinois, USA
Status: offline

As of now, AGElint supports all current AGEOD AGE system games. You can use it just as well to debug one game as another.

Going forward, AGElint development will focus on AGEOD games in this order of priority (highest to lowest):

  • RUS, Revolution under Siege
  • ACW, American Civil War
  • ROP, Rise of Prussia
  • WIA, Wars in America
  • NCP, Napoleon's Campaigns
  • PON, Pride of Nations

This ordering is based on:

  • ongoing, active modding
  • ongoing, active, diligent fixing of bugs en masse
  • ongoing, active, useful, constructive player and modder feedback
  • player activity
  • forum activity
  • closest proximity to bug-free "perfection"
  • the AGElint developer's areas of personal player interest

Note that, in the shared AGE engine, most commands and data are common to all games. So work and improvements focusing on the top-ranked games (RUS, ACW & ROP) will spill over as well to the other, lower-ranked games (WIA, NCP, PON). But commands and data and nuances specific to the lower-ranked games -- especially PON, with its many, many new commands and data extensions -- will get less, if any attention. Eventually, perhaps, but not in the near term. In the near term, attention will be directed to where the action is.

< Message edited by berto -- 12/29/2011 1:54:30 PM >


_____________________________

Early MusiChicago, http://earlymusichicago.org
PIKT, http://pikt.org
Campaign Series Lead Programmer, http://www.matrixgames.com/forums/tt.asp?forumid=226
AGElint debugging toolkit, http://www.matrixgames.com/forums/tm.asp?m=2978333

(in reply to Chliperic)
Post #: 84
RE: AGElint future focus - 12/28/2011 11:22:22 PM   
Chliperic


Posts: 955
Joined: 3/21/2010
Status: offline
I've the same priority order . Not the place to discuss here, but i've once again left any idea to mod PON, for reason tied to the AI behaviour in economy field.

I should use agelint this next days on the offical DNO scenario and on the offical AACW version, then oon my current set for SVF.

_____________________________

Fatal Years mod for RUS version 1.07
Struggle for a Vast Future 2.0 for AACW in advanced beta:

http://moddercorner.com/

(in reply to berto)
Post #: 85
RE: AGElint future focus - 12/29/2011 12:20:52 AM   
berto


Posts: 4185
Joined: 3/13/2002
From: metro Chicago, Illinois, USA
Status: offline

I should be releasing AGElint 1.0 by Friday or Saturday. Not much further work on the parser, but tying up lots of loose ends. Work on the parser etc. will proceed in the coming weeks.

_____________________________

Early MusiChicago, http://earlymusichicago.org
PIKT, http://pikt.org
Campaign Series Lead Programmer, http://www.matrixgames.com/forums/tt.asp?forumid=226
AGElint debugging toolkit, http://www.matrixgames.com/forums/tm.asp?m=2978333

(in reply to Chliperic)
Post #: 86
RE: AGElint TODO - 12/30/2011 8:39:56 AM   
berto


Posts: 4185
Joined: 3/13/2002
From: metro Chicago, Illinois, USA
Status: offline

AGElint TODO



Things still to do in agelint:

  • In the txt.y parser, reduce genericalness, increase specificity.
  • Deepen and extend the txt.y parser, refining the syntax checks, but also adding semantic and logical checks.
  • Integrate SelectFaction & SelectRegion into the semantic and logical checks.
  • In the txt.y parser, add more CHKINT() checks.
  • Better pinpoint the exact line number of reported error.
  • Improve parser 'error' recovery, for detecting all errors etc. in a given data file.
  • In names, more generally solve the problem of "foreign" (non-English, non-ASCII) characters.
  • Generally solve the problem of files not ending in EOL (end-of-line, e.g., CR/LF).
  • Present a pleasing display of blank lines for every possible combination of agelint command arguments.
  • Better pinpoint the exact DB sources file of reported error.



Things still to do in the *.pl and other (Perl & Bash) scripts:

  • Add automated setting of agelintroot & gameroot in all scripts, not just the chk*.pl ones (by, for example, universal reference to agelint.conf).
  • Check for duplication of UIDs/aliases.
  • Check inter-regional linkages.
  • Trim, or better categorize, reported "bad" aliases, localizations, graphics files, etc.



Other things still to do:

  • Extend the 'make check' to encompass still more regression tests.
  • Develop a functioning 'make install'.
  • Add still more examples to the USAGE file.
  • Host a web services site, where users can upload and check game data files without their having to install and run AGElint locally.
  • Host on the web the Kwd (AGE keyword usage) database and support programs.
  • In general, reduce false positives to a bare minimum.
  • Fix bugs!




_____________________________

Early MusiChicago, http://earlymusichicago.org
PIKT, http://pikt.org
Campaign Series Lead Programmer, http://www.matrixgames.com/forums/tt.asp?forumid=226
AGElint debugging toolkit, http://www.matrixgames.com/forums/tm.asp?m=2978333

(in reply to berto)
Post #: 87
AGElint first "official" 1.00 release - 12/30/2011 3:03:50 PM   
berto


Posts: 4185
Joined: 3/13/2002
From: metro Chicago, Illinois, USA
Status: offline

The first "official" AGElint version 1.00 has been posted in message #1 of this "AGElint -- an AGE debugging toolkit" thread.

No profound changes in version 1.00. This release "just" ties up lots of loose ends. Lays the basis for future development and progress.

The first "release" of AGElint, in late October 2011, was Not Ready For Prime Time, was essentially only fit for the developer's personal use. Subsequent releases in early December 2011 were tidied up, and usable, but with not a few rough edges. This AGElint version 1.00 is the first "polished" release. Not perfect by any means, but fully usable, and (together with the forum posts here) pretty well documented.

Here are the changes in AGElint 1.00:



Changes from the first public release, on 20111209, to the first "official" release, AGElint_1.00, on 20111230:

  • In agelint.conf, added acwdir, ncpdir, pondir, ropdir, rusdir, wiadir.
  • For agelint.conf, priority default location changed from /usr/local/etc to /usr/local/games/etc
  • Added conf.pl, for agelint.conf processing by Perl scripts.
  • In agelint.c, cleaned up agelintroot & gameroot code and logic.
  • Fixed broken 'make check'.
  • Substituted new, vetted test files in the CHK directory tree (and revised the squelches.chk.pl file).
  • In agelint, chk*.pl, common.pl, cmd.[ly], etc., cleaned up command-line arguments, and fixed all Usage: statements.
  • In chkaliases.pl, filtered out some false positives.
  • In txt.[ly], fixed several bugs & false positives.
  • Added grprpt.pl & rmgameroot scripts to distribution.
  • Emptied FIX directory tree of useless junk files.
  • Added USAGE, CHANGES & TODO files to distribution.
  • Other minor code & doc fixes/changes.



Nothing earth shattering in that list, mostly technical stuff.

The most important change? It is fixing the 'make check' regression tests. With each new version, with each new batch of extensions, improvements, and bug fixes, we want to ensure that no parts of the code regress, "fix" what ain't broken, (re)introduce (new) bugs. Two steps forward, one step back? No, we want to ensure forward steps only. Regression testing is essential to that.

With the 'make check' restored to working functionality, that lays the basis for future progress. For example, as I add and refine parser rules (and tweak the lexer pattern matches), I want to 'make check' every new change. In lex (lexer) and yacc (parser) programming, it's easy to blow things up! The 'make check' regression tests should help keep a lid on it.

The frequent use of 'make check', combined with a newly decided prioritization of RUS, ACW & ROP (see post #84 above), should speed up AGElint development. The more focused I am, and the more I do this, the faster it goes.

I will have more to say about the AGElint 'make check' (also use of the agelint & chklint.pl -S error "squelch" mechanism) in future posts.

But as a user, you really don't need to concern yourself with 'make check', regression testing, etc. Just use AGElint.

And enjoy!

< Message edited by berto -- 12/30/2011 3:16:17 PM >


_____________________________

Early MusiChicago, http://earlymusichicago.org
PIKT, http://pikt.org
Campaign Series Lead Programmer, http://www.matrixgames.com/forums/tt.asp?forumid=226
AGElint debugging toolkit, http://www.matrixgames.com/forums/tm.asp?m=2978333

(in reply to berto)
Post #: 88
RE: AGElint first "official" 1.00 release - 12/30/2011 10:35:01 PM   
Chliperic


Posts: 955
Joined: 3/21/2010
Status: offline
I will use the 1.00 next weeks both on FY and AACW. Thanks

_____________________________

Fatal Years mod for RUS version 1.07
Struggle for a Vast Future 2.0 for AACW in advanced beta:

http://moddercorner.com/

(in reply to berto)
Post #: 89
RE: AGElint first "official" 1.00 release - 12/31/2011 1:59:45 PM   
Chliperic


Posts: 955
Joined: 3/21/2010
Status: offline
Another possible false positive:

ChgUnitPoolInfos = $uni_DON_Amt1d;-999;75

The command accepts values from -999 to 999 for variation of force pool

_____________________________

Fatal Years mod for RUS version 1.07
Struggle for a Vast Future 2.0 for AACW in advanced beta:

http://moddercorner.com/

(in reply to Chliperic)
Post #: 90
Page:   <<   < prev  1 2 [3] 4 5   next >   >>
All Forums >> [Current Games From Matrix.] >> [World War I] >> Revolution Under Siege >> Mods and Scenarios >> RE: txt.y -- the AGElint parser Page: <<   < prev  1 2 [3] 4 5   next >   >>
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.133