Looking for page_layout_editor_lexer.h or the BNF

I’ve looked in all obvious locations for the file and used find on the 5.0 source tree from github and looked in the launchpad tree for 5.0 in ./common ./include and ./pagelayout_editor

I did see the keywords file, that is not a BNF or a lexer :slight_smile:

If a developer or knowledgeable user could chime in with the location (or most likely it seems the method of building it) I would be grateful!

If I need to build the source tree, just say so :blush:


what does BNF stand for in this case?

Also you might consider asking this over on the bugtracker or maybe better the mailing list as we here are mainly fellow users not developers. (Some dev might show up but it could take some time)

1 Like

Thanks Rene :slightly_smiling_face:



Hi @Seth_h , I"m looking for the file that is included on line 37 of that file. Thanks though :slight_smile:

So a partial answer to my question is in the s-expression documentation:


Apparently it is generated from the tokens file during the build process.

/* Do not modify this file it was automatically generated by the
 * TokenList2DsnLexer CMake script.


#include <dsnlexer.h>

page_layout_reader_lexer.h (7.2 KB)


@bobc Sir, you kick ass. I knew it was generated by the build at this point. Thanks for the upload!

FANTASTIC!!! This was what I needed to read Bob, thanks again.

Just for completeness, the cmake script is https://github.com/KiCad/kicad-source-mirror/blob/master/CMakeModules/TokenList2DsnLexer.cmake

1 Like

This is a description of the page layout file format: https://github.com/KiCad/kicad-source-mirror/blob/5.0/common/page_layout/page_layout_default_description.cpp

and the keywords file that TokenList2DsnLexer.cmake needs to consume to build the lexical analyzer interface in page_layout_reader_lexer.h : https://github.com/KiCad/kicad-source-mirror/blob/5.0/common/page_layout/page_layout_reader.keywords

Note these links are on the 5.0 branch not the master branch…

Everything else you would need if you are asking this question is already in the thread.

Thanks folks.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.