Programming-Language-Design / src / parser / Cmm.interp
Cmm.interp
Raw
token literal names:
null
'main'
'('
')'
'['
']'
'.'
'-'
'!'
'*'
'/'
'%'
'+'
'>'
'>='
'<'
'<='
'!='
'=='
'&&'
'||'
','
'read'
';'
'write'
'='
'return'
'if'
'else'
'while'
'{'
'}'
'int'
'char'
'double'
'struct'
'void'
null
null
null
null
null
null
null
'\n'
'\t'
'\r'

token symbolic names:
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
INT_CONSTANT
ID
REAL_CONSTANT
CHAR_CONSTANT
LINE_COMMENT
BLOCK_COMMENT
WHITE_SPACE
NEW_LINE
TAB
CARRIAGE_RETURN

rule names:
program
program_definitions
main_function
expression
function_invocation
arguments
statement
block
var_definition
func_definition
return_type
function_block
function_param
primitive_type
type
void_type
record_fields


atn:
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 48, 344, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 7, 3, 45, 10, 3, 12, 3, 14, 3, 48, 11, 3, 3, 3, 3, 3, 3, 3, 7, 3, 53, 10, 3, 12, 3, 14, 3, 56, 11, 3, 3, 3, 3, 3, 3, 3, 7, 3, 61, 10, 3, 12, 3, 14, 3, 64, 11, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 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, 3, 12, 3, 12, 5, 12, 253, 10, 12, 3, 13, 3, 13, 3, 13, 3, 13, 7, 13, 259, 10, 13, 12, 13, 14, 13, 262, 11, 13, 3, 13, 3, 13, 3, 13, 7, 13, 267, 10, 13, 12, 13, 14, 13, 270, 11, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 7, 14, 282, 10, 14, 12, 14, 14, 14, 285, 11, 14, 3, 14, 5, 14, 288, 10, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 5, 15, 296, 10, 15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 5, 16, 308, 10, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 7, 16, 315, 10, 16, 12, 16, 14, 16, 318, 11, 16, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 7, 18, 329, 10, 18, 12, 18, 14, 18, 332, 11, 18, 3, 18, 3, 18, 7, 18, 336, 10, 18, 12, 18, 14, 18, 339, 11, 18, 3, 18, 5, 18, 342, 10, 18, 3, 18, 2, 4, 8, 30, 19, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 2, 6, 3, 2, 11, 13, 4, 2, 9, 9, 14, 14, 3, 2, 15, 20, 3, 2, 21, 22, 2, 367, 2, 36, 3, 2, 2, 2, 4, 46, 3, 2, 2, 2, 6, 65, 3, 2, 2, 2, 8, 103, 3, 2, 2, 2, 10, 140, 3, 2, 2, 2, 12, 158, 3, 2, 2, 2, 14, 208, 3, 2, 2, 2, 16, 223, 3, 2, 2, 2, 18, 225, 3, 2, 2, 2, 20, 238, 3, 2, 2, 2, 22, 252, 3, 2, 2, 2, 24, 254, 3, 2, 2, 2, 26, 287, 3, 2, 2, 2, 28, 295, 3, 2, 2, 2, 30, 307, 3, 2, 2, 2, 32, 319, 3, 2, 2, 2, 34, 341, 3, 2, 2, 2, 36, 37, 5, 4, 3, 2, 37, 38, 5, 6, 4, 2, 38, 39, 8, 2, 1, 2, 39, 40, 7, 2, 2, 3, 40, 3, 3, 2, 2, 2, 41, 42, 5, 18, 10, 2, 42, 43, 8, 3, 1, 2, 43, 45, 3, 2, 2, 2, 44, 41, 3, 2, 2, 2, 45, 48, 3, 2, 2, 2, 46, 44, 3, 2, 2, 2, 46, 47, 3, 2, 2, 2, 47, 54, 3, 2, 2, 2, 48, 46, 3, 2, 2, 2, 49, 50, 5, 20, 11, 2, 50, 51, 8, 3, 1, 2, 51, 53, 3, 2, 2, 2, 52, 49, 3, 2, 2, 2, 53, 56, 3, 2, 2, 2, 54, 52, 3, 2, 2, 2, 54, 55, 3, 2, 2, 2, 55, 62, 3, 2, 2, 2, 56, 54, 3, 2, 2, 2, 57, 58, 5, 18, 10, 2, 58, 59, 8, 3, 1, 2, 59, 61, 3, 2, 2, 2, 60, 57, 3, 2, 2, 2, 61, 64, 3, 2, 2, 2, 62, 60, 3, 2, 2, 2, 62, 63, 3, 2, 2, 2, 63, 5, 3, 2, 2, 2, 64, 62, 3, 2, 2, 2, 65, 66, 5, 32, 17, 2, 66, 67, 7, 3, 2, 2, 67, 68, 7, 4, 2, 2, 68, 69, 7, 5, 2, 2, 69, 70, 5, 24, 13, 2, 70, 71, 8, 4, 1, 2, 71, 7, 3, 2, 2, 2, 72, 73, 8, 5, 1, 2, 73, 74, 7, 4, 2, 2, 74, 75, 5, 8, 5, 2, 75, 76, 7, 5, 2, 2, 76, 77, 8, 5, 1, 2, 77, 104, 3, 2, 2, 2, 78, 79, 5, 10, 6, 2, 79, 80, 8, 5, 1, 2, 80, 104, 3, 2, 2, 2, 81, 82, 7, 9, 2, 2, 82, 83, 5, 8, 5, 13, 83, 84, 8, 5, 1, 2, 84, 104, 3, 2, 2, 2, 85, 86, 7, 10, 2, 2, 86, 87, 5, 8, 5, 12, 87, 88, 8, 5, 1, 2, 88, 104, 3, 2, 2, 2, 89, 90, 7, 4, 2, 2, 90, 91, 5, 28, 15, 2, 91, 92, 7, 5, 2, 2, 92, 93, 5, 8, 5, 11, 93, 94, 8, 5, 1, 2, 94, 104, 3, 2, 2, 2, 95, 96, 7, 39, 2, 2, 96, 104, 8, 5, 1, 2, 97, 98, 7, 41, 2, 2, 98, 104, 8, 5, 1, 2, 99, 100, 7, 42, 2, 2, 100, 104, 8, 5, 1, 2, 101, 102, 7, 40, 2, 2, 102, 104, 8, 5, 1, 2, 103, 72, 3, 2, 2, 2, 103, 78, 3, 2, 2, 2, 103, 81, 3, 2, 2, 2, 103, 85, 3, 2, 2, 2, 103, 89, 3, 2, 2, 2, 103, 95, 3, 2, 2, 2, 103, 97, 3, 2, 2, 2, 103, 99, 3, 2, 2, 2, 103, 101, 3, 2, 2, 2, 104, 137, 3, 2, 2, 2, 105, 106, 12, 10, 2, 2, 106, 107, 9, 2, 2, 2, 107, 108, 5, 8, 5, 11, 108, 109, 8, 5, 1, 2, 109, 136, 3, 2, 2, 2, 110, 111, 12, 9, 2, 2, 111, 112, 9, 3, 2, 2, 112, 113, 5, 8, 5, 10, 113, 114, 8, 5, 1, 2, 114, 136, 3, 2, 2, 2, 115, 116, 12, 8, 2, 2, 116, 117, 9, 4, 2, 2, 117, 118, 5, 8, 5, 9, 118, 119, 8, 5, 1, 2, 119, 136, 3, 2, 2, 2, 120, 121, 12, 7, 2, 2, 121, 122, 9, 5, 2, 2, 122, 123, 5, 8, 5, 8, 123, 124, 8, 5, 1, 2, 124, 136, 3, 2, 2, 2, 125, 126, 12, 16, 2, 2, 126, 127, 7, 6, 2, 2, 127, 128, 5, 8, 5, 2, 128, 129, 7, 7, 2, 2, 129, 130, 8, 5, 1, 2, 130, 136, 3, 2, 2, 2, 131, 132, 12, 15, 2, 2, 132, 133, 7, 8, 2, 2, 133, 134, 7, 40, 2, 2, 134, 136, 8, 5, 1, 2, 135, 105, 3, 2, 2, 2, 135, 110, 3, 2, 2, 2, 135, 115, 3, 2, 2, 2, 135, 120, 3, 2, 2, 2, 135, 125, 3, 2, 2, 2, 135, 131, 3, 2, 2, 2, 136, 139, 3, 2, 2, 2, 137, 135, 3, 2, 2, 2, 137, 138, 3, 2, 2, 2, 138, 9, 3, 2, 2, 2, 139, 137, 3, 2, 2, 2, 140, 141, 7, 40, 2, 2, 141, 142, 7, 4, 2, 2, 142, 143, 5, 12, 7, 2, 143, 144, 7, 5, 2, 2, 144, 145, 8, 6, 1, 2, 145, 11, 3, 2, 2, 2, 146, 147, 5, 8, 5, 2, 147, 154, 8, 7, 1, 2, 148, 149, 7, 23, 2, 2, 149, 150, 5, 8, 5, 2, 150, 151, 8, 7, 1, 2, 151, 153, 3, 2, 2, 2, 152, 148, 3, 2, 2, 2, 153, 156, 3, 2, 2, 2, 154, 152, 3, 2, 2, 2, 154, 155, 3, 2, 2, 2, 155, 159, 3, 2, 2, 2, 156, 154, 3, 2, 2, 2, 157, 159, 3, 2, 2, 2, 158, 146, 3, 2, 2, 2, 158, 157, 3, 2, 2, 2, 159, 13, 3, 2, 2, 2, 160, 161, 7, 24, 2, 2, 161, 162, 5, 12, 7, 2, 162, 163, 7, 25, 2, 2, 163, 164, 8, 8, 1, 2, 164, 209, 3, 2, 2, 2, 165, 166, 7, 26, 2, 2, 166, 167, 5, 12, 7, 2, 167, 168, 7, 25, 2, 2, 168, 169, 8, 8, 1, 2, 169, 209, 3, 2, 2, 2, 170, 171, 5, 8, 5, 2, 171, 172, 7, 27, 2, 2, 172, 173, 5, 8, 5, 2, 173, 174, 7, 25, 2, 2, 174, 175, 8, 8, 1, 2, 175, 209, 3, 2, 2, 2, 176, 177, 7, 28, 2, 2, 177, 178, 5, 8, 5, 2, 178, 179, 7, 25, 2, 2, 179, 180, 8, 8, 1, 2, 180, 209, 3, 2, 2, 2, 181, 182, 7, 29, 2, 2, 182, 183, 7, 4, 2, 2, 183, 184, 5, 8, 5, 2, 184, 185, 7, 5, 2, 2, 185, 186, 5, 16, 9, 2, 186, 187, 8, 8, 1, 2, 187, 209, 3, 2, 2, 2, 188, 189, 7, 29, 2, 2, 189, 190, 7, 4, 2, 2, 190, 191, 5, 8, 5, 2, 191, 192, 7, 5, 2, 2, 192, 193, 5, 16, 9, 2, 193, 194, 7, 30, 2, 2, 194, 195, 5, 16, 9, 2, 195, 196, 8, 8, 1, 2, 196, 209, 3, 2, 2, 2, 197, 198, 7, 31, 2, 2, 198, 199, 7, 4, 2, 2, 199, 200, 5, 8, 5, 2, 200, 201, 7, 5, 2, 2, 201, 202, 5, 16, 9, 2, 202, 203, 8, 8, 1, 2, 203, 209, 3, 2, 2, 2, 204, 205, 5, 10, 6, 2, 205, 206, 7, 25, 2, 2, 206, 207, 8, 8, 1, 2, 207, 209, 3, 2, 2, 2, 208, 160, 3, 2, 2, 2, 208, 165, 3, 2, 2, 2, 208, 170, 3, 2, 2, 2, 208, 176, 3, 2, 2, 2, 208, 181, 3, 2, 2, 2, 208, 188, 3, 2, 2, 2, 208, 197, 3, 2, 2, 2, 208, 204, 3, 2, 2, 2, 209, 15, 3, 2, 2, 2, 210, 211, 5, 14, 8, 2, 211, 212, 8, 9, 1, 2, 212, 224, 3, 2, 2, 2, 213, 219, 7, 32, 2, 2, 214, 215, 5, 14, 8, 2, 215, 216, 8, 9, 1, 2, 216, 218, 3, 2, 2, 2, 217, 214, 3, 2, 2, 2, 218, 221, 3, 2, 2, 2, 219, 217, 3, 2, 2, 2, 219, 220, 3, 2, 2, 2, 220, 222, 3, 2, 2, 2, 221, 219, 3, 2, 2, 2, 222, 224, 7, 33, 2, 2, 223, 210, 3, 2, 2, 2, 223, 213, 3, 2, 2, 2, 224, 17, 3, 2, 2, 2, 225, 226, 5, 30, 16, 2, 226, 227, 7, 40, 2, 2, 227, 233, 8, 10, 1, 2, 228, 229, 7, 23, 2, 2, 229, 230, 7, 40, 2, 2, 230, 232, 8, 10, 1, 2, 231, 228, 3, 2, 2, 2, 232, 235, 3, 2, 2, 2, 233, 231, 3, 2, 2, 2, 233, 234, 3, 2, 2, 2, 234, 236, 3, 2, 2, 2, 235, 233, 3, 2, 2, 2, 236, 237, 7, 25, 2, 2, 237, 19, 3, 2, 2, 2, 238, 239, 5, 22, 12, 2, 239, 240, 7, 40, 2, 2, 240, 241, 7, 4, 2, 2, 241, 242, 5, 26, 14, 2, 242, 243, 7, 5, 2, 2, 243, 244, 5, 24, 13, 2, 244, 245, 8, 11, 1, 2, 245, 21, 3, 2, 2, 2, 246, 247, 5, 28, 15, 2, 247, 248, 8, 12, 1, 2, 248, 253, 3, 2, 2, 2, 249, 250, 5, 32, 17, 2, 250, 251, 8, 12, 1, 2, 251, 253, 3, 2, 2, 2, 252, 246, 3, 2, 2, 2, 252, 249, 3, 2, 2, 2, 253, 23, 3, 2, 2, 2, 254, 260, 7, 32, 2, 2, 255, 256, 5, 18, 10, 2, 256, 257, 8, 13, 1, 2, 257, 259, 3, 2, 2, 2, 258, 255, 3, 2, 2, 2, 259, 262, 3, 2, 2, 2, 260, 258, 3, 2, 2, 2, 260, 261, 3, 2, 2, 2, 261, 268, 3, 2, 2, 2, 262, 260, 3, 2, 2, 2, 263, 264, 5, 14, 8, 2, 264, 265, 8, 13, 1, 2, 265, 267, 3, 2, 2, 2, 266, 263, 3, 2, 2, 2, 267, 270, 3, 2, 2, 2, 268, 266, 3, 2, 2, 2, 268, 269, 3, 2, 2, 2, 269, 271, 3, 2, 2, 2, 270, 268, 3, 2, 2, 2, 271, 272, 7, 33, 2, 2, 272, 25, 3, 2, 2, 2, 273, 274, 5, 28, 15, 2, 274, 275, 7, 40, 2, 2, 275, 283, 8, 14, 1, 2, 276, 277, 7, 23, 2, 2, 277, 278, 5, 28, 15, 2, 278, 279, 7, 40, 2, 2, 279, 280, 8, 14, 1, 2, 280, 282, 3, 2, 2, 2, 281, 276, 3, 2, 2, 2, 282, 285, 3, 2, 2, 2, 283, 281, 3, 2, 2, 2, 283, 284, 3, 2, 2, 2, 284, 288, 3, 2, 2, 2, 285, 283, 3, 2, 2, 2, 286, 288, 3, 2, 2, 2, 287, 273, 3, 2, 2, 2, 287, 286, 3, 2, 2, 2, 288, 27, 3, 2, 2, 2, 289, 290, 7, 34, 2, 2, 290, 296, 8, 15, 1, 2, 291, 292, 7, 35, 2, 2, 292, 296, 8, 15, 1, 2, 293, 294, 7, 36, 2, 2, 294, 296, 8, 15, 1, 2, 295, 289, 3, 2, 2, 2, 295, 291, 3, 2, 2, 2, 295, 293, 3, 2, 2, 2, 296, 29, 3, 2, 2, 2, 297, 298, 8, 16, 1, 2, 298, 299, 5, 28, 15, 2, 299, 300, 8, 16, 1, 2, 300, 308, 3, 2, 2, 2, 301, 302, 7, 37, 2, 2, 302, 303, 7, 32, 2, 2, 303, 304, 5, 34, 18, 2, 304, 305, 7, 33, 2, 2, 305, 306, 8, 16, 1, 2, 306, 308, 3, 2, 2, 2, 307, 297, 3, 2, 2, 2, 307, 301, 3, 2, 2, 2, 308, 316, 3, 2, 2, 2, 309, 310, 12, 4, 2, 2, 310, 311, 7, 6, 2, 2, 311, 312, 7, 39, 2, 2, 312, 313, 7, 7, 2, 2, 313, 315, 8, 16, 1, 2, 314, 309, 3, 2, 2, 2, 315, 318, 3, 2, 2, 2, 316, 314, 3, 2, 2, 2, 316, 317, 3, 2, 2, 2, 317, 31, 3, 2, 2, 2, 318, 316, 3, 2, 2, 2, 319, 320, 7, 38, 2, 2, 320, 321, 8, 17, 1, 2, 321, 33, 3, 2, 2, 2, 322, 323, 5, 30, 16, 2, 323, 324, 7, 40, 2, 2, 324, 330, 8, 18, 1, 2, 325, 326, 7, 23, 2, 2, 326, 327, 7, 40, 2, 2, 327, 329, 8, 18, 1, 2, 328, 325, 3, 2, 2, 2, 329, 332, 3, 2, 2, 2, 330, 328, 3, 2, 2, 2, 330, 331, 3, 2, 2, 2, 331, 333, 3, 2, 2, 2, 332, 330, 3, 2, 2, 2, 333, 334, 7, 25, 2, 2, 334, 336, 3, 2, 2, 2, 335, 322, 3, 2, 2, 2, 336, 339, 3, 2, 2, 2, 337, 335, 3, 2, 2, 2, 337, 338, 3, 2, 2, 2, 338, 342, 3, 2, 2, 2, 339, 337, 3, 2, 2, 2, 340, 342, 3, 2, 2, 2, 341, 337, 3, 2, 2, 2, 341, 340, 3, 2, 2, 2, 342, 35, 3, 2, 2, 2, 25, 46, 54, 62, 103, 135, 137, 154, 158, 208, 219, 223, 233, 252, 260, 268, 283, 287, 295, 307, 316, 330, 337, 341]