nml parser grammar is in some dark corner somewhere?

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

Post Reply
speeder
Engineer
Engineer
Posts: 28
Joined: 16 Jul 2014 05:57

nml parser grammar is in some dark corner somewhere?

Post by speeder »

NML official parser use Python's ply, that is short for Python Lex Yacc

Theoretically the way you create such parser, is by running a .l and a .y file through ply, and getting a .py parser out of it.

The .py parser exists... and it would really help a proejct of mine if I could get the .l and .y files instead. Are they... somewhere?
Eddi
Tycoon
Tycoon
Posts: 8254
Joined: 17 Jan 2007 00:14

Re: nml parser grammar is in some dark corner somewhere?

Post by Eddi »

the syntax is all embedded in https://github.com/OpenTTD/nml/blob/mas ... /parser.py

you would have to dig through the ply documentation, maybe there's a way to extrude .l and .y files
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 7 guests