From bfeeac6e4889d1e9a1083b3c7efc59652981b168 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Mon, 1 Aug 2016 08:20:23 +0200 Subject: o Moving the generation logic to Python, embedding a Python interpreter with the help of pybind11. o Adding install configuration to CMake to make it easier to reuse the project later on. o Splitting out the examples into its own project to make it easier to test the whole installation setup and python/template loading. o Trying to reorganize the code a bit, not very much better yet. --- core/KicadNetLexer.g4 | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 core/KicadNetLexer.g4 (limited to 'core/KicadNetLexer.g4') diff --git a/core/KicadNetLexer.g4 b/core/KicadNetLexer.g4 new file mode 100644 index 0000000..e10f7e7 --- /dev/null +++ b/core/KicadNetLexer.g4 @@ -0,0 +1,38 @@ +lexer grammar KicadNetLexer; + +LPAREN: '('; +RPAREN: ')'; + +QUOTE: '"'; + +CODE: 'code'; +COMP: 'comp'; +FIELD: 'field'; +LIBSOURCE: 'libsource'; +LIBPART: 'libpart'; +LIB: 'lib'; +NAME: 'name'; +NET: 'net'; +NODE: 'node'; +NUM: 'num'; +PART: 'part'; +PIN: 'pin'; +REF: 'ref'; +TYPE: 'type'; +VALUE: 'value'; + +STRING: '"' ~["]* '"'; + +INTEGER: [0-9]+; + +ID + : [/+~\_\-\.\*\?/a-zA-Z0-9]+ + ; + +BlockComment + : '/*' .*? '*/' -> skip + ; + +WS + : [ \t\r\n]+ -> skip + ; -- cgit v1.2.3