diff options
Diffstat (limited to 'core/KicadNetLexer.g4')
-rw-r--r-- | core/KicadNetLexer.g4 | 38 |
1 files changed, 38 insertions, 0 deletions
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 + ; |