From 872ce09dee46938bf94d8d8992c5f75e945a7f6c Mon Sep 17 00:00:00 2001 From: Jan Lerking Date: Sat, 11 Aug 2018 09:51:08 +0200 Subject: [PATCH] keywords.py updated --- parser/keywords.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/parser/keywords.py b/parser/keywords.py index f3dd416..a8090d5 100644 --- a/parser/keywords.py +++ b/parser/keywords.py @@ -1,11 +1,11 @@ -# (c) 2018 Jan Lerking -# Python lexer for c header files. -# Used for creating corresponding NASM include files. -# Contains tokens expanded with reserved 'C' keywords +## (c) 2018 Jan Lerking +## Python lexer for c header files. +## Used for creating corresponding NASM include files. +## Contains tokens expanded with reserved 'C' keywords def init(): - global tokens - tokens = [ + global TOKENS + TOKENS = [ 'CSTART', 'CMID', 'CEND', @@ -30,7 +30,7 @@ def init(): 'POINTER' ] - reserved = { + RESERVED = { 'auto' : 'AUTO', 'break' : 'BREAK', 'case' : 'CASE', @@ -65,8 +65,8 @@ def init(): 'if' : 'IF' } - global preprocessor_directives - preprocessor_directives = { + global PREPROCESSOR_DIRECTIVES + PREPROCESSOR_DIRECTIVES = { '#include' : 'PREPROCESS', '#define' : 'PREPROCESS', '#undef' : 'PREPROCESS', @@ -84,8 +84,8 @@ def init(): '##' : 'PREPROCESS' } - global regular - regular = { + global REGULAR + REGULAR = { '/*' : 'CSTART', '*/' : 'CEND', '=' : 'ASSIGN', @@ -104,8 +104,8 @@ def init(): '\>' : 'RANGLE' } - global nasm_preprocess_directives - nasm_preprocess_directives = { + global NASM_PREPROCESS_DIRECTIVES + NASM_PREPROCESS_DIRECTIVES = { '#include' : '$include', '#define' : '$define', '#undef' : '$undef', @@ -123,4 +123,4 @@ def init(): '##' : '##' } - tokens += reserved.values() \ No newline at end of file + TOKENS += RESERVED.values()