keywords.py updated
This commit is contained in:
@@ -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()
|
||||
TOKENS += RESERVED.values()
|
||||
|
Reference in New Issue
Block a user