[ d20statblock.org ] a grammar

jmettraux said:
You would be able to commit your changes directly.

We should move there the grammar itself and any other document related. A lot of examples should be stored there too.

The source code for a validation parser (a parser that just says 'yes this stat block is standard') could be a nice addon.
(We could run it online somewhere).

You could also store there your web site like I do for dgsh :
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dgsh/dgsh/doc/

This sounds interesting, I'll have to look into it.

I went through an interesting excercise with the grammar: I decided to make the shortest legal stat block. I chose "X" for all strings and "0" for all integers (and d% as the die). This helped me find many minor bugs that I would have otherwise missed.

X: CR 0; Fine Fey; HD 0d%; hp 0; Init +0; Spd 0m; AC 0; Melee X +0; AL N; SV Fort +0, Ref +0, Will +0; Str 0, Dex 0, Con 0, Int 0, Wis 0, Cha 0.
Skills and Feats: X +0; X.
Equipment: X.

I'm editing my above post to include my changes.

Edit: (from above)

Is there a way to force capitalization? Some sections could use it:
domains, languages, deities, etc. Should I just make a lString: "a" | "b"... or what?
Also, how does a String work? Is it (character)+ or (character)*
 
Last edited:

log in or register to remove this ad

CRGreathouse said:

Is there a way to force capitalization? Some sections could use it:
domains, languages, deities, etc. Should I just make a lString: "a" | "b"... or what?
Also, how does a String work? Is it (character)+ or (character)*

Proposition :

string: (specialCharacter | lowAlpha | upAlpha)*
specialCharacter: " " | "'" | "-"
lowAlpha: "a" | ... | "z"
upAlpha: "A" | ... | "Z"

lowString: (specialCharacter | lowAlpha)*
upString: (specialCharacter | upAlpha)*

last version of the grammar :
http://cvs.sourceforge.net/cgi-bin/...rev=HEAD&content-type=text/vnd.viewcvs-markup
diff :
http://cvs.sourceforge.net/cgi-bin/...port_samples/standard.ebnf.diff?r1=1.7&r2=1.8
 
Last edited:

Leopold said:
also if you guys have all the monsters and stuff in statblock format and stuff from SRD posted it would be a GREAT help to the community.


I know you are trying to set a standard here but if you could take, say the monster manual, and convert it into statblock or even the Creature collection that would be awesome!

My Monster program will save stablocks of all the Monsters in Luke's RPM database (which is almost all of the creatures in the SRD).

I don't think a statblock is the best way to build interoperability between programs. I would think that time would be wasted writing a parser and a writer. I think XML or even a standard format Access database file would work better.
 

smetzger said:
I would think that time would be wasted writing a parser and a writer. I think XML or even a standard format Access database file would work better.

Once the grammar is OK, generating a parser can be automatically done.
Implementing stat block output is not much time consuming.

You're right when you say that XML would be a better 'pivot' between programs.

Access on the other hand should not be considered as something 'standard'. Perhaps the SQL92 transcription of the tables used by eTools could be considered as standard.

Which version of stat blocks do you use for storing SRD monsters into RPM ?
 

jmettraux said:

Which version of stat blocks do you use for storing SRD monsters into RPM ?

I don't store them into RPM. I read some tables in RPM and output a statblock. I use my own format which I believe is similare to the SSB.
 

smetzger said:

I don't store them into RPM. I read some tables in RPM and output a statblock. I use my own format which I believe is similare to the SSB.

So if you switched to SSB, that would be really fair, and Leopold's wish would be almost exauced.
 

jmettraux said:


So if you switched to SSB, that would be really fair, and Leopold's wish would be almost exauced.

Yes, but I use my own format because I think its better. Why do you need to have it in SSB format?
 

smetzger said:


Why do you need to have it in SSB format?

Because a standard is good for everyone.

If you think your stat block format is better than d20statblock.org's one, you should use this thread to explain us what makes your format better, so that we can make a better standard.

Your stat blocks are intended for human eyes only, ours target humans and programs.
 

Charles,

1) How should a weapon's range be displayed ?

2) The current grammar authorizes things like "Lolth / Drow, Spider and Evil". There is one domain that is not needed.

3) Are specialty spells (necromancers, invokers, ...) displayed like domain spells ?
(If you want I can just go a 'copy-paste-adjust' domainSpellsSection in specialtySpellsSection)
 

jmettraux said:

Your stat blocks are intended for human eyes only, ours target humans and programs.

Correct. I don't think a statblock should target computer programs.

Like CRGreathouse said "That sounds good, but what is the purpose of this type of definition?
Is it primarily designed for human or machine reading? "

Perhaps if you could elaborate on the answers to these questions and why you feel a statblock should be used as a target for computer programs.
 

Remove ads

Top