mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-01-15 16:30:02 +00:00
Added keyword directives __notvolatile, __ssa, __notssa.
This commit is contained in:
parent
71ce3d0438
commit
077f40b0d7
@ -28,14 +28,35 @@ public interface Directive {
|
||||
class Inline implements Directive {
|
||||
}
|
||||
|
||||
/** Variable declared volatile. */
|
||||
/** Variable declared volatile or __notvolatile. */
|
||||
class Volatile implements Directive {
|
||||
|
||||
/** True if declared volatile, false if declared __notvolatile */
|
||||
boolean isVolatile;
|
||||
|
||||
public Volatile(boolean isVolatile) {
|
||||
this.isVolatile = isVolatile;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/** Variable declared as export. */
|
||||
class Export implements Directive {
|
||||
}
|
||||
|
||||
/** Variable declared SSA or not SSA . */
|
||||
class FormSsa implements Directive {
|
||||
|
||||
/** True if declared SSA false if declared NOT SSA */
|
||||
boolean ssa;
|
||||
|
||||
public FormSsa(boolean ssa) {
|
||||
this.ssa = ssa;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/** Function declared interrupt. */
|
||||
class Interrupt implements Directive {
|
||||
public Procedure.InterruptType interruptType;
|
||||
@ -59,7 +80,7 @@ public interface Directive {
|
||||
/** Variable register or __notregister directive . */
|
||||
class Register implements Directive {
|
||||
|
||||
/** true if the directive is a register directive. false if it is a notregister directive. */
|
||||
/** true if the directive is a register directive. false if it is a __notregister directive. */
|
||||
boolean isRegister;
|
||||
|
||||
/** Name of register to use for the variable (if named) */
|
||||
|
@ -161,9 +161,18 @@ public class DirectiveParserContext {
|
||||
lValue.setMemoryArea(SymbolVariable.MemoryArea.MAIN_MEMORY);
|
||||
}
|
||||
|
||||
Directive.FormSsa ssaDirective = findDirective(Directive.FormSsa.class, sourceDirectives, directiveScope, directiveType);
|
||||
if(ssaDirective != null) {
|
||||
if(ssaDirective.ssa) {
|
||||
lValue.setStorageStrategy(SymbolVariable.StorageStrategy.PHI_MASTER);
|
||||
} else {
|
||||
lValue.setStorageStrategy(SymbolVariable.StorageStrategy.LOAD_STORE);
|
||||
}
|
||||
}
|
||||
|
||||
Directive.Volatile volatileDirective = findDirective(Directive.Volatile.class, sourceDirectives, directiveScope, directiveType);
|
||||
if(volatileDirective != null) {
|
||||
lValue.setDeclaredVolatile(true);
|
||||
lValue.setDeclaredVolatile(volatileDirective.isVolatile);
|
||||
}
|
||||
|
||||
Directive.Export exportDirective = findDirective(Directive.Export.class, sourceDirectives, directiveScope, directiveType);
|
||||
|
@ -82,8 +82,11 @@ NOTREGISTER: '__notregister' ;
|
||||
ADDRESS: '__address' ;
|
||||
ADDRESS_ZEROPAGE: '__zp' ;
|
||||
ADDRESS_MAINMEM: '__mem' ;
|
||||
FORM_SSA: '__ssa' ;
|
||||
FORM_NOTSSA: '__notssa' ;
|
||||
INLINE: 'inline' ;
|
||||
VOLATILE: 'volatile' ;
|
||||
NOTVOLATILE: '__notvolatile' ;
|
||||
INTERRUPT: 'interrupt' ;
|
||||
CALLING: 'calling';
|
||||
CALLINGCONVENTION: '__stackcall' | '__phicall' ;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -55,89 +55,92 @@ NOTREGISTER=54
|
||||
ADDRESS=55
|
||||
ADDRESS_ZEROPAGE=56
|
||||
ADDRESS_MAINMEM=57
|
||||
INLINE=58
|
||||
VOLATILE=59
|
||||
INTERRUPT=60
|
||||
CALLING=61
|
||||
CALLINGCONVENTION=62
|
||||
IF=63
|
||||
ELSE=64
|
||||
WHILE=65
|
||||
DO=66
|
||||
FOR=67
|
||||
SWITCH=68
|
||||
RETURN=69
|
||||
BREAK=70
|
||||
CONTINUE=71
|
||||
ASM=72
|
||||
DEFAULT=73
|
||||
CASE=74
|
||||
STRUCT=75
|
||||
ENUM=76
|
||||
SIZEOF=77
|
||||
TYPEID=78
|
||||
KICKASM=79
|
||||
RESOURCE=80
|
||||
USES=81
|
||||
CLOBBERS=82
|
||||
BYTES=83
|
||||
CYCLES=84
|
||||
LOGIC_NOT=85
|
||||
SIGNEDNESS=86
|
||||
SIMPLETYPE=87
|
||||
BOOLEAN=88
|
||||
KICKASM_BODY=89
|
||||
STRING=90
|
||||
CHAR=91
|
||||
NUMBER=92
|
||||
NUMFLOAT=93
|
||||
BINFLOAT=94
|
||||
DECFLOAT=95
|
||||
HEXFLOAT=96
|
||||
NUMINT=97
|
||||
BININTEGER=98
|
||||
DECINTEGER=99
|
||||
HEXINTEGER=100
|
||||
NAME=101
|
||||
WS=102
|
||||
COMMENT_LINE=103
|
||||
COMMENT_BLOCK=104
|
||||
ASM_BYTE=105
|
||||
ASM_MNEMONIC=106
|
||||
ASM_IMM=107
|
||||
ASM_COLON=108
|
||||
ASM_COMMA=109
|
||||
ASM_PAR_BEGIN=110
|
||||
ASM_PAR_END=111
|
||||
ASM_BRACKET_BEGIN=112
|
||||
ASM_BRACKET_END=113
|
||||
ASM_DOT=114
|
||||
ASM_SHIFT_LEFT=115
|
||||
ASM_SHIFT_RIGHT=116
|
||||
ASM_PLUS=117
|
||||
ASM_MINUS=118
|
||||
ASM_LESS_THAN=119
|
||||
ASM_GREATER_THAN=120
|
||||
ASM_MULTIPLY=121
|
||||
ASM_DIVIDE=122
|
||||
ASM_CURLY_BEGIN=123
|
||||
ASM_CURLY_END=124
|
||||
ASM_NUMBER=125
|
||||
ASM_NUMFLOAT=126
|
||||
ASM_BINFLOAT=127
|
||||
ASM_DECFLOAT=128
|
||||
ASM_HEXFLOAT=129
|
||||
ASM_NUMINT=130
|
||||
ASM_BININTEGER=131
|
||||
ASM_DECINTEGER=132
|
||||
ASM_HEXINTEGER=133
|
||||
ASM_CHAR=134
|
||||
ASM_MULTI_REL=135
|
||||
ASM_MULTI_NAME=136
|
||||
ASM_NAME=137
|
||||
ASM_WS=138
|
||||
ASM_COMMENT_LINE=139
|
||||
ASM_COMMENT_BLOCK=140
|
||||
FORM_SSA=58
|
||||
FORM_NOTSSA=59
|
||||
INLINE=60
|
||||
VOLATILE=61
|
||||
NOTVOLATILE=62
|
||||
INTERRUPT=63
|
||||
CALLING=64
|
||||
CALLINGCONVENTION=65
|
||||
IF=66
|
||||
ELSE=67
|
||||
WHILE=68
|
||||
DO=69
|
||||
FOR=70
|
||||
SWITCH=71
|
||||
RETURN=72
|
||||
BREAK=73
|
||||
CONTINUE=74
|
||||
ASM=75
|
||||
DEFAULT=76
|
||||
CASE=77
|
||||
STRUCT=78
|
||||
ENUM=79
|
||||
SIZEOF=80
|
||||
TYPEID=81
|
||||
KICKASM=82
|
||||
RESOURCE=83
|
||||
USES=84
|
||||
CLOBBERS=85
|
||||
BYTES=86
|
||||
CYCLES=87
|
||||
LOGIC_NOT=88
|
||||
SIGNEDNESS=89
|
||||
SIMPLETYPE=90
|
||||
BOOLEAN=91
|
||||
KICKASM_BODY=92
|
||||
STRING=93
|
||||
CHAR=94
|
||||
NUMBER=95
|
||||
NUMFLOAT=96
|
||||
BINFLOAT=97
|
||||
DECFLOAT=98
|
||||
HEXFLOAT=99
|
||||
NUMINT=100
|
||||
BININTEGER=101
|
||||
DECINTEGER=102
|
||||
HEXINTEGER=103
|
||||
NAME=104
|
||||
WS=105
|
||||
COMMENT_LINE=106
|
||||
COMMENT_BLOCK=107
|
||||
ASM_BYTE=108
|
||||
ASM_MNEMONIC=109
|
||||
ASM_IMM=110
|
||||
ASM_COLON=111
|
||||
ASM_COMMA=112
|
||||
ASM_PAR_BEGIN=113
|
||||
ASM_PAR_END=114
|
||||
ASM_BRACKET_BEGIN=115
|
||||
ASM_BRACKET_END=116
|
||||
ASM_DOT=117
|
||||
ASM_SHIFT_LEFT=118
|
||||
ASM_SHIFT_RIGHT=119
|
||||
ASM_PLUS=120
|
||||
ASM_MINUS=121
|
||||
ASM_LESS_THAN=122
|
||||
ASM_GREATER_THAN=123
|
||||
ASM_MULTIPLY=124
|
||||
ASM_DIVIDE=125
|
||||
ASM_CURLY_BEGIN=126
|
||||
ASM_CURLY_END=127
|
||||
ASM_NUMBER=128
|
||||
ASM_NUMFLOAT=129
|
||||
ASM_BINFLOAT=130
|
||||
ASM_DECFLOAT=131
|
||||
ASM_HEXFLOAT=132
|
||||
ASM_NUMINT=133
|
||||
ASM_BININTEGER=134
|
||||
ASM_DECINTEGER=135
|
||||
ASM_HEXINTEGER=136
|
||||
ASM_CHAR=137
|
||||
ASM_MULTI_REL=138
|
||||
ASM_MULTI_NAME=139
|
||||
ASM_NAME=140
|
||||
ASM_WS=141
|
||||
ASM_COMMENT_LINE=142
|
||||
ASM_COMMENT_BLOCK=143
|
||||
';'=8
|
||||
'..'=11
|
||||
'?'=12
|
||||
@ -176,32 +179,35 @@ ASM_COMMENT_BLOCK=140
|
||||
'__address'=55
|
||||
'__zp'=56
|
||||
'__mem'=57
|
||||
'inline'=58
|
||||
'volatile'=59
|
||||
'interrupt'=60
|
||||
'calling'=61
|
||||
'if'=63
|
||||
'else'=64
|
||||
'while'=65
|
||||
'do'=66
|
||||
'for'=67
|
||||
'switch'=68
|
||||
'return'=69
|
||||
'break'=70
|
||||
'continue'=71
|
||||
'asm'=72
|
||||
'default'=73
|
||||
'case'=74
|
||||
'struct'=75
|
||||
'enum'=76
|
||||
'sizeof'=77
|
||||
'typeid'=78
|
||||
'kickasm'=79
|
||||
'resource'=80
|
||||
'uses'=81
|
||||
'clobbers'=82
|
||||
'bytes'=83
|
||||
'cycles'=84
|
||||
'!'=85
|
||||
'.byte'=105
|
||||
'#'=107
|
||||
'__ssa'=58
|
||||
'__notssa'=59
|
||||
'inline'=60
|
||||
'volatile'=61
|
||||
'__notvolatile'=62
|
||||
'interrupt'=63
|
||||
'calling'=64
|
||||
'if'=66
|
||||
'else'=67
|
||||
'while'=68
|
||||
'do'=69
|
||||
'for'=70
|
||||
'switch'=71
|
||||
'return'=72
|
||||
'break'=73
|
||||
'continue'=74
|
||||
'asm'=75
|
||||
'default'=76
|
||||
'case'=77
|
||||
'struct'=78
|
||||
'enum'=79
|
||||
'sizeof'=80
|
||||
'typeid'=81
|
||||
'kickasm'=82
|
||||
'resource'=83
|
||||
'uses'=84
|
||||
'clobbers'=85
|
||||
'bytes'=86
|
||||
'cycles'=87
|
||||
'!'=88
|
||||
'.byte'=108
|
||||
'#'=110
|
||||
|
@ -104,8 +104,12 @@ directive
|
||||
| ADDRESS_ZEROPAGE #directiveMemoryAreaZp
|
||||
| ADDRESS_MAINMEM #directiveMemoryAreaMain
|
||||
| ADDRESS PAR_BEGIN ( NUMBER ) PAR_END #directiveMemoryAreaAddress
|
||||
| FORM_SSA #directiveFormSsa
|
||||
| FORM_NOTSSA #directiveFormNotSsa
|
||||
| ADDRESS PAR_BEGIN ( NUMBER ) PAR_END #directiveMemoryAreaAddress
|
||||
| INLINE #directiveInline
|
||||
| VOLATILE #directiveVolatile
|
||||
| NOTVOLATILE #directiveNotVolatile
|
||||
| INTERRUPT ( PAR_BEGIN NAME PAR_END )? #directiveInterrupt
|
||||
| RESERVE PAR_BEGIN NUMBER ( COMMA NUMBER )* PAR_END #directiveReserveZp
|
||||
| CALLINGCONVENTION #directiveCallingConvention
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -55,89 +55,92 @@ NOTREGISTER=54
|
||||
ADDRESS=55
|
||||
ADDRESS_ZEROPAGE=56
|
||||
ADDRESS_MAINMEM=57
|
||||
INLINE=58
|
||||
VOLATILE=59
|
||||
INTERRUPT=60
|
||||
CALLING=61
|
||||
CALLINGCONVENTION=62
|
||||
IF=63
|
||||
ELSE=64
|
||||
WHILE=65
|
||||
DO=66
|
||||
FOR=67
|
||||
SWITCH=68
|
||||
RETURN=69
|
||||
BREAK=70
|
||||
CONTINUE=71
|
||||
ASM=72
|
||||
DEFAULT=73
|
||||
CASE=74
|
||||
STRUCT=75
|
||||
ENUM=76
|
||||
SIZEOF=77
|
||||
TYPEID=78
|
||||
KICKASM=79
|
||||
RESOURCE=80
|
||||
USES=81
|
||||
CLOBBERS=82
|
||||
BYTES=83
|
||||
CYCLES=84
|
||||
LOGIC_NOT=85
|
||||
SIGNEDNESS=86
|
||||
SIMPLETYPE=87
|
||||
BOOLEAN=88
|
||||
KICKASM_BODY=89
|
||||
STRING=90
|
||||
CHAR=91
|
||||
NUMBER=92
|
||||
NUMFLOAT=93
|
||||
BINFLOAT=94
|
||||
DECFLOAT=95
|
||||
HEXFLOAT=96
|
||||
NUMINT=97
|
||||
BININTEGER=98
|
||||
DECINTEGER=99
|
||||
HEXINTEGER=100
|
||||
NAME=101
|
||||
WS=102
|
||||
COMMENT_LINE=103
|
||||
COMMENT_BLOCK=104
|
||||
ASM_BYTE=105
|
||||
ASM_MNEMONIC=106
|
||||
ASM_IMM=107
|
||||
ASM_COLON=108
|
||||
ASM_COMMA=109
|
||||
ASM_PAR_BEGIN=110
|
||||
ASM_PAR_END=111
|
||||
ASM_BRACKET_BEGIN=112
|
||||
ASM_BRACKET_END=113
|
||||
ASM_DOT=114
|
||||
ASM_SHIFT_LEFT=115
|
||||
ASM_SHIFT_RIGHT=116
|
||||
ASM_PLUS=117
|
||||
ASM_MINUS=118
|
||||
ASM_LESS_THAN=119
|
||||
ASM_GREATER_THAN=120
|
||||
ASM_MULTIPLY=121
|
||||
ASM_DIVIDE=122
|
||||
ASM_CURLY_BEGIN=123
|
||||
ASM_CURLY_END=124
|
||||
ASM_NUMBER=125
|
||||
ASM_NUMFLOAT=126
|
||||
ASM_BINFLOAT=127
|
||||
ASM_DECFLOAT=128
|
||||
ASM_HEXFLOAT=129
|
||||
ASM_NUMINT=130
|
||||
ASM_BININTEGER=131
|
||||
ASM_DECINTEGER=132
|
||||
ASM_HEXINTEGER=133
|
||||
ASM_CHAR=134
|
||||
ASM_MULTI_REL=135
|
||||
ASM_MULTI_NAME=136
|
||||
ASM_NAME=137
|
||||
ASM_WS=138
|
||||
ASM_COMMENT_LINE=139
|
||||
ASM_COMMENT_BLOCK=140
|
||||
FORM_SSA=58
|
||||
FORM_NOTSSA=59
|
||||
INLINE=60
|
||||
VOLATILE=61
|
||||
NOTVOLATILE=62
|
||||
INTERRUPT=63
|
||||
CALLING=64
|
||||
CALLINGCONVENTION=65
|
||||
IF=66
|
||||
ELSE=67
|
||||
WHILE=68
|
||||
DO=69
|
||||
FOR=70
|
||||
SWITCH=71
|
||||
RETURN=72
|
||||
BREAK=73
|
||||
CONTINUE=74
|
||||
ASM=75
|
||||
DEFAULT=76
|
||||
CASE=77
|
||||
STRUCT=78
|
||||
ENUM=79
|
||||
SIZEOF=80
|
||||
TYPEID=81
|
||||
KICKASM=82
|
||||
RESOURCE=83
|
||||
USES=84
|
||||
CLOBBERS=85
|
||||
BYTES=86
|
||||
CYCLES=87
|
||||
LOGIC_NOT=88
|
||||
SIGNEDNESS=89
|
||||
SIMPLETYPE=90
|
||||
BOOLEAN=91
|
||||
KICKASM_BODY=92
|
||||
STRING=93
|
||||
CHAR=94
|
||||
NUMBER=95
|
||||
NUMFLOAT=96
|
||||
BINFLOAT=97
|
||||
DECFLOAT=98
|
||||
HEXFLOAT=99
|
||||
NUMINT=100
|
||||
BININTEGER=101
|
||||
DECINTEGER=102
|
||||
HEXINTEGER=103
|
||||
NAME=104
|
||||
WS=105
|
||||
COMMENT_LINE=106
|
||||
COMMENT_BLOCK=107
|
||||
ASM_BYTE=108
|
||||
ASM_MNEMONIC=109
|
||||
ASM_IMM=110
|
||||
ASM_COLON=111
|
||||
ASM_COMMA=112
|
||||
ASM_PAR_BEGIN=113
|
||||
ASM_PAR_END=114
|
||||
ASM_BRACKET_BEGIN=115
|
||||
ASM_BRACKET_END=116
|
||||
ASM_DOT=117
|
||||
ASM_SHIFT_LEFT=118
|
||||
ASM_SHIFT_RIGHT=119
|
||||
ASM_PLUS=120
|
||||
ASM_MINUS=121
|
||||
ASM_LESS_THAN=122
|
||||
ASM_GREATER_THAN=123
|
||||
ASM_MULTIPLY=124
|
||||
ASM_DIVIDE=125
|
||||
ASM_CURLY_BEGIN=126
|
||||
ASM_CURLY_END=127
|
||||
ASM_NUMBER=128
|
||||
ASM_NUMFLOAT=129
|
||||
ASM_BINFLOAT=130
|
||||
ASM_DECFLOAT=131
|
||||
ASM_HEXFLOAT=132
|
||||
ASM_NUMINT=133
|
||||
ASM_BININTEGER=134
|
||||
ASM_DECINTEGER=135
|
||||
ASM_HEXINTEGER=136
|
||||
ASM_CHAR=137
|
||||
ASM_MULTI_REL=138
|
||||
ASM_MULTI_NAME=139
|
||||
ASM_NAME=140
|
||||
ASM_WS=141
|
||||
ASM_COMMENT_LINE=142
|
||||
ASM_COMMENT_BLOCK=143
|
||||
';'=8
|
||||
'..'=11
|
||||
'?'=12
|
||||
@ -176,32 +179,35 @@ ASM_COMMENT_BLOCK=140
|
||||
'__address'=55
|
||||
'__zp'=56
|
||||
'__mem'=57
|
||||
'inline'=58
|
||||
'volatile'=59
|
||||
'interrupt'=60
|
||||
'calling'=61
|
||||
'if'=63
|
||||
'else'=64
|
||||
'while'=65
|
||||
'do'=66
|
||||
'for'=67
|
||||
'switch'=68
|
||||
'return'=69
|
||||
'break'=70
|
||||
'continue'=71
|
||||
'asm'=72
|
||||
'default'=73
|
||||
'case'=74
|
||||
'struct'=75
|
||||
'enum'=76
|
||||
'sizeof'=77
|
||||
'typeid'=78
|
||||
'kickasm'=79
|
||||
'resource'=80
|
||||
'uses'=81
|
||||
'clobbers'=82
|
||||
'bytes'=83
|
||||
'cycles'=84
|
||||
'!'=85
|
||||
'.byte'=105
|
||||
'#'=107
|
||||
'__ssa'=58
|
||||
'__notssa'=59
|
||||
'inline'=60
|
||||
'volatile'=61
|
||||
'__notvolatile'=62
|
||||
'interrupt'=63
|
||||
'calling'=64
|
||||
'if'=66
|
||||
'else'=67
|
||||
'while'=68
|
||||
'do'=69
|
||||
'for'=70
|
||||
'switch'=71
|
||||
'return'=72
|
||||
'break'=73
|
||||
'continue'=74
|
||||
'asm'=75
|
||||
'default'=76
|
||||
'case'=77
|
||||
'struct'=78
|
||||
'enum'=79
|
||||
'sizeof'=80
|
||||
'typeid'=81
|
||||
'kickasm'=82
|
||||
'resource'=83
|
||||
'uses'=84
|
||||
'clobbers'=85
|
||||
'bytes'=86
|
||||
'cycles'=87
|
||||
'!'=88
|
||||
'.byte'=108
|
||||
'#'=110
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Generated from C:/c64/kickc/src/main/java/dk/camelot64/kickc/parser\KickCParser.g4 by ANTLR 4.7.2
|
||||
// Generated from /Users/jespergravgaard/c64/kickc/src/main/java/dk/camelot64/kickc/parser/KickCParser.g4 by ANTLR 4.7
|
||||
package dk.camelot64.kickc.parser;
|
||||
|
||||
|
||||
@ -421,6 +421,30 @@ public class KickCParserBaseListener implements KickCParserListener {
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void exitDirectiveMemoryAreaAddress(KickCParser.DirectiveMemoryAreaAddressContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void enterDirectiveFormSsa(KickCParser.DirectiveFormSsaContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void exitDirectiveFormSsa(KickCParser.DirectiveFormSsaContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void enterDirectiveFormNotSsa(KickCParser.DirectiveFormNotSsaContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void exitDirectiveFormNotSsa(KickCParser.DirectiveFormNotSsaContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
@ -445,6 +469,18 @@ public class KickCParserBaseListener implements KickCParserListener {
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void exitDirectiveVolatile(KickCParser.DirectiveVolatileContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void enterDirectiveNotVolatile(KickCParser.DirectiveNotVolatileContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override public void exitDirectiveNotVolatile(KickCParser.DirectiveNotVolatileContext ctx) { }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Generated from C:/c64/kickc/src/main/java/dk/camelot64/kickc/parser\KickCParser.g4 by ANTLR 4.7.2
|
||||
// Generated from /Users/jespergravgaard/c64/kickc/src/main/java/dk/camelot64/kickc/parser/KickCParser.g4 by ANTLR 4.7
|
||||
package dk.camelot64.kickc.parser;
|
||||
|
||||
|
||||
@ -251,6 +251,20 @@ public class KickCParserBaseVisitor<T> extends AbstractParseTreeVisitor<T> imple
|
||||
* {@link #visitChildren} on {@code ctx}.</p>
|
||||
*/
|
||||
@Override public T visitDirectiveMemoryAreaAddress(KickCParser.DirectiveMemoryAreaAddressContext ctx) { return visitChildren(ctx); }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation returns the result of calling
|
||||
* {@link #visitChildren} on {@code ctx}.</p>
|
||||
*/
|
||||
@Override public T visitDirectiveFormSsa(KickCParser.DirectiveFormSsaContext ctx) { return visitChildren(ctx); }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation returns the result of calling
|
||||
* {@link #visitChildren} on {@code ctx}.</p>
|
||||
*/
|
||||
@Override public T visitDirectiveFormNotSsa(KickCParser.DirectiveFormNotSsaContext ctx) { return visitChildren(ctx); }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
@ -265,6 +279,13 @@ public class KickCParserBaseVisitor<T> extends AbstractParseTreeVisitor<T> imple
|
||||
* {@link #visitChildren} on {@code ctx}.</p>
|
||||
*/
|
||||
@Override public T visitDirectiveVolatile(KickCParser.DirectiveVolatileContext ctx) { return visitChildren(ctx); }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation returns the result of calling
|
||||
* {@link #visitChildren} on {@code ctx}.</p>
|
||||
*/
|
||||
@Override public T visitDirectiveNotVolatile(KickCParser.DirectiveNotVolatileContext ctx) { return visitChildren(ctx); }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Generated from C:/c64/kickc/src/main/java/dk/camelot64/kickc/parser\KickCParser.g4 by ANTLR 4.7.2
|
||||
// Generated from /Users/jespergravgaard/c64/kickc/src/main/java/dk/camelot64/kickc/parser/KickCParser.g4 by ANTLR 4.7
|
||||
package dk.camelot64.kickc.parser;
|
||||
|
||||
|
||||
@ -393,6 +393,30 @@ public interface KickCParserListener extends ParseTreeListener {
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitDirectiveMemoryAreaAddress(KickCParser.DirectiveMemoryAreaAddressContext ctx);
|
||||
/**
|
||||
* Enter a parse tree produced by the {@code directiveFormSsa}
|
||||
* labeled alternative in {@link KickCParser#directive}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterDirectiveFormSsa(KickCParser.DirectiveFormSsaContext ctx);
|
||||
/**
|
||||
* Exit a parse tree produced by the {@code directiveFormSsa}
|
||||
* labeled alternative in {@link KickCParser#directive}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitDirectiveFormSsa(KickCParser.DirectiveFormSsaContext ctx);
|
||||
/**
|
||||
* Enter a parse tree produced by the {@code directiveFormNotSsa}
|
||||
* labeled alternative in {@link KickCParser#directive}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterDirectiveFormNotSsa(KickCParser.DirectiveFormNotSsaContext ctx);
|
||||
/**
|
||||
* Exit a parse tree produced by the {@code directiveFormNotSsa}
|
||||
* labeled alternative in {@link KickCParser#directive}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitDirectiveFormNotSsa(KickCParser.DirectiveFormNotSsaContext ctx);
|
||||
/**
|
||||
* Enter a parse tree produced by the {@code directiveInline}
|
||||
* labeled alternative in {@link KickCParser#directive}.
|
||||
@ -417,6 +441,18 @@ public interface KickCParserListener extends ParseTreeListener {
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitDirectiveVolatile(KickCParser.DirectiveVolatileContext ctx);
|
||||
/**
|
||||
* Enter a parse tree produced by the {@code directiveNotVolatile}
|
||||
* labeled alternative in {@link KickCParser#directive}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterDirectiveNotVolatile(KickCParser.DirectiveNotVolatileContext ctx);
|
||||
/**
|
||||
* Exit a parse tree produced by the {@code directiveNotVolatile}
|
||||
* labeled alternative in {@link KickCParser#directive}.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitDirectiveNotVolatile(KickCParser.DirectiveNotVolatileContext ctx);
|
||||
/**
|
||||
* Enter a parse tree produced by the {@code directiveInterrupt}
|
||||
* labeled alternative in {@link KickCParser#directive}.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Generated from C:/c64/kickc/src/main/java/dk/camelot64/kickc/parser\KickCParser.g4 by ANTLR 4.7.2
|
||||
// Generated from /Users/jespergravgaard/c64/kickc/src/main/java/dk/camelot64/kickc/parser/KickCParser.g4 by ANTLR 4.7
|
||||
package dk.camelot64.kickc.parser;
|
||||
|
||||
|
||||
@ -238,6 +238,20 @@ public interface KickCParserVisitor<T> extends ParseTreeVisitor<T> {
|
||||
* @return the visitor result
|
||||
*/
|
||||
T visitDirectiveMemoryAreaAddress(KickCParser.DirectiveMemoryAreaAddressContext ctx);
|
||||
/**
|
||||
* Visit a parse tree produced by the {@code directiveFormSsa}
|
||||
* labeled alternative in {@link KickCParser#directive}.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
T visitDirectiveFormSsa(KickCParser.DirectiveFormSsaContext ctx);
|
||||
/**
|
||||
* Visit a parse tree produced by the {@code directiveFormNotSsa}
|
||||
* labeled alternative in {@link KickCParser#directive}.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
T visitDirectiveFormNotSsa(KickCParser.DirectiveFormNotSsaContext ctx);
|
||||
/**
|
||||
* Visit a parse tree produced by the {@code directiveInline}
|
||||
* labeled alternative in {@link KickCParser#directive}.
|
||||
@ -252,6 +266,13 @@ public interface KickCParserVisitor<T> extends ParseTreeVisitor<T> {
|
||||
* @return the visitor result
|
||||
*/
|
||||
T visitDirectiveVolatile(KickCParser.DirectiveVolatileContext ctx);
|
||||
/**
|
||||
* Visit a parse tree produced by the {@code directiveNotVolatile}
|
||||
* labeled alternative in {@link KickCParser#directive}.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
T visitDirectiveNotVolatile(KickCParser.DirectiveNotVolatileContext ctx);
|
||||
/**
|
||||
* Visit a parse tree produced by the {@code directiveInterrupt}
|
||||
* labeled alternative in {@link KickCParser#directive}.
|
||||
|
@ -811,9 +811,24 @@ public class Pass0GenerateStatementSequence extends KickCParserBaseVisitor<Objec
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object visitDirectiveFormSsa(KickCParser.DirectiveFormSsaContext ctx) {
|
||||
return new Directive.FormSsa(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object visitDirectiveFormNotSsa(KickCParser.DirectiveFormNotSsaContext ctx) {
|
||||
return new Directive.FormSsa(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Directive visitDirectiveVolatile(KickCParser.DirectiveVolatileContext ctx) {
|
||||
return new Directive.Volatile();
|
||||
return new Directive.Volatile(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object visitDirectiveNotVolatile(KickCParser.DirectiveNotVolatileContext ctx) {
|
||||
return new Directive.Volatile(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user