diff --git a/docs/ruby/ArchDef.html b/docs/ruby/ArchDef.html index badaa367d..9f4a97d5c 100644 --- a/docs/ruby/ArchDef.html +++ b/docs/ruby/ArchDef.html @@ -783,34 +783,34 @@

 
 
-1251
-1252
-1253
-1254
-1255
-1256
-1257
-1258
-1259
-1260
-1261
-1262
-1263
-1264
-1265
-1266
-1267
-1268
-1269
-1270
-1271
-1272
-1273
-1274
-1275
+1345 +1346 +1347 +1348 +1349 +1350 +1351 +1352 +1353 +1354 +1355 +1356 +1357 +1358 +1359 +1360 +1361 +1362 +1363 +1364 +1365 +1366 +1367 +1368 +1369 -
# File 'lib/arch_def.rb', line 1251
+      
# File 'lib/arch_def.rb', line 1345
 
 def initialize(config_name)
   @name = config_name.to_s
@@ -893,12 +893,12 @@ 

 
 
-1239
-1240
-1241
+1333 +1334 +1335

-
# File 'lib/arch_def.rb', line 1239
+      
# File 'lib/arch_def.rb', line 1333
 
 def config_params
   @config_params
@@ -954,12 +954,12 @@ 

 
 
-1245
-1246
-1247
+1339 +1340 +1341

-
# File 'lib/arch_def.rb', line 1245
+      
# File 'lib/arch_def.rb', line 1339
 
 def global_ast
   @global_ast
@@ -1015,12 +1015,12 @@ 

 
 
-1242
-1243
-1244
+1336 +1337 +1338

-
# File 'lib/arch_def.rb', line 1242
+      
# File 'lib/arch_def.rb', line 1336
 
 def idl_compiler
   @idl_compiler
@@ -1076,12 +1076,12 @@ 

 
 
-1233
-1234
-1235
+1327 +1328 +1329

-
# File 'lib/arch_def.rb', line 1233
+      
# File 'lib/arch_def.rb', line 1327
 
 def name
   @name
@@ -1137,12 +1137,12 @@ 

 
 
-1236
-1237
-1238
+1330 +1331 +1332

-
# File 'lib/arch_def.rb', line 1236
+      
# File 'lib/arch_def.rb', line 1330
 
 def sym_table
   @sym_table
@@ -1203,12 +1203,12 @@ 

 
 
-1374
-1375
-1376
+1468 +1469 +1470

-
# File 'lib/arch_def.rb', line 1374
+      
# File 'lib/arch_def.rb', line 1468
 
 def all_known_csr_names
   @arch_def["csrs"].map { |csr| csr[0] }
@@ -1282,12 +1282,12 @@ 

 
 
-1408
-1409
-1410
+1502 +1503 +1504

-
# File 'lib/arch_def.rb', line 1408
+      
# File 'lib/arch_def.rb', line 1502
 
 def csr(csr_name)
   csr_hash[csr_name]
@@ -1341,18 +1341,18 @@ 

 
 
-1390
-1391
-1392
-1393
-1394
-1395
-1396
-1397
-1398
+1484 +1485 +1486 +1487 +1488 +1489 +1490 +1491 +1492

-
# File 'lib/arch_def.rb', line 1390
+      
# File 'lib/arch_def.rb', line 1484
 
 def csr_hash
   return @csr_hash unless @csr_hash.nil?
@@ -1412,16 +1412,16 @@ 

 
 
-1364
-1365
-1366
-1367
-1368
-1369
-1370
+1458 +1459 +1460 +1461 +1462 +1463 +1464

-
# File 'lib/arch_def.rb', line 1364
+      
# File 'lib/arch_def.rb', line 1458
 
 def csrs
   return @csrs unless @csrs.nil?
@@ -1479,12 +1479,12 @@ 

 
 
-1350
-1351
-1352
+1444 +1445 +1446

-
# File 'lib/arch_def.rb', line 1350
+      
# File 'lib/arch_def.rb', line 1444
 
 def data
   @arch_def
@@ -1686,19 +1686,19 @@ 

 
 
-1338
-1339
-1340
-1341
-1342
-1343
-1344
-1345
-1346
-1347
+1432 +1433 +1434 +1435 +1436 +1437 +1438 +1439 +1440 +1441

-
# File 'lib/arch_def.rb', line 1338
+      
# File 'lib/arch_def.rb', line 1432
 
 def ext?(ext_name, *ext_version_requirements)
   implemented_extensions.any? do |e|
@@ -1791,12 +1791,12 @@ 

 
 
-1320
-1321
-1322
+1414 +1415 +1416

-
# File 'lib/arch_def.rb', line 1320
+      
# File 'lib/arch_def.rb', line 1414
 
 def extension(name)
   extension_hash[name.to_s]
@@ -1821,18 +1821,18 @@ 

 
 
-1307
-1308
-1309
-1310
-1311
-1312
-1313
-1314
-1315
+1401 +1402 +1403 +1404 +1405 +1406 +1407 +1408 +1409

-
# File 'lib/arch_def.rb', line 1307
+      
# File 'lib/arch_def.rb', line 1401
 
 def extension_hash
   return @extension_hash unless @extension_hash.nil?
@@ -1892,18 +1892,18 @@ 

 
 
-1296
-1297
-1298
-1299
-1300
-1301
-1302
-1303
-1304
+1390 +1391 +1392 +1393 +1394 +1395 +1396 +1397 +1398

-
# File 'lib/arch_def.rb', line 1296
+      
# File 'lib/arch_def.rb', line 1390
 
 def extensions
   return @extensions unless @extensions.nil?
@@ -1983,27 +1983,27 @@ 
-
# File 'lib/arch_def.rb', line 1460
+      
# File 'lib/arch_def.rb', line 1552
 
 def find_replace_links(adoc)
   adoc.gsub(/`([\w.]+)`/) do |match|
@@ -2092,12 +2092,12 @@ 

 
 
-1402
-1403
-1404
+1496 +1497 +1498

-
# File 'lib/arch_def.rb', line 1402
+      
# File 'lib/arch_def.rb', line 1496
 
 def implemented_csr(csr_name)
   implemented_csr_hash[csr_name]
@@ -2151,18 +2151,18 @@ 

 
 
-1379
-1380
-1381
-1382
-1383
-1384
-1385
-1386
-1387
+1473 +1474 +1475 +1476 +1477 +1478 +1479 +1480 +1481

-
# File 'lib/arch_def.rb', line 1379
+      
# File 'lib/arch_def.rb', line 1473
 
 def implemented_csr_hash
   return @implemented_csr_hash unless @implemented_csr_hash.nil?
@@ -2222,16 +2222,16 @@ 

 
 
-1355
-1356
-1357
-1358
-1359
-1360
-1361
+1449 +1450 +1451 +1452 +1453 +1454 +1455

-
# File 'lib/arch_def.rb', line 1355
+      
# File 'lib/arch_def.rb', line 1449
 
 def implemented_csrs
   return @implemented_csrs unless @implemented_csrs.nil?
@@ -2289,27 +2289,27 @@ 

 
 
-1284
-1285
-1286
-1287
-1288
-1289
-1290
-1291
-1292
-1293
+1378 +1379 +1380 +1381 +1382 +1383 +1384 +1385 +1386 +1387

-
# File 'lib/arch_def.rb', line 1284
+      
# File 'lib/arch_def.rb', line 1378
 
 def implemented_extensions
   return @implemented_extensions unless @implemented_extensions.nil?
 
   @implemented_extensions = []
   @arch_def["implemented_extensions"].each do |e|
-    @implemented_extensions << ExtensionVersion.new(e["name"], e["version"], self)
-  end
+    @implemented_extensions << ExtensionVersion.new(e["name"], e["version"])
+2    end
 
   @implemented_extensions
 end
@@ -2362,20 +2362,20 @@

 
 
-1437
-1438
-1439
-1440
-1441
-1442
-1443
-1444
-1445
-1446
-1447
+1529 +1530 +1531 +1532 +1533 +1534 +1535 +1536 +1537 +1538 +1539

-
# File 'lib/arch_def.rb', line 1437
+      
# File 'lib/arch_def.rb', line 1529
 
 def implemented_instructions
   return @implemented_instructions unless @implemented_instructions.nil?
@@ -2457,12 +2457,12 @@ 

 
 
-1451
-1452
-1453
+1543 +1544 +1545

-
# File 'lib/arch_def.rb', line 1451
+      
# File 'lib/arch_def.rb', line 1543
 
 def inst(inst_name)
   instruction_hash[inst_name.to_s]
@@ -2516,18 +2516,18 @@ 

 
 
-1426
-1427
-1428
-1429
-1430
-1431
-1432
-1433
-1434
+1518 +1519 +1520 +1521 +1522 +1523 +1524 +1525 +1526

-
# File 'lib/arch_def.rb', line 1426
+      
# File 'lib/arch_def.rb', line 1518
 
 def instruction_hash
   return @instruction_hash unless @instruction_hash.nil?
@@ -2587,28 +2587,24 @@ 

 
 
-1413
-1414
-1415
-1416
-1417
-1418
-1419
-1420
-1421
-1422
-1423
+1507 +1508 +1509 +1510 +1511 +1512 +1513 +1514 +1515

-
# File 'lib/arch_def.rb', line 1413
+      
# File 'lib/arch_def.rb', line 1507
 
 def instructions
   return @instructions unless @instructions.nil?
 
-  opcode_data = YAML.load_file("#{$root}/ext/riscv-opcodes/instr_dict.yaml")
-
   @instructions = @arch_def["instructions"].map do |_inst_name, inst_data|
-    Instruction.new(inst_data, opcode_data, @sym_table, self)
+    Instruction.new(inst_data)
   end
 
   @instructions
@@ -2662,12 +2658,12 @@ 

 
 
-1279
-1280
-1281
+1373 +1374 +1375

-
# File 'lib/arch_def.rb', line 1279
+      
# File 'lib/arch_def.rb', line 1373
 
 def multi_xlen?
   ["SXLEN", "UXLEN", "VSXLEN", "VUXLEN"].any? { |key| @config_params[key] == 3264 }
@@ -2682,7 +2678,7 @@ 

diff --git a/docs/ruby/ArchDefObject.html b/docs/ruby/ArchDefObject.html index 3118f3095..a62c30f75 100644 --- a/docs/ruby/ArchDefObject.html +++ b/docs/ruby/ArchDefObject.html @@ -326,14 +326,14 @@

 
 
-42
-43
-44
-45
-46
+38 +39 +40 +41 +42

-
# File 'lib/arch_def.rb', line 42
+      
# File 'lib/arch_def.rb', line 38
 
 def initialize(data)
   raise "Bad data" unless data.is_a?(Hash)
@@ -379,20 +379,20 @@ 

 
 
+56
+57
+58
+59
 60
 61
 62
 63
 64
 65
-66
-67
-68
-69
-70
+66

-
# File 'lib/arch_def.rb', line 60
+      
# File 'lib/arch_def.rb', line 56
 
 def method_missing(method_name, *args, &block)
   if @data.key?(method_name.to_s)
@@ -432,12 +432,12 @@ 

 
 
-48
-49
-50
+44 +45 +46

-
# File 'lib/arch_def.rb', line 48
+      
# File 'lib/arch_def.rb', line 44
 
 def inspect
   self.class.name
@@ -491,10 +491,10 @@ 

 
 
-57
+53

-
# File 'lib/arch_def.rb', line 57
+      
# File 'lib/arch_def.rb', line 53
 
 def keys = @data.keys
@@ -539,12 +539,12 @@

 
 
-72
-73
-74
+68 +69 +70

-
# File 'lib/arch_def.rb', line 72
+      
# File 'lib/arch_def.rb', line 68
 
 def respond_to_missing?(method_name, include_private = false)
   @data.key?(method_name.to_s) || super
@@ -559,7 +559,7 @@ 

diff --git a/docs/ruby/ArchGen.html b/docs/ruby/ArchGen.html index c67899ba9..6461895b0 100644 --- a/docs/ruby/ArchGen.html +++ b/docs/ruby/ArchGen.html @@ -506,7 +506,6 @@

 
 
-36
 37
 38
 39
@@ -527,10 +526,11 @@ 

54 55 56 -57

+57 +58

-
# File 'lib/arch_gen.rb', line 36
+      
# File 'lib/arch_gen.rb', line 37
 
 def initialize(config_name)
   @validator = Validator.instance
@@ -592,12 +592,12 @@ 

 
 
-25
 26
-27
+27 +28

-
# File 'lib/arch_gen.rb', line 25
+      
# File 'lib/arch_gen.rb', line 26
 
 def gen_dir
   @gen_dir
@@ -635,12 +635,12 @@ 

 
 
-22
 23
-24
+24 +25

-
# File 'lib/arch_gen.rb', line 22
+      
# File 'lib/arch_gen.rb', line 23
 
 def name
   @name
@@ -701,17 +701,17 @@ 

 
 
-586
 587
 588
 589
 590
 591
 592
-593
+593 +594

-
# File 'lib/arch_gen.rb', line 586
+      
# File 'lib/arch_gen.rb', line 587
 
 def all_known_exts
   (
@@ -741,7 +741,6 @@ 

 
 
-110
 111
 112
 113
@@ -758,10 +757,11 @@ 

124 125 126 -127

+127 +128

-
# File 'lib/arch_gen.rb', line 110
+      
# File 'lib/arch_gen.rb', line 111
 
 def check_extension_dependencies
   @implemented_extensions.each do |ext|
@@ -830,7 +830,6 @@ 

 
 
-667
 668
 669
 670
@@ -846,10 +845,11 @@ 

680 681 682 -683

+683 +684

-
# File 'lib/arch_gen.rb', line 667
+      
# File 'lib/arch_gen.rb', line 668
 
 def exception_codes
   return @exception_codes unless @exception_codes.nil?
@@ -901,7 +901,6 @@ 

 
 
-95
 96
 97
 98
@@ -914,10 +913,11 @@ 

105 106 107 -108

+108 +109

-
# File 'lib/arch_gen.rb', line 95
+      
# File 'lib/arch_gen.rb', line 96
 
 def generate
   # extensions need to be parsed first since we pull, e.g., exception codes from them
@@ -982,13 +982,13 @@ 

 
 
-157
 158
 159
-160
+160 +161

-
# File 'lib/arch_gen.rb', line 157
+      
# File 'lib/arch_gen.rb', line 158
 
 def implemented_csrs
   generate unless @generate_done
@@ -1043,13 +1043,13 @@ 

 
 
-169
 170
 171
-172
+172 +173

-
# File 'lib/arch_gen.rb', line 169
+      
# File 'lib/arch_gen.rb', line 170
 
 def implemented_extensions
   generate unless @generate_done
@@ -1104,13 +1104,13 @@ 

 
 
-163
 164
 165
-166
+166 +167

-
# File 'lib/arch_gen.rb', line 163
+      
# File 'lib/arch_gen.rb', line 164
 
 def implemented_instructions
   generate unless @generate_done
@@ -1165,7 +1165,6 @@ 

 
 
-688
 689
 690
 691
@@ -1181,10 +1180,11 @@ 

701 702 703 -704

+704 +705

-
# File 'lib/arch_gen.rb', line 688
+      
# File 'lib/arch_gen.rb', line 689
 
 def interrupt_codes
   return @interrupt_codes unless @interrupt_codes.nil?
@@ -1289,7 +1289,6 @@ 

 
 
-60
 61
 62
 63
@@ -1318,10 +1317,11 @@ 

86 87 88 -89

+89 +90

-
# File 'lib/arch_gen.rb', line 60
+      
# File 'lib/arch_gen.rb', line 61
 
 def validate_config
   fork do
@@ -1363,7 +1363,7 @@ 

diff --git a/docs/ruby/Csr.html b/docs/ruby/Csr.html index 5d2b2805f..00f65a326 100644 --- a/docs/ruby/Csr.html +++ b/docs/ruby/Csr.html @@ -639,15 +639,15 @@

 
 
+359
+360
+361
+362
 363
-364
-365
-366
-367
-368
+364

-
# File 'lib/arch_def.rb', line 363
+      
# File 'lib/arch_def.rb', line 359
 
 def initialize(csr_data, sym_table, arch_def)
   super(csr_data)
@@ -721,12 +721,12 @@ 

 
 
-355
-356
-357
+351 +352 +353

-
# File 'lib/arch_def.rb', line 355
+      
# File 'lib/arch_def.rb', line 351
 
 def arch_def
   @arch_def
@@ -782,12 +782,12 @@ 

 
 
-358
-359
-360
+354 +355 +356

-
# File 'lib/arch_def.rb', line 358
+      
# File 'lib/arch_def.rb', line 354
 
 def sym_table
   @sym_table
@@ -848,12 +848,12 @@ 

 
 
-471
-472
-473
+467 +468 +469

-
# File 'lib/arch_def.rb', line 471
+      
# File 'lib/arch_def.rb', line 467
 
 def description_html
   Asciidoctor.convert description
@@ -907,6 +907,10 @@ 

 
 
+368
+369
+370
+371
 372
 373
 374
@@ -917,14 +921,10 @@ 

379 380 381 -382 -383 -384 -385 -386

+382

-
# File 'lib/arch_def.rb', line 372
+      
# File 'lib/arch_def.rb', line 368
 
 def dynamic_length?
   return false if @data["length"].is_a?(Integer)
@@ -972,12 +972,12 @@ 

 
 
-558
-559
-560
+554 +555 +556

-
# File 'lib/arch_def.rb', line 558
+      
# File 'lib/arch_def.rb', line 554
 
 def field(field_name)
   field_hash[field_name.to_s]
@@ -1031,12 +1031,12 @@ 

 
 
-553
-554
-555
+549 +550 +551

-
# File 'lib/arch_def.rb', line 553
+      
# File 'lib/arch_def.rb', line 549
 
 def field?(field_name)
   field_hash.key?(field_name.to_s)
@@ -1090,19 +1090,19 @@ 

 
 
+537
+538
+539
+540
 541
 542
 543
 544
 545
-546
-547
-548
-549
-550
+546

-
# File 'lib/arch_def.rb', line 541
+      
# File 'lib/arch_def.rb', line 537
 
 def field_hash
   @field_hash unless @field_hash.nil?
@@ -1163,18 +1163,18 @@ 

 
 
+472
+473
+474
+475
 476
 477
 478
 479
-480
-481
-482
-483
-484
+480

-
# File 'lib/arch_def.rb', line 476
+      
# File 'lib/arch_def.rb', line 472
 
 def fields
   return @fields unless @fields.nil?
@@ -1234,12 +1234,12 @@ 

 
 
-563
-564
-565
+559 +560 +561

-
# File 'lib/arch_def.rb', line 563
+      
# File 'lib/arch_def.rb', line 559
 
 def has_custom_sw_read?
   @data.key?("sw_read") && !sw_read.empty?
@@ -1293,6 +1293,10 @@ 

 
 
+508
+509
+510
+511
 512
 513
 514
@@ -1315,14 +1319,10 @@ 

531 532 533 -534 -535 -536 -537 -538

+534

-
# File 'lib/arch_def.rb', line 512
+      
# File 'lib/arch_def.rb', line 508
 
 def implemented_fields
   return @implemented_fields unless @implemented_fields.nil?
@@ -1400,6 +1400,10 @@ 

 
 
+484
+485
+486
+487
 488
 489
 490
@@ -1416,14 +1420,10 @@ 

501 502 503 -504 -505 -506 -507 -508

+504

-
# File 'lib/arch_def.rb', line 488
+      
# File 'lib/arch_def.rb', line 484
 
 def implemented_fields_for(effective_xlen)
   @implemented_fields_for ||= {}
@@ -1517,6 +1517,10 @@ 

 
 
+386
+387
+388
+389
 390
 391
 392
@@ -1543,14 +1547,10 @@ 

413 414 415 -416 -417 -418 -419 -420

+416

-
# File 'lib/arch_def.rb', line 390
+      
# File 'lib/arch_def.rb', line 386
 
 def length(effective_xlen = nil)
   case @data["length"]
@@ -1632,19 +1632,19 @@ 

 
 
+419
+420
+421
+422
 423
 424
 425
 426
 427
-428
-429
-430
-431
-432
+428

-
# File 'lib/arch_def.rb', line 423
+      
# File 'lib/arch_def.rb', line 419
 
 def length_cond32
   case @data["length"]
@@ -1705,19 +1705,19 @@ 

 
 
+431
+432
+433
+434
 435
 436
 437
 438
 439
-440
-441
-442
-443
-444
+440

-
# File 'lib/arch_def.rb', line 435
+      
# File 'lib/arch_def.rb', line 431
 
 def length_cond64
   case @data["length"]
@@ -1778,6 +1778,10 @@ 

 
 
+443
+444
+445
+446
 447
 448
 449
@@ -1793,14 +1797,10 @@ 

459 460 461 -462 -463 -464 -465 -466

+462

-
# File 'lib/arch_def.rb', line 447
+      
# File 'lib/arch_def.rb', line 443
 
 def length_pretty
   if dynamic_length?
@@ -1909,6 +1909,10 @@ 

 
 
+580
+581
+582
+583
 584
 585
 586
@@ -1927,14 +1931,10 @@ 

599 600 601 -602 -603 -604 -605 -606

+602

-
# File 'lib/arch_def.rb', line 584
+      
# File 'lib/arch_def.rb', line 580
 
 def wavedrom_desc(effective_xlen)
   desc = {
@@ -1969,7 +1969,7 @@ 

diff --git a/docs/ruby/CsrField.html b/docs/ruby/CsrField.html index db00531df..176f5bfdb 100644 --- a/docs/ruby/CsrField.html +++ b/docs/ruby/CsrField.html @@ -648,13 +648,13 @@

 
 
-90
-91
-92
-93
+86 +87 +88 +89

-
# File 'lib/arch_def.rb', line 90
+      
# File 'lib/arch_def.rb', line 86
 
 def initialize(parent_csr, field_data)
   super(field_data)
@@ -730,12 +730,12 @@ 

 
 
-80
-81
-82
+76 +77 +78

-
# File 'lib/arch_def.rb', line 80
+      
# File 'lib/arch_def.rb', line 76
 
 def parent
   @parent
@@ -796,6 +796,10 @@ 

 
 
+157
+158
+159
+160
 161
 162
 163
@@ -816,14 +820,10 @@ 

178 179 180 -181 -182 -183 -184 -185

+181

-
# File 'lib/arch_def.rb', line 161
+      
# File 'lib/arch_def.rb', line 157
 
 def alias
   return @alias unless @alias.nil?
@@ -899,12 +899,12 @@ 

 
 
-96
-97
-98
+92 +93 +94

-
# File 'lib/arch_def.rb', line 96
+      
# File 'lib/arch_def.rb', line 92
 
 def arch_def
   @parent.arch_def
@@ -958,10 +958,10 @@ 

 
 
-278
+274

-
# File 'lib/arch_def.rb', line 278
+      
# File 'lib/arch_def.rb', line 274
 
 def base32_only? = @data.key?("base") && @data["base"] == 32
@@ -1013,10 +1013,10 @@

 
 
-275
+271

-
# File 'lib/arch_def.rb', line 275
+      
# File 'lib/arch_def.rb', line 271
 
 def base64_only? = @data.key?("base") && @data["base"] == 64
@@ -1068,10 +1068,10 @@

 
 
-281
+277

-
# File 'lib/arch_def.rb', line 281
+      
# File 'lib/arch_def.rb', line 277
 
 def defined_in_all_bases? = @data["base"].nil?
@@ -1123,14 +1123,14 @@

 
 
-197
-198
-199
-200
-201
+193 +194 +195 +196 +197

-
# File 'lib/arch_def.rb', line 197
+      
# File 'lib/arch_def.rb', line 193
 
 def dynamic_location?
   return false if @data.key?("location")
@@ -1186,12 +1186,12 @@ 

 
 
-188
-189
-190
+184 +185 +186

-
# File 'lib/arch_def.rb', line 188
+      
# File 'lib/arch_def.rb', line 184
 
 def has_custom_write?
   @data.key?("write(csr_value)") && !@data["write(csr_value)"].empty?
@@ -1267,6 +1267,10 @@ 

 
 
+240
+241
+242
+243
 244
 245
 246
@@ -1291,14 +1295,10 @@ 

265 266 267 -268 -269 -270 -271 -272

+268

-
# File 'lib/arch_def.rb', line 244
+      
# File 'lib/arch_def.rb', line 240
 
 def location(effective_xlen = nil)
   key =
@@ -1378,6 +1378,10 @@ 

 
 
+286
+287
+288
+289
 290
 291
 292
@@ -1398,14 +1402,10 @@ 

307 308 309 -310 -311 -312 -313 -314

+310

-
# File 'lib/arch_def.rb', line 290
+      
# File 'lib/arch_def.rb', line 286
 
 def location_pretty
   derangeify = proc { |loc|
@@ -1493,6 +1493,10 @@ 

 
 
+219
+220
+221
+222
 223
 224
 225
@@ -1506,14 +1510,10 @@ 

233 234 235 -236 -237 -238 -239 -240

+236

-
# File 'lib/arch_def.rb', line 223
+      
# File 'lib/arch_def.rb', line 219
 
 def reset_value
   return @reset_value unless @reset_value.nil?
@@ -1600,6 +1600,10 @@ 

 
 
+201
+202
+203
+204
 205
 206
 207
@@ -1610,14 +1614,10 @@ 

212 213 214 -215 -216 -217 -218 -219

+215

-
# File 'lib/arch_def.rb', line 205
+      
# File 'lib/arch_def.rb', line 201
 
 def reset_value_func
   raise "Not an IDL value" unless @data.key?("reset_value()")
@@ -1699,6 +1699,10 @@ 

 
 
+104
+105
+106
+107
 108
 109
 110
@@ -1745,14 +1749,10 @@ 

151 152 153 -154 -155 -156 -157 -158

+154

-
# File 'lib/arch_def.rb', line 108
+      
# File 'lib/arch_def.rb', line 104
 
 def type
   return @type unless @type.nil?
@@ -1854,12 +1854,12 @@ 

 
 
-347
-348
-349
+343 +344 +345

-
# File 'lib/arch_def.rb', line 347
+      
# File 'lib/arch_def.rb', line 343
 
 def type_desc
   TYPE_DESC_MAP[type]
@@ -1933,12 +1933,12 @@ 

 
 
-285
-286
-287
+281 +282 +283

-
# File 'lib/arch_def.rb', line 285
+      
# File 'lib/arch_def.rb', line 281
 
 def width(effective_xlen)
   location(effective_xlen).size
@@ -1953,7 +1953,7 @@ 

diff --git a/docs/ruby/CsrField/Alias.html b/docs/ruby/CsrField/Alias.html index 496f1f056..eba577280 100644 --- a/docs/ruby/CsrField/Alias.html +++ b/docs/ruby/CsrField/Alias.html @@ -218,10 +218,10 @@

 
 
-86
+82

-
# File 'lib/arch_def.rb', line 86
+      
# File 'lib/arch_def.rb', line 82
 
 Alias = Struct.new(:field, :range)
@@ -275,10 +275,10 @@

 
 
-86
+82

-
# File 'lib/arch_def.rb', line 86
+      
# File 'lib/arch_def.rb', line 82
 
 Alias = Struct.new(:field, :range)
@@ -292,7 +292,7 @@

diff --git a/docs/ruby/DecodeField.html b/docs/ruby/DecodeField.html index 316fad41e..4e16bd0bc 100644 --- a/docs/ruby/DecodeField.html +++ b/docs/ruby/DecodeField.html @@ -445,13 +445,6 @@

 
 
-229
-230
-231
-232
-233
-234
-235
 236
 237
 238
@@ -497,10 +490,17 @@ 

278 279 280 -281

+281 +282 +283 +284 +285 +286 +287 +288

-
# File 'lib/opcodes.rb', line 229
+      
# File 'lib/opcodes.rb', line 236
 
 def initialize(inst, name, decode_ring_key, field_data)
   raise "No field '#{name}', needed by #{inst.name}, in Opcodes module" unless Opcodes::DECODER_RING.key?(decode_ring_key)
@@ -598,12 +598,12 @@ 

 
 
-227
-228
-229
+234 +235 +236

-
# File 'lib/opcodes.rb', line 227
+      
# File 'lib/opcodes.rb', line 234
 
 def decode_variable
   @decode_variable
@@ -641,12 +641,12 @@ 

 
 
-220
-221
-222
+227 +228 +229

-
# File 'lib/opcodes.rb', line 220
+      
# File 'lib/opcodes.rb', line 227
 
 def name
   @name
@@ -696,12 +696,12 @@ 

 
 
-302
-303
-304
+309 +310 +311

-
# File 'lib/opcodes.rb', line 302
+      
# File 'lib/opcodes.rb', line 309
 
 def bits
   @field_data[:bits].is_a?(Range) ? [@field_data[:bits]] : @field_data[:bits]
@@ -748,12 +748,12 @@ 

 
 
-283
-284
-285
+290 +291 +292

-
# File 'lib/opcodes.rb', line 283
+      
# File 'lib/opcodes.rb', line 290
 
 def eql?(other)
   @name.eql?(other.name)
@@ -789,13 +789,6 @@ 

 
 
-326
-327
-328
-329
-330
-331
-332
 333
 334
 335
@@ -816,10 +809,17 @@ 

350 351 352 -353

+353 +354 +355 +356 +357 +358 +359 +360

-
# File 'lib/opcodes.rb', line 326
+      
# File 'lib/opcodes.rb', line 333
 
 def extract
   ops = []
@@ -869,12 +869,12 @@ 

 
 
-306
-307
-308
+313 +314 +315

-
# File 'lib/opcodes.rb', line 306
+      
# File 'lib/opcodes.rb', line 313
 
 def grouped_encoding_fields
   @encoding_fields
@@ -899,12 +899,12 @@ 

 
 
-287
-288
-289
+294 +295 +296

-
# File 'lib/opcodes.rb', line 287
+      
# File 'lib/opcodes.rb', line 294
 
 def hash
   @name.hash
@@ -953,12 +953,12 @@ 

 
 
-321
-322
-323
+328 +329 +330

-
# File 'lib/opcodes.rb', line 321
+      
# File 'lib/opcodes.rb', line 328
 
 def sext?
   @field_data[:sext] == true
@@ -994,12 +994,12 @@ 

 
 
-311
-312
-313
+318 +319 +320

-
# File 'lib/opcodes.rb', line 311
+      
# File 'lib/opcodes.rb', line 318
 
 def size
   size_in_encoding + (@field_data.key?(:lshift) ? @field_data[:lshift] : 0)
@@ -1035,12 +1035,12 @@ 

 
 
-316
-317
-318
+323 +324 +325

-
# File 'lib/opcodes.rb', line 316
+      
# File 'lib/opcodes.rb', line 323
 
 def size_in_encoding
   bits.reduce(0) { |sum, f| sum + (f.is_a?(Integer) ? 1 : f.size) }
@@ -1089,12 +1089,12 @@ 

 
 
-292
-293
-294
+299 +300 +301

-
# File 'lib/opcodes.rb', line 292
+      
# File 'lib/opcodes.rb', line 299
 
 def split?
   encoding_fields.size > 1
@@ -1109,7 +1109,7 @@ 

diff --git a/docs/ruby/DecodeVariable.html b/docs/ruby/DecodeVariable.html index 4f7310cb8..1a27e1dcd 100644 --- a/docs/ruby/DecodeVariable.html +++ b/docs/ruby/DecodeVariable.html @@ -290,7 +290,7 @@

  • - #extract_location(location_string) ⇒ Object + #extract_location(location) ⇒ Object @@ -531,23 +531,23 @@

     
     
    -136
    -137
    -138
    -139
    -140
    -141
    -142
     143
     144
     145
     146
     147
     148
    -149
    +149 +150 +151 +152 +153 +154 +155 +156

  • -
    # File 'lib/opcodes.rb', line 136
    +      
    # File 'lib/opcodes.rb', line 143
     
     def initialize(inst, field_data)
       @inst = inst
    @@ -746,14 +746,14 @@ 

     
     
    -170
    -171
    -172
    -173
    -174
    +177 +178 +179 +180 +181

    -
    # File 'lib/opcodes.rb', line 170
    +      
    # File 'lib/opcodes.rb', line 177
     
     def bits
       @encoding_fields.map do |ef|
    @@ -802,12 +802,12 @@ 

     
     
    -151
    -152
    -153
    +158 +159 +160

    -
    # File 'lib/opcodes.rb', line 151
    +      
    # File 'lib/opcodes.rb', line 158
     
     def eql?(other)
       @name.eql?(other.name)
    @@ -843,13 +843,6 @@ 

     
     
    -192
    -193
    -194
    -195
    -196
    -197
    -198
     199
     200
     201
    @@ -866,10 +859,17 @@ 

    212 213 214 -215

    +215 +216 +217 +218 +219 +220 +221 +222

    -
    # File 'lib/opcodes.rb', line 192
    +      
    # File 'lib/opcodes.rb', line 199
     
     def extract
       ops = []
    @@ -903,7 +903,7 @@ 

    - #extract_location(location_string) ⇒ Object + #extract_location(location) ⇒ Object @@ -932,14 +932,28 @@

    72 73 74 -75

    +75 +76 +77 +78 +79 +80 +81 +82
    # File 'lib/opcodes.rb', line 58
     
    -def extract_location(location_string)
    -  parts = location_string.split("|")
    +def extract_location(location)
       @encoding_fields = []
    +
    +  if location.is_a?(Integer)
    +    @encoding_fields << EncodingField.new("", location..location)
    +    return
    +  end
    +
    +  location_string = location
    +  parts = location_string.split("|")
       parts.each do |part|
         if part =~ /^([0-9]+)$/
           bit = ::Regexp.last_match(1)
    @@ -986,13 +1000,6 @@ 

     
     
    -112
    -113
    -114
    -115
    -116
    -117
    -118
     119
     120
     121
    @@ -1008,10 +1015,17 @@ 

    131 132 133 -134

    +134 +135 +136 +137 +138 +139 +140 +141

    -
    # File 'lib/opcodes.rb', line 112
    +      
    # File 'lib/opcodes.rb', line 119
     
     def grouped_encoding_fields
       sorted_encoding_fields = @encoding_fields.sort { |a, b| b.range.last <=> a.range.last }
    @@ -1056,12 +1070,12 @@ 

     
     
    -155
    -156
    -157
    +162 +163 +164

    -
    # File 'lib/opcodes.rb', line 155
    +      
    # File 'lib/opcodes.rb', line 162
     
     def hash
       @name.hash
    @@ -1086,22 +1100,22 @@ 

     
     
    -77
    -78
    -79
    -80
    -81
    -82
    -83
     84
     85
     86
     87
     88
    -89
    +89 +90 +91 +92 +93 +94 +95 +96

    -
    # File 'lib/opcodes.rb', line 77
    +      
    # File 'lib/opcodes.rb', line 84
     
     def inst_pos_to_var_pos
       s = size
    @@ -1160,12 +1174,12 @@ 

     
     
    -187
    -188
    -189
    +194 +195 +196

    -
    # File 'lib/opcodes.rb', line 187
    +      
    # File 'lib/opcodes.rb', line 194
     
     def sext?
       @sext
    @@ -1201,12 +1215,12 @@ 

     
     
    -177
    -178
    -179
    +184 +185 +186

    -
    # File 'lib/opcodes.rb', line 177
    +      
    # File 'lib/opcodes.rb', line 184
     
     def size
       size_in_encoding + @left_shift
    @@ -1242,12 +1256,12 @@ 

     
     
    -182
    -183
    -184
    +189 +190 +191

    -
    # File 'lib/opcodes.rb', line 182
    +      
    # File 'lib/opcodes.rb', line 189
     
     def size_in_encoding
       bits.reduce(0) { |sum, f| sum + (f.is_a?(Integer) ? 1 : f.size) }
    @@ -1296,12 +1310,12 @@ 

     
     
    -160
    -161
    -162
    +167 +168 +169

    -
    # File 'lib/opcodes.rb', line 160
    +      
    # File 'lib/opcodes.rb', line 167
     
     def split?
       @encoding_fields.size > 1
    @@ -1316,7 +1330,7 @@ 

    diff --git a/docs/ruby/EncodingField.html b/docs/ruby/EncodingField.html index 6887fe6dc..70a77bc0a 100644 --- a/docs/ruby/EncodingField.html +++ b/docs/ruby/EncodingField.html @@ -680,7 +680,7 @@

    diff --git a/docs/ruby/Extension.html b/docs/ruby/Extension.html index 19c088a2b..036e5078c 100644 --- a/docs/ruby/Extension.html +++ b/docs/ruby/Extension.html @@ -164,7 +164,7 @@

  • - #implies ⇒ Array<String> + #implies(version_requirement = ">= 0") ⇒ Array<ExtensionVersion> @@ -179,7 +179,7 @@

    -

    Array of extensions implied by this one.

    +

    Array of extensions implied by any version of this extension meeting version_requirement.

  • @@ -208,6 +208,30 @@

    A new instance of Extension.

    + + + +
  • + + + #instructions ⇒ Object + + + + + + + + + + + + + +
    +

    returns the list of instructions implemented by this extension.

    +
    +
  • @@ -282,13 +306,13 @@

     
     
    -1151
    -1152
    -1153
    -1154
    +1192 +1193 +1194 +1195

    -
    # File 'lib/arch_def.rb', line 1151
    +      
    # File 'lib/arch_def.rb', line 1192
     
     def initialize(ext_data, arch_def)
       super(ext_data)
    @@ -360,12 +384,12 @@ 

     
     
    -1147
    -1148
    -1149
    +1188 +1189 +1190

    -
    # File 'lib/arch_def.rb', line 1147
    +      
    # File 'lib/arch_def.rb', line 1188
     
     def arch_def
       @arch_def
    @@ -385,7 +409,7 @@ 

    Instance Method Details

    - #impliesArray<String> + #implies(version_requirement = ">= 0") ⇒ Array<ExtensionVersion> @@ -394,26 +418,48 @@

    -

    Returns Array of extensions implied by this one.

    +

    Returns Array of extensions implied by any version of this extension meeting version_requirement.

    +

    Parameters:

    +
      +
    • + + version_requirement + + + (String) + + + (defaults to: ">= 0") + + + — +
      +

      Version requirement

      +
      + +
    • + +
    +

    Returns:

    • - (Array<String>) + (Array<ExtensionVersion>)
      -

      Array of extensions implied by this one

      +

      Array of extensions implied by any version of this extension meeting version_requirement

    • @@ -426,29 +472,86 @@

       
       
      -1157
      -1158
      -1159
      -1160
      -1161
      -1162
      -1163
      -1164
      -1165
      -1166
      +1199 +1200 +1201 +1202 +1203 +1204 +1205 +1206 +1207 +1208 +1209 +1210 +1211 +1212 +1213 +1214 +1215 +1216

    -
    # File 'lib/arch_def.rb', line 1157
    -
    -def implies
    -  case @data["implies"]
    -  when nil
    -    []
    -  when Array
    -    @data["implies"]
    -  else
    -    [@data["implies"]]
    +      
    # File 'lib/arch_def.rb', line 1199
    +
    +def implies(version_requirement = ">= 0")
    +  implications = []
    +  @data["versions"].each do |v|
    +    next unless Gem::Requirement.new(version_requirement).satisfied_by?(Gem::Version.new(v["version"]))
    +
    +    case v["implies"]
    +    when nil
    +      next
    +    when Array
    +      if v["implies"][0].is_a?(Array)
    +        implications += v["implies"].map { |e| ExtensionVersion.new(e[0], e[1])}
    +      else
    +        implications << ExtensionVersion.new(v["implies"][0], v["implies"][1])
    +      end
    +    end
       end
    +  implications
    +end
    + + + + + +
    +

    + + #instructionsObject + + + + + +

    +
    + +

    returns the list of instructions implemented by this extension

    + + +
    +
    +
    + + +
    + + + @@ -460,7 +563,7 @@

    diff --git a/docs/ruby/ExtensionVersion.html b/docs/ruby/ExtensionVersion.html index 6bbc1456e..67fc0b0aa 100644 --- a/docs/ruby/ExtensionVersion.html +++ b/docs/ruby/ExtensionVersion.html @@ -117,64 +117,6 @@

    Overview

    Instance Attribute Summary collapse

    @@ -455,129 +393,7 @@

    Instance Attribute Details

    -

    - - #arch_defArchDef (readonly) - - - - - -

    -
    - -

    Returns Owning ArchDef.

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (ArchDef) - - - - — -
      -

      Owning ArchDef

      -
      - -
    • - -
    - -
    +
    +
    +
    +1219
    +1220
    +1221
    +
    +
    # File 'lib/arch_def.rb', line 1219
    +
    +def instructions
    +  arch_def.instructions.select { |i| i.definedBy == name || (i.definedBy.is_a?(Array) && i.definedBy.include?(name)) }
     end
    -
    # File 'lib/arch_def.rb', line 1186
    +      
    # File 'lib/arch_def.rb', line 1236
     
    -def initialize(name, version, arch_def)
    +def initialize(name, version)
       @name = name.to_s
       @version = Gem::Version.new(version)
    -  @arch_def = arch_def
    -  @extension = @arch_def.extension(@name)
     end
    - - - - -
    -
    -
    -
    -1178
    -1179
    -1180
    -
    -
    # File 'lib/arch_def.rb', line 1178
    -
    -def arch_def
    -  @arch_def
    -end
    -
    -
    - - - -
    -

    - - #extensionExtension (readonly) - - - - - -

    -
    - -

    Returns The full definition of the extension (all versions).

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Extension) - - - - — -
      -

      The full definition of the extension (all versions)

      -
      - -
    • - -
    - -
    - - - - -
    -
    -
    -
    -1181
    -1182
    -1183
    -
    -
    # File 'lib/arch_def.rb', line 1181
    -
    -def extension
    -  @extension
    -end
    -
    -
    - - - -
    -

    +

    #nameString (readonly) @@ -620,12 +436,12 @@

     
     
    -1172
    -1173
    -1174
    +1227 +1228 +1229

    -
    # File 'lib/arch_def.rb', line 1172
    +      
    # File 'lib/arch_def.rb', line 1227
     
     def name
       @name
    @@ -681,12 +497,12 @@ 

     
     
    -1175
    -1176
    -1177
    +1230 +1231 +1232

    -
    # File 'lib/arch_def.rb', line 1175
    +      
    # File 'lib/arch_def.rb', line 1230
     
     def version
       @version
    @@ -742,18 +558,18 @@ 

     
     
    -1219
    -1220
    -1221
    -1222
    -1223
    -1224
    -1225
    -1226
    -1227
    +1267 +1268 +1269 +1270 +1271 +1272 +1273 +1274 +1275

    -
    # File 'lib/arch_def.rb', line 1219
    +      
    # File 'lib/arch_def.rb', line 1267
     
     def <=>(other)
       raise ArgumentError, "ExtensionVersions are only comparable to other extension versions" unless other.is_a?(ExtensionVersion)
    @@ -784,19 +600,19 @@ 

     
     
    -1199
    -1200
    -1201
    -1202
    -1203
    -1204
    -1205
    -1206
    -1207
    -1208
    +1247 +1248 +1249 +1250 +1251 +1252 +1253 +1254 +1255 +1256

    -
    # File 'lib/arch_def.rb', line 1199
    +      
    # File 'lib/arch_def.rb', line 1247
     
     def ==(other)
       case other
    @@ -900,12 +716,12 @@ 

     
     
    -1214
    -1215
    -1216
    +1262 +1263 +1264

    -
    # File 'lib/arch_def.rb', line 1214
    +      
    # File 'lib/arch_def.rb', line 1262
     
     def satisfies?(ext_name, *ext_version_requirements)
       @name == ext_name && Gem::Requirement.new(ext_version_requirements).satisfied_by?(@version)
    @@ -920,7 +736,7 @@ 

    diff --git a/docs/ruby/Idl.html b/docs/ruby/Idl.html index e3b546ace..d55482634 100644 --- a/docs/ruby/Idl.html +++ b/docs/ruby/Idl.html @@ -89,11 +89,11 @@

    Defined Under Namespace

    - Modules: AstNodeFuncs, Declaration, Executable, FunctionStatementAst, IntAst, Returns, Rvalue, VarReadExpressionAst + Modules: AstNodeFuncs, Declaration, Executable, IntLiteralSyntaxNode, Returns, Rvalue - Classes: ArrayLiteralAst, AryAccessSyntaxNode, AryElementAccessAst, AryElementAssignmentAst, AryRangeAccessAst, AryRangeAssignmentAst, AssignmentAst, AstNode, BinaryExpressionAst, BinaryExpressionRightSyntaxNode, BitfieldAccessExpressionAst, BitfieldDefinitionAst, BitfieldType, BitsCastAst, BitsTypeAst, BuiltinEnumDefinitionAst, BuiltinTypeNameAst, Compiler, ConcatenationExpressionAst, ConditionalReturnStatementAst, ConditionalStatementAst, ConditionalStatementSyntaxNode, CsrFieldReadExpressionAst, CsrReadExpressionAst, CsrSoftwareReadAst, CsrSoftwareWriteAst, CsrType, CsrWriteAst, DontCareLvalueAst, DontCareReturnAst, ElseIfAst, EnumDefinitionAst, EnumRefAst, EnumerationType, ExecutionCommentAst, FieldAssignmentAst, FieldNameAst, ForLoopAst, FunctionBodyAst, FunctionBodySyntaxNode, FunctionCallExpressionAst, FunctionDefAst, FunctionType, GlobalAst, GlobalWithInitializationAst, IdAst, IfAst, IfBodyAst, IfSyntaxNode, InstructionOperationAst, IsaAst, MultiVariableAssignmentAst, MultiVariableDeclarationAst, NoopAst, ParenExpressionAst, PostDecrementExpressionAst, PostIncrementExpressionAst, ReplicationExpressionAst, ReturnStatementAst, SignCastAst, StatementAst, StatementSyntaxNode, SymbolTable, TernaryOperatorExpressionAst, Type, UnaryOperatorExpressionAst, UserTypeNameAst, Var, VariableAssignmentAst, VariableDeclarationAst, VariableDeclarationWithInitializationAst, XregType + Classes: ArrayLiteralAst, AryAccessSyntaxNode, AryElementAccessAst, AryElementAssignmentAst, AryElementAssignmentSyntaxNode, AryRangeAccessAst, AryRangeAssignmentAst, AssignmentAst, AstNode, BinaryExpressionAst, BinaryExpressionRightSyntaxNode, BitfieldAccessExpressionAst, BitfieldDefinitionAst, BitfieldType, BitsCastAst, BuiltinEnumDefinitionAst, BuiltinTypeNameAst, BuiltinTypeNameSyntaxNode, BuiltinVariableAst, BuiltinVariableSyntaxNode, Compiler, ConcatenationExpressionAst, ConditionalReturnStatementAst, ConditionalStatementAst, ConditionalStatementSyntaxNode, CsrFieldReadExpressionAst, CsrReadExpressionAst, CsrSoftwareReadAst, CsrSoftwareWriteAst, CsrType, CsrWriteAst, DontCareLvalueAst, DontCareReturnAst, DontCareReturnSyntaxNode, ElseIfAst, EnumDefinitionAst, EnumRefAst, EnumRefSyntaxNode, EnumerationType, ExecutionCommentAst, FieldAssignmentAst, FieldNameAst, ForLoopAst, ForLoopSyntaxNode, FunctionBodyAst, FunctionBodySyntaxNode, FunctionCallExpressionAst, FunctionCallExpressionSyntaxNode, FunctionDefAst, FunctionType, GlobalAst, GlobalWithInitializationAst, IdAst, IdSyntaxNode, IfAst, IfBodyAst, IfSyntaxNode, InstructionOperationAst, InstructionOperationSyntaxNode, IntLiteralAst, IsaAst, MultiVariableAssignmentAst, MultiVariableDeclarationAst, NoopAst, ParenExpressionAst, ParenExpressionSyntaxNode, PostDecrementExpressionAst, PostIncrementExpressionAst, ReplicationExpressionAst, ReplicationExpressionSyntaxNode, ReturnStatementAst, SignCastAst, SignCastSyntaxNode, StatementAst, StatementSyntaxNode, SymbolTable, TernaryOperatorExpressionAst, TernaryOperatorExpressionSyntaxNode, Type, UnaryOperatorExpressionAst, UserTypeNameAst, Var, VariableAssignmentAst, VariableAssignmentSyntaxNode, VariableDeclarationAst, VariableDeclarationWithInitializationAst, VariableDeclarationWithInitializationSyntaxNode, XregType

    @@ -109,7 +109,7 @@

    Defined Under Namespace

    diff --git a/docs/ruby/Idl/ArrayLiteralAst.html b/docs/ruby/Idl/ArrayLiteralAst.html index 1fb9b5bc4..ac8d205b0 100644 --- a/docs/ruby/Idl/ArrayLiteralAst.html +++ b/docs/ruby/Idl/ArrayLiteralAst.html @@ -296,12 +296,12 @@

     
     
    -1872
    -1873
    -1874
    +1948 +1949 +1950

    -
    # File 'lib/idl/ast.rb', line 1872
    +      
    # File 'lib/idl/ast.rb', line 1948
     
     def element_nodes
       [first] + rest.elements.map(&:expression)
    @@ -326,10 +326,10 @@ 

     
     
    -1895
    +1971

    -
    # File 'lib/idl/ast.rb', line 1895
    +      
    # File 'lib/idl/ast.rb', line 1971
     
     def to_idl = "[#{element_nodes.map(&:to_idl).join(',')}]"
    @@ -352,12 +352,12 @@

     
     
    -1887
    -1888
    -1889
    +1963 +1964 +1965

    -
    # File 'lib/idl/ast.rb', line 1887
    +      
    # File 'lib/idl/ast.rb', line 1963
     
     def type(symtab)
       Type.new(:array, width: element_nodes.size, sub_type: element_nodes[0].type(symtab))
    @@ -447,18 +447,18 @@ 

     
     
    -1877
    -1878
    -1879
    -1880
    -1881
    -1882
    -1883
    -1884
    -1885
    +1953 +1954 +1955 +1956 +1957 +1958 +1959 +1960 +1961

    -
    # File 'lib/idl/ast.rb', line 1877
    +      
    # File 'lib/idl/ast.rb', line 1953
     
     def type_check(symtab)
       element_nodes.each do |node|
    @@ -489,12 +489,12 @@ 

     
     
    -1891
    -1892
    -1893
    +1967 +1968 +1969

    -
    # File 'lib/idl/ast.rb', line 1891
    +      
    # File 'lib/idl/ast.rb', line 1967
     
     def value(symtab)
       element_nodes.map { |e| e.value(symtab) }
    @@ -605,7 +605,7 @@ 

    diff --git a/docs/ruby/Idl/AryAccess.html b/docs/ruby/Idl/AryAccessSyntaxNode.html similarity index 89% rename from docs/ruby/Idl/AryAccess.html rename to docs/ruby/Idl/AryAccessSyntaxNode.html index 5c5200d85..e6d19d4f7 100644 --- a/docs/ruby/Idl/AryAccess.html +++ b/docs/ruby/Idl/AryAccessSyntaxNode.html @@ -4,7 +4,7 @@ - Class: Idl::AryAccess + Class: Idl::AryAccessSyntaxNode — Documentation by YARD 0.9.36 @@ -15,7 +15,7 @@ <link rel="stylesheet" href="../css/common.css" type="text/css" /> <script type="text/javascript"> - pathId = "Idl::AryAccess"; + pathId = "Idl::AryAccessSyntaxNode"; relpath = '../'; </script> @@ -39,7 +39,7 @@ <a href="../_index.html">Index (A)</a> » <span class='title'><span class='object_link'><a href="../Idl.html" title="Idl (module)">Idl</a></span></span> » - <span class="title">AryAccess</span> + <span class="title">AryAccessSyntaxNode</span> </div> @@ -59,7 +59,7 @@ <div class="clear"></div> </div> - <div id="content"><h1>Class: Idl::AryAccess + <div id="content"><h1>Class: Idl::AryAccessSyntaxNode @@ -76,7 +76,7 @@ <li class="next"><span class='object_link'><a href="../Treetop/Runtime/SyntaxNode.html" title="Treetop::Runtime::SyntaxNode (class)">Treetop::Runtime::SyntaxNode</a></span></li> - <li class="next">Idl::AryAccess</li> + <li class="next">Idl::AryAccessSyntaxNode</li> </ul> <a href="#" class="inheritanceTree">show all</a> @@ -135,7 +135,7 @@ <h2> <li class="public "> <span class="summary_signature"> - <a href="#make_left-instance_method" title="#make_left (instance method)">#<strong>make_left</strong> ⇒ AstNode </a> + <a href="#to_ast-instance_method" title="#to_ast (instance method)">#<strong>to_ast</strong> ⇒ AstNode </a> @@ -192,9 +192,9 @@ <h2>Instance Method Details</h2> <div class="method_details first"> - <h3 class="signature first" id="make_left-instance_method"> + <h3 class="signature first" id="to_ast-instance_method"> - #<strong>make_left</strong> ⇒ <tt><span class='object_link'><a href="AstNode.html" title="Idl::AstNode (class)">AstNode</a></span></tt> + #<strong>to_ast</strong> ⇒ <tt><span class='object_link'><a href="AstNode.html" title="Idl::AstNode (class)">AstNode</a></span></tt> @@ -235,35 +235,35 @@ <h3 class="signature first" id="make_left-instance_method"> <pre class="lines"> -751 -752 -753 -754 -755 -756 -757 -758 -759 -760 -761 -762 -763 -764 -765 -766</pre> +792 +793 +794 +795 +796 +797 +798 +799 +800 +801 +802 +803 +804 +805 +806 +807</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 751</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 792</span> -<span class='kw'>def</span> <span class='id identifier rubyid_make_left'>make_left</span> - <span class='id identifier rubyid_var'>var</span> <span class='op'>=</span> <span class='id identifier rubyid_a'>a</span><span class='period'>.</span><span class='id identifier rubyid_make_left'>make_left</span> +<span class='kw'>def</span> <span class='id identifier rubyid_to_ast'>to_ast</span> + <span class='id identifier rubyid_var'>var</span> <span class='op'>=</span> <span class='id identifier rubyid_a'>a</span><span class='period'>.</span><span class='id identifier rubyid_to_ast'>to_ast</span> <span class='id identifier rubyid_interval_start'>interval_start</span> <span class='op'>=</span> <span class='id identifier rubyid_interval'>interval</span><span class='period'>.</span><span class='id identifier rubyid_begin'>begin</span> <span class='id identifier rubyid_brackets'>brackets</span><span class='period'>.</span><span class='id identifier rubyid_elements'>elements</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_bracket'>bracket</span><span class='op'>|</span> <span class='id identifier rubyid_var'>var</span> <span class='op'>=</span> <span class='kw'>if</span> <span class='id identifier rubyid_bracket'>bracket</span><span class='period'>.</span><span class='id identifier rubyid_msb'>msb</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> - <span class='const'><span class='object_link'><a href="AryElementAccessAst.html" title="Idl::AryElementAccessAst (class)">AryElementAccessAst</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="AryElementAccessAst.html#initialize-instance_method" title="Idl::AryElementAccessAst#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_input'>input</span><span class='comma'>,</span> <span class='id identifier rubyid_interval_start'>interval_start</span><span class='op'>...</span><span class='id identifier rubyid_bracket'>bracket</span><span class='period'>.</span><span class='id identifier rubyid_interval'>interval</span><span class='period'>.</span><span class='id identifier rubyid_end'>end</span><span class='comma'>,</span> <span class='id identifier rubyid_var'>var</span><span class='comma'>,</span> <span class='id identifier rubyid_bracket'>bracket</span><span class='period'>.</span><span class='id identifier rubyid_lsb'>lsb</span><span class='period'>.</span><span class='id identifier rubyid_make_left'>make_left</span><span class='rparen'>)</span> + <span class='const'><span class='object_link'><a href="AryElementAccessAst.html" title="Idl::AryElementAccessAst (class)">AryElementAccessAst</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="AryElementAccessAst.html#initialize-instance_method" title="Idl::AryElementAccessAst#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_input'>input</span><span class='comma'>,</span> <span class='id identifier rubyid_interval_start'>interval_start</span><span class='op'>...</span><span class='id identifier rubyid_bracket'>bracket</span><span class='period'>.</span><span class='id identifier rubyid_interval'>interval</span><span class='period'>.</span><span class='id identifier rubyid_end'>end</span><span class='comma'>,</span> <span class='id identifier rubyid_var'>var</span><span class='comma'>,</span> <span class='id identifier rubyid_bracket'>bracket</span><span class='period'>.</span><span class='id identifier rubyid_lsb'>lsb</span><span class='period'>.</span><span class='id identifier rubyid_to_ast'>to_ast</span><span class='rparen'>)</span> <span class='kw'>else</span> <span class='const'><span class='object_link'><a href="AryRangeAccessAst.html" title="Idl::AryRangeAccessAst (class)">AryRangeAccessAst</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="AryRangeAccessAst.html#initialize-instance_method" title="Idl::AryRangeAccessAst#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_input'>input</span><span class='comma'>,</span> <span class='id identifier rubyid_interval_start'>interval_start</span><span class='op'>...</span><span class='id identifier rubyid_bracket'>bracket</span><span class='period'>.</span><span class='id identifier rubyid_interval'>interval</span><span class='period'>.</span><span class='id identifier rubyid_end'>end</span><span class='comma'>,</span> <span class='id identifier rubyid_var'>var</span><span class='comma'>,</span> - <span class='id identifier rubyid_bracket'>bracket</span><span class='period'>.</span><span class='id identifier rubyid_msb'>msb</span><span class='period'>.</span><span class='id identifier rubyid_expression'>expression</span><span class='period'>.</span><span class='id identifier rubyid_make_left'>make_left</span><span class='comma'>,</span> <span class='id identifier rubyid_bracket'>bracket</span><span class='period'>.</span><span class='id identifier rubyid_lsb'>lsb</span><span class='period'>.</span><span class='id identifier rubyid_make_left'>make_left</span><span class='rparen'>)</span> + <span class='id identifier rubyid_bracket'>bracket</span><span class='period'>.</span><span class='id identifier rubyid_msb'>msb</span><span class='period'>.</span><span class='id identifier rubyid_expression'>expression</span><span class='period'>.</span><span class='id identifier rubyid_to_ast'>to_ast</span><span class='comma'>,</span> <span class='id identifier rubyid_bracket'>bracket</span><span class='period'>.</span><span class='id identifier rubyid_lsb'>lsb</span><span class='period'>.</span><span class='id identifier rubyid_to_ast'>to_ast</span><span class='rparen'>)</span> <span class='kw'>end</span> <span class='id identifier rubyid_interval_start'>interval_start</span> <span class='op'>=</span> <span class='id identifier rubyid_bracket'>bracket</span><span class='period'>.</span><span class='id identifier rubyid_interval'>interval</span><span class='period'>.</span><span class='id identifier rubyid_end'>end</span> <span class='kw'>end</span> @@ -320,16 +320,16 @@ <h3 class="signature " id="to_idl-instance_method"> <pre class="lines"> -769 -770 -771 -772 -773 -774 -775</pre> +810 +811 +812 +813 +814 +815 +816</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 769</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 810</span> <span class='kw'>def</span> <span class='id identifier rubyid_to_idl'>to_idl</span> <span class='kw'>if</span> <span class='id identifier rubyid_bracket'>bracket</span><span class='period'>.</span><span class='id identifier rubyid_msb'>msb</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> @@ -348,7 +348,7 @@ <h3 class="signature " id="to_idl-instance_method"> </div> <div id="footer"> - Generated on Fri Jul 12 07:33:10 2024 by + Generated on Thu Jul 18 13:55:45 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.36 (ruby-3.2.3). </div> diff --git a/docs/ruby/Idl/AryElementAccessAst.html b/docs/ruby/Idl/AryElementAccessAst.html index b12f37233..d0d13617a 100644 --- a/docs/ruby/Idl/AryElementAccessAst.html +++ b/docs/ruby/Idl/AryElementAccessAst.html @@ -419,14 +419,14 @@ <h3 class="signature first" id="initialize-instance_method"> <pre class="lines"> -812 -813 -814 -815 -816</pre> +824 +825 +826 +827 +828</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 812</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 824</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_input'>input</span><span class='comma'>,</span> <span class='id identifier rubyid_interval'>interval</span><span class='comma'>,</span> <span class='id identifier rubyid_var'>var</span><span class='comma'>,</span> <span class='id identifier rubyid_index'>index</span><span class='rparen'>)</span> <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_input'>input</span><span class='comma'>,</span> <span class='id identifier rubyid_interval'>interval</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_var'>var</span><span class='comma'>,</span> <span class='id identifier rubyid_index'>index</span><span class='rbracket'>]</span><span class='rparen'>)</span> @@ -471,12 +471,12 @@ <h3 class="signature first" id="index-instance_method"> <pre class="lines"> -810 -811 -812</pre> +822 +823 +824</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 810</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 822</span> <span class='kw'>def</span> <span class='id identifier rubyid_index'>index</span> <span class='ivar'>@index</span> @@ -514,12 +514,12 @@ <h3 class="signature " id="var-instance_method"> <pre class="lines"> -810 -811 -812</pre> +822 +823 +824</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 810</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 822</span> <span class='kw'>def</span> <span class='id identifier rubyid_var'>var</span> <span class='ivar'>@var</span> @@ -551,12 +551,12 @@ <h3 class="signature first" id="gen_adoc-instance_method"> <pre class="lines"> -48 -49 -50</pre> +122 +123 +124</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/passes/gen_adoc.rb', line 48</span> + <pre class="code"><span class="info file"># File 'lib/idl/passes/gen_adoc.rb', line 122</span> <span class='kw'>def</span> <span class='id identifier rubyid_gen_adoc'>gen_adoc</span><span class='lparen'>(</span><span class='id identifier rubyid_indent'>indent</span> <span class='op'>=</span> <span class='int'>0</span><span class='comma'>,</span> <span class='label'>indent_spaces:</span> <span class='int'>2</span><span class='rparen'>)</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_var'>var</span><span class='period'>.</span><span class='id identifier rubyid_gen_adoc'>gen_adoc</span><span class='lparen'>(</span><span class='id identifier rubyid_indent'>indent</span><span class='comma'>,</span> <span class='label'>indent_spaces:</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>[</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_index'>index</span><span class='period'>.</span><span class='id identifier rubyid_gen_adoc'>gen_adoc</span><span class='lparen'>(</span><span class='int'>0</span><span class='comma'>,</span> <span class='label'>indent_spaces:</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>]</span><span class='tstring_end'>"</span></span> @@ -581,12 +581,12 @@ <h3 class="signature " id="prune-instance_method"> <pre class="lines"> -91 -92 -93</pre> +106 +107 +108</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/passes/prune.rb', line 91</span> + <pre class="code"><span class="info file"># File 'lib/idl/passes/prune.rb', line 106</span> <span class='kw'>def</span> <span class='id identifier rubyid_prune'>prune</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> <span class='const'><span class='object_link'><a href="" title="Idl::AryElementAccessAst (class)">AryElementAccessAst</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Idl::AryElementAccessAst#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_input'>input</span><span class='comma'>,</span> <span class='id identifier rubyid_interval'>interval</span><span class='comma'>,</span> <span class='ivar'>@var</span><span class='period'>.</span><span class='id identifier rubyid_prune'>prune</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='ivar'>@index</span><span class='period'>.</span><span class='id identifier rubyid_prune'>prune</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='rparen'>)</span> @@ -640,10 +640,10 @@ <h3 class="signature " id="to_idl-instance_method"> <pre class="lines"> -879</pre> +891</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 879</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 891</span> <span class='kw'>def</span> <span class='id identifier rubyid_to_idl'>to_idl</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='ivar'>@var</span><span class='period'>.</span><span class='id identifier rubyid_to_idl'>to_idl</span><span class='embexpr_end'>}</span><span class='tstring_content'>[</span><span class='embexpr_beg'>#{</span><span class='ivar'>@index</span><span class='period'>.</span><span class='id identifier rubyid_to_idl'>to_idl</span><span class='embexpr_end'>}</span><span class='tstring_content'>]</span><span class='tstring_end'>"</span></span></pre> </td> @@ -666,18 +666,18 @@ <h3 class="signature " id="type-instance_method"> <pre class="lines"> -850 -851 -852 -853 -854 -855 -856 -857 -858</pre> +862 +863 +864 +865 +866 +867 +868 +869 +870</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 850</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 862</span> <span class='kw'>def</span> <span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='ivar'>@var</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_kind'>kind</span> <span class='op'>==</span> <span class='symbol'>:array</span> @@ -773,18 +773,6 @@ <h3 class="signature " id="type_check-instance_method"> <pre class="lines"> -819 -820 -821 -822 -823 -824 -825 -826 -827 -828 -829 -830 831 832 833 @@ -802,10 +790,22 @@ <h3 class="signature " id="type_check-instance_method"> 845 846 847 -848</pre> +848 +849 +850 +851 +852 +853 +854 +855 +856 +857 +858 +859 +860</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 819</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 831</span> <span class='kw'>def</span> <span class='id identifier rubyid_type_check'>type_check</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> <span class='ivar'>@var</span><span class='period'>.</span><span class='id identifier rubyid_type_check'>type_check</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> @@ -857,26 +857,26 @@ <h3 class="signature " id="value-instance_method"> <pre class="lines"> -860 -861 -862 -863 -864 -865 -866 -867 -868 -869 -870 -871 872 873 874 875 -876</pre> +876 +877 +878 +879 +880 +881 +882 +883 +884 +885 +886 +887 +888</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 860</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 872</span> <span class='kw'>def</span> <span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='ivar'>@var</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_integral?'>integral?</span> @@ -1001,7 +1001,7 @@ <h3 class="signature " id="values-instance_method"> </div> <div id="footer"> - Generated on Tue Jul 16 12:06:46 2024 by + Generated on Thu Jul 18 13:55:45 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.36 (ruby-3.2.3). </div> diff --git a/docs/ruby/Idl/AryElementAssignmentAst.html b/docs/ruby/Idl/AryElementAssignmentAst.html index f9a0c0fce..25f3f39c8 100644 --- a/docs/ruby/Idl/AryElementAssignmentAst.html +++ b/docs/ruby/Idl/AryElementAssignmentAst.html @@ -69,7 +69,7 @@ <dl> <dt>Inherits:</dt> <dd> - <span class="inheritName"><span class='object_link'><a href="AssignmentAst.html" title="Idl::AssignmentAst (class)">AssignmentAst</a></span></span> + <span class="inheritName"><span class='object_link'><a href="AstNode.html" title="Idl::AstNode (class)">AstNode</a></span></span> <ul class="fullTree"> <li>Object</li> @@ -78,8 +78,6 @@ <li class="next"><span class='object_link'><a href="AstNode.html" title="Idl::AstNode (class)">AstNode</a></span></li> - <li class="next"><span class='object_link'><a href="AssignmentAst.html" title="Idl::AssignmentAst (class)">AssignmentAst</a></span></li> - <li class="next">Idl::AryElementAssignmentAst</li> </ul> @@ -100,7 +98,9 @@ <dl> <dt>Defined in:</dt> - <dd>lib/idl/ast.rb</dd> + <dd>lib/idl/ast.rb<span class="defines">,<br /> + lib/idl/passes/gen_adoc.rb</span> +</dd> </dl> </div> @@ -125,6 +125,98 @@ <h2>Overview</h2><div class="docstring"> + <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2> + <ul class="summary"> + + <li class="public "> + <span class="summary_signature"> + + <a href="#idx-instance_method" title="#idx (instance method)">#<strong>idx</strong> ⇒ Object </a> + + + + </span> + + + + + <span class="note title readonly">readonly</span> + + + + + + + + + + <span class="summary_desc"><div class='inline'> +<p>Returns the value of attribute idx.</p> +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#lhs-instance_method" title="#lhs (instance method)">#<strong>lhs</strong> ⇒ Object </a> + + + + </span> + + + + + <span class="note title readonly">readonly</span> + + + + + + + + + + <span class="summary_desc"><div class='inline'> +<p>Returns the value of attribute lhs.</p> +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#rhs-instance_method" title="#rhs (instance method)">#<strong>rhs</strong> ⇒ Object </a> + + + + </span> + + + + + <span class="note title readonly">readonly</span> + + + + + + + + + + <span class="summary_desc"><div class='inline'> +<p>Returns the value of attribute rhs.</p> +</div></span> + +</li> + + + </ul> + @@ -161,7 +253,7 @@ <h2> <li class="public "> <span class="summary_signature"> - <a href="#lhs-instance_method" title="#lhs (instance method)">#<strong>lhs</strong> ⇒ Object </a> + <a href="#gen_adoc-instance_method" title="#gen_adoc (instance method)">#<strong>gen_adoc</strong>(indent = 0, indent_spaces: 2) ⇒ Object </a> @@ -183,13 +275,15 @@ <h2> <li class="public "> <span class="summary_signature"> - <a href="#rhs-instance_method" title="#rhs (instance method)">#<strong>rhs</strong> ⇒ Object </a> + <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(input, interval, lhs, idx, rhs) ⇒ AryElementAssignmentAst </a> </span> + <span class="note title constructor">constructor</span> + @@ -197,7 +291,9 @@ <h2> - <span class="summary_desc"><div class='inline'></div></span> + <span class="summary_desc"><div class='inline'> +<p>A new instance of AryElementAssignmentAst.</p> +</div></span> </li> @@ -259,120 +355,269 @@ <h2> + <div id="constructor_details" class="method_details_list"> + <h2>Constructor Details</h2> + <div class="method_details first"> + <h3 class="signature first" id="initialize-instance_method"> + #<strong>initialize</strong>(input, interval, lhs, idx, rhs) ⇒ <tt><span class='object_link'><a href="" title="Idl::AryElementAssignmentAst (class)">AryElementAssignmentAst</a></span></tt> + + +</h3><div class="docstring"> + <div class="discussion"> + +<p>Returns a new instance of AryElementAssignmentAst.</p> - <div id="instance_method_details" class="method_details_list"> - <h2>Instance Method Details</h2> + </div> +</div> +<div class="tags"> + + +</div><table class="source_code"> + <tr> + <td> + <pre class="lines"> + + +1030 +1031 +1032 +1033 +1034 +1035</pre> + </td> + <td> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1030</span> + +<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_input'>input</span><span class='comma'>,</span> <span class='id identifier rubyid_interval'>interval</span><span class='comma'>,</span> <span class='id identifier rubyid_lhs'>lhs</span><span class='comma'>,</span> <span class='id identifier rubyid_idx'>idx</span><span class='comma'>,</span> <span class='id identifier rubyid_rhs'>rhs</span><span class='rparen'>)</span> + <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_input'>input</span><span class='comma'>,</span> <span class='id identifier rubyid_interval'>interval</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_lhs'>lhs</span><span class='comma'>,</span> <span class='id identifier rubyid_idx'>idx</span><span class='comma'>,</span> <span class='id identifier rubyid_rhs'>rhs</span><span class='rbracket'>]</span><span class='rparen'>)</span> + <span class='ivar'>@lhs</span> <span class='op'>=</span> <span class='id identifier rubyid_lhs'>lhs</span> + <span class='ivar'>@idx</span> <span class='op'>=</span> <span class='id identifier rubyid_idx'>idx</span> + <span class='ivar'>@rhs</span> <span class='op'>=</span> <span class='id identifier rubyid_rhs'>rhs</span> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + +</div> + + <div id="instance_attr_details" class="attr_details"> + <h2>Instance Attribute Details</h2> + + <span id=""></span> <div class="method_details first"> - <h3 class="signature first" id="execute-instance_method"> + <h3 class="signature first" id="idx-instance_method"> - #<strong>execute</strong>(symtab) ⇒ <tt>Object</tt> + #<strong>idx</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span> -</h3><table class="source_code"> +</h3><div class="docstring"> + <div class="discussion"> + +<p>Returns the value of attribute idx.</p> + + + </div> +</div> +<div class="tags"> + + +</div><table class="source_code"> <tr> <td> <pre class="lines"> -1045 -1046 -1047 -1048 -1049 -1050 -1051 -1052 -1053 -1054 -1055 -1056 -1057</pre> +1028 +1029 +1030</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1045</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1028</span> -<span class='kw'>def</span> <span class='id identifier rubyid_execute'>execute</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> - <span class='kw'>case</span> <span class='id identifier rubyid_var'>var</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_kind'>kind</span> - <span class='kw'>when</span> <span class='symbol'>:array</span> - <span class='id identifier rubyid_var'>var</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='id identifier rubyid_idx'>idx</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_rhs'>rhs</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> - <span class='kw'>when</span> <span class='symbol'>:bits</span> - <span class='id identifier rubyid_v'>v</span> <span class='op'>=</span> <span class='id identifier rubyid_rhs'>rhs</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> - <span class='id identifier rubyid_var'>var</span> <span class='op'>=</span> <span class='id identifier rubyid_symtab'>symtab</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_var'>var</span><span class='period'>.</span><span class='id identifier rubyid_text_value'>text_value</span><span class='rparen'>)</span> - <span class='id identifier rubyid_mask'>mask</span> <span class='op'>=</span> <span class='int'>1</span> <span class='op'><<</span> <span class='id identifier rubyid_idx'>idx</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> - <span class='id identifier rubyid_var'>var</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_var'>var</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span> <span class='op'>&</span> <span class='op'>~</span><span class='int'>0</span><span class='rparen'>)</span> <span class='op'>|</span> <span class='lparen'>(</span><span class='lparen'>(</span><span class='id identifier rubyid_v'>v</span> <span class='op'>&</span> <span class='int'>1</span><span class='rparen'>)</span> <span class='op'><<</span> <span class='id identifier rubyid_idx'>idx</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='rparen'>)</span> - <span class='kw'>else</span> - <span class='id identifier rubyid_internal_error'>internal_error</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>unexpected type for array element assignment</span><span class='tstring_end'>"</span></span> - <span class='kw'>end</span> +<span class='kw'>def</span> <span class='id identifier rubyid_idx'>idx</span> + <span class='ivar'>@idx</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> + + <span id=""></span> <div class="method_details "> <h3 class="signature " id="lhs-instance_method"> - #<strong>lhs</strong> ⇒ <tt>Object</tt> + #<strong>lhs</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span> -</h3><table class="source_code"> +</h3><div class="docstring"> + <div class="discussion"> + +<p>Returns the value of attribute lhs.</p> + + + </div> +</div> +<div class="tags"> + + +</div><table class="source_code"> <tr> <td> <pre class="lines"> -1037 -1038 -1039</pre> +1028 +1029 +1030</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1037</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1028</span> <span class='kw'>def</span> <span class='id identifier rubyid_lhs'>lhs</span> - <span class='id identifier rubyid_internal_error'>internal_error</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>What's this used for?</span><span class='tstring_end'>"</span></span> + <span class='ivar'>@lhs</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> + + <span id=""></span> <div class="method_details "> <h3 class="signature " id="rhs-instance_method"> - #<strong>rhs</strong> ⇒ <tt>Object</tt> + #<strong>rhs</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span> -</h3><table class="source_code"> +</h3><div class="docstring"> + <div class="discussion"> + +<p>Returns the value of attribute rhs.</p> + + + </div> +</div> +<div class="tags"> + + +</div><table class="source_code"> <tr> <td> <pre class="lines"> -1041 -1042 -1043</pre> +1028 +1029 +1030</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1041</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1028</span> <span class='kw'>def</span> <span class='id identifier rubyid_rhs'>rhs</span> - <span class='id identifier rubyid_rval'>rval</span> + <span class='ivar'>@rhs</span> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + </div> + + + <div id="instance_method_details" class="method_details_list"> + <h2>Instance Method Details</h2> + + + <div class="method_details first"> + <h3 class="signature first" id="execute-instance_method"> + + #<strong>execute</strong>(symtab) ⇒ <tt>Object</tt> + + + + + +</h3><table class="source_code"> + <tr> + <td> + <pre class="lines"> + + +1072 +1073 +1074 +1075 +1076 +1077 +1078 +1079 +1080 +1081 +1082 +1083</pre> + </td> + <td> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1072</span> + +<span class='kw'>def</span> <span class='id identifier rubyid_execute'>execute</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> + <span class='kw'>case</span> <span class='ivar'>@lhs</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_kind'>kind</span> + <span class='kw'>when</span> <span class='symbol'>:array</span> + <span class='ivar'>@lhs</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='ivar'>@idx</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='ivar'>@rhs</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> + <span class='kw'>when</span> <span class='symbol'>:bits</span> + <span class='id identifier rubyid_v'>v</span> <span class='op'>=</span> <span class='ivar'>@rhs</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> + <span class='id identifier rubyid_var'>var</span> <span class='op'>=</span> <span class='id identifier rubyid_symtab'>symtab</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='ivar'>@lhs</span><span class='period'>.</span><span class='id identifier rubyid_text_value'>text_value</span><span class='rparen'>)</span> + <span class='id identifier rubyid_var'>var</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='ivar'>@lhs</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span> <span class='op'>&</span> <span class='op'>~</span><span class='int'>0</span><span class='rparen'>)</span> <span class='op'>|</span> <span class='lparen'>(</span><span class='lparen'>(</span><span class='id identifier rubyid_v'>v</span> <span class='op'>&</span> <span class='int'>1</span><span class='rparen'>)</span> <span class='op'><<</span> <span class='ivar'>@idx</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='rparen'>)</span> + <span class='kw'>else</span> + <span class='id identifier rubyid_internal_error'>internal_error</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>unexpected type for array element assignment</span><span class='tstring_end'>"</span></span> + <span class='kw'>end</span> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + <div class="method_details "> + <h3 class="signature " id="gen_adoc-instance_method"> + + #<strong>gen_adoc</strong>(indent = 0, indent_spaces: 2) ⇒ <tt>Object</tt> + + + + + +</h3><table class="source_code"> + <tr> + <td> + <pre class="lines"> + + +140 +141 +142</pre> + </td> + <td> + <pre class="code"><span class="info file"># File 'lib/idl/passes/gen_adoc.rb', line 140</span> + +<span class='kw'>def</span> <span class='id identifier rubyid_gen_adoc'>gen_adoc</span><span class='lparen'>(</span><span class='id identifier rubyid_indent'>indent</span> <span class='op'>=</span> <span class='int'>0</span><span class='comma'>,</span> <span class='label'>indent_spaces:</span> <span class='int'>2</span><span class='rparen'>)</span> + <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_lhs'>lhs</span><span class='period'>.</span><span class='id identifier rubyid_gen_adoc'>gen_adoc</span><span class='lparen'>(</span><span class='int'>0</span><span class='comma'>,</span> <span class='label'>indent_spaces:</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>[</span><span class='embexpr_beg'>#{</span><span class='ivar'>@idx</span><span class='period'>.</span><span class='id identifier rubyid_gen_adoc'>gen_adoc</span><span class='lparen'>(</span><span class='int'>0</span><span class='comma'>,</span> <span class='label'>indent_spaces:</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>] = </span><span class='embexpr_beg'>#{</span><span class='ivar'>@rhs</span><span class='period'>.</span><span class='id identifier rubyid_gen_adoc'>gen_adoc</span><span class='lparen'>(</span><span class='int'>0</span><span class='comma'>,</span> <span class='label'>indent_spaces:</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>end</span></pre> </td> </tr> @@ -423,12 +668,12 @@ <h3 class="signature " id="to_idl-instance_method"> <pre class="lines"> -1060</pre> +1086</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1060</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1086</span> -<span class='kw'>def</span> <span class='id identifier rubyid_to_idl'>to_idl</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_var'>var</span><span class='period'>.</span><span class='id identifier rubyid_to_idl'>to_idl</span><span class='embexpr_end'>}</span><span class='tstring_content'>[</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_idx'>idx</span><span class='period'>.</span><span class='id identifier rubyid_to_idl'>to_idl</span><span class='embexpr_end'>}</span><span class='tstring_content'>] = </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_rval'>rval</span><span class='period'>.</span><span class='id identifier rubyid_to_idl'>to_idl</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span></pre> +<span class='kw'>def</span> <span class='id identifier rubyid_to_idl'>to_idl</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='ivar'>@lhs</span><span class='period'>.</span><span class='id identifier rubyid_to_idl'>to_idl</span><span class='embexpr_end'>}</span><span class='tstring_content'>[</span><span class='embexpr_beg'>#{</span><span class='ivar'>@idx</span><span class='period'>.</span><span class='id identifier rubyid_to_idl'>to_idl</span><span class='embexpr_end'>}</span><span class='tstring_content'>] = </span><span class='embexpr_beg'>#{</span><span class='ivar'>@rhs</span><span class='period'>.</span><span class='id identifier rubyid_to_idl'>to_idl</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span></pre> </td> </tr> </table> @@ -514,66 +759,70 @@ <h3 class="signature " id="type_check-instance_method"> <pre class="lines"> -1005 -1006 -1007 -1008 -1009 -1010 -1011 -1012 -1013 -1014 -1015 -1016 -1017 -1018 -1019 -1020 -1021 -1022 -1023 -1024 -1025 -1026 -1027 -1028 -1029 -1030 -1031 -1032 -1033 -1034 -1035</pre> +1038 +1039 +1040 +1041 +1042 +1043 +1044 +1045 +1046 +1047 +1048 +1049 +1050 +1051 +1052 +1053 +1054 +1055 +1056 +1057 +1058 +1059 +1060 +1061 +1062 +1063 +1064 +1065 +1066 +1067 +1068 +1069 +1070</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1005</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1038</span> <span class='kw'>def</span> <span class='id identifier rubyid_type_check'>type_check</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> - <span class='id identifier rubyid_var'>var</span><span class='period'>.</span><span class='id identifier rubyid_type_check'>type_check</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> - <span class='id identifier rubyid_type_error'>type_error</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_var'>var</span><span class='period'>.</span><span class='id identifier rubyid_text_value'>text_value</span><span class='embexpr_end'>}</span><span class='tstring_content'> must be an array or an integral type</span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='lbracket'>[</span><span class='symbol'>:array</span><span class='comma'>,</span> <span class='symbol'>:bits</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_var'>var</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_kind'>kind</span><span class='rparen'>)</span> - <span class='id identifier rubyid_type_errpr'>type_errpr</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Assigning to a constant</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_var'>var</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_const?'>const?</span> + <span class='ivar'>@lhs</span><span class='period'>.</span><span class='id identifier rubyid_type_check'>type_check</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> + <span class='kw'>unless</span> <span class='lbracket'>[</span><span class='symbol'>:array</span><span class='comma'>,</span> <span class='symbol'>:bits</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='ivar'>@lhs</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_kind'>kind</span><span class='rparen'>)</span> + <span class='id identifier rubyid_type_error'>type_error</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='ivar'>@lhs</span><span class='period'>.</span><span class='id identifier rubyid_text_value'>text_value</span><span class='embexpr_end'>}</span><span class='tstring_content'> must be an array or an integral type</span><span class='tstring_end'>"</span></span> + <span class='kw'>end</span> + <span class='id identifier rubyid_type_errpr'>type_errpr</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Assigning to a constant</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='ivar'>@lhs</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_const?'>const?</span> - <span class='id identifier rubyid_idx'>idx</span><span class='period'>.</span><span class='id identifier rubyid_type_check'>type_check</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> + <span class='ivar'>@idx</span><span class='period'>.</span><span class='id identifier rubyid_type_check'>type_check</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> - <span class='id identifier rubyid_type_error'>type_error</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Index must be integral</span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_idx'>idx</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_integral?'>integral?</span> + <span class='id identifier rubyid_type_error'>type_error</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Index must be integral</span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='ivar'>@idx</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_integral?'>integral?</span> <span class='kw'>begin</span> - <span class='id identifier rubyid_idx_value'>idx_value</span> <span class='op'>=</span> <span class='id identifier rubyid_idx'>idx</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> - <span class='id identifier rubyid_type_error'>type_error</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Array index (</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_idx'>idx</span><span class='period'>.</span><span class='id identifier rubyid_text_value'>text_value</span><span class='embexpr_end'>}</span><span class='tstring_content'> = </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_idx_value'>idx_value</span><span class='embexpr_end'>}</span><span class='tstring_content'>) out of range (< </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_var'>var</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_width'>width</span><span class='embexpr_end'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_idx_value'>idx_value</span> <span class='op'>>=</span> <span class='id identifier rubyid_var'>var</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_width'>width</span> + <span class='id identifier rubyid_idx_value'>idx_value</span> <span class='op'>=</span> <span class='ivar'>@idx</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> + <span class='id identifier rubyid_type_error'>type_error</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Array index (</span><span class='embexpr_beg'>#{</span><span class='ivar'>@idx</span><span class='period'>.</span><span class='id identifier rubyid_text_value'>text_value</span><span class='embexpr_end'>}</span><span class='tstring_content'> = </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_idx_value'>idx_value</span><span class='embexpr_end'>}</span><span class='tstring_content'>) out of range (< </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_var'>var</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_width'>width</span><span class='embexpr_end'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_idx_value'>idx_value</span> <span class='op'>>=</span> <span class='ivar'>@lhs</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_width'>width</span> <span class='kw'>rescue</span> <span class='const'><span class='object_link'><a href="AstNode/ValueError.html" title="Idl::AstNode::ValueError (class)">ValueError</a></span></span> <span class='comment'># OK, doesn't need to be known </span> <span class='kw'>end</span> - <span class='id identifier rubyid_rval'>rval</span><span class='period'>.</span><span class='id identifier rubyid_type_check'>type_check</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> + <span class='ivar'>@rhs</span><span class='period'>.</span><span class='id identifier rubyid_type_check'>type_check</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> - <span class='kw'>case</span> <span class='id identifier rubyid_var'>var</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_kind'>kind</span> + <span class='kw'>case</span> <span class='ivar'>@lhs</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_kind'>kind</span> <span class='kw'>when</span> <span class='symbol'>:array</span> - <span class='kw'>unless</span> <span class='id identifier rubyid_rval'>rval</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_convertable_to?'>convertable_to?</span><span class='lparen'>(</span><span class='id identifier rubyid_var'>var</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_sub_type'>sub_type</span><span class='rparen'>)</span> + <span class='kw'>unless</span> <span class='ivar'>@rhs</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_convertable_to?'>convertable_to?</span><span class='lparen'>(</span><span class='ivar'>@lhs</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_sub_type'>sub_type</span><span class='rparen'>)</span> <span class='id identifier rubyid_type_error'>type_error</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Incompatible type in array assignment</span><span class='tstring_end'>"</span></span> <span class='kw'>end</span> <span class='kw'>when</span> <span class='symbol'>:bits</span> - <span class='kw'>unless</span> <span class='id identifier rubyid_rval'>rval</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_convertable_to?'>convertable_to?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Type.html" title="Idl::Type (class)">Type</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Type.html#initialize-instance_method" title="Idl::Type#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='symbol'>:bits</span><span class='comma'>,</span> <span class='label'>width:</span> <span class='int'>1</span><span class='rparen'>)</span><span class='rparen'>)</span> + <span class='kw'>unless</span> <span class='ivar'>@rhs</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_convertable_to?'>convertable_to?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Type.html" title="Idl::Type (class)">Type</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Type.html#initialize-instance_method" title="Idl::Type#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='symbol'>:bits</span><span class='comma'>,</span> <span class='label'>width:</span> <span class='int'>1</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='id identifier rubyid_type_error'>type_error</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Incompatible type in integer slice assignement</span><span class='tstring_end'>"</span></span> <span class='kw'>end</span> <span class='kw'>else</span> @@ -590,7 +839,7 @@ <h3 class="signature " id="type_check-instance_method"> </div> <div id="footer"> - Generated on Tue Jul 16 12:06:46 2024 by + Generated on Thu Jul 18 13:55:45 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.36 (ruby-3.2.3). </div> diff --git a/docs/ruby/Idl/AryElementAssignmentSyntaxNode.html b/docs/ruby/Idl/AryElementAssignmentSyntaxNode.html new file mode 100644 index 000000000..90e3b0fbe --- /dev/null +++ b/docs/ruby/Idl/AryElementAssignmentSyntaxNode.html @@ -0,0 +1,194 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> +<meta name="viewport" content="width=device-width, initial-scale=1.0"> +<title> + Class: Idl::AryElementAssignmentSyntaxNode + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Class: Idl::AryElementAssignmentSyntaxNode + + + +

    +
    + +
    +
    Inherits:
    +
    + Treetop::Runtime::SyntaxNode + + + show all + +
    +
    + + + + + + + + + + + +
    +
    Defined in:
    +
    lib/idl/ast.rb
    +
    + +
    + + + + + + + + + +

    + Instance Method Summary + collapse +

    + + + + + + + + +
    +

    Instance Method Details

    + + +
    +

    + + #to_astObject + + + + + +

    + + + + +
    +
    +
    +
    +1018
    +1019
    +1020
    +
    +
    # File 'lib/idl/ast.rb', line 1018
    +
    +def to_ast
    +  AryElementAssignmentAst.new(input, interval, var.to_ast, idx.to_ast, rval.to_ast)
    +end
    +
    +
    + +
    + +
    + + + +
    + + \ No newline at end of file diff --git a/docs/ruby/Idl/AryRangeAccessAst.html b/docs/ruby/Idl/AryRangeAccessAst.html index 79e80270f..f3fe3beda 100644 --- a/docs/ruby/Idl/AryRangeAccessAst.html +++ b/docs/ruby/Idl/AryRangeAccessAst.html @@ -452,15 +452,15 @@

     
     
    -887
    -888
    -889
    -890
    -891
    -892
    +899 +900 +901 +902 +903 +904

    -
    # File 'lib/idl/ast.rb', line 887
    +      
    # File 'lib/idl/ast.rb', line 899
     
     def initialize(input, interval, var, msb, lsb)
       super(input, interval, [var, msb, lsb])
    @@ -506,12 +506,12 @@ 

     
     
    -885
    -886
    -887
    +897 +898 +899

    -
    # File 'lib/idl/ast.rb', line 885
    +      
    # File 'lib/idl/ast.rb', line 897
     
     def lsb
       @lsb
    @@ -549,12 +549,12 @@ 

     
     
    -885
    -886
    -887
    +897 +898 +899

    -
    # File 'lib/idl/ast.rb', line 885
    +      
    # File 'lib/idl/ast.rb', line 897
     
     def msb
       @msb
    @@ -592,12 +592,12 @@ 

     
     
    -885
    -886
    -887
    +897 +898 +899

    -
    # File 'lib/idl/ast.rb', line 885
    +      
    # File 'lib/idl/ast.rb', line 897
     
     def var
       @var
    @@ -629,15 +629,15 @@ 

     
     
    -42
    -43
    -44
    +67 +68 +69

    -
    # File 'lib/idl/passes/gen_adoc.rb', line 42
    +      
    # File 'lib/idl/passes/gen_adoc.rb', line 67
     
     def gen_adoc(indent = 0, indent_spaces: 2)
    -  "#{var.gen_adoc(indent, indent_spaces:)}[#{msb.gen_adoc(0, indent_spaces:)}:#{msb.gen_adoc(0, indent_spaces:)}]"
    +  "#{var.gen_adoc(indent, indent_spaces:)}[#{msb.gen_adoc(0, indent_spaces:)}:#{lsb.gen_adoc(0, indent_spaces:)}]"
     end
    @@ -659,12 +659,12 @@

     
     
    -96
    -97
    -98
    +111 +112 +113

    -
    # File 'lib/idl/passes/prune.rb', line 96
    +      
    # File 'lib/idl/passes/prune.rb', line 111
     
     def prune(symtab)
       AryRangeAccessAst.new(input, interval, @var.prune(symtab), @msb.prune(symtab), @lsb.prune(symtab))
    @@ -718,10 +718,10 @@ 

     
     
    -940
    +952

    -
    # File 'lib/idl/ast.rb', line 940
    +      
    # File 'lib/idl/ast.rb', line 952
     
     def to_idl = "#{@var.to_idl}[#{@msb.to_idl}:#{@lsb.to_idl}]"
    @@ -813,20 +813,20 @@

     
     
    -921
    -922
    -923
    -924
    -925
    -926
    -927
    -928
    -929
    -930
    -931
    +933 +934 +935 +936 +937 +938 +939 +940 +941 +942 +943

    -
    # File 'lib/idl/ast.rb', line 921
    +      
    # File 'lib/idl/ast.rb', line 933
     
     def type(symtab)
       begin
    @@ -924,18 +924,6 @@ 

     
     
    -895
    -896
    -897
    -898
    -899
    -900
    -901
    -902
    -903
    -904
    -905
    -906
     907
     908
     909
    @@ -947,10 +935,22 @@ 

    915 916 917 -918

    +918 +919 +920 +921 +922 +923 +924 +925 +926 +927 +928 +929 +930

    -
    # File 'lib/idl/ast.rb', line 895
    +      
    # File 'lib/idl/ast.rb', line 907
     
     def type_check(symtab)
       @var.type_check(symtab)
    @@ -1007,13 +1007,13 @@ 

     
     
    -934
    -935
    -936
    -937
    +946 +947 +948 +949

    -
    # File 'lib/idl/ast.rb', line 934
    +      
    # File 'lib/idl/ast.rb', line 946
     
     def value(symtab)
       mask = (1 << (@msb.value(symtab) - @lsb.value(symtab) + 1)) - 1
    @@ -1125,7 +1125,7 @@ 

    diff --git a/docs/ruby/Idl/AryRangeAssignmentAst.html b/docs/ruby/Idl/AryRangeAssignmentAst.html index ecae1df4d..9965454b8 100644 --- a/docs/ruby/Idl/AryRangeAssignmentAst.html +++ b/docs/ruby/Idl/AryRangeAssignmentAst.html @@ -284,25 +284,25 @@

     
     
    -1105
    -1106
    -1107
    -1108
    -1109
    -1110
    -1111
    -1112
    -1113
    -1114
    -1115
    -1116
    -1117
    -1118
    -1119
    -1120
    +1131 +1132 +1133 +1134 +1135 +1136 +1137 +1138 +1139 +1140 +1141 +1142 +1143 +1144 +1145 +1146

    -
    # File 'lib/idl/ast.rb', line 1105
    +      
    # File 'lib/idl/ast.rb', line 1131
     
     def execute(symtab)
       var_val = var.value(symtab)
    @@ -340,12 +340,12 @@ 

     
     
    -1097
    -1098
    -1099
    +1123 +1124 +1125

    -
    # File 'lib/idl/ast.rb', line 1097
    +      
    # File 'lib/idl/ast.rb', line 1123
     
     def lhs
       internal_error "What's this used for?"
    @@ -370,12 +370,12 @@ 

     
     
    -1101
    -1102
    -1103
    +1127 +1128 +1129

    -
    # File 'lib/idl/ast.rb', line 1101
    +      
    # File 'lib/idl/ast.rb', line 1127
     
     def rhs
       rval
    @@ -429,10 +429,10 @@ 

     
     
    -1123
    +1149

    -
    # File 'lib/idl/ast.rb', line 1123
    +      
    # File 'lib/idl/ast.rb', line 1149
     
     def to_idl = "#{var.to_idl}[#{msb.to_idl}:#{lsb.to_idl}] = #{rval.to_idl}"
    @@ -520,36 +520,36 @@

     
     
    -1069
    -1070
    -1071
    -1072
    -1073
    -1074
    -1075
    -1076
    -1077
    -1078
    -1079
    -1080
    -1081
    -1082
    -1083
    -1084
    -1085
    -1086
    -1087
    -1088
    -1089
    -1090
    -1091
    -1092
    -1093
    -1094
    -1095
    +1095 +1096 +1097 +1098 +1099 +1100 +1101 +1102 +1103 +1104 +1105 +1106 +1107 +1108 +1109 +1110 +1111 +1112 +1113 +1114 +1115 +1116 +1117 +1118 +1119 +1120 +1121

    -
    # File 'lib/idl/ast.rb', line 1069
    +      
    # File 'lib/idl/ast.rb', line 1095
     
     def type_check(symtab)
       var.type_check(symtab)
    @@ -588,7 +588,7 @@ 

    diff --git a/docs/ruby/Idl/AssignmentAst.html b/docs/ruby/Idl/AssignmentAst.html index 4ff68db68..26b8c0c33 100644 --- a/docs/ruby/Idl/AssignmentAst.html +++ b/docs/ruby/Idl/AssignmentAst.html @@ -125,7 +125,7 @@

    Overview

    @@ -328,12 +328,12 @@

     
     
    -950
    -951
    -952
    +962 +963 +964

    -
    # File 'lib/idl/ast.rb', line 950
    +      
    # File 'lib/idl/ast.rb', line 962
     
     def lhs
       internal_error "#{self.class} must implement lhs"
    @@ -369,12 +369,12 @@ 

     
     
    -955
    -956
    -957
    +967 +968 +969

    -
    # File 'lib/idl/ast.rb', line 955
    +      
    # File 'lib/idl/ast.rb', line 967
     
     def rhs
       internal_error "#{calss} must implement rhs"
    @@ -389,7 +389,7 @@ 

    diff --git a/docs/ruby/Idl/AstNode.html b/docs/ruby/Idl/AstNode.html index 51fa0221a..06a0dbfe1 100644 --- a/docs/ruby/Idl/AstNode.html +++ b/docs/ruby/Idl/AstNode.html @@ -102,7 +102,7 @@
    Defined in:
    lib/idl/ast.rb,
    - lib/idl/ast.rb
    + lib/idl/ast.rb,
    lib/idl/passes/prune.rb,
    lib/idl/passes/gen_adoc.rb
    @@ -111,7 +111,7 @@

    Overview

    -

    reopen AstNode, and add functions

    +

    set up a default

    @@ -121,7 +121,7 @@

    Overview

    Direct Known Subclasses

    -

    ArrayLiteralAst, AryElementAccessAst, AryRangeAccessAst, AssignmentAst, BinaryExpressionAst, BitfieldAccessExpressionAst, BitfieldDefinitionAst, BitsCastAst, BitsTypeAst, BuiltinTypeNameAst, ConcatenationExpressionAst, ConditionalStatementAst, CsrFieldReadExpressionAst, CsrReadExpressionAst, CsrSoftwareReadAst, CsrSoftwareWriteAst, CsrWriteAst, DontCareLvalueAst, DontCareReturnAst, ElseIfAst, EnumDefinitionAst, EnumRefAst, ExecutionCommentAst, FieldNameAst, ForLoopAst, FunctionBodyAst, FunctionCallExpressionAst, FunctionDefAst, GlobalAst, GlobalWithInitializationAst, IdAst, IfAst, IfBodyAst, InstructionOperationAst, IsaAst, MultiVariableDeclarationAst, NoopAst, ParenExpressionAst, PostDecrementExpressionAst, PostIncrementExpressionAst, ReplicationExpressionAst, ReturnStatementAst, SignCastAst, StatementAst, StatementSyntaxNode, TernaryOperatorExpressionAst, UnaryOperatorExpressionAst, UserTypeNameAst, VariableDeclarationAst

    +

    ArrayLiteralAst, AryElementAccessAst, AryElementAssignmentAst, AryRangeAccessAst, AssignmentAst, BinaryExpressionAst, BitfieldAccessExpressionAst, BitfieldDefinitionAst, BitsCastAst, BuiltinTypeNameAst, BuiltinVariableAst, ConcatenationExpressionAst, ConditionalStatementAst, CsrFieldReadExpressionAst, CsrReadExpressionAst, CsrSoftwareReadAst, CsrSoftwareWriteAst, CsrWriteAst, DontCareLvalueAst, DontCareReturnAst, ElseIfAst, EnumDefinitionAst, EnumRefAst, ExecutionCommentAst, FieldNameAst, ForLoopAst, FunctionBodyAst, FunctionCallExpressionAst, FunctionDefAst, GlobalAst, GlobalWithInitializationAst, IdAst, IfAst, IfBodyAst, InstructionOperationAst, IntLiteralAst, IsaAst, MultiVariableDeclarationAst, NoopAst, ParenExpressionAst, PostDecrementExpressionAst, PostIncrementExpressionAst, ReplicationExpressionAst, ReturnStatementAst, SignCastAst, StatementAst, StatementSyntaxNode, TernaryOperatorExpressionAst, UnaryOperatorExpressionAst, UserTypeNameAst, VariableAssignmentAst, VariableDeclarationAst, VariableDeclarationWithInitializationAst

    Defined Under Namespace

    @@ -174,6 +174,28 @@

    List of children, or an empty array for a terminal.

    + + + +
  • + + + #gen_adoc(indent = 0, indent_spaces: 2) ⇒ Object + + + + + + + + + + + + + +
    +
  • @@ -261,6 +283,28 @@

    pretty print the AST rooted at this node.

    + + + +
  • + + + #prune(_symtab) ⇒ Object + + + + + + + + + + + + + +
    +
  • @@ -466,6 +510,50 @@

    + + +
    +

    + + #gen_adoc(indent = 0, indent_spaces: 2) ⇒ Object + + + + + +

    + + + + +
    +
    +
    +
    +4
    +5
    +6
    +7
    +8
    +9
    +10
    +11
    +12
    +13
    +
    +
    # File 'lib/idl/passes/gen_adoc.rb', line 4
    +
    +def gen_adoc(indent = 0, indent_spaces: 2)
    +  adoc = []
    +  puts self.class.name if elements.nil?
    +  elements.each do |e|
    +    next unless e.is_a?(Idl::AstNode)
    +
    +    adoc << e.gen_adoc(indent, indent_spaces:)
    +  end
    +  adoc.map{ |a| "#{' '*indent}#{a}" }.join('')
    +end
    +
    @@ -664,6 +752,36 @@
    + + +
    +

    + + #prune(_symtab) ⇒ Object + + + + + +

    + + + + +
    +
    +
    +
    +43
    +44
    +45
    +
    +
    # File 'lib/idl/passes/prune.rb', line 43
    +
    +def prune(_symtab)
    +  clone
    +end
    +
    @@ -1020,7 +1138,7 @@

    diff --git a/docs/ruby/Idl/AstNode/InternalError.html b/docs/ruby/Idl/AstNode/InternalError.html index 8e3f7517e..89f663f35 100644 --- a/docs/ruby/Idl/AstNode/InternalError.html +++ b/docs/ruby/Idl/AstNode/InternalError.html @@ -249,19 +249,19 @@

     
     
    -143
    -144
    -145
     146
     147
     148
     149
     150
     151
    -152
    +152 +153 +154 +155

    -
    # File 'lib/idl/ast.rb', line 143
    +      
    # File 'lib/idl/ast.rb', line 146
     
     def initialize(what)
       super(what)
    @@ -331,12 +331,12 @@ 

     
     
    -141
    -142
    -143
    +144 +145 +146

    -
    # File 'lib/idl/ast.rb', line 141
    +      
    # File 'lib/idl/ast.rb', line 144
     
     def bt
       @bt
    @@ -392,12 +392,12 @@ 

     
     
    -134
    -135
    -136
    +137 +138 +139

    -
    # File 'lib/idl/ast.rb', line 134
    +      
    # File 'lib/idl/ast.rb', line 137
     
     def what
       @what
    @@ -413,7 +413,7 @@ 

    diff --git a/docs/ruby/Idl/AstNode/TypeError.html b/docs/ruby/Idl/AstNode/TypeError.html index a6f70398d..c15d5a35f 100644 --- a/docs/ruby/Idl/AstNode/TypeError.html +++ b/docs/ruby/Idl/AstNode/TypeError.html @@ -269,19 +269,19 @@

     
     
    -119
    -120
    -121
     122
     123
     124
     125
     126
     127
    -128
    +128 +129 +130 +131

    -
    # File 'lib/idl/ast.rb', line 119
    +      
    # File 'lib/idl/ast.rb', line 122
     
     def initialize(what)
       super(what)
    @@ -351,12 +351,12 @@ 

     
     
    -116
    -117
    -118
    +119 +120 +121

    -
    # File 'lib/idl/ast.rb', line 116
    +      
    # File 'lib/idl/ast.rb', line 119
     
     def bt
       @bt
    @@ -412,12 +412,12 @@ 

     
     
    -109
    -110
    -111
    +112 +113 +114

    -
    # File 'lib/idl/ast.rb', line 109
    +      
    # File 'lib/idl/ast.rb', line 112
     
     def what
       @what
    @@ -433,7 +433,7 @@ 

    diff --git a/docs/ruby/Idl/AstNode/ValueError.html b/docs/ruby/Idl/AstNode/ValueError.html index b21c3a813..2285cb6bc 100644 --- a/docs/ruby/Idl/AstNode/ValueError.html +++ b/docs/ruby/Idl/AstNode/ValueError.html @@ -249,14 +249,14 @@

     
     
    -160
    -161
    -162
     163
    -164
    +164 +165 +166 +167

    -
    # File 'lib/idl/ast.rb', line 160
    +      
    # File 'lib/idl/ast.rb', line 163
     
     def initialize(what, lineno, file)
       super(what)
    @@ -301,12 +301,12 @@ 

     
     
    -158
    -159
    -160
    +161 +162 +163

    -
    # File 'lib/idl/ast.rb', line 158
    +      
    # File 'lib/idl/ast.rb', line 161
     
     def file
       @file
    @@ -344,12 +344,12 @@ 

     
     
    -158
    -159
    -160
    +161 +162 +163

    -
    # File 'lib/idl/ast.rb', line 158
    +      
    # File 'lib/idl/ast.rb', line 161
     
     def lineno
       @lineno
    @@ -365,7 +365,7 @@ 

    diff --git a/docs/ruby/Idl/AstNodeFuncs.html b/docs/ruby/Idl/AstNodeFuncs.html index 364ce6855..69ad5ec5e 100644 --- a/docs/ruby/Idl/AstNodeFuncs.html +++ b/docs/ruby/Idl/AstNodeFuncs.html @@ -76,7 +76,7 @@
    Included in:
    -
    AstNode, FunctionStatementAst, IntAst
    +
    AstNode, IntLiteralAst
    @@ -383,17 +383,17 @@

     
     
    -223
    -224
    -225
     226
     227
     228
     229
    -230
    +230 +231 +232 +233

    -
    # File 'lib/idl/ast.rb', line 223
    +      
    # File 'lib/idl/ast.rb', line 226
     
     def children
       if terminal?
    @@ -472,18 +472,18 @@ 

     
     
    -188
    -189
    -190
     191
     192
     193
     194
     195
    -196
    +196 +197 +198 +199

    -
    # File 'lib/idl/ast.rb', line 188
    +      
    # File 'lib/idl/ast.rb', line 191
     
     def internal_error(reason)
       msg = <<~WHAT
    @@ -543,9 +543,6 @@ 

     
     
    -247
    -248
    -249
     250
     251
     252
    @@ -557,10 +554,13 @@ 

    258 259 260 -261

    +261 +262 +263 +264

    -
    # File 'lib/idl/ast.rb', line 247
    +      
    # File 'lib/idl/ast.rb', line 250
     
     def nodes
       return @nodes unless @nodes.nil?
    @@ -666,15 +666,15 @@ 
    -
    # File 'lib/idl/ast.rb', line 268
    +      
    # File 'lib/idl/ast.rb', line 271
     
     def print_ast(indent = 0, indent_size: 2, io: $stdout)
       io.puts "#{' ' * indent}#{self.class.name}:"
    @@ -748,10 +748,10 @@ 

     
     
    -297
    +300

    -
    # File 'lib/idl/ast.rb', line 297
    +      
    # File 'lib/idl/ast.rb', line 300
     
     def to_idl = raise NotImplementedError, "#{self.class.name} must implement to_idl"
    @@ -843,10 +843,10 @@

     
     
    -288
    +291

    -
    # File 'lib/idl/ast.rb', line 288
    +      
    # File 'lib/idl/ast.rb', line 291
     
     def type_check(symtab) = raise NotImplementedError, "#{self.class.name} must implement type_check"
    @@ -918,18 +918,18 @@

     
     
    -174
    -175
    -176
     177
     178
     179
     180
     181
    -182
    +182 +183 +184 +185

    -
    # File 'lib/idl/ast.rb', line 174
    +      
    # File 'lib/idl/ast.rb', line 177
     
     def type_error(reason)
       msg = <<~WHAT
    @@ -1011,12 +1011,12 @@ 

     
     
    -218
    -219
    -220
    +221 +222 +223

    -
    # File 'lib/idl/ast.rb', line 218
    +      
    # File 'lib/idl/ast.rb', line 221
     
     def unindent(s)
       s.gsub(/^#{s.scan(/^[ \t]+(?=\S)/).min}/, "")
    @@ -1090,18 +1090,18 @@ 

     
     
    -202
    -203
    -204
     205
     206
     207
     208
     209
    -210
    +210 +211 +212 +213

    -
    # File 'lib/idl/ast.rb', line 202
    +      
    # File 'lib/idl/ast.rb', line 205
     
     def value_error(reason)
       msg = <<~WHAT
    @@ -1122,7 +1122,7 @@ 

    diff --git a/docs/ruby/Idl/BinaryExpressionAst.html b/docs/ruby/Idl/BinaryExpressionAst.html index 7258d1b4f..44a9b480a 100644 --- a/docs/ruby/Idl/BinaryExpressionAst.html +++ b/docs/ruby/Idl/BinaryExpressionAst.html @@ -509,21 +509,21 @@

     
     
    -1607
    -1608
    -1609
    -1610
    -1611
    -1612
    -1613
    +1668 +1669 +1670 +1671 +1672 +1673 +1674

    -
    # File 'lib/idl/ast.rb', line 1607
    +      
    # File 'lib/idl/ast.rb', line 1668
     
     def initialize(input, interval, lhs, op, rhs)
    -  super(input, interval, [lhs, op, rhs])
    +  super(input, interval, [lhs, rhs])
       @lhs = lhs
    -  @op = op.text_value
    +  @op = op.to_s
       type_error "Bad op '#{@op}'" unless OPS.include?(@op)
       @rhs = rhs
     end
    @@ -565,12 +565,12 @@

     
     
    -1838
    -1839
    -1840
    +1901 +1902 +1903

    -
    # File 'lib/idl/ast.rb', line 1838
    +      
    # File 'lib/idl/ast.rb', line 1901
     
     def lhs
       @lhs
    @@ -608,12 +608,12 @@ 

     
     
    -1844
    -1845
    -1846
    +1907 +1908 +1909

    -
    # File 'lib/idl/ast.rb', line 1844
    +      
    # File 'lib/idl/ast.rb', line 1907
     
     def op
       @op
    @@ -651,12 +651,12 @@ 

     
     
    -1841
    -1842
    -1843
    +1904 +1905 +1906

    -
    # File 'lib/idl/ast.rb', line 1841
    +      
    # File 'lib/idl/ast.rb', line 1904
     
     def rhs
       @rhs
    @@ -688,15 +688,15 @@ 

     
     
    -54
    -55
    -56
    +128 +129 +130

    -
    # File 'lib/idl/passes/gen_adoc.rb', line 54
    +      
    # File 'lib/idl/passes/gen_adoc.rb', line 128
     
     def gen_adoc(indent = 0, indent_spaces: 2)
    -  "#{rhs.gen_adoc(0, indent_spaces:)} #{op} #{lhs.gen_adoc(0, indent_spaces:)}"
    +  "#{lhs.gen_adoc(0, indent_spaces:)} #{op} #{rhs.gen_adoc(0, indent_spaces:)}"
     end
    @@ -747,35 +747,35 @@

     
     
    -1616
    -1617
    -1618
    -1619
    -1620
    -1621
    -1622
    -1623
    -1624
    -1625
    -1626
    -1627
    -1628
    -1629
    -1630
    -1631
    -1632
    -1633
    -1634
    -1635
    -1636
    -1637
    -1638
    -1639
    -1640
    -1641
    +1677 +1678 +1679 +1680 +1681 +1682 +1683 +1684 +1685 +1686 +1687 +1688 +1689 +1690 +1691 +1692 +1693 +1694 +1695 +1696 +1697 +1698 +1699 +1700 +1701 +1702

    -
    # File 'lib/idl/ast.rb', line 1616
    +      
    # File 'lib/idl/ast.rb', line 1677
     
     def invert(symtab)
       type_error "Not a boolean operator" unless type(symtab).kind == :boolean
    @@ -872,21 +872,6 @@ 

     
     
    -102
    -103
    -104
    -105
    -106
    -107
    -108
    -109
    -110
    -111
    -112
    -113
    -114
    -115
    -116
     117
     118
     119
    @@ -896,10 +881,25 @@ 

    123 124 125 -126

    +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141

    -
    # File 'lib/idl/passes/prune.rb', line 102
    +      
    # File 'lib/idl/passes/prune.rb', line 117
     
     def prune(symtab)
       if op == "&&"
    @@ -907,23 +907,23 @@ 

    if @lhs.value(symtab) == false @rhs.prune(symtab) else - self + BinaryExpressionAst.new(input, interval, @lhs.prune(symtab), @op, @rhs.prune(symtab)) end rescue ValueError - self + BinaryExpressionAst.new(input, interval, @lhs.prune(symtab), @op, @rhs.prune(symtab)) end elsif op == "||" begin if @lhs.value(symtab) == true @rhs.prune(symtab) else - self + BinaryExpressionAst.new(input, interval, @lhs.prune(symtab), @op, @rhs.prune(symtab)) end rescue ValueError - self + BinaryExpressionAst.new(input, interval, @lhs.prune(symtab), @op, @rhs.prune(symtab)) end else - self + BinaryExpressionAst.new(input, interval, @lhs.prune(symtab), @op, @rhs.prune(symtab)) end end

    @@ -975,12 +975,12 @@

     
     
    -1644
    -1645
    -1646
    +1705 +1706 +1707

    -
    # File 'lib/idl/ast.rb', line 1644
    +      
    # File 'lib/idl/ast.rb', line 1705
     
     def to_idl
       "(#{lhs.to_idl} #{op} #{rhs.to_idl})"
    @@ -1074,29 +1074,29 @@ 

     
     
    -1649
    -1650
    -1651
    -1652
    -1653
    -1654
    -1655
    -1656
    -1657
    -1658
    -1659
    -1660
    -1661
    -1662
    -1663
    -1664
    -1665
    -1666
    -1667
    -1668
    +1710 +1711 +1712 +1713 +1714 +1715 +1716 +1717 +1718 +1719 +1720 +1721 +1722 +1723 +1724 +1725 +1726 +1727 +1728 +1729

    -
    # File 'lib/idl/ast.rb', line 1649
    +      
    # File 'lib/idl/ast.rb', line 1710
     
     def type(symtab)
       qualifiers = []
    @@ -1203,67 +1203,67 @@ 

     
     
    -1671
    -1672
    -1673
    -1674
    -1675
    -1676
    -1677
    -1678
    -1679
    -1680
    -1681
    -1682
    -1683
    -1684
    -1685
    -1686
    -1687
    -1688
    -1689
    -1690
    -1691
    -1692
    -1693
    -1694
    -1695
    -1696
    -1697
    -1698
    -1699
    -1700
    -1701
    -1702
    -1703
    -1704
    -1705
    -1706
    -1707
    -1708
    -1709
    -1710
    -1711
    -1712
    -1713
    -1714
    -1715
    -1716
    -1717
    -1718
    -1719
    -1720
    -1721
    -1722
    -1723
    -1724
    -1725
    -1726
    -1727
    -1728
    +1732 +1733 +1734 +1735 +1736 +1737 +1738 +1739 +1740 +1741 +1742 +1743 +1744 +1745 +1746 +1747 +1748 +1749 +1750 +1751 +1752 +1753 +1754 +1755 +1756 +1757 +1758 +1759 +1760 +1761 +1762 +1763 +1764 +1765 +1766 +1767 +1768 +1769 +1770 +1771 +1772 +1773 +1774 +1775 +1776 +1777 +1778 +1779 +1780 +1781 +1782 +1783 +1784 +1785 +1786 +1787 +1788 +1789

    -
    # File 'lib/idl/ast.rb', line 1671
    +      
    # File 'lib/idl/ast.rb', line 1732
     
     def type_check(symtab)
       internal_error "No type_check function #{@lhs.inspect}" unless @lhs.respond_to?(:type_check)
    @@ -1354,67 +1354,6 @@ 

     
     
    -1731
    -1732
    -1733
    -1734
    -1735
    -1736
    -1737
    -1738
    -1739
    -1740
    -1741
    -1742
    -1743
    -1744
    -1745
    -1746
    -1747
    -1748
    -1749
    -1750
    -1751
    -1752
    -1753
    -1754
    -1755
    -1756
    -1757
    -1758
    -1759
    -1760
    -1761
    -1762
    -1763
    -1764
    -1765
    -1766
    -1767
    -1768
    -1769
    -1770
    -1771
    -1772
    -1773
    -1774
    -1775
    -1776
    -1777
    -1778
    -1779
    -1780
    -1781
    -1782
    -1783
    -1784
    -1785
    -1786
    -1787
    -1788
    -1789
    -1790
    -1791
     1792
     1793
     1794
    @@ -1458,10 +1397,73 @@ 

    1832 1833 1834 -1835

    +1835 +1836 +1837 +1838 +1839 +1840 +1841 +1842 +1843 +1844 +1845 +1846 +1847 +1848 +1849 +1850 +1851 +1852 +1853 +1854 +1855 +1856 +1857 +1858 +1859 +1860 +1861 +1862 +1863 +1864 +1865 +1866 +1867 +1868 +1869 +1870 +1871 +1872 +1873 +1874 +1875 +1876 +1877 +1878 +1879 +1880 +1881 +1882 +1883 +1884 +1885 +1886 +1887 +1888 +1889 +1890 +1891 +1892 +1893 +1894 +1895 +1896 +1897 +1898

    -
    # File 'lib/idl/ast.rb', line 1731
    +      
    # File 'lib/idl/ast.rb', line 1792
     
     def value(symtab)
       if op == ">>>"
    @@ -1565,7 +1567,9 @@ 

    end else v = eval "lhs.value(symtab) #{op} rhs.value(symtab)", binding, __FILE__, __LINE__ - v & ((1 << type(symtab).width) - 1) + v_trunc = v & ((1 << type(symtab).width) - 1) + warn "WARNING: The value of '#{text_value}' is truncated from #{v} to #{v_trunc} because the result is only #{type(symtab).width} bits" if v != v_trunc + v_trunc end end

    @@ -1674,7 +1678,7 @@

    diff --git a/docs/ruby/Idl/BinaryExpressionRightAst.html b/docs/ruby/Idl/BinaryExpressionRightSyntaxNode.html similarity index 62% rename from docs/ruby/Idl/BinaryExpressionRightAst.html rename to docs/ruby/Idl/BinaryExpressionRightSyntaxNode.html index 70d50c4d9..ae8f79dff 100644 --- a/docs/ruby/Idl/BinaryExpressionRightAst.html +++ b/docs/ruby/Idl/BinaryExpressionRightSyntaxNode.html @@ -4,7 +4,7 @@ - Class: Idl::BinaryExpressionRightAst + Class: Idl::BinaryExpressionRightSyntaxNode — Documentation by YARD 0.9.36 @@ -15,7 +15,7 @@ <link rel="stylesheet" href="../css/common.css" type="text/css" /> <script type="text/javascript"> - pathId = "Idl::BinaryExpressionRightAst"; + pathId = "Idl::BinaryExpressionRightSyntaxNode"; relpath = '../'; </script> @@ -39,7 +39,7 @@ <a href="../_index.html">Index (B)</a> » <span class='title'><span class='object_link'><a href="../Idl.html" title="Idl (module)">Idl</a></span></span> » - <span class="title">BinaryExpressionRightAst</span> + <span class="title">BinaryExpressionRightSyntaxNode</span> </div> @@ -59,7 +59,7 @@ <div class="clear"></div> </div> - <div id="content"><h1>Class: Idl::BinaryExpressionRightAst + <div id="content"><h1>Class: Idl::BinaryExpressionRightSyntaxNode @@ -69,16 +69,14 @@ <dl> <dt>Inherits:</dt> <dd> - <span class="inheritName"><span class='object_link'><a href="AstNode.html" title="Idl::AstNode (class)">AstNode</a></span></span> + <span class="inheritName"><span class='object_link'><a href="../Treetop/Runtime/SyntaxNode.html" title="Treetop::Runtime::SyntaxNode (class)">Treetop::Runtime::SyntaxNode</a></span></span> <ul class="fullTree"> <li>Object</li> <li class="next"><span class='object_link'><a href="../Treetop/Runtime/SyntaxNode.html" title="Treetop::Runtime::SyntaxNode (class)">Treetop::Runtime::SyntaxNode</a></span></li> - <li class="next"><span class='object_link'><a href="AstNode.html" title="Idl::AstNode (class)">AstNode</a></span></li> - - <li class="next">Idl::BinaryExpressionRightAst</li> + <li class="next">Idl::BinaryExpressionRightSyntaxNode</li> </ul> <a href="#" class="inheritanceTree">show all</a> @@ -121,7 +119,7 @@ <h2> <li class="public "> <span class="summary_signature"> - <a href="#make_left-instance_method" title="#make_left (instance method)">#<strong>make_left</strong> ⇒ Object </a> + <a href="#to_ast-instance_method" title="#to_ast (instance method)">#<strong>to_ast</strong> ⇒ Object </a> @@ -135,7 +133,9 @@ <h2> - <span class="summary_desc"><div class='inline'></div></span> + <span class="summary_desc"><div class='inline'> +<p>fix up left recursion i.e., xlen() - 1 - i => (xlen() - 1) - i.</p> +</div></span> </li> @@ -143,7 +143,7 @@ <h2> <li class="public "> <span class="summary_signature"> - <a href="#type_check-instance_method" title="#type_check (instance method)">#<strong>type_check</strong>(_symtab, _archdef) ⇒ Object </a> + <a href="#type_check-instance_method" title="#type_check (instance method)">#<strong>type_check</strong>(_symtab) ⇒ Object </a> @@ -168,67 +168,72 @@ <h2> - - - - <div id="instance_method_details" class="method_details_list"> <h2>Instance Method Details</h2> <div class="method_details first"> - <h3 class="signature first" id="make_left-instance_method"> + <h3 class="signature first" id="to_ast-instance_method"> - #<strong>make_left</strong> ⇒ <tt>Object</tt> + #<strong>to_ast</strong> ⇒ <tt>Object</tt> -</h3><table class="source_code"> +</h3><div class="docstring"> + <div class="discussion"> + +<p>fix up left recursion i.e., xlen() - 1 - i => (xlen() - 1) - i</p> + + + </div> +</div> +<div class="tags"> + + +</div><table class="source_code"> <tr> <td> <pre class="lines"> -1428 -1429 -1430 -1431 -1432 -1433 -1434 -1435 -1436 -1437 -1438 -1439 -1440 -1441 -1442 -1443 -1444</pre> +1542 +1543 +1544 +1545 +1546 +1547 +1548 +1549 +1550 +1551 +1552 +1553 +1554 +1555 +1556 +1557</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1428</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1542</span> -<span class='kw'>def</span> <span class='id identifier rubyid_make_left'>make_left</span> +<span class='kw'>def</span> <span class='id identifier rubyid_to_ast'>to_ast</span> <span class='id identifier rubyid_first'>first</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="BinaryExpressionAst.html" title="Idl::BinaryExpressionAst (class)">BinaryExpressionAst</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="BinaryExpressionAst.html#initialize-instance_method" title="Idl::BinaryExpressionAst#initialize (method)">new</a></span></span><span class='lparen'>(</span> <span class='id identifier rubyid_input'>input</span><span class='comma'>,</span> <span class='lparen'>(</span><span class='id identifier rubyid_interval'>interval</span><span class='period'>.</span><span class='id identifier rubyid_begin'>begin</span><span class='op'>...</span><span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_elements'>elements</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_interval'>interval</span><span class='period'>.</span><span class='id identifier rubyid_end'>end</span><span class='rparen'>)</span><span class='comma'>,</span> - <span class='id identifier rubyid_l'>l</span><span class='period'>.</span><span class='id identifier rubyid_make_left'>make_left</span><span class='comma'>,</span> <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_elements'>elements</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_op'>op</span><span class='comma'>,</span> <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_elements'>elements</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_make_left'>make_left</span> + <span class='id identifier rubyid_l'>l</span><span class='period'>.</span><span class='id identifier rubyid_to_ast'>to_ast</span><span class='comma'>,</span> <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_elements'>elements</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_op'>op</span><span class='period'>.</span><span class='id identifier rubyid_text_value'>text_value</span><span class='comma'>,</span> <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_elements'>elements</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_to_ast'>to_ast</span> <span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_elements'>elements</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>==</span> <span class='int'>1</span> <span class='id identifier rubyid_first'>first</span> <span class='kw'>else</span> - <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_elements'>elements</span><span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_inject'>inject</span><span class='lparen'>(</span><span class='id identifier rubyid_first'>first</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_lhs'>lhs</span><span class='comma'>,</span> <span class='id identifier rubyid_r'>r</span><span class='op'>|</span> - <span class='const'><span class='object_link'><a href="BinaryExpressionAst.html" title="Idl::BinaryExpressionAst (class)">BinaryExpressionAst</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="BinaryExpressionAst.html#initialize-instance_method" title="Idl::BinaryExpressionAst#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_input'>input</span><span class='comma'>,</span> <span class='lparen'>(</span><span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_interval'>interval</span><span class='period'>.</span><span class='id identifier rubyid_begin'>begin</span><span class='op'>...</span><span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_interval'>interval</span><span class='period'>.</span><span class='id identifier rubyid_end'>end</span><span class='rparen'>)</span><span class='comma'>,</span> - <span class='id identifier rubyid_lhs'>lhs</span><span class='comma'>,</span> <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_op'>op</span><span class='comma'>,</span> <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_make_left'>make_left</span><span class='rparen'>)</span> + <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_elements'>elements</span><span class='lbracket'>[</span><span class='int'>1</span><span class='op'>..</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_inject'>inject</span><span class='lparen'>(</span><span class='id identifier rubyid_first'>first</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_lhs'>lhs</span><span class='comma'>,</span> <span class='id identifier rubyid_el'>el</span><span class='op'>|</span> + <span class='const'><span class='object_link'><a href="BinaryExpressionAst.html" title="Idl::BinaryExpressionAst (class)">BinaryExpressionAst</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="BinaryExpressionAst.html#initialize-instance_method" title="Idl::BinaryExpressionAst#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_input'>input</span><span class='comma'>,</span> <span class='lparen'>(</span><span class='id identifier rubyid_lhs'>lhs</span><span class='period'>.</span><span class='id identifier rubyid_interval'>interval</span><span class='period'>.</span><span class='id identifier rubyid_begin'>begin</span><span class='op'>...</span><span class='id identifier rubyid_el'>el</span><span class='period'>.</span><span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_interval'>interval</span><span class='period'>.</span><span class='id identifier rubyid_end'>end</span><span class='rparen'>)</span><span class='comma'>,</span> + <span class='id identifier rubyid_lhs'>lhs</span><span class='comma'>,</span> <span class='id identifier rubyid_el'>el</span><span class='period'>.</span><span class='id identifier rubyid_op'>op</span><span class='period'>.</span><span class='id identifier rubyid_text_value'>text_value</span><span class='comma'>,</span> <span class='id identifier rubyid_el'>el</span><span class='period'>.</span><span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_to_ast'>to_ast</span><span class='rparen'>)</span> <span class='kw'>end</span> <span class='kw'>end</span> - <span class='id identifier rubyid_first'>first</span> <span class='kw'>end</span></pre> </td> </tr> @@ -238,7 +243,7 @@ <h3 class="signature first" id="make_left-instance_method"> <div class="method_details "> <h3 class="signature " id="type_check-instance_method"> - #<strong>type_check</strong>(_symtab, _archdef) ⇒ <tt>Object</tt> + #<strong>type_check</strong>(_symtab) ⇒ <tt>Object</tt> @@ -250,15 +255,15 @@ <h3 class="signature " id="type_check-instance_method"> <pre class="lines"> -1446 -1447 -1448</pre> +1559 +1560 +1561</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1446</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1559</span> -<span class='kw'>def</span> <span class='id identifier rubyid_type_check'>type_check</span><span class='lparen'>(</span><span class='id identifier rubyid__symtab'>_symtab</span><span class='comma'>,</span> <span class='id identifier rubyid__archdef'>_archdef</span><span class='rparen'>)</span> - <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>you must have forgotten the make_left pass</span><span class='tstring_end'>"</span></span> +<span class='kw'>def</span> <span class='id identifier rubyid_type_check'>type_check</span><span class='lparen'>(</span><span class='id identifier rubyid__symtab'>_symtab</span><span class='rparen'>)</span> + <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>you must have forgotten the to_ast pass</span><span class='tstring_end'>"</span></span> <span class='kw'>end</span></pre> </td> </tr> @@ -270,7 +275,7 @@ <h3 class="signature " id="type_check-instance_method"> </div> <div id="footer"> - Generated on Fri Jul 12 07:33:11 2024 by + Generated on Thu Jul 18 13:55:45 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.36 (ruby-3.2.3). </div> diff --git a/docs/ruby/Idl/BitfieldAccessExpressionAst.html b/docs/ruby/Idl/BitfieldAccessExpressionAst.html index 4159a505b..dbeff4d7f 100644 --- a/docs/ruby/Idl/BitfieldAccessExpressionAst.html +++ b/docs/ruby/Idl/BitfieldAccessExpressionAst.html @@ -317,12 +317,12 @@ <h3 class="signature first" id="kind-instance_method"> <pre class="lines"> -2050 -2051 -2052</pre> +2178 +2179 +2180</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 2050</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 2178</span> <span class='kw'>def</span> <span class='id identifier rubyid_kind'>kind</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> <span class='id identifier rubyid_rval'>rval</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_kind'>kind</span> @@ -376,10 +376,10 @@ <h3 class="signature " id="to_idl-instance_method"> <pre class="lines"> -2110</pre> +2238</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 2110</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 2238</span> <span class='kw'>def</span> <span class='id identifier rubyid_to_idl'>to_idl</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_rval'>rval</span><span class='period'>.</span><span class='id identifier rubyid_to_idl'>to_idl</span><span class='embexpr_end'>}</span><span class='tstring_content'>.</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_field_name'>field_name</span><span class='period'>.</span><span class='id identifier rubyid_to_idl'>to_idl</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span></pre> </td> @@ -471,20 +471,20 @@ <h3 class="signature " id="type-instance_method"> <pre class="lines"> -2055 -2056 -2057 -2058 -2059 -2060 -2061 -2062 -2063 -2064 -2065</pre> +2183 +2184 +2185 +2186 +2187 +2188 +2189 +2190 +2191 +2192 +2193</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 2055</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 2183</span> <span class='kw'>def</span> <span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> <span class='id identifier rubyid_rval_type'>rval_type</span> <span class='op'>=</span> <span class='id identifier rubyid_rval'>rval</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> @@ -517,38 +517,38 @@ <h3 class="signature " id="type_check-instance_method"> <pre class="lines"> -2067 -2068 -2069 -2070 -2071 -2072 -2073 -2074 -2075 -2076 -2077 -2078 -2079 -2080 -2081 -2082 -2083 -2084 -2085 -2086 -2087 -2088 -2089 -2090 -2091 -2092 -2093 -2094 -2095</pre> +2195 +2196 +2197 +2198 +2199 +2200 +2201 +2202 +2203 +2204 +2205 +2206 +2207 +2208 +2209 +2210 +2211 +2212 +2213 +2214 +2215 +2216 +2217 +2218 +2219 +2220 +2221 +2222 +2223</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 2067</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 2195</span> <span class='kw'>def</span> <span class='id identifier rubyid_type_check'>type_check</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> <span class='id identifier rubyid_rval'>rval</span><span class='period'>.</span><span class='id identifier rubyid_type_check'>type_check</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> @@ -610,19 +610,19 @@ <h3 class="signature " id="value-instance_method"> <pre class="lines"> -2098 -2099 -2100 -2101 -2102 -2103 -2104 -2105 -2106 -2107</pre> +2226 +2227 +2228 +2229 +2230 +2231 +2232 +2233 +2234 +2235</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 2098</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 2226</span> <span class='kw'>def</span> <span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_kind'>kind</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> <span class='op'>==</span> <span class='symbol'>:bitfield</span> @@ -740,7 +740,7 @@ <h3 class="signature " id="values-instance_method"> </div> <div id="footer"> - Generated on Tue Jul 16 12:06:47 2024 by + Generated on Thu Jul 18 13:55:46 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.36 (ruby-3.2.3). </div> diff --git a/docs/ruby/Idl/BitfieldDefinitionAst.html b/docs/ruby/Idl/BitfieldDefinitionAst.html index 3f688704c..e81f348ff 100644 --- a/docs/ruby/Idl/BitfieldDefinitionAst.html +++ b/docs/ruby/Idl/BitfieldDefinitionAst.html @@ -403,13 +403,13 @@ <h3 class="signature first" id="add_symbol-instance_method"> <pre class="lines"> -725 -726 -727 -728</pre> +737 +738 +739 +740</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 725</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 737</span> <span class='kw'>def</span> <span class='id identifier rubyid_add_symbol'>add_symbol</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> <span class='id identifier rubyid_t'>t</span> <span class='op'>=</span> <span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> @@ -464,14 +464,14 @@ <h3 class="signature " id="element_names-instance_method"> <pre class="lines"> -686 -687 -688 -689 -690</pre> +698 +699 +700 +701 +702</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 686</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 698</span> <span class='kw'>def</span> <span class='id identifier rubyid_element_names'>element_names</span> <span class='kw'>return</span> <span class='ivar'>@element_names</span> <span class='kw'>unless</span> <span class='ivar'>@element_names</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> @@ -527,22 +527,22 @@ <h3 class="signature " id="element_ranges-instance_method"> <pre class="lines"> -694 -695 -696 -697 -698 -699 -700 -701 -702 -703 -704 -705 -706</pre> +706 +707 +708 +709 +710 +711 +712 +713 +714 +715 +716 +717 +718</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 694</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 706</span> <span class='kw'>def</span> <span class='id identifier rubyid_element_ranges'>element_ranges</span> <span class='kw'>return</span> <span class='ivar'>@element_ranges</span> <span class='kw'>unless</span> <span class='ivar'>@element_ranges</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> @@ -606,10 +606,10 @@ <h3 class="signature " id="name-instance_method"> <pre class="lines"> -734</pre> +746</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 734</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 746</span> <span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='id identifier rubyid_user_type_name'>user_type_name</span><span class='period'>.</span><span class='id identifier rubyid_text_value'>text_value</span></pre> </td> @@ -661,17 +661,17 @@ <h3 class="signature " id="to_idl-instance_method"> <pre class="lines"> -740 -741 -742 -743 -744 -745 -746 -747</pre> +752 +753 +754 +755 +756 +757 +758 +759</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 740</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 752</span> <span class='kw'>def</span> <span class='id identifier rubyid_to_idl'>to_idl</span> <span class='id identifier rubyid_idl'>idl</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>bitfield (</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_bf_size'>bf_size</span><span class='embexpr_end'>}</span><span class='tstring_content'>) </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'> { </span><span class='tstring_end'>"</span></span> @@ -750,10 +750,10 @@ <h3 class="signature " id="type-instance_method"> <pre class="lines"> -731</pre> +743</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 731</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 743</span> <span class='kw'>def</span> <span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="BitfieldType.html" title="Idl::BitfieldType (class)">BitfieldType</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="BitfieldType.html#initialize-instance_method" title="Idl::BitfieldType#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_int'>int</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_element_names'>element_names</span><span class='comma'>,</span> <span class='id identifier rubyid_element_ranges'>element_ranges</span><span class='rparen'>)</span></pre> </td> @@ -841,23 +841,23 @@ <h3 class="signature " id="type_check-instance_method"> <pre class="lines"> -709 -710 -711 -712 -713 -714 -715 -716 -717 -718 -719 -720 721 -722</pre> +722 +723 +724 +725 +726 +727 +728 +729 +730 +731 +732 +733 +734</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 709</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 721</span> <span class='kw'>def</span> <span class='id identifier rubyid_type_check'>type_check</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> <span class='id identifier rubyid_int'>int</span><span class='period'>.</span><span class='id identifier rubyid_type_check'>type_check</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> @@ -974,10 +974,10 @@ <h3 class="signature " id="value-instance_method"> <pre class="lines"> -737</pre> +749</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 737</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 749</span> <span class='kw'>def</span> <span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid__symtab'>_symtab</span><span class='comma'>,</span> <span class='id identifier rubyid__archdef'>_archdef</span><span class='rparen'>)</span> <span class='op'>=</span> <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="AstNode.html" title="Idl::AstNode (class)">AstNode</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="AstNode/InternalError.html" title="Idl::AstNode::InternalError (class)">InternalError</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Bitfield defintions have no value</span><span class='tstring_end'>"</span></span></pre> </td> @@ -990,7 +990,7 @@ <h3 class="signature " id="value-instance_method"> </div> <div id="footer"> - Generated on Tue Jul 16 12:06:46 2024 by + Generated on Thu Jul 18 13:55:45 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.36 (ruby-3.2.3). </div> diff --git a/docs/ruby/Idl/BitfieldType.html b/docs/ruby/Idl/BitfieldType.html index 0b9febed2..527824565 100644 --- a/docs/ruby/Idl/BitfieldType.html +++ b/docs/ruby/Idl/BitfieldType.html @@ -385,7 +385,7 @@ <h3 class="signature " id="range-instance_method"> </div> <div id="footer"> - Generated on Tue Jul 16 12:06:49 2024 by + Generated on Thu Jul 18 13:55:48 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.36 (ruby-3.2.3). </div> diff --git a/docs/ruby/Idl/BitsCastAst.html b/docs/ruby/Idl/BitsCastAst.html index 921591a65..a15d09806 100644 --- a/docs/ruby/Idl/BitsCastAst.html +++ b/docs/ruby/Idl/BitsCastAst.html @@ -325,10 +325,10 @@ <h3 class="signature first" id="to_idl-instance_method"> <pre class="lines"> -1595</pre> +1656</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1595</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1656</span> <span class='kw'>def</span> <span class='id identifier rubyid_to_idl'>to_idl</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>$signed(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_expression'>expression</span><span class='period'>.</span><span class='id identifier rubyid_to_idl'>to_idl</span><span class='embexpr_end'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>"</span></span></pre> </td> @@ -420,22 +420,22 @@ <h3 class="signature " id="type-instance_method"> <pre class="lines"> -1563 -1564 -1565 -1566 -1567 -1568 -1569 -1570 -1571 -1572 -1573 -1574 -1575</pre> +1624 +1625 +1626 +1627 +1628 +1629 +1630 +1631 +1632 +1633 +1634 +1635 +1636</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1563</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1624</span> <span class='kw'>def</span> <span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> <span class='id identifier rubyid_etype'>etype</span> <span class='op'>=</span> <span class='id identifier rubyid_expression'>expression</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> @@ -535,16 +535,16 @@ <h3 class="signature " id="type_check-instance_method"> <pre class="lines"> -1554 -1555 -1556 -1557 -1558 -1559 -1560</pre> +1615 +1616 +1617 +1618 +1619 +1620 +1621</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1554</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1615</span> <span class='kw'>def</span> <span class='id identifier rubyid_type_check'>type_check</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> <span class='id identifier rubyid_expression'>expression</span><span class='period'>.</span><span class='id identifier rubyid_type_check'>type_check</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> @@ -584,24 +584,24 @@ <h3 class="signature " id="value-instance_method"> <pre class="lines"> -1578 -1579 -1580 -1581 -1582 -1583 -1584 -1585 -1586 -1587 -1588 -1589 -1590 -1591 -1592</pre> +1639 +1640 +1641 +1642 +1643 +1644 +1645 +1646 +1647 +1648 +1649 +1650 +1651 +1652 +1653</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1578</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1639</span> <span class='kw'>def</span> <span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> <span class='id identifier rubyid_etype'>etype</span> <span class='op'>=</span> <span class='id identifier rubyid_expression'>expression</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> @@ -724,7 +724,7 @@ <h3 class="signature " id="values-instance_method"> </div> <div id="footer"> - Generated on Tue Jul 16 12:06:46 2024 by + Generated on Thu Jul 18 13:55:45 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.36 (ruby-3.2.3). </div> diff --git a/docs/ruby/Idl/BuiltinEnumDefinitionAst.html b/docs/ruby/Idl/BuiltinEnumDefinitionAst.html index f85fd75c5..a83176dde 100644 --- a/docs/ruby/Idl/BuiltinEnumDefinitionAst.html +++ b/docs/ruby/Idl/BuiltinEnumDefinitionAst.html @@ -264,10 +264,10 @@ <h3 class="signature first" id="to_idl-instance_method"> <pre class="lines"> -660</pre> +672</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 660</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 672</span> <span class='kw'>def</span> <span class='id identifier rubyid_to_idl'>to_idl</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>builtin enum </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_user_type_name'>user_type_name</span><span class='period'>.</span><span class='id identifier rubyid_text_value'>text_value</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span></pre> </td> @@ -290,10 +290,10 @@ <h3 class="signature " id="type-instance_method"> <pre class="lines"> -657</pre> +669</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 657</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 669</span> <span class='kw'>def</span> <span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> <span class='op'>=</span> <span class='id identifier rubyid_symtab'>symtab</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_user_type_name'>user_type_name</span><span class='period'>.</span><span class='id identifier rubyid_text_value'>text_value</span><span class='rparen'>)</span></pre> </td> @@ -316,14 +316,14 @@ <h3 class="signature " id="type_check-instance_method"> <pre class="lines"> -650 -651 -652 -653 -654</pre> +662 +663 +664 +665 +666</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 650</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 662</span> <span class='kw'>def</span> <span class='id identifier rubyid_type_check'>type_check</span><span class='lparen'>(</span><span class='id identifier rubyid__symtab'>_symtab</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_user_type_name'>user_type_name</span><span class='period'>.</span><span class='id identifier rubyid_text_value'>text_value</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>ExtensionName</span><span class='tstring_end'>"</span></span> @@ -340,7 +340,7 @@ <h3 class="signature " id="type_check-instance_method"> </div> <div id="footer"> - Generated on Tue Jul 16 12:06:46 2024 by + Generated on Thu Jul 18 13:55:45 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.36 (ruby-3.2.3). </div> diff --git a/docs/ruby/Idl/BuiltinTypeNameAst.html b/docs/ruby/Idl/BuiltinTypeNameAst.html index e06f7eca9..9830c7fb6 100644 --- a/docs/ruby/Idl/BuiltinTypeNameAst.html +++ b/docs/ruby/Idl/BuiltinTypeNameAst.html @@ -98,7 +98,9 @@ <dl> <dt>Defined in:</dt> - <dd>lib/idl/ast.rb</dd> + <dd>lib/idl/ast.rb<span class="defines">,<br /> + lib/idl/passes/gen_adoc.rb</span> +</dd> </dl> </div> @@ -121,6 +123,54 @@ <h2> <li class="public "> <span class="summary_signature"> + <a href="#gen_adoc-instance_method" title="#gen_adoc (instance method)">#<strong>gen_adoc</strong>(indent = 0, indent_spaces: 2) ⇒ Object </a> + + + + </span> + + + + + + + + + + <span class="summary_desc"><div class='inline'></div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(input, interval, type_name, bits_expression) ⇒ BuiltinTypeNameAst </a> + + + + </span> + + + <span class="note title constructor">constructor</span> + + + + + + + + + <span class="summary_desc"><div class='inline'> +<p>A new instance of BuiltinTypeNameAst.</p> +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + <a href="#to_idl-instance_method" title="#to_idl (instance method)">#<strong>to_idl</strong> ⇒ String </a> @@ -199,14 +249,109 @@ <h2> + <div id="constructor_details" class="method_details_list"> + <h2>Constructor Details</h2> + + <div class="method_details first"> + <h3 class="signature first" id="initialize-instance_method"> + + #<strong>initialize</strong>(input, interval, type_name, bits_expression) ⇒ <tt><span class='object_link'><a href="" title="Idl::BuiltinTypeNameAst (class)">BuiltinTypeNameAst</a></span></tt> + + + + + +</h3><div class="docstring"> + <div class="discussion"> + +<p>Returns a new instance of BuiltinTypeNameAst.</p> + + + </div> +</div> +<div class="tags"> + + +</div><table class="source_code"> + <tr> + <td> + <pre class="lines"> + + +2820 +2821 +2822 +2823 +2824 +2825 +2826 +2827 +2828</pre> + </td> + <td> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 2820</span> + +<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_input'>input</span><span class='comma'>,</span> <span class='id identifier rubyid_interval'>interval</span><span class='comma'>,</span> <span class='id identifier rubyid_type_name'>type_name</span><span class='comma'>,</span> <span class='id identifier rubyid_bits_expression'>bits_expression</span><span class='rparen'>)</span> + <span class='kw'>if</span> <span class='id identifier rubyid_bits_expression'>bits_expression</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> + <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_input'>input</span><span class='comma'>,</span> <span class='id identifier rubyid_interval'>interval</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> + <span class='kw'>else</span> + <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_input'>input</span><span class='comma'>,</span> <span class='id identifier rubyid_interval'>interval</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_bits_expression'>bits_expression</span><span class='rbracket'>]</span><span class='rparen'>)</span> + <span class='kw'>end</span> + <span class='ivar'>@type_name</span> <span class='op'>=</span> <span class='id identifier rubyid_type_name'>type_name</span> + <span class='ivar'>@bits_expression</span> <span class='op'>=</span> <span class='id identifier rubyid_bits_expression'>bits_expression</span> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> +</div> + <div id="instance_method_details" class="method_details_list"> <h2>Instance Method Details</h2> <div class="method_details first"> - <h3 class="signature first" id="to_idl-instance_method"> + <h3 class="signature first" id="gen_adoc-instance_method"> + + #<strong>gen_adoc</strong>(indent = 0, indent_spaces: 2) ⇒ <tt>Object</tt> + + + + + +</h3><table class="source_code"> + <tr> + <td> + <pre class="lines"> + + +85 +86 +87 +88 +89 +90 +91</pre> + </td> + <td> + <pre class="code"><span class="info file"># File 'lib/idl/passes/gen_adoc.rb', line 85</span> + +<span class='kw'>def</span> <span class='id identifier rubyid_gen_adoc'>gen_adoc</span><span class='lparen'>(</span><span class='id identifier rubyid_indent'>indent</span> <span class='op'>=</span> <span class='int'>0</span><span class='comma'>,</span> <span class='label'>indent_spaces:</span> <span class='int'>2</span><span class='rparen'>)</span> + <span class='kw'>if</span> <span class='ivar'>@type_name</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Bits</span><span class='tstring_end'>"</span></span> + <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Bits<</span><span class='embexpr_beg'>#{</span><span class='ivar'>@bits_expression</span><span class='period'>.</span><span class='id identifier rubyid_gen_adoc'>gen_adoc</span><span class='lparen'>(</span><span class='int'>0</span><span class='comma'>,</span> <span class='label'>indent_spaces:</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>></span><span class='tstring_end'>"</span></span> + <span class='kw'>else</span> + <span class='id identifier rubyid_to_idl'>to_idl</span> + <span class='kw'>end</span> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + <div class="method_details "> + <h3 class="signature " id="to_idl-instance_method"> #<strong>to_idl</strong> ⇒ <tt>String</tt> @@ -249,12 +394,24 @@ <h3 class="signature first" id="to_idl-instance_method"> <pre class="lines"> -2698</pre> +2861 +2862 +2863 +2864 +2865 +2866 +2867</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 2698</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 2861</span> -<span class='kw'>def</span> <span class='id identifier rubyid_to_idl'>to_idl</span> <span class='op'>=</span> <span class='id identifier rubyid_text_value'>text_value</span></pre> +<span class='kw'>def</span> <span class='id identifier rubyid_to_idl'>to_idl</span> + <span class='kw'>if</span> <span class='ivar'>@type_name</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Bits</span><span class='tstring_end'>"</span></span> + <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Bits<</span><span class='embexpr_beg'>#{</span><span class='ivar'>@bits_expression</span><span class='period'>.</span><span class='id identifier rubyid_to_idl'>to_idl</span><span class='embexpr_end'>}</span><span class='tstring_content'>></span><span class='tstring_end'>"</span></span> + <span class='kw'>else</span> + <span class='ivar'>@type_name</span> + <span class='kw'>end</span> +<span class='kw'>end</span></pre> </td> </tr> </table> @@ -344,28 +501,30 @@ <h3 class="signature " id="type-instance_method"> <pre class="lines"> -2681 -2682 -2683 -2684 -2685 -2686 -2687 -2688 -2689 -2690 -2691 -2692 -2693 -2694 -2695</pre> +2842 +2843 +2844 +2845 +2846 +2847 +2848 +2849 +2850 +2851 +2852 +2853 +2854 +2855 +2856 +2857 +2858</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 2681</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 2842</span> <span class='kw'>def</span> <span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> <span class='id identifier rubyid_archdef'>archdef</span> <span class='op'>=</span> <span class='id identifier rubyid_symtab'>symtab</span><span class='period'>.</span><span class='id identifier rubyid_archdef'>archdef</span> - <span class='kw'>case</span> <span class='id identifier rubyid_text_value'>text_value</span> + <span class='kw'>case</span> <span class='ivar'>@type_name</span> <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>XReg</span><span class='tstring_end'>"</span></span> <span class='const'><span class='object_link'><a href="Type.html" title="Idl::Type (class)">Type</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Type.html#initialize-instance_method" title="Idl::Type#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='symbol'>:bits</span><span class='comma'>,</span> <span class='label'>width:</span> <span class='id identifier rubyid_archdef'>archdef</span><span class='period'>.</span><span class='id identifier rubyid_config_params'>config_params</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>XLEN</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Boolean</span><span class='tstring_end'>"</span></span> @@ -374,6 +533,8 @@ <h3 class="signature " id="type-instance_method"> <span class='const'><span class='object_link'><a href="Type.html" title="Idl::Type (class)">Type</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Type.html#initialize-instance_method" title="Idl::Type#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='symbol'>:bits</span><span class='comma'>,</span> <span class='label'>width:</span> <span class='int'>32</span><span class='rparen'>)</span> <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>U64</span><span class='tstring_end'>"</span></span> <span class='const'><span class='object_link'><a href="Type.html" title="Idl::Type (class)">Type</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Type.html#initialize-instance_method" title="Idl::Type#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='symbol'>:bits</span><span class='comma'>,</span> <span class='label'>width:</span> <span class='int'>64</span><span class='rparen'>)</span> + <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Bits</span><span class='tstring_end'>"</span></span> + <span class='const'><span class='object_link'><a href="Type.html" title="Idl::Type (class)">Type</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Type.html#initialize-instance_method" title="Idl::Type#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='symbol'>:bits</span><span class='comma'>,</span> <span class='label'>width:</span> <span class='ivar'>@bits_expression</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>else</span> <span class='id identifier rubyid_internal_error'>internal_error</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>TODO: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_text_value'>text_value</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>end</span> @@ -463,15 +624,27 @@ <h3 class="signature " id="type_check-instance_method"> <pre class="lines"> -2676 -2677 -2678</pre> +2831 +2832 +2833 +2834 +2835 +2836 +2837 +2838 +2839</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 2676</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 2831</span> <span class='kw'>def</span> <span class='id identifier rubyid_type_check'>type_check</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> - <span class='id identifier rubyid_type_error'>type_error</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Unimplemented builtin type </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_text_value'>text_value</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>XReg</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Boolean</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>U32</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>U64</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_text_value'>text_value</span><span class='rparen'>)</span> + <span class='kw'>if</span> <span class='ivar'>@type_name</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Bits</span><span class='tstring_end'>"</span></span> + <span class='ivar'>@bits_expression</span><span class='period'>.</span><span class='id identifier rubyid_type_check'>type_check</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> + <span class='id identifier rubyid_type_error'>type_error</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Bits width (</span><span class='embexpr_beg'>#{</span><span class='ivar'>@bits_expression</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>) must be positive</span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='ivar'>@bits_expression</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_positive?'>positive?</span> + <span class='kw'>end</span> + <span class='kw'>unless</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Bits</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>XReg</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Boolean</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>U32</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>U64</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='ivar'>@type_name</span><span class='rparen'>)</span> + <span class='id identifier rubyid_type_error'>type_error</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Unimplemented builtin type </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_text_value'>text_value</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> + <span class='kw'>end</span> <span class='kw'>end</span></pre> </td> </tr> @@ -483,7 +656,7 @@ <h3 class="signature " id="type_check-instance_method"> </div> <div id="footer"> - Generated on Tue Jul 16 12:06:47 2024 by + Generated on Thu Jul 18 13:55:46 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.36 (ruby-3.2.3). </div> diff --git a/docs/ruby/Idl/BuiltinTypeNameSyntaxNode.html b/docs/ruby/Idl/BuiltinTypeNameSyntaxNode.html new file mode 100644 index 000000000..83678f553 --- /dev/null +++ b/docs/ruby/Idl/BuiltinTypeNameSyntaxNode.html @@ -0,0 +1,202 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> +<meta name="viewport" content="width=device-width, initial-scale=1.0"> +<title> + Class: Idl::BuiltinTypeNameSyntaxNode + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Class: Idl::BuiltinTypeNameSyntaxNode + + + +

    +
    + +
    +
    Inherits:
    +
    + Treetop::Runtime::SyntaxNode + + + show all + +
    +
    + + + + + + + + + + + +
    +
    Defined in:
    +
    lib/idl/ast.rb
    +
    + +
    + + + + + + + + + +

    + Instance Method Summary + collapse +

    + + + + + + + + +
    +

    Instance Method Details

    + + +
    +

    + + #to_astObject + + + + + +

    + + + + +
    +
    +
    +
    +2809
    +2810
    +2811
    +2812
    +2813
    +2814
    +2815
    +
    +
    # File 'lib/idl/ast.rb', line 2809
    +
    +def to_ast
    +  if !respond_to?(:i)
    +    BuiltinTypeNameAst.new(input, interval, elements[0].text_value, nil)
    +  else
    +    BuiltinTypeNameAst.new(input, interval, elements[0].text_value, i.to_ast)
    +  end
    +end
    +
    +
    + +
    + +
    + + + +
    + + \ No newline at end of file diff --git a/docs/ruby/Idl/BuiltinVariableAst.html b/docs/ruby/Idl/BuiltinVariableAst.html new file mode 100644 index 000000000..3f3ae8b69 --- /dev/null +++ b/docs/ruby/Idl/BuiltinVariableAst.html @@ -0,0 +1,527 @@ + + + + + + + Class: Idl::BuiltinVariableAst + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Class: Idl::BuiltinVariableAst + + + +

    +
    + +
    +
    Inherits:
    +
    + AstNode + + + show all + +
    +
    + + + + + + + + + + + +
    +
    Defined in:
    +
    lib/idl/ast.rb,
    + lib/idl/passes/gen_adoc.rb
    +
    +
    + +
    + + + + + +

    Instance Attribute Summary collapse

    +
      + +
    • + + + #name ⇒ Object + + + + + + + + + readonly + + + + + + + + + +
      +

      Returns the value of attribute name.

      +
      + +
    • + + +
    + + + + + +

    + Instance Method Summary + collapse +

    + + + + + + + + + + +
    +

    Constructor Details

    + +
    +

    + + #initialize(input, interval, name) ⇒ BuiltinVariableAst + + + + + +

    +
    + +

    Returns a new instance of BuiltinVariableAst.

    + + +
    +
    +
    + + +
    + + + + +
    +
    +
    +
    +2114
    +2115
    +2116
    +2117
    +
    +
    # File 'lib/idl/ast.rb', line 2114
    +
    +def initialize(input, interval, name)
    +  super(input, interval, [])
    +  @name = name
    +end
    +
    +
    + +
    + +
    +

    Instance Attribute Details

    + + + +
    +

    + + #nameObject (readonly) + + + + + +

    +
    + +

    Returns the value of attribute name.

    + + +
    +
    +
    + + +
    + + + + +
    +
    +
    +
    +2112
    +2113
    +2114
    +
    +
    # File 'lib/idl/ast.rb', line 2112
    +
    +def name
    +  @name
    +end
    +
    +
    + +
    + + +
    +

    Instance Method Details

    + + +
    +

    + + #gen_adoc(indent = 0, indent_spaces: 2) ⇒ Object + + + + + +

    + + + + +
    +
    +
    +
    +106
    +107
    +108
    +
    +
    # File 'lib/idl/passes/gen_adoc.rb', line 106
    +
    +def gen_adoc(indent = 0, indent_spaces: 2)
    +  name
    +end
    +
    +
    + +
    +

    + + #type(symtab) ⇒ Object + + + + + +

    + + + + +
    +
    +
    +
    +2123
    +2124
    +2125
    +2126
    +2127
    +2128
    +2129
    +2130
    +2131
    +2132
    +
    +
    # File 'lib/idl/ast.rb', line 2123
    +
    +def type(symtab)
    +  case @name
    +  when "$encoding"
    +    sz = symtab.get("__instruction_encoding_size")
    +    internal_error "Forgot to set __instruction_encoding_size" if sz.nil?
    +    Type.new(:bits, width: sz.value, qualifiers: [:const])
    +  when "$pc"
    +    Type.new(:bits, width: symtab.archdef.config_params["XLEN"])
    +  end
    +end
    +
    +
    + +
    +

    + + #type_check(symtab) ⇒ Object + + + + + +

    + + + + +
    +
    +
    +
    +2119
    +2120
    +2121
    +
    +
    # File 'lib/idl/ast.rb', line 2119
    +
    +def type_check(symtab)
    +  type_error "Not a builtin variable" unless ["$pc", "$encoding"].include?(@name)
    +end
    +
    +
    + +
    +

    + + #value(symtab) ⇒ Object + + + + + +

    + + + + +
    +
    +
    +
    +2134
    +2135
    +2136
    +
    +
    # File 'lib/idl/ast.rb', line 2134
    +
    +def value(symtab)
    +  value_error "Cannot know the value of pc or encoding"
    +end
    +
    +
    + +
    + +
    + + + +
    + + \ No newline at end of file diff --git a/docs/ruby/Idl/BuiltinVariableSyntaxNode.html b/docs/ruby/Idl/BuiltinVariableSyntaxNode.html new file mode 100644 index 000000000..f7e7aa169 --- /dev/null +++ b/docs/ruby/Idl/BuiltinVariableSyntaxNode.html @@ -0,0 +1,194 @@ + + + + + + + Class: Idl::BuiltinVariableSyntaxNode + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Class: Idl::BuiltinVariableSyntaxNode + + + +

    +
    + +
    +
    Inherits:
    +
    + Treetop::Runtime::SyntaxNode + + + show all + +
    +
    + + + + + + + + + + + +
    +
    Defined in:
    +
    lib/idl/ast.rb
    +
    + +
    + + + + + + + + + +

    + Instance Method Summary + collapse +

    + + + + + + + + +
    +

    Instance Method Details

    + + +
    +

    + + #to_astObject + + + + + +

    + + + + +
    +
    +
    +
    +2106
    +2107
    +2108
    +
    +
    # File 'lib/idl/ast.rb', line 2106
    +
    +def to_ast
    +  BuiltinVariableAst.new(input, interval, text_value)
    +end
    +
    +
    + +
    + +
    + + + +
    + + \ No newline at end of file diff --git a/docs/ruby/Idl/Compiler.html b/docs/ruby/Idl/Compiler.html index e6400f9f8..13a459f72 100644 --- a/docs/ruby/Idl/Compiler.html +++ b/docs/ruby/Idl/Compiler.html @@ -128,7 +128,7 @@

  • - #compile_expression(expression, symtab) ⇒ Object + #compile_expression(expression, symtab, pass_error: false) ⇒ Object @@ -196,7 +196,7 @@

  • - #compile_inst_operation(operation, symtab: SymbolTable.new, name: nil, parent: nil, input_file: nil, input_line: 0) ⇒ Ast + #compile_inst_operation(inst, input_file: nil, input_line: 0) ⇒ Ast @@ -240,6 +240,30 @@

    A new instance of Compiler.

    +

  • + + +
  • + + + #type_check(ast, symtab, what) ⇒ Object + + + + + + + + + + + + + +
    +

    Type check an abstract syntax tree.

    +
    +
  • @@ -322,7 +346,7 @@

    Instance Method Details

    - #compile_expression(expression, symtab) ⇒ Object + #compile_expression(expression, symtab, pass_error: false) ⇒ Object @@ -334,6 +358,9 @@

     
     
    +189
    +190
    +191
     192
     193
     194
    @@ -360,12 +387,13 @@ 

    215 216 217 -218

    +218 +219

  • -
    # File 'lib/idl.rb', line 192
    +      
    # File 'lib/idl.rb', line 189
     
    -def compile_expression(expression, symtab)
    +def compile_expression(expression, symtab, pass_error: false)
       m = @parser.parse(expression, root: :expression)
       if m.nil?
         raise SyntaxError, <<~MSG
    @@ -379,11 +407,15 @@ 

    begin ast.type_check(symtab) rescue AstNode::TypeError => e + raise e if pass_error + warn "Compiling #{expression}" warn e.what warn e.backtrace exit 1 rescue AstNode::InternalError => e + raise e if pass_error + warn "Compiling #{expression}" warn e.what warn e.backtrace @@ -787,7 +819,7 @@

    - #compile_inst_operation(operation, symtab: SymbolTable.new, name: nil, parent: nil, input_file: nil, input_line: 0) ⇒ Ast + #compile_inst_operation(inst, input_file: nil, input_line: 0) ⇒ Ast @@ -807,16 +839,16 @@

  • - operation + inst - (String) + (Instruction)
    -

    Instruction operation source code

    +

    Instruction object

  • @@ -829,8 +861,6 @@

    (SymbolTable) - (defaults to: SymbolTable.new) - —
    @@ -841,10 +871,10 @@

  • - name + input_file - (String) + (Pathname) (defaults to: nil) @@ -852,80 +882,185 @@

    -

    Function name, used for error messages

    +

    Path to the input file this source comes from

  • - parent + input_line - (String) + (Integer) - (defaults to: nil) + (defaults to: 0)
    -

    Parent class of the function, used for error messages

    +

    Starting line in the input file that this source comes from

  • + + +

    Returns:

    +
      +
    • - input_file + (Ast) - (Pathname) - (defaults to: nil) + — +
      +

      The root of the abstract syntax tree

      +
      + +
    • + +
    + +

    + + + + +
    +
    +
    +
    +146
    +147
    +148
    +149
    +150
    +151
    +152
    +153
    +154
    +155
    +156
    +157
    +158
    +159
    +160
    +161
    +162
    +163
    +
    +
    # File 'lib/idl.rb', line 146
    +
    +def compile_inst_operation(inst, input_file: nil, input_line: 0)
    +  operation = inst["operation()"]
    +  @parser.set_input_file(input_file, input_line)
    +
    +  m = @parser.parse(operation, root: :instruction_operation)
    +  if m.nil?
    +    raise SyntaxError, <<~MSG
    +      While parsing #{input_file}:#{@parser.failure_line}:#{@parser.failure_column}
    +
    +      #{@parser.failure_reason}
    +    MSG
    +  end
    +
    +  # fix up left recursion
    +  ast = m.to_ast
    +  ast.set_input_file("Inst #{inst.name} (#{input_file})", input_line)
    +  ast
    +end
    +
    +

    + +
    +

    + + #type_check(ast, symtab, what) ⇒ Object + + + + + +

    +
    + +

    Type check an abstract syntax tree

    + + +
    +
    +
    +

    Parameters:

    +
      + +
    • + + ast + + + (AstNode) + —
      -

      Path to the input file this source comes from

      +

      An abstract syntax tree

    • - input_line + symtab - (Integer) + (SymbolTable) - (defaults to: 0) + + — +
      +

      The compilation context

      +
      + +
    • + +
    • + + what + + + (String) + —
      -

      Starting line in the input file that this source comes from

      +

      A description of what you are type checking (for error messages)

    -

    Returns:

    -
      +

      Raises:

      +
      • - (Ast) + - — +
        -

        The root of the abstract syntax tree

        +

        AstNode::TypeError if a type error is found

      • @@ -938,29 +1073,6 @@

         
         
        -148
        -149
        -150
        -151
        -152
        -153
        -154
        -155
        -156
        -157
        -158
        -159
        -160
        -161
        -162
        -163
        -164
        -165
        -166
        -167
        -168
        -169
        -170
         171
         172
         173
        @@ -977,54 +1089,25 @@ 

        184 185 186 -187 -188 -189 -190

        +187

    -
    # File 'lib/idl.rb', line 148
    -
    -def compile_inst_operation(operation, symtab: SymbolTable.new, name: nil, parent: nil, input_file: nil, input_line: 0)
    -  @parser.set_input_file(input_file, input_line)
    -
    -  m = @parser.parse(operation, root: :instruction_operation)
    -  if m.nil?
    -    raise SyntaxError, <<~MSG
    -      While parsing #{input_file}:#{@parser.failure_line}:#{@parser.failure_column}
    -
    -      #{@parser.failure_reason}
    -    MSG
    -  end
    -
    -  # fix up left recursion
    -  ast = m.to_ast
    +      
    # File 'lib/idl.rb', line 171
     
    +def type_check(ast, symtab, what)
       # type check
    -  symtab.push
    -
    -  begin
    +  begin
         ast.type_check(symtab)
       rescue AstNode::TypeError => e
    -    if name && parent
    -      warn "In function #{name} of #{parent}:"
    -    elsif name && parent.nil?
    -      warn "In function #{name}:"
    -    end
    +    warn "While type checking #{what}:"
         warn e.what
    -    warn e.backtrace
         exit 1
       rescue AstNode::InternalError => e
    -    if name && parent
    -      warn "In function #{name} of #{parent}:"
    -    elsif name && parent.nil?
    -      warn "In function #{name}:"
    -    end
    +    warn "While type checking #{what}:"
         warn e.what
         warn e.backtrace
         exit 1
       end
    -  symtab.pop
     
       ast
     end
    @@ -1038,7 +1121,7 @@

    diff --git a/docs/ruby/Idl/ConcatenationExpressionAst.html b/docs/ruby/Idl/ConcatenationExpressionAst.html index 7c163db17..982d0715d 100644 --- a/docs/ruby/Idl/ConcatenationExpressionAst.html +++ b/docs/ruby/Idl/ConcatenationExpressionAst.html @@ -325,10 +325,10 @@

     
     
    -1943
    +2020

    -
    # File 'lib/idl/ast.rb', line 1943
    +      
    # File 'lib/idl/ast.rb', line 2020
     
     def to_idl = "{#{first.to_idl},#{rest.elements.map { |e| e.expression.to_idl }.join(',')}}"
    @@ -420,18 +420,18 @@

     
     
    -1921
    -1922
    -1923
    -1924
    -1925
    -1926
    -1927
    -1928
    -1929
    +1997 +1998 +1999 +2000 +2001 +2002 +2003 +2004 +2005

    -
    # File 'lib/idl/ast.rb', line 1921
    +      
    # File 'lib/idl/ast.rb', line 1997
     
     def type(symtab)
       total_width = first.type(symtab).width
    @@ -527,22 +527,22 @@ 

     
     
    -1906
    -1907
    -1908
    -1909
    -1910
    -1911
    -1912
    -1913
    -1914
    -1915
    -1916
    -1917
    -1918
    +1982 +1983 +1984 +1985 +1986 +1987 +1988 +1989 +1990 +1991 +1992 +1993 +1994

    -
    # File 'lib/idl/ast.rb', line 1906
    +      
    # File 'lib/idl/ast.rb', line 1982
     
     def type_check(symtab)
       first.type_check(symtab)
    @@ -588,26 +588,28 @@ 

     
     
    -1932
    -1933
    -1934
    -1935
    -1936
    -1937
    -1938
    -1939
    -1940
    +2008 +2009 +2010 +2011 +2012 +2013 +2014 +2015 +2016 +2017

    -
    # File 'lib/idl/ast.rb', line 1932
    +      
    # File 'lib/idl/ast.rb', line 2008
     
     def value(symtab)
    -  result = first.value(symtab)
    -  total_width = first.type(symtab).width
    -  rest.elements.each do |e|
    +  result = 0
    +  total_width = 0
    +  rest.elements.reverse_each do |e|
         result |= (e.expression.value(symtab) << total_width)
         total_width += e.expression.type(symtab).width
       end
    +  result |= first.value(symtab) << total_width
       result
     end
    @@ -716,7 +718,7 @@

    diff --git a/docs/ruby/Idl/ConditionalReturnStatementAst.html b/docs/ruby/Idl/ConditionalReturnStatementAst.html index 865af920a..4d6ada231 100644 --- a/docs/ruby/Idl/ConditionalReturnStatementAst.html +++ b/docs/ruby/Idl/ConditionalReturnStatementAst.html @@ -225,12 +225,12 @@

     
     
    -2618
    -2619
    -2620
    +2775 +2776 +2777

    -
    # File 'lib/idl/ast.rb', line 2618
    +      
    # File 'lib/idl/ast.rb', line 2775
     
     def condition
       expression
    @@ -255,20 +255,20 @@ 

     
     
    -2623
    -2624
    -2625
    -2626
    -2627
    -2628
    -2629
    -2630
    -2631
    -2632
    -2633
    +2780 +2781 +2782 +2783 +2784 +2785 +2786 +2787 +2788 +2789 +2790

    -
    # File 'lib/idl/ast.rb', line 2623
    +      
    # File 'lib/idl/ast.rb', line 2780
     
     def return_value(symtab)
       cond = condition.value(symtab)
    @@ -301,18 +301,18 @@ 

     
     
    -2636
    -2637
    -2638
    -2639
    -2640
    -2641
    -2642
    -2643
    -2644
    +2793 +2794 +2795 +2796 +2797 +2798 +2799 +2800 +2801

    -
    # File 'lib/idl/ast.rb', line 2636
    +      
    # File 'lib/idl/ast.rb', line 2793
     
     def return_values(symtab)
       cond = condition.value(symtab)
    @@ -333,7 +333,7 @@ 

    diff --git a/docs/ruby/Idl/ConditionalStatementAst.html b/docs/ruby/Idl/ConditionalStatementAst.html index b4a98dfde..042a402d2 100644 --- a/docs/ruby/Idl/ConditionalStatementAst.html +++ b/docs/ruby/Idl/ConditionalStatementAst.html @@ -379,14 +379,14 @@

     
     
    -2410
    -2411
    -2412
    -2413
    -2414
    +2558 +2559 +2560 +2561 +2562

    -
    # File 'lib/idl/ast.rb', line 2410
    +      
    # File 'lib/idl/ast.rb', line 2558
     
     def initialize(action, condition)
       super(action.input, action.interval.first..action.interval.end, [action, condition])
    @@ -431,12 +431,12 @@ 

     
     
    -2408
    -2409
    -2410
    +2556 +2557 +2558

    -
    # File 'lib/idl/ast.rb', line 2408
    +      
    # File 'lib/idl/ast.rb', line 2556
     
     def action
       @action
    @@ -474,12 +474,12 @@ 

     
     
    -2408
    -2409
    -2410
    +2556 +2557 +2558

    -
    # File 'lib/idl/ast.rb', line 2408
    +      
    # File 'lib/idl/ast.rb', line 2556
     
     def condition
       @condition
    @@ -560,16 +560,16 @@ 

     
     
    -2424
    -2425
    -2426
    -2427
    -2428
    -2429
    -2430
    +2572 +2573 +2574 +2575 +2576 +2577 +2578

    -
    # File 'lib/idl/ast.rb', line 2424
    +      
    # File 'lib/idl/ast.rb', line 2572
     
     def execute(symtab)
       cond = @condition.value(symtab)
    @@ -598,12 +598,12 @@ 

     
     
    -79
    -80
    -81
    +172 +173 +174

    -
    # File 'lib/idl/passes/gen_adoc.rb', line 79
    +      
    # File 'lib/idl/passes/gen_adoc.rb', line 172
     
     def gen_adoc(indent = 0, indent_spaces: 2)
       "#{action.gen_adoc(indent, indent_spaces:)} if (#{condition.gen_adoc(0, indent_spaces:)});"
    @@ -628,23 +628,21 @@ 

     
     
    -188
    -189
    -190
    -191
    -192
    -193
    -194
    -195
    -196
    -197
    -198
    +203 +204 +205 +206 +207 +208 +209 +210 +211 +212

    -
    # File 'lib/idl/passes/prune.rb', line 188
    +      
    # File 'lib/idl/passes/prune.rb', line 203
     
     def prune(symtab)
    -  puts "pruning #{condition.text_value}"
       if condition.value(symtab)
         StatementAst.new(action.prune(symtab))
       else
    @@ -652,7 +650,7 @@ 

    end rescue ValueError # condition not known - self + ConditionalStatementAst.new(action.prune(symtab), condition.prune(symtab)) end

    @@ -703,12 +701,12 @@

     
     
    -2433
    -2434
    -2435
    +2581 +2582 +2583

    -
    # File 'lib/idl/ast.rb', line 2433
    +      
    # File 'lib/idl/ast.rb', line 2581
     
     def to_idl
       "#{@action.to_idl} if (#{@condition.to_idl});"
    @@ -798,14 +796,14 @@ 

     
     
    -2417
    -2418
    -2419
    -2420
    -2421
    +2565 +2566 +2567 +2568 +2569

    -
    # File 'lib/idl/ast.rb', line 2417
    +      
    # File 'lib/idl/ast.rb', line 2565
     
     def type_check(symtab)
       @action.type_check(symtab)
    @@ -822,7 +820,7 @@ 

    diff --git a/docs/ruby/Idl/ConditionalStatementSyntaxNode.html b/docs/ruby/Idl/ConditionalStatementSyntaxNode.html new file mode 100644 index 000000000..ebbb6cfd4 --- /dev/null +++ b/docs/ruby/Idl/ConditionalStatementSyntaxNode.html @@ -0,0 +1,194 @@ + + + + + + + Class: Idl::ConditionalStatementSyntaxNode + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Class: Idl::ConditionalStatementSyntaxNode + + + +

    +
    + +
    +
    Inherits:
    +
    + Treetop::Runtime::SyntaxNode + + + show all + +
    +
    + + + + + + + + + + + +
    +
    Defined in:
    +
    lib/idl/ast.rb
    +
    + +
    + + + + + + + + + +

    + Instance Method Summary + collapse +

    + + + + + + + + +
    +

    Instance Method Details

    + + +
    +

    + + #to_astObject + + + + + +

    + + + + +
    +
    +
    +
    +2546
    +2547
    +2548
    +
    +
    # File 'lib/idl/ast.rb', line 2546
    +
    +def to_ast
    +  ConditionalStatementAst.new(a.to_ast, expression.to_ast)
    +end
    +
    +
    + +
    + +
    + + + +
    + + \ No newline at end of file diff --git a/docs/ruby/Idl/CsrFieldReadExpressionAst.html b/docs/ruby/Idl/CsrFieldReadExpressionAst.html index ede12d9af..600fee921 100644 --- a/docs/ruby/Idl/CsrFieldReadExpressionAst.html +++ b/docs/ruby/Idl/CsrFieldReadExpressionAst.html @@ -392,23 +392,23 @@

     
     
    -3919
    -3920
    -3921
    -3922
    -3923
    -3924
    -3925
    -3926
    -3927
    +4110 +4111 +4112 +4113 +4114 +4115 +4116 +4117 +4118

    -
    # File 'lib/idl/ast.rb', line 3919
    +      
    # File 'lib/idl/ast.rb', line 4110
     
     def csr_def(symtab)
       archdef = symtab.archdef
     
    -  if idx.is_a?(IntAst)
    +  if idx.is_a?(IntLiteralAst)
         archdef.implemented_csrs.find { |c| c.address == idx.value(symtab) }
       else
         archdef.implemented_csrs.find { |c| c.name == idx.text_value }
    @@ -434,12 +434,12 @@ 

     
     
    -3929
    -3930
    -3931
    +4120 +4121 +4122

    -
    # File 'lib/idl/ast.rb', line 3929
    +      
    # File 'lib/idl/ast.rb', line 4120
     
     def csr_name(symtab)
       csr_def(symtab).name
    @@ -464,12 +464,12 @@ 

     
     
    -3933
    -3934
    -3935
    +4124 +4125 +4126

    -
    # File 'lib/idl/ast.rb', line 3933
    +      
    # File 'lib/idl/ast.rb', line 4124
     
     def field_def(symtab)
       csr_def(symtab).implemented_fields.find { |f| f.name == csr_field_name.text_value }
    @@ -494,12 +494,12 @@ 

     
     
    -3937
    -3938
    -3939
    +4128 +4129 +4130

    -
    # File 'lib/idl/ast.rb', line 3937
    +      
    # File 'lib/idl/ast.rb', line 4128
     
     def field_name(symtab)
       field_def(symtab).name
    @@ -524,17 +524,17 @@ 

     
     
    -98
    -99
    -100
    -101
    -102
    -103
    -104
    -105
    +193 +194 +195 +196 +197 +198 +199 +200

    -
    # File 'lib/idl/passes/gen_adoc.rb', line 98
    +      
    # File 'lib/idl/passes/gen_adoc.rb', line 193
     
     def gen_adoc(indent = 0, indent_spaces: 2)
       csr_text = "CSR[#{idx.text_value}].#{csr_field_name.text_value}"
    @@ -593,19 +593,19 @@ 

     
     
    -3942
    -3943
    -3944
    -3945
    -3946
    -3947
    -3948
    +4133 +4134 +4135 +4136 +4137 +4138 +4139

    -
    # File 'lib/idl/ast.rb', line 3942
    +      
    # File 'lib/idl/ast.rb', line 4133
     
     def to_idl
    -  if idx.is_a?(IntAst)
    +  if idx.is_a?(IntLiteralAst)
         "CSR[#{idx.to_idl}].#{csr_field_name.text_value}"
       else
         "CSR[#{idx.text_value}].#{csr_field_name.text_value}"
    @@ -700,21 +700,21 @@ 

     
     
    -3951
    -3952
    -3953
    -3954
    -3955
    -3956
    -3957
    -3958
    -3959
    -3960
    -3961
    -3962
    +4142 +4143 +4144 +4145 +4146 +4147 +4148 +4149 +4150 +4151 +4152 +4153

    -
    # File 'lib/idl/ast.rb', line 3951
    +      
    # File 'lib/idl/ast.rb', line 4142
     
     def type(symtab)
       fd = field_def(symtab)
    @@ -813,22 +813,22 @@ 

     
     
    -3908
    -3909
    -3910
    -3911
    -3912
    -3913
    -3914
    -3915
    -3916
    -3917
    +4099 +4100 +4101 +4102 +4103 +4104 +4105 +4106 +4107 +4108

    -
    # File 'lib/idl/ast.rb', line 3908
    +      
    # File 'lib/idl/ast.rb', line 4099
     
     def type_check(symtab)
    -  if idx.is_a?(IntAst)
    +  if idx.is_a?(IntLiteralAst)
         type_error "No CSR at address #{idx.text_value}" if csr_def(symtab).nil?
       else
         # idx is a csr name
    @@ -868,13 +868,13 @@ 

     
     
    -3965
    -3966
    -3967
    -3968
    +4156 +4157 +4158 +4159

    -
    # File 'lib/idl/ast.rb', line 3965
    +      
    # File 'lib/idl/ast.rb', line 4156
     
     def value(symtab)
       value_error "'#{csr_name(symtab)}.#{field_name(symtab)}' is not RO" unless field_def(symtab).type == "RO"
    @@ -986,7 +986,7 @@ 

    diff --git a/docs/ruby/Idl/CsrReadExpressionAst.html b/docs/ruby/Idl/CsrReadExpressionAst.html index 1cdb79fe2..c7f1be196 100644 --- a/docs/ruby/Idl/CsrReadExpressionAst.html +++ b/docs/ruby/Idl/CsrReadExpressionAst.html @@ -370,29 +370,29 @@

     
     
    -4011
    -4012
    -4013
    -4014
    -4015
    -4016
    -4017
    -4018
    -4019
    -4020
    -4021
    -4022
    -4023
    -4024
    -4025
    -4026
    -4027
    -4028
    -4029
    -4030
    +4202 +4203 +4204 +4205 +4206 +4207 +4208 +4209 +4210 +4211 +4212 +4213 +4214 +4215 +4216 +4217 +4218 +4219 +4220 +4221

    -
    # File 'lib/idl/ast.rb', line 4011
    +      
    # File 'lib/idl/ast.rb', line 4202
     
     def csr_def(symtab)
       archdef = symtab.archdef
    @@ -456,12 +456,12 @@ 

     
     
    -4032
    -4033
    -4034
    +4223 +4224 +4225

    -
    # File 'lib/idl/ast.rb', line 4032
    +      
    # File 'lib/idl/ast.rb', line 4223
     
     def csr_known?(symtab)
       !csr_def(symtab).nil?
    @@ -486,14 +486,14 @@ 

     
     
    -4036
    -4037
    -4038
    -4039
    -4040
    +4227 +4228 +4229 +4230 +4231

    -
    # File 'lib/idl/ast.rb', line 4036
    +      
    # File 'lib/idl/ast.rb', line 4227
     
     def csr_name(symtab)
       internal_error "No CSR" unless csr_known?(symtab)
    @@ -520,17 +520,17 @@ 

     
     
    -109
    -110
    -111
    -112
    -113
    -114
    -115
    -116
    +204 +205 +206 +207 +208 +209 +210 +211

    -
    # File 'lib/idl/passes/gen_adoc.rb', line 109
    +      
    # File 'lib/idl/passes/gen_adoc.rb', line 204
     
     def gen_adoc(indent = 0, indent_spaces: 2)
       csr_text = "CSR[#{idx.text_value}]"
    @@ -589,10 +589,10 @@ 

     
     
    -4053
    +4244

    -
    # File 'lib/idl/ast.rb', line 4053
    +      
    # File 'lib/idl/ast.rb', line 4244
     
     def to_idl = "CSR[#{idx.text_value}]"
    @@ -684,21 +684,21 @@

     
     
    -3975
    -3976
    -3977
    -3978
    -3979
    -3980
    -3981
    -3982
    -3983
    -3984
    -3985
    -3986
    +4166 +4167 +4168 +4169 +4170 +4171 +4172 +4173 +4174 +4175 +4176 +4177

    -
    # File 'lib/idl/ast.rb', line 3975
    +      
    # File 'lib/idl/ast.rb', line 4166
     
     def type(symtab)
       archdef = symtab.archdef
    @@ -797,30 +797,30 @@ 

     
     
    -3989
    -3990
    -3991
    -3992
    -3993
    -3994
    -3995
    -3996
    -3997
    -3998
    -3999
    -4000
    -4001
    -4002
    -4003
    -4004
    -4005
    -4006
    -4007
    -4008
    -4009
    +4180 +4181 +4182 +4183 +4184 +4185 +4186 +4187 +4188 +4189 +4190 +4191 +4192 +4193 +4194 +4195 +4196 +4197 +4198 +4199 +4200

    -
    # File 'lib/idl/ast.rb', line 3989
    +      
    # File 'lib/idl/ast.rb', line 4180
     
     def type_check(symtab)
       archdef = symtab.archdef
    @@ -874,17 +874,17 @@ 

     
     
    -4043
    -4044
    -4045
    -4046
    -4047
    -4048
    -4049
    -4050
    +4234 +4235 +4236 +4237 +4238 +4239 +4240 +4241

    -
    # File 'lib/idl/ast.rb', line 4043
    +      
    # File 'lib/idl/ast.rb', line 4234
     
     def value(symtab)
       cd = csr_def(symtab)
    @@ -1000,7 +1000,7 @@ 

    diff --git a/docs/ruby/Idl/CsrSoftwareReadAst.html b/docs/ruby/Idl/CsrSoftwareReadAst.html index b0b824747..b3e50e3ba 100644 --- a/docs/ruby/Idl/CsrSoftwareReadAst.html +++ b/docs/ruby/Idl/CsrSoftwareReadAst.html @@ -340,12 +340,12 @@

     
     
    -4115
    -4116
    -4117
    +4306 +4307 +4308

    -
    # File 'lib/idl/ast.rb', line 4115
    +      
    # File 'lib/idl/ast.rb', line 4306
     
     def csr_def(symtab)
       csr.csr_def(symtab)
    @@ -392,12 +392,12 @@ 

     
     
    -4107
    -4108
    -4109
    +4298 +4299 +4300

    -
    # File 'lib/idl/ast.rb', line 4107
    +      
    # File 'lib/idl/ast.rb', line 4298
     
     def csr_known?(symtab)
       csr.csr_known?(symtab)
    @@ -422,12 +422,12 @@ 

     
     
    -4111
    -4112
    -4113
    +4302 +4303 +4304

    -
    # File 'lib/idl/ast.rb', line 4111
    +      
    # File 'lib/idl/ast.rb', line 4302
     
     def csr_name(symtab)
       csr.csr_name(symtab)
    @@ -481,10 +481,10 @@ 

     
     
    -4129
    +4320

    -
    # File 'lib/idl/ast.rb', line 4129
    +      
    # File 'lib/idl/ast.rb', line 4320
     
     def to_idl = "CSR[#{csr.to_idl}].sw_read()"
    @@ -507,18 +507,18 @@

     
     
    -4097
    -4098
    -4099
    -4100
    -4101
    -4102
    -4103
    -4104
    -4105
    +4288 +4289 +4290 +4291 +4292 +4293 +4294 +4295 +4296

    -
    # File 'lib/idl/ast.rb', line 4097
    +      
    # File 'lib/idl/ast.rb', line 4288
     
     def type(symtab)
       archdef = symtab.archdef
    @@ -549,12 +549,12 @@ 

     
     
    -4093
    -4094
    -4095
    +4284 +4285 +4286

    -
    # File 'lib/idl/ast.rb', line 4093
    +      
    # File 'lib/idl/ast.rb', line 4284
     
     def type_check(symtab)
       csr.type_check(symtab)
    @@ -596,16 +596,16 @@ 

     
     
    -4120
    -4121
    -4122
    -4123
    -4124
    -4125
    -4126
    +4311 +4312 +4313 +4314 +4315 +4316 +4317

    -
    # File 'lib/idl/ast.rb', line 4120
    +      
    # File 'lib/idl/ast.rb', line 4311
     
     def value(symtab)
       value_error "CSR not knowable" unless csr_known?(symtab)
    @@ -720,7 +720,7 @@ 

    diff --git a/docs/ruby/Idl/CsrSoftwareWriteAst.html b/docs/ruby/Idl/CsrSoftwareWriteAst.html index 2694fcf90..eebac8080 100644 --- a/docs/ruby/Idl/CsrSoftwareWriteAst.html +++ b/docs/ruby/Idl/CsrSoftwareWriteAst.html @@ -315,12 +315,12 @@

     
     
    -4070
    -4071
    -4072
    +4261 +4262 +4263

    -
    # File 'lib/idl/ast.rb', line 4070
    +      
    # File 'lib/idl/ast.rb', line 4261
     
     def csr_known?(symtab)
       csr.csr_known?(symtab)
    @@ -345,12 +345,12 @@ 

     
     
    -4074
    -4075
    -4076
    +4265 +4266 +4267

    -
    # File 'lib/idl/ast.rb', line 4074
    +      
    # File 'lib/idl/ast.rb', line 4265
     
     def csr_name(symtab)
       csr.csr_name(symtab)
    @@ -424,10 +424,10 @@ 

     
     
    -4084
    +4275

    -
    # File 'lib/idl/ast.rb', line 4084
    +      
    # File 'lib/idl/ast.rb', line 4275
     
     def execute(_symtab) = value_error "CSR writes are global"
    @@ -479,10 +479,10 @@

     
     
    -4087
    +4278

    -
    # File 'lib/idl/ast.rb', line 4087
    +      
    # File 'lib/idl/ast.rb', line 4278
     
     def to_idl = "CSR[#{csr.to_idl}].sw_write(#{expression.to_idl})"
    @@ -505,19 +505,19 @@

     
     
    -4059
    -4060
    -4061
    -4062
    -4063
    -4064
    -4065
    -4066
    -4067
    -4068
    +4250 +4251 +4252 +4253 +4254 +4255 +4256 +4257 +4258 +4259

    -
    # File 'lib/idl/ast.rb', line 4059
    +      
    # File 'lib/idl/ast.rb', line 4250
     
     def type_check(symtab)
       archdef = symtab.archdef
    @@ -560,12 +560,12 @@ 

     
     
    -4079
    -4080
    -4081
    +4270 +4271 +4272

    -
    # File 'lib/idl/ast.rb', line 4079
    +      
    # File 'lib/idl/ast.rb', line 4270
     
     def value(_symtab)
       value_error "CSR writes are global"
    @@ -580,7 +580,7 @@ 

    diff --git a/docs/ruby/Idl/CsrType.html b/docs/ruby/Idl/CsrType.html index 406f85c5e..0b0100249 100644 --- a/docs/ruby/Idl/CsrType.html +++ b/docs/ruby/Idl/CsrType.html @@ -348,7 +348,7 @@

    diff --git a/docs/ruby/Idl/CsrWriteAst.html b/docs/ruby/Idl/CsrWriteAst.html index 6041886f6..b7763d0ed 100644 --- a/docs/ruby/Idl/CsrWriteAst.html +++ b/docs/ruby/Idl/CsrWriteAst.html @@ -295,24 +295,24 @@

     
     
    -4149
    -4150
    -4151
    -4152
    -4153
    -4154
    -4155
    -4156
    -4157
    -4158
    -4159
    +4340 +4341 +4342 +4343 +4344 +4345 +4346 +4347 +4348 +4349 +4350

    -
    # File 'lib/idl/ast.rb', line 4149
    +      
    # File 'lib/idl/ast.rb', line 4340
     
     def csr_def(symtab)
       index =
    -    if idx.is_a?(IntAst)
    +    if idx.is_a?(IntLiteralAst)
           # make sure this value is a defined CSR
           symtab.archdef.csrs.index { |csr| csr.address == idx.text_value.to_i }
         else
    @@ -390,12 +390,12 @@ 

     
     
    -4171
    -4172
    -4173
    +4362 +4363 +4364

    -
    # File 'lib/idl/ast.rb', line 4171
    +      
    # File 'lib/idl/ast.rb', line 4362
     
     def execute(symtab)
       value_error "CSR write"
    @@ -420,12 +420,12 @@ 

     
     
    -4166
    -4167
    -4168
    +4357 +4358 +4359

    -
    # File 'lib/idl/ast.rb', line 4166
    +      
    # File 'lib/idl/ast.rb', line 4357
     
     def name(symtab)
       csr_def(symtab).name
    @@ -479,10 +479,10 @@ 

     
     
    -4176
    +4367

    -
    # File 'lib/idl/ast.rb', line 4176
    +      
    # File 'lib/idl/ast.rb', line 4367
     
     def to_idl = "CSR[#{idx.text_value}]"
    @@ -574,12 +574,12 @@

     
     
    -4162
    -4163
    -4164
    +4353 +4354 +4355

    -
    # File 'lib/idl/ast.rb', line 4162
    +      
    # File 'lib/idl/ast.rb', line 4353
     
     def type(symtab)
       CsrType.new(csr_def(symtab))
    @@ -669,24 +669,24 @@ 

     
     
    -4136
    -4137
    -4138
    -4139
    -4140
    -4141
    -4142
    -4143
    -4144
    -4145
    -4146
    -4147
    +4327 +4328 +4329 +4330 +4331 +4332 +4333 +4334 +4335 +4336 +4337 +4338

    -
    # File 'lib/idl/ast.rb', line 4136
    +      
    # File 'lib/idl/ast.rb', line 4327
     
     def type_check(symtab)
    -  if idx.is_a?(IntAst)
    +  if idx.is_a?(IntLiteralAst)
         # make sure this value is a defined CSR
         index = symtab.archdef.csrs.index { |csr| csr.address == idx.value(symtab) }
         type_error "No csr number '#{idx.value(symtab)}' was found" if index.nil?
    @@ -707,7 +707,7 @@ 

    diff --git a/docs/ruby/Idl/Declaration.html b/docs/ruby/Idl/Declaration.html new file mode 100644 index 000000000..262b1e952 --- /dev/null +++ b/docs/ruby/Idl/Declaration.html @@ -0,0 +1,232 @@ + + + + + + + Module: Idl::Declaration + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Module: Idl::Declaration + + + +

    +
    + + + + + + + + + +
    +
    Included in:
    +
    MultiVariableDeclarationAst, VariableDeclarationAst, VariableDeclarationWithInitializationAst
    +
    + + + +
    +
    Defined in:
    +
    lib/idl/ast.rb
    +
    + +
    + +

    Overview

    +
    + +

    interface for any AstNode that introduces a new symbol into scope

    + + +
    +
    +
    + + +
    + + + + + + + +

    + Instance Method Summary + collapse +

    + + + + + + +
    +

    Instance Method Details

    + + +
    +

    + + #add_symbol(symtab) ⇒ Object + + + + + +

    +
    + +

    Add symbol(s) at the outermost scope of the symbol table

    + + +
    +
    +
    +

    Parameters:

    +
      + +
    • + + symtab + + + (SymbolTable) + + + + — +
      +

      Symbol table at the scope that the symbol(s) will be inserted

      +
      + +
    • + +
    + +

    Raises:

    +
      + +
    • + + + (NotImplementedError) + + + +
    • + +
    + +
    + + + + +
    +
    +
    +
    +416
    +
    +
    # File 'lib/idl/ast.rb', line 416
    +
    +def add_symbol(symtab) = raise NotImplementedError, "#{self.class.name} must implment add_symbol"
    +
    +
    + +
    + +
    + + + +
    + + \ No newline at end of file diff --git a/docs/ruby/Idl/DontCareLvalueAst.html b/docs/ruby/Idl/DontCareLvalueAst.html index 6a08c0755..d1547d37d 100644 --- a/docs/ruby/Idl/DontCareLvalueAst.html +++ b/docs/ruby/Idl/DontCareLvalueAst.html @@ -276,10 +276,10 @@

     
     
    -2492
    +2650

    -
    # File 'lib/idl/ast.rb', line 2492
    +      
    # File 'lib/idl/ast.rb', line 2650
     
     def to_idl = "-"
    @@ -351,12 +351,12 @@

     
     
    -2485
    -2486
    -2487
    +2643 +2644 +2645

    -
    # File 'lib/idl/ast.rb', line 2485
    +      
    # File 'lib/idl/ast.rb', line 2643
     
     def type(_symtab, _archdef)
       Type.new(:dontcare)
    @@ -381,12 +381,12 @@ 

     
     
    -2480
    -2481
    -2482
    +2638 +2639 +2640

    -
    # File 'lib/idl/ast.rb', line 2480
    +      
    # File 'lib/idl/ast.rb', line 2638
     
     def type_check(_symtab)
       # nothing to do!
    @@ -492,10 +492,10 @@ 

     
     
    -2490
    +2648

    -
    # File 'lib/idl/ast.rb', line 2490
    +      
    # File 'lib/idl/ast.rb', line 2648
     
     def value(_symtab, _archdef) = internal_error "Why are you calling value for an lval?"
    @@ -604,7 +604,7 @@

    diff --git a/docs/ruby/Idl/DontCareReturnAst.html b/docs/ruby/Idl/DontCareReturnAst.html index 1549f2f39..be51be040 100644 --- a/docs/ruby/Idl/DontCareReturnAst.html +++ b/docs/ruby/Idl/DontCareReturnAst.html @@ -142,6 +142,32 @@

  • + #initialize(input, interval) ⇒ DontCareReturnAst + + + + + + + constructor + + + + + + + + +
    +

    A new instance of DontCareReturnAst.

    +
    + +
  • + + +
  • + + #set_expected_type(t) ⇒ Object @@ -293,7 +319,52 @@

    +
    +

    Constructor Details

    + +
    +

    + + #initialize(input, interval) ⇒ DontCareReturnAst + + + + + +

    +
    + +

    Returns a new instance of DontCareReturnAst.

    + + +
    +
    +
    + + +
    + + + + +
    +
    +
    +
    +2599
    +2600
    +2601
    +
    +
    # File 'lib/idl/ast.rb', line 2599
    +
    +def initialize(input, interval)
    +  super(input, interval, [])
    +end
    +
    +
    +
    +

    Instance Method Details

    @@ -314,12 +385,12 @@

     
     
    -2469
    -2470
    -2471
    +2627 +2628 +2629

  • -
    # File 'lib/idl/ast.rb', line 2469
    +      
    # File 'lib/idl/ast.rb', line 2627
     
     def set_expected_type(t)
       @expected_type = t
    @@ -344,10 +415,10 @@ 

     
     
    -2473
    +2631

    -
    # File 'lib/idl/ast.rb', line 2473
    +      
    # File 'lib/idl/ast.rb', line 2631
     
     def to_idl = "-"
    @@ -419,12 +490,12 @@

     
     
    -2451
    -2452
    -2453
    +2609 +2610 +2611

    -
    # File 'lib/idl/ast.rb', line 2451
    +      
    # File 'lib/idl/ast.rb', line 2609
     
     def type(_symtab)
       Type.new(:dontcare)
    @@ -449,12 +520,12 @@ 

     
     
    -2446
    -2447
    -2448
    +2604 +2605 +2606

    -
    # File 'lib/idl/ast.rb', line 2446
    +      
    # File 'lib/idl/ast.rb', line 2604
     
     def type_check(_symtab)
       # nothing to do!
    @@ -560,21 +631,21 @@ 

     
     
    -2456
    -2457
    -2458
    -2459
    -2460
    -2461
    -2462
    -2463
    -2464
    -2465
    -2466
    -2467
    +2614 +2615 +2616 +2617 +2618 +2619 +2620 +2621 +2622 +2623 +2624 +2625

    -
    # File 'lib/idl/ast.rb', line 2456
    +      
    # File 'lib/idl/ast.rb', line 2614
     
     def value(_symtab, _archdef)
       internal_error "Must call set_expected_type first" if @expected_type.nil?
    @@ -694,7 +765,7 @@ 

    diff --git a/docs/ruby/Idl/DontCareReturnSyntaxNode.html b/docs/ruby/Idl/DontCareReturnSyntaxNode.html new file mode 100644 index 000000000..f866b26d7 --- /dev/null +++ b/docs/ruby/Idl/DontCareReturnSyntaxNode.html @@ -0,0 +1,194 @@ + + + + + + + Class: Idl::DontCareReturnSyntaxNode + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Class: Idl::DontCareReturnSyntaxNode + + + +

    +
    + +
    +
    Inherits:
    +
    + Treetop::Runtime::SyntaxNode + + + show all + +
    +
    + + + + + + + + + + + +
    +
    Defined in:
    +
    lib/idl/ast.rb
    +
    + +
    + + + + + + + + + +

    + Instance Method Summary + collapse +

    + + + + + + + + +
    +

    Instance Method Details

    + + +
    +

    + + #to_astObject + + + + + +

    + + + + +
    +
    +
    +
    +2587
    +2588
    +2589
    +
    +
    # File 'lib/idl/ast.rb', line 2587
    +
    +def to_ast
    +  DontCareReturnAst.new(input, interval)
    +end
    +
    +
    + +
    + +
    + + + +
    + + \ No newline at end of file diff --git a/docs/ruby/Idl/ElseIfAst.html b/docs/ruby/Idl/ElseIfAst.html new file mode 100644 index 000000000..c15d7d7e7 --- /dev/null +++ b/docs/ruby/Idl/ElseIfAst.html @@ -0,0 +1,733 @@ + + + + + + + Class: Idl::ElseIfAst + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Class: Idl::ElseIfAst + + + +

    +
    + +
    +
    Inherits:
    +
    + AstNode + + + show all + +
    +
    + + + + + + +
    +
    Includes:
    +
    Returns
    +
    + + + + + + +
    +
    Defined in:
    +
    lib/idl/ast.rb,
    + lib/idl/passes/prune.rb
    +
    +
    + +
    + + + + + +

    Instance Attribute Summary collapse

    +
      + +
    • + + + #body ⇒ Object + + + + + + + + + readonly + + + + + + + + + +
      +

      Returns the value of attribute body.

      +
      + +
    • + + +
    • + + + #cond ⇒ Object + + + + + + + + + readonly + + + + + + + + + +
      +

      Returns the value of attribute cond.

      +
      + +
    • + + +
    + + + + + +

    + Instance Method Summary + collapse +

    + + + + + + + + + + + + +
    +

    Constructor Details

    + +
    +

    + + #initialize(cond, body_stmts) ⇒ ElseIfAst + + + + + +

    +
    + +

    Returns a new instance of ElseIfAst.

    + + +
    +
    +
    + + +
    + + + + +
    +
    +
    +
    +3872
    +3873
    +3874
    +3875
    +3876
    +
    +
    # File 'lib/idl/ast.rb', line 3872
    +
    +def initialize(cond, body_stmts)
    +  @body = IfBodyAst.new(body_stmts)
    +  super(cond.input, cond.interval.first..body_stmts.last.interval.end, [cond, @body])
    +  @cond = cond
    +end
    +
    +
    + +
    + +
    +

    Instance Attribute Details

    + + + +
    +

    + + #bodyObject (readonly) + + + + + +

    +
    + +

    Returns the value of attribute body.

    + + +
    +
    +
    + + +
    + + + + +
    +
    +
    +
    +3870
    +3871
    +3872
    +
    +
    # File 'lib/idl/ast.rb', line 3870
    +
    +def body
    +  @body
    +end
    +
    +
    + + + +
    +

    + + #condObject (readonly) + + + + + +

    +
    + +

    Returns the value of attribute cond.

    + + +
    +
    +
    + + +
    + + + + +
    +
    +
    +
    +3870
    +3871
    +3872
    +
    +
    # File 'lib/idl/ast.rb', line 3870
    +
    +def cond
    +  @cond
    +end
    +
    +
    + +
    + + +
    +

    Instance Method Details

    + + +
    +

    + + #prune(symtab) ⇒ Object + + + + + +

    + + + + +
    +
    +
    +
    +155
    +156
    +157
    +
    +
    # File 'lib/idl/passes/prune.rb', line 155
    +
    +def prune(symtab)
    +  ElseIfAst.new(cond.prune(symtab), body.prune(symtab).stmts)
    +end
    +
    +
    + +
    +

    + + #return_value(symtab) ⇒ Object + + + + + + + Originally defined in module + Returns + + +

    +
    + + +
    +
    +
    + +

    Raises:

    +
      + +
    • + + + (NotImplementedError) + + + +
    • + +
    + +
    +
    + +
    +

    + + #return_values(symtab) ⇒ Object + + + + + +

    + + + + +
    +
    +
    +
    +3897
    +3898
    +3899
    +3900
    +3901
    +3902
    +3903
    +3904
    +3905
    +3906
    +
    +
    # File 'lib/idl/ast.rb', line 3897
    +
    +def return_values(symtab)
    +  if @cond.value(symtab)
    +    @body.return_values(symtab)
    +  else
    +    []
    +  end
    +rescue ValueError
    +  # might be taken, so add the possible return values
    +  @body.return_values(symtab)
    +end
    +
    +
    + +
    +

    + + #to_idlString + + + + + +

    +
    + +

    Return valid IDL representation of the node (and its subtree)

    + + +
    +
    +
    + +

    Returns:

    +
      + +
    • + + + (String) + + + + — +
      +

      IDL code for the node

      +
      + +
    • + +
    + +
    + + + + +
    +
    +
    +
    +3909
    +3910
    +3911
    +
    +
    # File 'lib/idl/ast.rb', line 3909
    +
    +def to_idl
    +  " else if (#{@cond.to_idl}) { #{@body.to_idl} }"
    +end
    +
    +
    + +
    +

    + + #type_check(symtab) ⇒ Object + + + + + +

    + + + + +
    +
    +
    +
    +3878
    +3879
    +3880
    +3881
    +3882
    +3883
    +3884
    +3885
    +3886
    +3887
    +3888
    +3889
    +3890
    +3891
    +3892
    +3893
    +3894
    +
    +
    # File 'lib/idl/ast.rb', line 3878
    +
    +def type_check(symtab)
    +  @cond.type_check(symtab)
    +  unless @cond.type(symtab).convertable_to?(:boolean)
    +    type_error "'#{@cond.text_value}' is not boolean"
    +  end
    +
    +  begin
    +    # only type check the body if it is reachable
    +    if @cond.value(symtab) == true
    +      @body.type_check(symtab)
    +      return # don't bother with the rest
    +    end
    +  rescue ValueError
    +    # condition isn't compile-time-known; have to check the body
    +    @body.type_check(symtab)
    +  end
    +end
    +
    +
    + +
    + +
    + + + +
    + + \ No newline at end of file diff --git a/docs/ruby/Idl/EnumDefinitionAst.html b/docs/ruby/Idl/EnumDefinitionAst.html index 9adbc011e..5b9c16bb7 100644 --- a/docs/ruby/Idl/EnumDefinitionAst.html +++ b/docs/ruby/Idl/EnumDefinitionAst.html @@ -397,13 +397,13 @@

     
     
    -616
    -617
    -618
    -619
    +628 +629 +630 +631

    -
    # File 'lib/idl/ast.rb', line 616
    +      
    # File 'lib/idl/ast.rb', line 628
     
     def add_symbol(symtab)
       et = EnumerationType.new(user_type_name.text_value, element_names, element_values)
    @@ -458,14 +458,14 @@ 

     
     
    -576
    -577
    -578
    -579
    -580
    +588 +589 +590 +591 +592

    -
    # File 'lib/idl/ast.rb', line 576
    +      
    # File 'lib/idl/ast.rb', line 588
     
     def element_names
       return @element_names unless @element_names.nil?
    @@ -521,27 +521,27 @@ 

     
     
    -585
    -586
    -587
    -588
    -589
    -590
    -591
    -592
    -593
    -594
    -595
    -596
     597
     598
     599
     600
     601
    -602
    +602 +603 +604 +605 +606 +607 +608 +609 +610 +611 +612 +613 +614

    -
    # File 'lib/idl/ast.rb', line 585
    +      
    # File 'lib/idl/ast.rb', line 597
     
     def element_values
       return @element_values unless @element_values.nil?
    @@ -610,10 +610,10 @@ 

     
     
    -630
    +642

    -
    # File 'lib/idl/ast.rb', line 630
    +      
    # File 'lib/idl/ast.rb', line 642
     
     def name = user_type_name.text_value
    @@ -665,17 +665,17 @@

     
     
    -633
    -634
    -635
    -636
    -637
    -638
    -639
    -640
    +645 +646 +647 +648 +649 +650 +651 +652

    -
    # File 'lib/idl/ast.rb', line 633
    +      
    # File 'lib/idl/ast.rb', line 645
     
     def to_idl
       idl = "enum #{name} { "
    @@ -754,12 +754,12 @@ 

     
     
    -622
    -623
    -624
    +634 +635 +636

    -
    # File 'lib/idl/ast.rb', line 622
    +      
    # File 'lib/idl/ast.rb', line 634
     
     def type(_symtab, _archdef)
       EnumerationType.new(user_type_name.text_value, element_names, element_values)
    @@ -849,18 +849,18 @@ 

     
     
    -605
    -606
    -607
    -608
    -609
    -610
    -611
    -612
    -613
    +617 +618 +619 +620 +621 +622 +623 +624 +625

    -
    # File 'lib/idl/ast.rb', line 605
    +      
    # File 'lib/idl/ast.rb', line 617
     
     def type_check(symtab)
       e.elements.each do |e|
    @@ -972,10 +972,10 @@ 

     
     
    -627
    +639

    -
    # File 'lib/idl/ast.rb', line 627
    +      
    # File 'lib/idl/ast.rb', line 639
     
     def value(_symtab, _archdef) = raise InternalError, "Enum defintions have no value"
    @@ -988,7 +988,7 @@

    diff --git a/docs/ruby/Idl/EnumRefAst.html b/docs/ruby/Idl/EnumRefAst.html index 49e8af76a..a1e818278 100644 --- a/docs/ruby/Idl/EnumRefAst.html +++ b/docs/ruby/Idl/EnumRefAst.html @@ -103,7 +103,9 @@
    Defined in:
    -
    lib/idl/ast.rb
    +
    lib/idl/ast.rb,
    + lib/idl/passes/gen_adoc.rb
    +
    @@ -143,6 +145,98 @@

  • + #class_name ⇒ Object + + + + + + + + + + + + + +
    + +
  • + + +
  • + + + #gen_adoc(indent, indent_spaces: 2) ⇒ Object + + + + + + + + + + + + + +
    + +
  • + + +
  • + + + #initialize(input, interval, class_name, member_name) ⇒ EnumRefAst + + + + + + + constructor + + + + + + + + +
    +

    A new instance of EnumRefAst.

    +
    + +
  • + + +
  • + + + #member_name ⇒ Object + + + + + + + + + + + + + +
    + +
  • + + +
  • + + #to_idl ⇒ String @@ -272,14 +366,147 @@

    +
    +

    Constructor Details

    + +
    +

    + + #initialize(input, interval, class_name, member_name) ⇒ EnumRefAst + + + + + +

    +
    + +

    Returns a new instance of EnumRefAst.

    + + +
    +
    +
    + + +
    + + + + +
    +
    +
    +
    +2258
    +2259
    +2260
    +2261
    +2262
    +2263
    +
    +
    # File 'lib/idl/ast.rb', line 2258
    +
    +def initialize(input, interval, class_name, member_name)
    +  super(input, interval, [])
    +
    +  @enum_class_name = class_name
    +  @member_name = member_name
    +end
    +
    +
    +
    +

    Instance Method Details

    -

    +

    + + #class_nameObject + + + + + +

    + + + + +
    +
    +
    +
    +2255
    +
    +
    # File 'lib/idl/ast.rb', line 2255
    +
    +def class_name = @enum_class_name
    +
    +
    + +
    +

    + + #gen_adoc(indent, indent_spaces: 2) ⇒ Object + + + + + +

    + + + + +
    +
    +
    +
    +41
    +42
    +43
    +
    +
    # File 'lib/idl/passes/gen_adoc.rb', line 41
    +
    +def gen_adoc(indent, indent_spaces: 2)
    +  "#{class_name}::#{member_name}"
    +end
    +
    +
    + +
    +

    + + #member_nameObject + + + + + +

    + + + + +
    +
    +
    +
    +2256
    +
    +
    # File 'lib/idl/ast.rb', line 2256
    +
    +def member_name = @member_name
    +
    +
    + +
    +

    #to_idlString @@ -322,12 +549,12 @@

     
     
    -2144
    +2289

  • -
    # File 'lib/idl/ast.rb', line 2144
    +      
    # File 'lib/idl/ast.rb', line 2289
     
    -def to_idl = "#{enum_class.to_idl}::#{member.to_idl}"
    +def to_idl = "#{@enum_class_name}::#{@member_name}"
    @@ -348,19 +575,19 @@

     
     
    -2130
    -2131
    -2132
    -2133
    -2134
    +2275 +2276 +2277 +2278 +2279

    -
    # File 'lib/idl/ast.rb', line 2130
    +      
    # File 'lib/idl/ast.rb', line 2275
     
     def type(symtab)
    -  internal_error "Must call type_check first" if symtab.get(enum_class.text_value).nil?
    +  internal_error "Must call type_check first" if symtab.get(@enum_class_name).nil?
     
    -  Type.new(:enum_ref, enum_class: symtab.get(enum_class.text_value))
    +  Type.new(:enum_ref, enum_class: symtab.get(@enum_class_name))
     end
    @@ -447,21 +674,23 @@

     
     
    -2122
    -2123
    -2124
    -2125
    -2126
    -2127
    +2266 +2267 +2268 +2269 +2270 +2271 +2272

    -
    # File 'lib/idl/ast.rb', line 2122
    +      
    # File 'lib/idl/ast.rb', line 2266
     
     def type_check(symtab)
    -  enum_def_type = symtab.get(enum_class.text_value)
    -  type_error "No symbol #{enum_class.text_value} has been defined" if enum_def_type.nil?
    +  enum_def_type = symtab.get(@enum_class_name)
    +  type_error "No symbol #{@enum_class_name} has been defined" if enum_def_type.nil?
     
    -  type_error "#{enum_class.text_value} is not an enum type" unless enum_def_type.is_a?(EnumerationType)
    +  type_error "#{@enum_class_name} is not an enum type" unless enum_def_type.is_a?(EnumerationType)
    +  type_error "#{@enum_class_name} has no member '#{@member_name}'" if enum_def_type.value(@member_name).nil?
     end
    @@ -483,19 +712,19 @@

     
     
    -2137
    -2138
    -2139
    -2140
    -2141
    +2282 +2283 +2284 +2285 +2286

    -
    # File 'lib/idl/ast.rb', line 2137
    +      
    # File 'lib/idl/ast.rb', line 2282
     
     def value(symtab)
    -  internal_error "Must call type_check first" if symtab.get(enum_class.text_value).nil?
    +  internal_error "Must call type_check first" if symtab.get(@enum_class_name).nil?
     
    -  symtab.get(enum_class.text_value).value(member.text_value)
    +  symtab.get(@enum_class_name).value(@member_name)
     end
    @@ -603,7 +832,7 @@

    diff --git a/docs/ruby/Idl/EnumRefSyntaxNode.html b/docs/ruby/Idl/EnumRefSyntaxNode.html new file mode 100644 index 000000000..5162f03d0 --- /dev/null +++ b/docs/ruby/Idl/EnumRefSyntaxNode.html @@ -0,0 +1,194 @@ + + + + + + + Class: Idl::EnumRefSyntaxNode + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Class: Idl::EnumRefSyntaxNode + + + +

    +
    + +
    +
    Inherits:
    +
    + Treetop::Runtime::SyntaxNode + + + show all + +
    +
    + + + + + + + + + + + +
    +
    Defined in:
    +
    lib/idl/ast.rb
    +
    + +
    + + + + + + + + + +

    + Instance Method Summary + collapse +

    + + + + + + + + +
    +

    Instance Method Details

    + + +
    +

    + + #to_astObject + + + + + +

    + + + + +
    +
    +
    +
    +2242
    +2243
    +2244
    +
    +
    # File 'lib/idl/ast.rb', line 2242
    +
    +def to_ast
    +  EnumRefAst.new(input, interval, enum_class.text_value, member.text_value)
    +end
    +
    +
    + +
    + +
    + + + +
    + + \ No newline at end of file diff --git a/docs/ruby/Idl/EnumerationType.html b/docs/ruby/Idl/EnumerationType.html index 394bd0a0c..038c1a08a 100644 --- a/docs/ruby/Idl/EnumerationType.html +++ b/docs/ruby/Idl/EnumerationType.html @@ -551,9 +551,9 @@

    def value(element_name) i = @element_names.index(element_name) - raise "Could not find #{element_name} in enumeration #{@name}" if i.nil? + return nil if i.nil? - return @element_values[i] + @element_values[i] end

    @@ -565,7 +565,7 @@

    diff --git a/docs/ruby/Idl/Executable.html b/docs/ruby/Idl/Executable.html index 147712d99..eb9abcf71 100644 --- a/docs/ruby/Idl/Executable.html +++ b/docs/ruby/Idl/Executable.html @@ -76,7 +76,7 @@
    Included in:
    -
    AssignmentAst, CsrSoftwareWriteAst, CsrWriteAst, ForLoopAst, FunctionBodyAst, FunctionCallExpressionAst, FunctionStatementAst, GlobalAst, GlobalWithInitializationAst, IfAst, IfBodyAst, InstructionOperationAst, PostDecrementExpressionAst, PostIncrementExpressionAst, StatementAst, VariableDeclarationWithInitializationAst
    +
    AssignmentAst, CsrSoftwareWriteAst, CsrWriteAst, ForLoopAst, FunctionBodyAst, FunctionCallExpressionAst, GlobalAst, GlobalWithInitializationAst, IfAst, IfBodyAst, InstructionOperationAst, PostDecrementExpressionAst, PostIncrementExpressionAst, StatementAst, VariableDeclarationWithInitializationAst
    @@ -211,10 +211,10 @@

     
     
    -315
    +318

    -
    # File 'lib/idl/ast.rb', line 315
    +      
    # File 'lib/idl/ast.rb', line 318
     
     def execute(symtab) = raise NotImplementedError, "#{self.class.name} must implement execute"
    @@ -227,7 +227,7 @@

    diff --git a/docs/ruby/Idl/ExecutionCommentAst.html b/docs/ruby/Idl/ExecutionCommentAst.html index 01d4de20c..9727d0c30 100644 --- a/docs/ruby/Idl/ExecutionCommentAst.html +++ b/docs/ruby/Idl/ExecutionCommentAst.html @@ -170,10 +170,10 @@

     
     
    -2648
    +2805

    -
    # File 'lib/idl/ast.rb', line 2648
    +      
    # File 'lib/idl/ast.rb', line 2805
     
     def type_check(_symtab, _global); end
    @@ -186,7 +186,7 @@

    diff --git a/docs/ruby/Idl/FieldAssignmentAst.html b/docs/ruby/Idl/FieldAssignmentAst.html index bf573e493..8fc8ce546 100644 --- a/docs/ruby/Idl/FieldAssignmentAst.html +++ b/docs/ruby/Idl/FieldAssignmentAst.html @@ -386,14 +386,14 @@

     
     
    -1142
    -1143
    -1144
    -1145
    -1146
    +1168 +1169 +1170 +1171 +1172

    -
    # File 'lib/idl/ast.rb', line 1142
    +      
    # File 'lib/idl/ast.rb', line 1168
     
     def bf_type(symtab)
       internal_error "Not a bitfield variable" unless kind(symtab) == :bitfield
    @@ -420,12 +420,12 @@ 

     
     
    -1201
    -1202
    -1203
    +1227 +1228 +1229

    -
    # File 'lib/idl/ast.rb', line 1201
    +      
    # File 'lib/idl/ast.rb', line 1227
     
     def execute(symtab)
       value_error "TODO: Field assignement execution"
    @@ -497,13 +497,13 @@ 

     
     
    -1150
    -1151
    -1152
    -1153
    +1176 +1177 +1178 +1179

    -
    # File 'lib/idl/ast.rb', line 1150
    +      
    # File 'lib/idl/ast.rb', line 1176
     
     def field(symtab)
       internal_error "Not a CSR field type" unless kind(symtab) == :csr
    @@ -558,12 +558,12 @@ 

     
     
    -1136
    -1137
    -1138
    +1162 +1163 +1164

    -
    # File 'lib/idl/ast.rb', line 1136
    +      
    # File 'lib/idl/ast.rb', line 1162
     
     def kind(symtab)
       var.type(symtab).kind
    @@ -617,10 +617,10 @@ 

     
     
    -1206
    +1232

    -
    # File 'lib/idl/ast.rb', line 1206
    +      
    # File 'lib/idl/ast.rb', line 1232
     
     def to_idl = "#{var.to_idl}.#{field_name.to_idl} = #{rval.to_idl}"
    @@ -712,27 +712,27 @@

     
     
    -1156
    -1157
    -1158
    -1159
    -1160
    -1161
    -1162
    -1163
    -1164
    -1165
    -1166
    -1167
    -1168
    -1169
    -1170
    -1171
    -1172
    -1173
    +1182 +1183 +1184 +1185 +1186 +1187 +1188 +1189 +1190 +1191 +1192 +1193 +1194 +1195 +1196 +1197 +1198 +1199

    -
    # File 'lib/idl/ast.rb', line 1156
    +      
    # File 'lib/idl/ast.rb', line 1182
     
     def type(symtab)
       case kind(symtab)
    @@ -837,33 +837,33 @@ 

     
     
    -1176
    -1177
    -1178
    -1179
    -1180
    -1181
    -1182
    -1183
    -1184
    -1185
    -1186
    -1187
    -1188
    -1189
    -1190
    -1191
    -1192
    -1193
    -1194
    -1195
    -1196
    -1197
    -1198
    -1199
    +1202 +1203 +1204 +1205 +1206 +1207 +1208 +1209 +1210 +1211 +1212 +1213 +1214 +1215 +1216 +1217 +1218 +1219 +1220 +1221 +1222 +1223 +1224 +1225

    -
    # File 'lib/idl/ast.rb', line 1176
    +      
    # File 'lib/idl/ast.rb', line 1202
     
     def type_check(symtab)
       var.type_check(symtab)
    @@ -899,7 +899,7 @@ 

    diff --git a/docs/ruby/Idl/FieldNameAst.html b/docs/ruby/Idl/FieldNameAst.html index c47aba5c0..49dadb0d4 100644 --- a/docs/ruby/Idl/FieldNameAst.html +++ b/docs/ruby/Idl/FieldNameAst.html @@ -225,10 +225,10 @@

     
     
    -3074
    +3236

    -
    # File 'lib/idl/ast.rb', line 3074
    +      
    # File 'lib/idl/ast.rb', line 3236
     
     def to_idl = text_value
    @@ -316,12 +316,12 @@

     
     
    -3068
    -3069
    -3070
    +3230 +3231 +3232

    -
    # File 'lib/idl/ast.rb', line 3068
    +      
    # File 'lib/idl/ast.rb', line 3230
     
     def type_check(_symtab, _archdef)
       # nothing to do
    @@ -336,7 +336,7 @@ 

    diff --git a/docs/ruby/Idl/ForLoopAst.html b/docs/ruby/Idl/ForLoopAst.html index 2d776fb65..883f8d7c5 100644 --- a/docs/ruby/Idl/ForLoopAst.html +++ b/docs/ruby/Idl/ForLoopAst.html @@ -103,7 +103,9 @@
    Defined in:
    -
    lib/idl/ast.rb
    +
    lib/idl/ast.rb,
    + lib/idl/passes/gen_adoc.rb
    +
    @@ -112,6 +114,127 @@ +

    Instance Attribute Summary collapse

    +
      + +
    • + + + #condition ⇒ Object + + + + + + + + + readonly + + + + + + + + + +
      +

      Returns the value of attribute condition.

      +
      + +
    • + + +
    • + + + #init ⇒ Object + + + + + + + + + readonly + + + + + + + + + +
      +

      Returns the value of attribute init.

      +
      + +
    • + + +
    • + + + #stmts ⇒ Object + + + + + + + + + readonly + + + + + + + + + +
      +

      Returns the value of attribute stmts.

      +
      + +
    • + + +
    • + + + #update ⇒ Object + + + + + + + + + readonly + + + + + + + + + +
      +

      Returns the value of attribute update.

      +
      + +
    • + + +
    + @@ -126,6 +249,54 @@

  • + #gen_adoc(indent = 0, indent_spaces: 2) ⇒ Object + + + + + + + + + + + + + +
    + +
  • + + +
  • + + + #initialize(input, interval, init, condition, update, stmts) ⇒ ForLoopAst + + + + + + + constructor + + + + + + + + +
    +

    A new instance of ForLoopAst.

    +
    + +
  • + + +
  • + + #return_value(symtab) ⇒ Object @@ -230,14 +401,286 @@

    +
    +

    Constructor Details

    + +
    +

    + + #initialize(input, interval, init, condition, update, stmts) ⇒ ForLoopAst + + + + + +

    +
    + +

    Returns a new instance of ForLoopAst.

    + + +
    +
    +
    + + +
    + + + + +
    +
    +
    +
    +3682
    +3683
    +3684
    +3685
    +3686
    +3687
    +3688
    +3689
    +
    +
    # File 'lib/idl/ast.rb', line 3682
    +
    +def initialize(input, interval, init, condition, update, stmts)
    +  super(input, interval, [init, condition] + stmts)
    +
    +  @init = init
    +  @condition = condition
    +  @update = update
    +  @stmts = stmts
    +end
    +
    +
    + +
    + +
    +

    Instance Attribute Details

    + + + +
    +

    + + #conditionObject (readonly) + + + + + +

    +
    + +

    Returns the value of attribute condition.

    + + +
    +
    +
    + + +
    + + + + +
    +
    +
    +
    +3680
    +3681
    +3682
    +
    +
    # File 'lib/idl/ast.rb', line 3680
    +
    +def condition
    +  @condition
    +end
    +
    +
    + + + +
    +

    + + #initObject (readonly) + + + + + +

    +
    + +

    Returns the value of attribute init.

    + + +
    +
    +
    + + +
    + + + + +
    +
    +
    +
    +3680
    +3681
    +3682
    +
    +
    # File 'lib/idl/ast.rb', line 3680
    +
    +def init
    +  @init
    +end
    +
    +
    + + + +
    +

    + + #stmtsObject (readonly) + + + +

    +
    + +

    Returns the value of attribute stmts.

    + + +
    +
    +
    + + +
    + + + + +
    +
    +
    +
    +3680
    +3681
    +3682
    +
    +
    # File 'lib/idl/ast.rb', line 3680
    +
    +def stmts
    +  @stmts
    +end
    +
    +
    + + + +
    +

    + + #updateObject (readonly) + + + + + +

    +
    + +

    Returns the value of attribute update.

    + + +
    +
    +
    + + +
    + + + + +
    +
    +
    +
    +3680
    +3681
    +3682
    +
    +
    # File 'lib/idl/ast.rb', line 3680
    +
    +def update
    +  @update
    +end
    +
    +
    + +
    + +

    Instance Method Details

    -

    +

    + + #gen_adoc(indent = 0, indent_spaces: 2) ⇒ Object + + + + + +

    + + + + +
    +
    +
    +
    +95
    +96
    +97
    +98
    +99
    +100
    +101
    +102
    +
    +
    # File 'lib/idl/passes/gen_adoc.rb', line 95
    +
    +def gen_adoc(indent = 0, indent_spaces: 2)
    +  lines = ["#{' '*indent}for (#{init.gen_adoc(0, indent_spaces:)}; #{condition.gen_adoc(0, indent_spaces:)}; #{update.gen_adoc(0, indent_spaces:)}) {"]
    +  stmts.each do |s|
    +    lines << s.gen_adoc(indent + indent_spaces, indent_spaces:)
    +  end
    +  lines << "#{' '*indent}}"
    +  lines.join("\n")
    +end
    +
    +
    + +
    +

    #return_value(symtab) ⇒ Object @@ -255,57 +698,57 @@

     
     
    -3514
    -3515
    -3516
    -3517
    -3518
    -3519
    -3520
    -3521
    -3522
    -3523
    -3524
    -3525
    -3526
    -3527
    -3528
    -3529
    -3530
    -3531
    -3532
    -3533
    -3534
    -3535
    -3536
    -3537
    -3538
    -3539
    -3540
    -3541
    +3705 +3706 +3707 +3708 +3709 +3710 +3711 +3712 +3713 +3714 +3715 +3716 +3717 +3718 +3719 +3720 +3721 +3722 +3723 +3724 +3725 +3726 +3727 +3728 +3729 +3730 +3731 +3732

  • -
    # File 'lib/idl/ast.rb', line 3514
    +      
    # File 'lib/idl/ast.rb', line 3705
     
     def return_value(symtab)
       symtab.push
     
       begin
    -    single_declaration_with_initialization.execute(symtab)
    +    @init.execute(symtab)
     
    -    while condition.value(symtab)
    -      stmts.elements.each do |s|
    -        if s.s.is_a?(Returns)
    -          v = s.s.return_value(symtab)
    +    while @condition.value(symtab)
    +      @stmts.each do |s|
    +        if s.is_a?(Returns)
    +          v = s.return_value(symtab)
               unless v.nil?
                 symtab.pop
                 return v
               end
             else
    -          s.s.execute(symtab)
    +          s.execute(symtab)
             end
           end
    -      action.execute(symtab)
    +      @update.execute(symtab)
         end
       rescue ValueError => e
         symtab.pop
    @@ -335,41 +778,41 @@ 

     
     
    -3544
    -3545
    -3546
    -3547
    -3548
    -3549
    -3550
    -3551
    -3552
    -3553
    -3554
    -3555
    -3556
    -3557
    -3558
    -3559
    -3560
    -3561
    -3562
    -3563
    -3564
    -3565
    -3566
    -3567
    -3568
    -3569
    -3570
    -3571
    -3572
    -3573
    -3574
    -3575
    +3735 +3736 +3737 +3738 +3739 +3740 +3741 +3742 +3743 +3744 +3745 +3746 +3747 +3748 +3749 +3750 +3751 +3752 +3753 +3754 +3755 +3756 +3757 +3758 +3759 +3760 +3761 +3762 +3763 +3764 +3765 +3766

    -
    # File 'lib/idl/ast.rb', line 3544
    +      
    # File 'lib/idl/ast.rb', line 3735
     
     def return_values(symtab)
       # if there is a known return value, then we are done
    @@ -380,22 +823,22 @@ 

    symtab.push begin - single_declaration_with_initialization.execute(symtab) + @init.execute(symtab) - while condition.value(symtab) - stmts.elements.each do |s| - if s.s.is_a?(Returns) + while @condition.value(symtab) + @stmts.each do |s| + if s.is_a?(Returns) begin - v = s.s.return_value(symtab) + v = s.return_value(symtab) return values.push(v).uniq unless v.nil? rescue ValueError - values += s.s.return_values(symtab) + values += s.return_values(symtab) end else - s.s.execute(symtab) + s.execute(symtab) end end - action.execute(symtab) + @update.execute(symtab) end ensure symtab.pop @@ -452,22 +895,22 @@

     
     
    -3581
    -3582
    -3583
    -3584
    -3585
    -3586
    -3587
    -3588
    +3772 +3773 +3774 +3775 +3776 +3777 +3778 +3779

    -
    # File 'lib/idl/ast.rb', line 3581
    +      
    # File 'lib/idl/ast.rb', line 3772
     
     def to_idl
    -  idl = "for (#{single_declaration_with_initialization.to_idl}; #{condition.to_idl}; #{action.to_idl}) {"
    -  stmts.elements.each do |s|
    -    idl << s.s.to_idl
    +  idl = "for (#{@init.to_idl}; #{@condition.to_idl}; #{@update.to_idl}) {"
    +  @stmts.each do |s|
    +    idl << s.to_idl
       end
       idl << "}"
       idl
    @@ -557,29 +1000,29 @@ 

     
     
    -3501
    -3502
    -3503
    -3504
    -3505
    -3506
    -3507
    -3508
    -3509
    -3510
    -3511
    +3692 +3693 +3694 +3695 +3696 +3697 +3698 +3699 +3700 +3701 +3702

    -
    # File 'lib/idl/ast.rb', line 3501
    +      
    # File 'lib/idl/ast.rb', line 3692
     
     def type_check(symtab)
       symtab.push
    -  single_declaration_with_initialization.type_check(symtab)
    -  condition.type_check(symtab)
    -  action.type_check(symtab)
    +  @init.type_check(symtab)
    +  @condition.type_check(symtab)
    +  @update.type_check(symtab)
     
    -  stmts.elements.each do |s|
    -    s.s.type_check(symtab)
    +  @stmts.each do |s|
    +    s.type_check(symtab)
       end
       symtab.pop
     end
    @@ -593,7 +1036,7 @@

    diff --git a/docs/ruby/Idl/ForLoopSyntaxNode.html b/docs/ruby/Idl/ForLoopSyntaxNode.html new file mode 100644 index 000000000..82fb2354e --- /dev/null +++ b/docs/ruby/Idl/ForLoopSyntaxNode.html @@ -0,0 +1,206 @@ + + + + + + + Class: Idl::ForLoopSyntaxNode + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Class: Idl::ForLoopSyntaxNode + + + +

    +
    + +
    +
    Inherits:
    +
    + Treetop::Runtime::SyntaxNode + + + show all + +
    +
    + + + + + + + + + + + +
    +
    Defined in:
    +
    lib/idl/ast.rb
    +
    + +
    + + + + + + + + + +

    + Instance Method Summary + collapse +

    + + + + + + + + +
    +

    Instance Method Details

    + + +
    +

    + + #to_astObject + + + + + +

    + + + + +
    +
    +
    +
    +3665
    +3666
    +3667
    +3668
    +3669
    +3670
    +3671
    +3672
    +3673
    +
    +
    # File 'lib/idl/ast.rb', line 3665
    +
    +def to_ast
    +  ForLoopAst.new(
    +    input, interval,
    +    single_declaration_with_initialization.to_ast,
    +    condition.to_ast,
    +    action.to_ast,
    +    stmts.elements.map(&:s).map(&:to_ast)
    +  )
    +end
    +
    +
    + +
    + +
    + + + +
    + + \ No newline at end of file diff --git a/docs/ruby/Idl/FunctionBodyAst.html b/docs/ruby/Idl/FunctionBodyAst.html index 87b39c408..5ee2614a7 100644 --- a/docs/ruby/Idl/FunctionBodyAst.html +++ b/docs/ruby/Idl/FunctionBodyAst.html @@ -150,7 +150,7 @@

  • - #initialize(stmts) ⇒ FunctionBodyAst + #initialize(input, interval, stmts) ⇒ FunctionBodyAst @@ -352,7 +352,7 @@

    Constructor Details

    - #initialize(stmts) ⇒ FunctionBodyAst + #initialize(input, interval, stmts) ⇒ FunctionBodyAst @@ -375,16 +375,16 @@

     
     
    -3116
    -3117
    -3118
    -3119
    +3284 +3285 +3286 +3287

  • -
    # File 'lib/idl/ast.rb', line 3116
    +      
    # File 'lib/idl/ast.rb', line 3284
     
    -def initialize(stmts)
    -  super(stmts[0].input, stmts[0].interval.first..stmts.last.interval.end, stmts)
    +def initialize(input, interval, stmts)
    +  super(input, interval, stmts)
       @stmts = stmts
     end
    @@ -414,12 +414,12 @@

     
     
    -92
    -93
    -94
    +187 +188 +189

    -
    # File 'lib/idl/passes/gen_adoc.rb', line 92
    +      
    # File 'lib/idl/passes/gen_adoc.rb', line 187
     
     def gen_adoc(indent = 0, indent_spaces: 2)
       statements.map{ |s| "#{' ' * indent}#{s.gen_adoc(indent, indent_spaces:)}" }.join("\n")
    @@ -513,19 +513,6 @@ 

     
     
    -40
    -41
    -42
    -43
    -44
    -45
    -46
    -47
    -48
    -49
    -50
    -51
    -52
     53
     54
     55
    @@ -545,40 +532,57 @@ 

    69 70 71 -72

    +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87

    -
    # File 'lib/idl/passes/prune.rb', line 40
    +      
    # File 'lib/idl/passes/prune.rb', line 53
     
     def prune(symtab)
       symtab.push
    -  begin
    -    func_def = find_ancestor(FunctionDefAst)
    -    unless func_def.nil?
    -      # push template values
    -      func_def.template_names.each_with_index do |tname, idx|
    -        symtab.add(tname, Var.new(tname, func_def.template_types(symtab)[idx]))
    -      end
    -
    -      # push args
    -      func_def.arguments(symtab).each do |arg_type, arg_name|
    -        symtab.add(arg_name, Var.new(arg_name, arg_type))
    -      end
    +  raise "?" if symtab.get("current_mode").nil?
    +  func_def = find_ancestor(FunctionDefAst)
    +  unless func_def.nil?
    +    return FunctionBodyAst.new(input, interval, statements) if func_def.templated? # can't prune a template because we don't have all types
    +
    +    # push template values
    +    func_def.template_names.each_with_index do |tname, idx|
    +      symtab.add(tname, Var.new(tname, func_def.template_types(symtab)[idx]))
         end
     
    +    # push args
    +    func_def.arguments(symtab).each do |arg_type, arg_name|
    +      symtab.add(arg_name, Var.new(arg_name, arg_type))
    +    end
    +  end
    +  begin
         # go through the statements, and stop if we find one that retuns
         statements.each_with_index do |s, idx|
           if s.is_a?(Returns)
             v = s.return_value(symtab)
    -        return FunctionBodyAst.new(statements[0..idx].map { |s| s.prune(symtab) }) unless v.nil?
    +        return FunctionBodyAst.new(input, interval, statements[0..idx].map { |s| s.prune(symtab) }) unless v.nil?
           else
             s.execute(symtab)
           end
         end
     
    -    FunctionBodyAst.new(statements.map { |s| s.prune(symtab) })
    +    FunctionBodyAst.new(input, interval, statements.map { |s| s.prune(symtab) })
       rescue ValueError
    -    FunctionBodyAst.new(statements.map { |s| s.prune(symtab) })
    +    FunctionBodyAst.new(input, interval, statements.map { |s| s.prune(symtab) })
       ensure
         symtab.pop
       end
    @@ -624,24 +628,24 @@ 

     
     
    -3152
    -3153
    -3154
    -3155
    -3156
    -3157
    -3158
    -3159
    -3160
    -3161
    -3162
    -3163
    -3164
    -3165
    -3166
    +3320 +3321 +3322 +3323 +3324 +3325 +3326 +3327 +3328 +3329 +3330 +3331 +3332 +3333 +3334

    -
    # File 'lib/idl/ast.rb', line 3152
    +      
    # File 'lib/idl/ast.rb', line 3320
     
     def return_value(symtab)
       internal_error "Function bodies should be at global + 1 scope" unless symtab.levels == 2
    @@ -678,35 +682,35 @@ 

     
     
    -3170
    -3171
    -3172
    -3173
    -3174
    -3175
    -3176
    -3177
    -3178
    -3179
    -3180
    -3181
    -3182
    -3183
    -3184
    -3185
    -3186
    -3187
    -3188
    -3189
    -3190
    -3191
    -3192
    -3193
    -3194
    -3195
    +3338 +3339 +3340 +3341 +3342 +3343 +3344 +3345 +3346 +3347 +3348 +3349 +3350 +3351 +3352 +3353 +3354 +3355 +3356 +3357 +3358 +3359 +3360 +3361 +3362 +3363

    -
    # File 'lib/idl/ast.rb', line 3170
    +      
    # File 'lib/idl/ast.rb', line 3338
     
     def return_values(symtab)
       internal_error "Function bodies should be at global + 1 scope" unless symtab.levels == 2
    @@ -754,12 +758,12 @@ 

     
     
    -3121
    -3122
    -3123
    +3289 +3290 +3291

    -
    # File 'lib/idl/ast.rb', line 3121
    +      
    # File 'lib/idl/ast.rb', line 3289
     
     def statements
       @stmts
    @@ -784,17 +788,17 @@ 

     
     
    -3197
    -3198
    -3199
    -3200
    -3201
    -3202
    -3203
    -3204
    +3365 +3366 +3367 +3368 +3369 +3370 +3371 +3372

    -
    # File 'lib/idl/ast.rb', line 3197
    +      
    # File 'lib/idl/ast.rb', line 3365
     
     def to_idl
       result = ""
    @@ -889,34 +893,34 @@ 

     
     
    -3126
    -3127
    -3128
    -3129
    -3130
    -3131
    -3132
    -3133
    -3134
    -3135
    -3136
    -3137
    -3138
    -3139
    -3140
    -3141
    -3142
    -3143
    -3144
    -3145
    -3146
    -3147
    +3294 +3295 +3296 +3297 +3298 +3299 +3300 +3301 +3302 +3303 +3304 +3305 +3306 +3307 +3308 +3309 +3310 +3311 +3312 +3313 +3314 +3315

    -
    # File 'lib/idl/ast.rb', line 3126
    +      
    # File 'lib/idl/ast.rb', line 3294
     
     def type_check(symtab)
    -  internal_error "Function bodies should be at global + 1 scope" unless symtab.levels == 2
    +  internal_error "Function bodies should be at global + 1 scope (at #{symtab.levels})" unless symtab.levels == 2
     
       return_value_might_be_known = true
     
    @@ -947,7 +951,7 @@ 

    diff --git a/docs/ruby/Idl/FunctionBodySyntaxNode.html b/docs/ruby/Idl/FunctionBodySyntaxNode.html new file mode 100644 index 000000000..cee62bf7e --- /dev/null +++ b/docs/ruby/Idl/FunctionBodySyntaxNode.html @@ -0,0 +1,194 @@ + + + + + + + Class: Idl::FunctionBodySyntaxNode + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Class: Idl::FunctionBodySyntaxNode + + + +

    +
    + +
    +
    Inherits:
    +
    + Treetop::Runtime::SyntaxNode + + + show all + +
    +
    + + + + + + + + + + + +
    +
    Defined in:
    +
    lib/idl/ast.rb
    +
    + +
    + + + + + + + + + +

    + Instance Method Summary + collapse +

    + + + + + + + + +
    +

    Instance Method Details

    + + +
    +

    + + #to_astObject + + + + + +

    + + + + +
    +
    +
    +
    +3275
    +3276
    +3277
    +
    +
    # File 'lib/idl/ast.rb', line 3275
    +
    +def to_ast
    +  FunctionBodyAst.new(input, interval, func_stmt_list.elements.map(&:choice).map(&:to_ast))
    +end
    +
    +
    + +
    + +
    + + + +
    + + \ No newline at end of file diff --git a/docs/ruby/Idl/FunctionCallExpressionAst.html b/docs/ruby/Idl/FunctionCallExpressionAst.html index 8874ba4e1..297324a5c 100644 --- a/docs/ruby/Idl/FunctionCallExpressionAst.html +++ b/docs/ruby/Idl/FunctionCallExpressionAst.html @@ -104,7 +104,7 @@
    Defined in:
    lib/idl/ast.rb,
    - lib/idl/passes/gen_adoc.rb
    + lib/idl/passes/prune.rb,
    lib/idl/passes/gen_adoc.rb
    @@ -168,6 +168,32 @@

    + + + +
  • + + + #initialize(input, interval, function_name, targs, args) ⇒ FunctionCallExpressionAst + + + + + + + constructor + + + + + + + + +
    +

    A new instance of FunctionCallExpressionAst.

    +
    +
  • @@ -188,6 +214,28 @@

    +
    + + + + +
  • + + + #prune(symtab) ⇒ Object + + + + + + + + + + + + +
  • @@ -403,7 +451,79 @@

    +
    +

    Constructor Details

    + +
    +

    + #initialize(input, interval, function_name, targs, args) ⇒ FunctionCallExpressionAst + + + + + +

    +
    + +

    Returns a new instance of FunctionCallExpressionAst.

    + + +
    +
    +
    + +

    Raises:

    +
      + +
    • + + + (ArgumentError) + + + +
    • + +
    + +
    + + + + +
    +
    +
    +
    +3076
    +3077
    +3078
    +3079
    +3080
    +3081
    +3082
    +3083
    +3084
    +3085
    +
    +
    # File 'lib/idl/ast.rb', line 3076
    +
    +def initialize(input, interval, function_name, targs, args)
    +  raise ArgumentError, "targs shoudl be an array" unless targs.is_a?(Array)
    +  raise ArgumentError, "args shoudl be an array" unless args.is_a?(Array)
    +
    +  super(input, interval, targs + args)
    +
    +  @name = function_name
    +  @targs = targs
    +  @args = args
    +end
    +
    +
    + +
    +

    Instance Method Details

    @@ -453,19 +573,15 @@

     
     
    -2938
    -2939
    -2940
    -2941
    -2942
    +3104 +3105 +3106

    -
    # File 'lib/idl/ast.rb', line 2938
    +      
    # File 'lib/idl/ast.rb', line 3104
     
     def arg_nodes
    -  nodes = []
    -  nodes << function_arg_list.first unless function_arg_list.first.empty?
    -  nodes + function_arg_list.rest.elements.map(&:expression)
    +  @args
     end
    @@ -487,17 +603,21 @@

     
     
    -85
    -86
    -87
    -88
    +178 +179 +180 +181 +182 +183

    -
    # File 'lib/idl/passes/gen_adoc.rb', line 85
    +      
    # File 'lib/idl/passes/gen_adoc.rb', line 178
     
     def gen_adoc(indent = 0, indent_spaces: 2)
    -  after_name = "#{t.gen_adoc}(#{function_arg_list.gen_adoc})"
    -  "%%LINK%func;#{name};#{name}%%#{after_name}"
    +  after_name = []
    +  after_name << "<#{template_arg_nodes.map { |t| t.gen_adoc(0, indent_spaces:)}.join(', ')}>" unless template_arg_nodes.empty?
    +  after_name << "(#{arg_nodes.map { |a| a.gen_adoc(0, indent_spaces: ) }.join(', ')})"
    +  "%%LINK%func;#{name};#{name}%%#{after_name.join ''}"
     end
    @@ -519,15 +639,45 @@

     
     
    -3029
    -3030
    -3031
    +3191 +3192 +3193

    -
    # File 'lib/idl/ast.rb', line 3029
    +      
    # File 'lib/idl/ast.rb', line 3191
     
     def name
    -  function_name.text_value
    +  @name
    +end
    + + + + + +
    +

    + + #prune(symtab) ⇒ Object + + + + + +

    + + + @@ -578,15 +728,15 @@

     
     
    -2920
    -2921
    -2922
    +3088 +3089 +3090

    @@ -637,19 +787,15 @@

     
     
    -2925
    -2926
    -2927
    -2928
    -2929
    +3093 +3094 +3095

    @@ -671,14 +817,14 @@

     
     
    -2931
    -2932
    -2933
    -2934
    -2935
    +3097 +3098 +3099 +3100 +3101

    +
    +
    +
    +48
    +49
    +50
    +
    +
    # File 'lib/idl/passes/prune.rb', line 48
    +
    +def prune(symtab)
    +  FunctionCallExpressionAst.new(input, interval, name, @targs.map { |t| t.prune(symtab) }, @args.map { |a| a.prune(symtab)} )
     end
    -
    # File 'lib/idl/ast.rb', line 2920
    +      
    # File 'lib/idl/ast.rb', line 3088
     
     def template?
    -  !t.empty?
    +  !@targs.empty?
     end
    -
    # File 'lib/idl/ast.rb', line 2925
    +      
    # File 'lib/idl/ast.rb', line 3093
     
     def template_arg_nodes
    -  return [] unless template?
    -
    -  [t.targs.first] + t.targs.rest.elements.map(&:arg)
    +  @targs
     end
    -
    # File 'lib/idl/ast.rb', line 2931
    +      
    # File 'lib/idl/ast.rb', line 3097
     
     def template_values(symtab)
       return [] unless template?
    @@ -734,16 +880,16 @@ 

     
     
    -3034
    -3035
    -3036
    -3037
    -3038
    -3039
    -3040
    +3196 +3197 +3198 +3199 +3200 +3201 +3202

    -
    # File 'lib/idl/ast.rb', line 3034
    +      
    # File 'lib/idl/ast.rb', line 3196
     
     def to_idl
       if template?
    @@ -841,13 +987,13 @@ 

     
     
    -2998
    -2999
    -3000
    -3001
    +3162 +3163 +3164 +3165

    -
    # File 'lib/idl/ast.rb', line 2998
    +      
    # File 'lib/idl/ast.rb', line 3162
     
     def type(symtab)
       func_def_type = symtab.get(name)
    @@ -938,74 +1084,74 @@ 

     
     
    -2945
    -2946
    -2947
    -2948
    -2949
    -2950
    -2951
    -2952
    -2953
    -2954
    -2955
    -2956
    -2957
    -2958
    -2959
    -2960
    -2961
    -2962
    -2963
    -2964
    -2965
    -2966
    -2967
    -2968
    -2969
    -2970
    -2971
    -2972
    -2973
    -2974
    -2975
    -2976
    -2977
    -2978
    -2979
    -2980
    -2981
    -2982
    -2983
    -2984
    -2985
    -2986
    -2987
    -2988
    -2989
    -2990
    -2991
    -2992
    -2993
    -2994
    -2995
    +3109 +3110 +3111 +3112 +3113 +3114 +3115 +3116 +3117 +3118 +3119 +3120 +3121 +3122 +3123 +3124 +3125 +3126 +3127 +3128 +3129 +3130 +3131 +3132 +3133 +3134 +3135 +3136 +3137 +3138 +3139 +3140 +3141 +3142 +3143 +3144 +3145 +3146 +3147 +3148 +3149 +3150 +3151 +3152 +3153 +3154 +3155 +3156 +3157 +3158 +3159

    -
    # File 'lib/idl/ast.rb', line 2945
    +      
    # File 'lib/idl/ast.rb', line 3109
     
     def type_check(symtab)
       level = symtab.levels
     
    -  func_def_type = symtab.get(name)
    -  type_error "No symbol #{name}" if func_def_type.nil?
    +  func_def_type = symtab.get(@name)
    +  type_error "No symbol #{@name}" if func_def_type.nil?
     
       unless func_def_type.is_a?(FunctionType)
    -    type_error "#{name} is not a function (it's a #{func_def_type.class.name})"
    +    type_error "#{@name} is not a function (it's a #{func_def_type.class.name})"
       end
     
    -  type_error "Missing template arguments in call to #{name}" if template? && func_def_type.template_names.empty?
    +  type_error "Missing template arguments in call to #{@name}" if template? && func_def_type.template_names.empty?
     
    -  type_error "Template arguments provided in call to non-template function #{name}" if !template? && !func_def_type.template_names.empty?
    +  type_error "Template arguments provided in call to non-template function #{@name}" if !template? && !func_def_type.template_names.empty?
     
       if template?
         num_targs = template_arg_nodes.size
    @@ -1029,7 +1175,7 @@ 

    if func_def_type.num_args != num_args type_error "Wrong number of arguments to '#{name}' function call. Expecting #{func_def_type.num_args}, got #{num_args}" end - arg_nodes.each_with_index do |a, idx| + arg_nodes.each do |a| a.type_check(symtab) end arg_nodes.each_with_index do |a, idx| @@ -1079,32 +1225,30 @@

     
     
    -3004
    -3005
    -3006
    -3007
    -3008
    -3009
    -3010
    -3011
    -3012
    -3013
    -3014
    -3015
    -3016
    -3017
    -3018
    -3019
    -3020
    -3021
    -3022
    -3023
    -3024
    -3025
    -3026
    +3168 +3169 +3170 +3171 +3172 +3173 +3174 +3175 +3176 +3177 +3178 +3179 +3180 +3181 +3182 +3183 +3184 +3185 +3186 +3187 +3188

    -
    # File 'lib/idl/ast.rb', line 3004
    +      
    # File 'lib/idl/ast.rb', line 3168
     
     def value(symtab)
       func_def_type = symtab.get(name)
    @@ -1112,19 +1256,17 @@ 

    if func_def_type.builtin? if name == "implemented?" extname_ref = arg_nodes[0] - type_error "First argument should be a ExtensionName" unless extname_ref.type(symtab).kind == :enum_ref && extname_ref.type(symtab).enum_class.name == "ExtensionName" + type_error "First argument should be a ExtensionName" unless extname_ref.type(symtab).kind == :enum_ref && extname_ref.class_name == "ExtensionName" - return symtab.archdef.ext?(arg_nodes[0].text_value.split(":").last) + return symtab.archdef.ext?(arg_nodes[0].member_name) else value_error "value of builtin function cannot be known" end end template_values = [] - template_arg_nodes.each_with_index do |targ, idx| - # targ_name = func_def_type.template_names[idx] - # targ_type = func_def_type.template_types[idx] - template_values << targ.value(symtab) + template_arg_nodes.each do |targ| + template_values << targ.value(symtab) end func_def_type.return_value(template_values, arg_nodes, symtab) @@ -1235,7 +1377,7 @@

    diff --git a/docs/ruby/Idl/FunctionCallExpressionSyntaxNode.html b/docs/ruby/Idl/FunctionCallExpressionSyntaxNode.html new file mode 100644 index 000000000..89e9b49ad --- /dev/null +++ b/docs/ruby/Idl/FunctionCallExpressionSyntaxNode.html @@ -0,0 +1,202 @@ + + + + + + + Class: Idl::FunctionCallExpressionSyntaxNode + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Class: Idl::FunctionCallExpressionSyntaxNode + + + +

    +
    + +
    +
    Inherits:
    +
    + Treetop::Runtime::SyntaxNode + + + show all + +
    +
    + + + + + + + + + + + +
    +
    Defined in:
    +
    lib/idl/ast.rb
    +
    + +
    + + + + + + + + + +

    + Instance Method Summary + collapse +

    + + + + + + + + +
    +

    Instance Method Details

    + + +
    +

    + + #to_astObject + + + + + +

    + + + + +
    +
    +
    +
    +3062
    +3063
    +3064
    +3065
    +3066
    +3067
    +3068
    +
    +
    # File 'lib/idl/ast.rb', line 3062
    +
    +def to_ast
    +  targs = t.empty? ? [] : [t.targs.first.to_ast] + t.targs.rest.elements.map { |e| e.arg.to_ast }
    +  args = []
    +  args << function_arg_list.first.to_ast unless function_arg_list.first.empty?
    +  args += function_arg_list.rest.elements.map { |e| e.expression.to_ast }
    +  FunctionCallExpressionAst.new(input, interval, function_name.text_value, targs, args)
    +end
    +
    +
    + +
    + +
    + + + +
    + + \ No newline at end of file diff --git a/docs/ruby/Idl/FunctionDefAst.html b/docs/ruby/Idl/FunctionDefAst.html index 98c968814..0b7bbe6d8 100644 --- a/docs/ruby/Idl/FunctionDefAst.html +++ b/docs/ruby/Idl/FunctionDefAst.html @@ -639,19 +639,19 @@

     
     
    -3356
    -3357
    -3358
    -3359
    -3360
    -3361
    -3362
    -3363
    -3364
    -3365
    +3524 +3525 +3526 +3527 +3528 +3529 +3530 +3531 +3532 +3533

    -
    # File 'lib/idl/ast.rb', line 3356
    +      
    # File 'lib/idl/ast.rb', line 3524
     
     def add_symbol(symtab)
       # now add the function in global scope
    @@ -712,33 +712,33 @@ 

     
     
    -3223
    -3224
    -3225
    -3226
    -3227
    -3228
    -3229
    -3230
    -3231
    -3232
    -3233
    -3234
    -3235
    -3236
    -3237
    -3238
    -3239
    -3240
    -3241
    -3242
    -3243
    -3244
    -3245
    -3246
    +3391 +3392 +3393 +3394 +3395 +3396 +3397 +3398 +3399 +3400 +3401 +3402 +3403 +3404 +3405 +3406 +3407 +3408 +3409 +3410 +3411 +3412 +3413 +3414

    -
    # File 'lib/idl/ast.rb', line 3223
    +      
    # File 'lib/idl/ast.rb', line 3391
     
     def arguments(symtab)
       if templated?
    @@ -795,19 +795,19 @@ 

     
     
    -3250
    -3251
    -3252
    -3253
    -3254
    -3255
    -3256
    -3257
    -3258
    -3259
    +3418 +3419 +3420 +3421 +3422 +3423 +3424 +3425 +3426 +3427

    -
    # File 'lib/idl/ast.rb', line 3250
    +      
    # File 'lib/idl/ast.rb', line 3418
     
     def arguments_list_str
       list = []
    @@ -839,14 +839,14 @@ 

     
     
    -3474
    -3475
    -3476
    -3477
    -3478
    +3642 +3643 +3644 +3645 +3646

    -
    # File 'lib/idl/ast.rb', line 3474
    +      
    # File 'lib/idl/ast.rb', line 3642
     
     def body
       internal_error "Function has no body" if builtin?
    @@ -908,12 +908,12 @@ 

     
     
    -3490
    -3491
    -3492
    +3658 +3659 +3660

    -
    # File 'lib/idl/ast.rb', line 3490
    +      
    # File 'lib/idl/ast.rb', line 3658
     
     def builtin?
       !respond_to?(:body_block)
    @@ -938,12 +938,12 @@ 

     
     
    -3208
    -3209
    -3210
    +3376 +3377 +3378

    -
    # File 'lib/idl/ast.rb', line 3208
    +      
    # File 'lib/idl/ast.rb', line 3376
     
     def description
       unindent(desc.text_value)
    @@ -968,12 +968,12 @@ 

     
     
    -3310
    -3311
    -3312
    +3478 +3479 +3480

    -
    # File 'lib/idl/ast.rb', line 3310
    +      
    # File 'lib/idl/ast.rb', line 3478
     
     def name
       function_name.text_value
    @@ -998,14 +998,14 @@ 

     
     
    -3216
    -3217
    -3218
    -3219
    -3220
    +3384 +3385 +3386 +3387 +3388

    -
    # File 'lib/idl/ast.rb', line 3216
    +      
    # File 'lib/idl/ast.rb', line 3384
     
     def num_args
       return 0 if args.empty?
    @@ -1043,41 +1043,41 @@ 

     
     
    -3262
    -3263
    -3264
    -3265
    -3266
    -3267
    -3268
    -3269
    -3270
    -3271
    -3272
    -3273
    -3274
    -3275
    -3276
    -3277
    -3278
    -3279
    -3280
    -3281
    -3282
    -3283
    -3284
    -3285
    -3286
    -3287
    -3288
    -3289
    -3290
    -3291
    -3292
    -3293
    +3430 +3431 +3432 +3433 +3434 +3435 +3436 +3437 +3438 +3439 +3440 +3441 +3442 +3443 +3444 +3445 +3446 +3447 +3448 +3449 +3450 +3451 +3452 +3453 +3454 +3455 +3456 +3457 +3458 +3459 +3460 +3461

    -
    # File 'lib/idl/ast.rb', line 3262
    +      
    # File 'lib/idl/ast.rb', line 3430
     
     def return_type(symtab)
       unless symtab.levels == 2
    @@ -1142,21 +1142,21 @@ 

     
     
    -3297
    -3298
    -3299
    -3300
    -3301
    -3302
    -3303
    -3304
    -3305
    -3306
    -3307
    -3308
    +3465 +3466 +3467 +3468 +3469 +3470 +3471 +3472 +3473 +3474 +3475 +3476

    -
    # File 'lib/idl/ast.rb', line 3297
    +      
    # File 'lib/idl/ast.rb', line 3465
     
     def return_type_list_str
       list = []
    @@ -1219,18 +1219,18 @@ 

     
     
    -3368
    -3369
    -3370
    -3371
    -3372
    -3373
    -3374
    -3375
    -3376
    +3536 +3537 +3538 +3539 +3540 +3541 +3542 +3543 +3544

    -
    # File 'lib/idl/ast.rb', line 3368
    +      
    # File 'lib/idl/ast.rb', line 3536
     
     def template_names
       return [] unless templated?
    @@ -1310,23 +1310,23 @@ 

     
     
    -3380
    -3381
    -3382
    -3383
    -3384
    -3385
    -3386
    -3387
    -3388
    -3389
    -3390
    -3391
    -3392
    -3393
    +3548 +3549 +3550 +3551 +3552 +3553 +3554 +3555 +3556 +3557 +3558 +3559 +3560 +3561

    -
    # File 'lib/idl/ast.rb', line 3380
    +      
    # File 'lib/idl/ast.rb', line 3548
     
     def template_types(symtab)
       return [] unless templated?
    @@ -1384,12 +1384,12 @@ 

     
     
    -3212
    -3213
    -3214
    +3380 +3381 +3382

    -
    # File 'lib/idl/ast.rb', line 3212
    +      
    # File 'lib/idl/ast.rb', line 3380
     
     def templated?
       !targs.empty?
    @@ -1479,17 +1479,17 @@ 

     
     
    -3346
    -3347
    -3348
    -3349
    -3350
    -3351
    -3352
    -3353
    +3514 +3515 +3516 +3517 +3518 +3519 +3520 +3521

    -
    # File 'lib/idl/ast.rb', line 3346
    +      
    # File 'lib/idl/ast.rb', line 3514
     
     def type_check(symtab)
       internal_error "Functions must be declared at global scope (at #{symtab.levels})" unless symtab.levels == 1
    @@ -1519,32 +1519,32 @@ 

     
     
    -3439
    -3440
    -3441
    -3442
    -3443
    -3444
    -3445
    -3446
    -3447
    -3448
    -3449
    -3450
    -3451
    -3452
    -3453
    -3454
    -3455
    -3456
    -3457
    -3458
    -3459
    -3460
    -3461
    +3607 +3608 +3609 +3610 +3611 +3612 +3613 +3614 +3615 +3616 +3617 +3618 +3619 +3620 +3621 +3622 +3623 +3624 +3625 +3626 +3627 +3628 +3629

    -
    # File 'lib/idl/ast.rb', line 3439
    +      
    # File 'lib/idl/ast.rb', line 3607
     
     def type_check_args(symtab)
       @arguments = []
    @@ -1589,19 +1589,19 @@ 

     
     
    -3463
    -3464
    -3465
    -3466
    -3467
    -3468
    -3469
    -3470
    -3471
    -3472
    +3631 +3632 +3633 +3634 +3635 +3636 +3637 +3638 +3639 +3640

    -
    # File 'lib/idl/ast.rb', line 3463
    +      
    # File 'lib/idl/ast.rb', line 3631
     
     def type_check_body(symtab)
     
    @@ -1644,21 +1644,21 @@ 

     
     
    -3332
    -3333
    -3334
    -3335
    -3336
    -3337
    -3338
    -3339
    -3340
    -3341
    -3342
    -3343
    +3500 +3501 +3502 +3503 +3504 +3505 +3506 +3507 +3508 +3509 +3510 +3511

    -
    # File 'lib/idl/ast.rb', line 3332
    +      
    # File 'lib/idl/ast.rb', line 3500
     
     def type_check_from_call(symtab)
       internal_error "Function definitions should be at global + 1 scope" unless symtab.levels == 2
    @@ -1692,25 +1692,25 @@ 

     
     
    -3422
    -3423
    -3424
    -3425
    -3426
    -3427
    -3428
    -3429
    -3430
    -3431
    -3432
    -3433
    -3434
    -3435
    -3436
    -3437
    +3590 +3591 +3592 +3593 +3594 +3595 +3596 +3597 +3598 +3599 +3600 +3601 +3602 +3603 +3604 +3605

    -
    # File 'lib/idl/ast.rb', line 3422
    +      
    # File 'lib/idl/ast.rb', line 3590
     
     def type_check_return(symtab)
       return if ret.empty?
    @@ -1748,35 +1748,35 @@ 

     
     
    -3395
    -3396
    -3397
    -3398
    -3399
    -3400
    -3401
    -3402
    -3403
    -3404
    -3405
    -3406
    -3407
    -3408
    -3409
    -3410
    -3411
    -3412
    -3413
    -3414
    -3415
    -3416
    -3417
    -3418
    -3419
    -3420
    +3563 +3564 +3565 +3566 +3567 +3568 +3569 +3570 +3571 +3572 +3573 +3574 +3575 +3576 +3577 +3578 +3579 +3580 +3581 +3582 +3583 +3584 +3585 +3586 +3587 +3588

    -
    # File 'lib/idl/ast.rb', line 3395
    +      
    # File 'lib/idl/ast.rb', line 3563
     
     def type_check_targs(symtab)
       @template_names = []
    @@ -1853,22 +1853,22 @@ 

     
     
    -3315
    -3316
    -3317
    -3318
    -3319
    -3320
    -3321
    -3322
    -3323
    -3324
    -3325
    -3326
    -3327
    +3483 +3484 +3485 +3486 +3487 +3488 +3489 +3490 +3491 +3492 +3493 +3494 +3495

    -
    # File 'lib/idl/ast.rb', line 3315
    +      
    # File 'lib/idl/ast.rb', line 3483
     
     def type_check_template_instance(symtab)
       internal_error "Function definitions should be at global + 1 scope" unless symtab.levels == 2
    @@ -1893,7 +1893,7 @@ 

    diff --git a/docs/ruby/Idl/FunctionStatementAst.html b/docs/ruby/Idl/FunctionStatementAst.html deleted file mode 100644 index 1be382533..000000000 --- a/docs/ruby/Idl/FunctionStatementAst.html +++ /dev/null @@ -1,1037 +0,0 @@ - - - - - - - Module: Idl::FunctionStatementAst - - — Documentation by YARD 0.9.36 - - - - - - - - - - - - - - - - - - - -
    - - -

    Module: Idl::FunctionStatementAst - - - -

    -
    - - - - - - -
    -
    Includes:
    -
    AstNodeFuncs, Executable
    -
    - - - - - - -
    -
    Defined in:
    -
    lib/idl/ast.rb
    -
    - -
    - - - - - - - - - -

    - Instance Method Summary - collapse -

    - - - - - - - - - - -
    -

    Instance Method Details

    - - -
    -

    - - #childrenArray<AstNode> - - - - - - - Originally defined in module - AstNodeFuncs - - -

    -
    - -

    Returns list of children, or an empty array for a terminal.

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Array<AstNode>) - - - - — -
      -

      list of children, or an empty array for a terminal

      -
      - -
    • - -
    - -
    -
    - -
    -

    - - #execute(symtab) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -3081
    -3082
    -3083
    -
    -
    # File 'lib/idl/ast.rb', line 3081
    -
    -def execute(symtab)
    -  raise "WHere is this AST?"
    -end
    -
    -
    - -
    -

    - - #internal_error(reason) ⇒ Object - - - - - - - Originally defined in module - AstNodeFuncs - - -

    -
    - -

    raise an internal error

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - reason - - - (String) - - - - — -
      -

      Error message

      -
      - -
    • - -
    - -

    Raises:

    - - -
    -
    - -
    -

    - - #nodesArray<AstNode> - - - - - - - Originally defined in module - AstNodeFuncs - - -

    -
    - -

    Returns an array of AST sub nodes (notably, excludes anything, like whitespace, that wasn’t subclassed to AST).

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Array<AstNode>) - - - - — -
      -

      an array of AST sub nodes (notably, excludes anything, like whitespace, that wasn’t subclassed to AST)

      -
      - -
    • - -
    - -
    -
    - -
    -
    -
    - -

    pretty print the AST rooted at this node

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - indent - - - (Integer) - - - (defaults to: 0) - - - — -
      -

      The starting indentation, in # of spaces

      -
      - -
    • - -
    • - - indent_size - - - (Integer) - - - (defaults to: 2) - - - — -
      -

      The extra indentation applied to each level of the tree

      -
      - -
    • - -
    • - - io - - - (IO) - - - (defaults to: $stdout) - - - — -
      -

      Where to write the output

      -
      - -
    • - -
    - - -
    -
    - -
    -

    - - #to_idlString - - - - - - - Originally defined in module - AstNodeFuncs - - -

    -
    -
    - This method is abstract. -
    -
    - -

    Return valid IDL representation of the node (and its subtree)

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (String) - - - - — -
      -

      IDL code for the node

      -
      - -
    • - -
    -

    Raises:

    -
      - -
    • - - - (NotImplementedError) - - - -
    • - -
    - -
    -
    - -
    -

    - - #type_check(symtab) ⇒ void - - - - - - - Originally defined in module - AstNodeFuncs - - -

    -
    -
    - This method is abstract. -
    -
    -

    This method returns an undefined value.

    -

    type check this node and all children

    - -

    Calls to #type and/or #value may depend on type_check being called first with the same symtab. If not, those functions may raise an AstNode::InternalError

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - symtab - - - (SymbolTable) - - - - — -
      -

      Symbol table for lookup

      -
      - -
    • - -
    - -

    Raises:

    - - -
    -
    - -
    -

    - - #type_error(reason) ⇒ Object - - - - - - - Originally defined in module - AstNodeFuncs - - -

    -
    - -

    raise a type error

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - reason - - - (String) - - - - — -
      -

      Error message

      -
      - -
    • - -
    - -

    Raises:

    - - -
    -
    - -
    -

    - - #unindent(s) ⇒ String - - - - - - - Originally defined in module - AstNodeFuncs - - -

    -
    - -

    unindent a multiline string, getting rid of all common leading whitespace (like <<~ heredocs)

    - -

    borrowed from stackoverflow.com/questions/33527064/multiline-strings-with-no-indent

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - s - - - (String) - - - - — -
      -

      A string (presumably with newlines)

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (String) - - - - — -
      -

      Unindented string

      -
      - -
    • - -
    - -
    -
    - -
    -

    - - #value_error(reason) ⇒ Object - - - - - - - Originally defined in module - AstNodeFuncs - - -

    -
    - -

    raise a value error, indicating that the value is not known at compile time

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - reason - - - (String) - - - - — -
      -

      Error message

      -
      - -
    • - -
    - -

    Raises:

    - - -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/ruby/Idl/FunctionType.html b/docs/ruby/Idl/FunctionType.html index 41747fc80..553492205 100644 --- a/docs/ruby/Idl/FunctionType.html +++ b/docs/ruby/Idl/FunctionType.html @@ -1240,7 +1240,7 @@

    diff --git a/docs/ruby/Idl/GlobalAst.html b/docs/ruby/Idl/GlobalAst.html index 2878cdf8f..320eb0140 100644 --- a/docs/ruby/Idl/GlobalAst.html +++ b/docs/ruby/Idl/GlobalAst.html @@ -294,12 +294,12 @@

     
     
    -488
    -489
    -490
    +500 +501 +502

    -
    # File 'lib/idl/ast.rb', line 488
    +      
    # File 'lib/idl/ast.rb', line 500
     
     def type(symtab)
       declaration.type
    @@ -324,12 +324,12 @@ 

     
     
    -484
    -485
    -486
    +496 +497 +498

    -
    # File 'lib/idl/ast.rb', line 484
    +      
    # File 'lib/idl/ast.rb', line 496
     
     def type_check(symtab)
       declaration.type_check(symtab)
    @@ -344,7 +344,7 @@ 

    diff --git a/docs/ruby/Idl/GlobalWithInitializationAst.html b/docs/ruby/Idl/GlobalWithInitializationAst.html index 775cd7d27..65ed74366 100644 --- a/docs/ruby/Idl/GlobalWithInitializationAst.html +++ b/docs/ruby/Idl/GlobalWithInitializationAst.html @@ -358,12 +358,12 @@

     
     
    -476
    -477
    -478
    +488 +489 +490

    -
    # File 'lib/idl/ast.rb', line 476
    +      
    # File 'lib/idl/ast.rb', line 488
     
     def to_idl
       "TODO"
    @@ -388,12 +388,12 @@ 

     
     
    -468
    -469
    -470
    +480 +481 +482

    -
    # File 'lib/idl/ast.rb', line 468
    +      
    # File 'lib/idl/ast.rb', line 480
     
     def type(symtab)
       single_declartion_with_initialization.type(symtab)
    @@ -418,12 +418,12 @@ 

     
     
    -464
    -465
    -466
    +476 +477 +478

    -
    # File 'lib/idl/ast.rb', line 464
    +      
    # File 'lib/idl/ast.rb', line 476
     
     def type_check(symtab)
       single_declaration_with_initialization.type_check(symtab)
    @@ -448,12 +448,12 @@ 

     
     
    -472
    -473
    -474
    +484 +485 +486

    -
    # File 'lib/idl/ast.rb', line 472
    +      
    # File 'lib/idl/ast.rb', line 484
     
     def value(symtab)
       single_declartion_with_initialization.value(symtab)
    @@ -468,7 +468,7 @@ 

    diff --git a/docs/ruby/Idl/IdAst.html b/docs/ruby/Idl/IdAst.html index a6aa0c8de..29c184a4f 100644 --- a/docs/ruby/Idl/IdAst.html +++ b/docs/ruby/Idl/IdAst.html @@ -103,7 +103,9 @@
    Defined in:
    -
    lib/idl/ast.rb
    +
    lib/idl/ast.rb,
    + lib/idl/passes/gen_adoc.rb
    +
    @@ -139,6 +141,54 @@

  • + #gen_adoc(indent = 0, indent_spaces: 2) ⇒ Object + + + + + + + + + + + + + +
    + +
  • + + +
  • + + + #initialize(input, interval, id_name) ⇒ IdAst + + + + + + + constructor + + + + + + + + +
    +

    A new instance of IdAst.

    +
    + +
  • + + +
  • + + #name ⇒ String @@ -292,14 +342,91 @@

    +
    +

    Constructor Details

    + +
    +

    + + #initialize(input, interval, id_name) ⇒ IdAst + + + +

    +
    + +

    Returns a new instance of IdAst.

    + + +
    +
    +
    + + +
    + + + + +
    +
    +
    +
    +429
    +430
    +431
    +432
    +
    +
    # File 'lib/idl/ast.rb', line 429
    +
    +def initialize(input, interval, id_name)
    +  super(input, interval, [])
    +  @name = id_name
    +end
    +
    +
    + +
    + +

    Instance Method Details

    -

    +

    + + #gen_adoc(indent = 0, indent_spaces: 2) ⇒ Object + + + + + +

    + + + + +
    +
    +
    +
    +57
    +58
    +59
    +
    +
    # File 'lib/idl/passes/gen_adoc.rb', line 57
    +
    +def gen_adoc(indent = 0, indent_spaces: 2)
    +  text_value
    +end
    +
    +
    + +
    +

    #nameString @@ -342,12 +469,12 @@

     
     
    -428
    +440

  • -
    # File 'lib/idl/ast.rb', line 428
    +      
    # File 'lib/idl/ast.rb', line 440
     
    -def name = text_value
    +def name = @name
    @@ -397,12 +524,12 @@

     
     
    -449
    +461

    -
    # File 'lib/idl/ast.rb', line 449
    +      
    # File 'lib/idl/ast.rb', line 461
     
    -def to_idl = text_value
    +def to_idl = @name
    @@ -423,19 +550,19 @@

     
     
    -431
    -432
    -433
    -434
    -435
    +443 +444 +445 +446 +447

    -
    # File 'lib/idl/ast.rb', line 431
    +      
    # File 'lib/idl/ast.rb', line 443
     
     def type(symtab)
    -  internal_error "Symbol not found (should have called type_check)" if symtab.get(text_value).nil?
    +  internal_error "Symbol '#{@name}' not found (should have called type_check)" if symtab.get(@name).nil?
     
    -  symtab.get(text_value).type
    +  symtab.get(@name).type
     end
    @@ -522,15 +649,15 @@

     
     
    -423
    -424
    -425
    +435 +436 +437

    -
    # File 'lib/idl/ast.rb', line 423
    +      
    # File 'lib/idl/ast.rb', line 435
     
     def type_check(symtab)
    -  type_error "no symbol named '#{text_value}' on line #{lineno}" if symtab.get(text_value).nil?
    +  type_error "no symbol named '#{@name}' on line #{lineno}" if symtab.get(@name).nil?
     end
    @@ -552,25 +679,25 @@

     
     
    -438
    -439
    -440
    -441
    -442
    -443
    -444
    -445
    -446
    +450 +451 +452 +453 +454 +455 +456 +457 +458

    -
    # File 'lib/idl/ast.rb', line 438
    +      
    # File 'lib/idl/ast.rb', line 450
     
     def value(symtab)
    -  var = symtab.get(text_value)
    +  var = symtab.get(@name)
     
    -  internal_error "Var was not found, call type_check first!" if var.nil?
    +  type_error "Variable '#{@name}' was not found" if var.nil?
     
    -  value_error "Value of '#{text_value}' not known" if var.value.nil?
    +  value_error "Value of '#{@name}' not known" if var.value.nil?
     
       var.value
     end
    @@ -680,7 +807,7 @@

    diff --git a/docs/ruby/Idl/IdSyntaxNode.html b/docs/ruby/Idl/IdSyntaxNode.html new file mode 100644 index 000000000..62e795928 --- /dev/null +++ b/docs/ruby/Idl/IdSyntaxNode.html @@ -0,0 +1,190 @@ + + + + + + + Class: Idl::IdSyntaxNode + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Class: Idl::IdSyntaxNode + + + +

    +
    + +
    +
    Inherits:
    +
    + Treetop::Runtime::SyntaxNode + + + show all + +
    +
    + + + + + + + + + + + +
    +
    Defined in:
    +
    lib/idl/ast.rb
    +
    + +
    + + + + + + + + + +

    + Instance Method Summary + collapse +

    + + + + + + + + +
    +

    Instance Method Details

    + + +
    +

    + + #to_astObject + + + + + +

    + + + + +
    +
    +
    +
    +420
    +
    +
    # File 'lib/idl/ast.rb', line 420
    +
    +def to_ast = IdAst.new(input, interval, text_value)
    +
    +
    + +
    + +
    + + + +
    + + \ No newline at end of file diff --git a/docs/ruby/Idl/IfAst.html b/docs/ruby/Idl/IfAst.html index c1fe1d525..ea5d47b28 100644 --- a/docs/ruby/Idl/IfAst.html +++ b/docs/ruby/Idl/IfAst.html @@ -502,30 +502,30 @@

     
     
    -3762
    -3763
    -3764
    -3765
    -3766
    -3767
    -3768
    -3769
    -3770
    -3771
    -3772
    -3773
    -3774
    -3775
    -3776
    -3777
    -3778
    -3779
    -3780
    -3781
    -3782
    +3953 +3954 +3955 +3956 +3957 +3958 +3959 +3960 +3961 +3962 +3963 +3964 +3965 +3966 +3967 +3968 +3969 +3970 +3971 +3972 +3973

    -
    # File 'lib/idl/ast.rb', line 3762
    +      
    # File 'lib/idl/ast.rb', line 3953
     
     def initialize(if_cond, if_body, elseifs, final_else_body)
       children_nodes = [if_cond, if_body]
    @@ -586,12 +586,12 @@ 

     
     
    -3760
    -3761
    -3762
    +3951 +3952 +3953

    -
    # File 'lib/idl/ast.rb', line 3760
    +      
    # File 'lib/idl/ast.rb', line 3951
     
     def elseifs
       @elseifs
    @@ -629,12 +629,12 @@ 

     
     
    -3760
    -3761
    -3762
    +3951 +3952 +3953

    -
    # File 'lib/idl/ast.rb', line 3760
    +      
    # File 'lib/idl/ast.rb', line 3951
     
     def final_else_body
       @final_else_body
    @@ -672,12 +672,12 @@ 

     
     
    -3760
    -3761
    -3762
    +3951 +3952 +3953

    -
    # File 'lib/idl/ast.rb', line 3760
    +      
    # File 'lib/idl/ast.rb', line 3951
     
     def if_body
       @if_body
    @@ -715,12 +715,12 @@ 

     
     
    -3760
    -3761
    -3762
    +3951 +3952 +3953

    -
    # File 'lib/idl/ast.rb', line 3760
    +      
    # File 'lib/idl/ast.rb', line 3951
     
     def if_cond
       @if_cond
    @@ -752,30 +752,30 @@ 

     
     
    -120
    -121
    -122
    -123
    -124
    -125
    -126
    -127
    -128
    -129
    -130
    -131
    -132
    -133
    -134
    -135
    -136
    -137
    -138
    -139
    -140
    +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235

    -
    # File 'lib/idl/passes/gen_adoc.rb', line 120
    +      
    # File 'lib/idl/passes/gen_adoc.rb', line 215
     
     def gen_adoc(indent = 0, indent_spaces: 2)
       lines = ["if (#{if_cond.gen_adoc(0, indent_spaces:)}) {"]
    @@ -947,21 +947,6 @@ 

     
     
    -147
    -148
    -149
    -150
    -151
    -152
    -153
    -154
    -155
    -156
    -157
    -158
    -159
    -160
    -161
     162
     163
     164
    @@ -984,10 +969,25 @@ 

    181 182 183 -184

    +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199

    -
    # File 'lib/idl/passes/prune.rb', line 147
    +      
    # File 'lib/idl/passes/prune.rb', line 162
     
     def prune(symtab)
       if if_cond.value(symtab)
    @@ -1051,16 +1051,16 @@ 

     
     
    -3832
    -3833
    -3834
    -3835
    -3836
    -3837
    -3838
    +4023 +4024 +4025 +4026 +4027 +4028 +4029

    -
    # File 'lib/idl/ast.rb', line 3832
    +      
    # File 'lib/idl/ast.rb', line 4023
     
     def return_value(symtab)
     
    @@ -1156,22 +1156,22 @@ 

     
     
    -3873
    -3874
    -3875
    -3876
    -3877
    -3878
    -3879
    -3880
    -3881
    -3882
    -3883
    -3884
    -3885
    +4064 +4065 +4066 +4067 +4068 +4069 +4070 +4071 +4072 +4073 +4074 +4075 +4076

    -
    # File 'lib/idl/ast.rb', line 3873
    +      
    # File 'lib/idl/ast.rb', line 4064
     
     def return_values(symtab)
       if_cond_value = @if_cond.value(symtab)
    @@ -1253,20 +1253,20 @@ 

     
     
    -3819
    -3820
    -3821
    -3822
    -3823
    -3824
    -3825
    -3826
    -3827
    -3828
    -3829
    +4010 +4011 +4012 +4013 +4014 +4015 +4016 +4017 +4018 +4019 +4020

    -
    # File 'lib/idl/ast.rb', line 3819
    +      
    # File 'lib/idl/ast.rb', line 4010
     
     def taken_body(symtab)
       return @if_body if @if_cond.value(symtab)
    @@ -1328,23 +1328,23 @@ 

     
     
    -3888
    -3889
    -3890
    -3891
    -3892
    -3893
    -3894
    -3895
    -3896
    -3897
    -3898
    -3899
    -3900
    -3901
    +4079 +4080 +4081 +4082 +4083 +4084 +4085 +4086 +4087 +4088 +4089 +4090 +4091 +4092

    -
    # File 'lib/idl/ast.rb', line 3888
    +      
    # File 'lib/idl/ast.rb', line 4079
     
     def to_idl
       result = "if (#{@if_cond.to_idl}) { "
    @@ -1445,40 +1445,40 @@ 

     
     
    -3785
    -3786
    -3787
    -3788
    -3789
    -3790
    -3791
    -3792
    -3793
    -3794
    -3795
    -3796
    -3797
    -3798
    -3799
    -3800
    -3801
    -3802
    -3803
    -3804
    -3805
    -3806
    -3807
    -3808
    -3809
    -3810
    -3811
    -3812
    -3813
    -3814
    -3815
    +3976 +3977 +3978 +3979 +3980 +3981 +3982 +3983 +3984 +3985 +3986 +3987 +3988 +3989 +3990 +3991 +3992 +3993 +3994 +3995 +3996 +3997 +3998 +3999 +4000 +4001 +4002 +4003 +4004 +4005 +4006

    -
    # File 'lib/idl/ast.rb', line 3785
    +      
    # File 'lib/idl/ast.rb', line 3976
     
     def type_check(symtab)
       level = symtab.levels
    @@ -1521,7 +1521,7 @@ 

    diff --git a/docs/ruby/Idl/IfBodyAst.html b/docs/ruby/Idl/IfBodyAst.html new file mode 100644 index 000000000..027a1f669 --- /dev/null +++ b/docs/ruby/Idl/IfBodyAst.html @@ -0,0 +1,877 @@ + + + + + + + Class: Idl::IfBodyAst + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Class: Idl::IfBodyAst + + + +

    +
    + +
    +
    Inherits:
    +
    + AstNode + + + show all + +
    +
    + + + + + + +
    +
    Includes:
    +
    Executable, Returns
    +
    + + + + + + +
    +
    Defined in:
    +
    lib/idl/ast.rb,
    + lib/idl/passes/prune.rb
    +
    +
    + +
    + + + + + +

    Instance Attribute Summary collapse

    +
      + +
    • + + + #stmts ⇒ Object + + + + + + + + + readonly + + + + + + + + + +
      +

      Returns the value of attribute stmts.

      +
      + +
    • + + +
    + + + + + +

    + Instance Method Summary + collapse +

    + + + + + + + + + + + + + + +
    +

    Constructor Details

    + +
    +

    + + #initialize(body_stmts) ⇒ IfBodyAst + + + + + +

    +
    + +

    Returns a new instance of IfBodyAst.

    + + +
    +
    +
    + + +
    + + + + +
    +
    +
    +
    +3788
    +3789
    +3790
    +3791
    +3792
    +3793
    +3794
    +3795
    +
    +
    # File 'lib/idl/ast.rb', line 3788
    +
    +def initialize(body_stmts)
    +  if body_stmts.empty?
    +    super("", 0...0, [])
    +  else
    +    super(body_stmts[0].input, body_stmts.first.interval.first..body_stmts.last.interval.end, body_stmts)
    +  end
    +  @stmts = body_stmts
    +end
    +
    +
    + +
    + +
    +

    Instance Attribute Details

    + + + +
    +

    + + #stmtsObject (readonly) + + + + + +

    +
    + +

    Returns the value of attribute stmts.

    + + +
    +
    +
    + + +
    + + + + +
    +
    +
    +
    +3786
    +3787
    +3788
    +
    +
    # File 'lib/idl/ast.rb', line 3786
    +
    +def stmts
    +  @stmts
    +end
    +
    +
    + +
    + + +
    +

    Instance Method Details

    + + +
    +

    + + #execute(symtab) ⇒ void + + + + + +

    +
    +

    This method returns an undefined value.

    +

    “execute” the statement by updating the variables in the symbol table

    + + +
    +
    +
    +

    Parameters:

    +
      + +
    • + + symtab + + + (SymbolTable) + + + + — +
      +

      The symbol table for the context

      +
      + +
    • + +
    + +

    Raises:

    +
      + +
    • + + + + + + + +
      +

      ValueError if some part of the statement cannot be executed at compile time

      +
      + +
    • + +
    + +
    + + + + +
    +
    +
    +
    +3854
    +3855
    +3856
    +3857
    +3858
    +
    +
    # File 'lib/idl/ast.rb', line 3854
    +
    +def execute(symtab)
    +  stmts.each do |s|
    +    s.execute(symtab)
    +  end
    +end
    +
    +
    + +
    +

    + + #prune(symtab) ⇒ Object + + + + + +

    + + + + +
    +
    +
    +
    +145
    +146
    +147
    +148
    +149
    +150
    +151
    +
    +
    # File 'lib/idl/passes/prune.rb', line 145
    +
    +def prune(symtab)
    +  pruned_stmts = []
    +  stmts.each do |s|
    +    pruned_stmts << s.prune(symtab)
    +  end
    +  IfBodyAst.new(pruned_stmts)
    +end
    +
    +
    + +
    +

    + + #return_value(symtab) ⇒ Object + + + + + +

    + + + + +
    +
    +
    +
    +3809
    +3810
    +3811
    +3812
    +3813
    +3814
    +3815
    +3816
    +3817
    +3818
    +3819
    +3820
    +3821
    +3822
    +3823
    +3824
    +3825
    +3826
    +3827
    +
    +
    # File 'lib/idl/ast.rb', line 3809
    +
    +def return_value(symtab)
    +  symtab.push
    +  begin
    +    @stmts.each do |s|
    +      if s.is_a?(Returns)
    +        v = s.return_value(symtab)
    +        unless v.nil?
    +          return v
    +        end
    +      else
    +        s.execute(symtab)
    +      end
    +    end
    +  ensure
    +    symtab.pop
    +  end
    +
    +  nil
    +end
    +
    +
    + +
    +

    + + #return_values(symtab) ⇒ Object + + + + + +

    + + + + +
    +
    +
    +
    +3830
    +3831
    +3832
    +3833
    +3834
    +3835
    +3836
    +3837
    +3838
    +3839
    +3840
    +3841
    +3842
    +3843
    +3844
    +3845
    +3846
    +3847
    +3848
    +3849
    +3850
    +3851
    +
    +
    # File 'lib/idl/ast.rb', line 3830
    +
    +def return_values(symtab)
    +  values = []
    +  symtab.push
    +  begin
    +    @stmts.each do |s|
    +      if s.is_a?(Returns)
    +        begin
    +          v = s.return_value(symtab)
    +          return values.push(v).uniq unless v.nil?
    +        rescue ValueError
    +          values += s.return_values(symtab)
    +        end
    +      else
    +        s.execute(symtab)
    +      end
    +    end
    +  ensure
    +    symtab.pop
    +  end
    +
    +  values.uniq
    +end
    +
    +
    + +
    +

    + + #to_idlString + + + + + +

    +
    + +

    Return valid IDL representation of the node (and its subtree)

    + + +
    +
    +
    + +

    Returns:

    +
      + +
    • + + + (String) + + + + — +
      +

      IDL code for the node

      +
      + +
    • + +
    + +
    + + + + +
    +
    +
    +
    +3861
    +3862
    +3863
    +
    +
    # File 'lib/idl/ast.rb', line 3861
    +
    +def to_idl
    +  stmts.map(&:to_idl).join("")
    +end
    +
    +
    + +
    +

    + + #type_check(symtab) ⇒ void + + + + + +

    +
    +

    This method returns an undefined value.

    +

    type check this node and all children

    + +

    Calls to #type and/or #value may depend on type_check being called first with the same symtab. If not, those functions may raise an AstNode::InternalError

    + + +
    +
    +
    +

    Parameters:

    +
      + +
    • + + symtab + + + (SymbolTable) + + + + — +
      +

      Symbol table for lookup

      +
      + +
    • + +
    + +

    Raises:

    + + +
    + + + + +
    +
    +
    +
    +3798
    +3799
    +3800
    +3801
    +3802
    +3803
    +3804
    +3805
    +3806
    +
    +
    # File 'lib/idl/ast.rb', line 3798
    +
    +def type_check(symtab)
    +  symtab.push
    +
    +  @stmts.each do |s|
    +    s.type_check(symtab)
    +  end
    +
    +  symtab.pop
    +end
    +
    +
    + +
    + +
    + + + +
    + + \ No newline at end of file diff --git a/docs/ruby/Idl/IfSyntaxNode.html b/docs/ruby/Idl/IfSyntaxNode.html new file mode 100644 index 000000000..b68c56b91 --- /dev/null +++ b/docs/ruby/Idl/IfSyntaxNode.html @@ -0,0 +1,248 @@ + + + + + + + Class: Idl::IfSyntaxNode + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Class: Idl::IfSyntaxNode + + + +

    +
    + +
    +
    Inherits:
    +
    + Treetop::Runtime::SyntaxNode + + + show all + +
    +
    + + + + + + + + + + + +
    +
    Defined in:
    +
    lib/idl/ast.rb
    +
    + +
    + + + + + + + + + +

    + Instance Method Summary + collapse +

    + + + + + + + + +
    +

    Instance Method Details

    + + +
    +

    + + #to_astObject + + + + + +

    + + + + +
    +
    +
    +
    +3915
    +3916
    +3917
    +3918
    +3919
    +3920
    +3921
    +3922
    +3923
    +3924
    +3925
    +3926
    +3927
    +3928
    +3929
    +3930
    +3931
    +3932
    +3933
    +3934
    +3935
    +3936
    +3937
    +3938
    +3939
    +3940
    +3941
    +3942
    +3943
    +3944
    +
    +
    # File 'lib/idl/ast.rb', line 3915
    +
    +def to_ast
    +  if_body_stmts = []
    +  if_body.elements.each do |e|
    +    if_body_stmts << e.e.to_ast
    +  end
    +  eifs = []
    +  unless elseifs.empty?
    +    elseifs.elements.each do |eif|
    +      stmts = []
    +      eif.body.elements.each do |e|
    +        stmts << e.e.to_ast
    +      end
    +      eifs << ElseIfAst.new(eif.expression.to_ast, stmts)
    +    end
    +  end
    +  final_else_stmts = []
    +  unless final_else.empty?
    +    final_else.body.elements.each do |e|
    +      final_else_stmts << e.e.to_ast
    +    end
    +  end
    +  if_body_ast = IfBodyAst.new(if_body_stmts)
    +  final_else_ast = IfBodyAst.new(final_else_stmts)
    +  ast = IfAst.new(if_cond.to_ast, if_body_ast, eifs, final_else_ast)
    +  ast.parent = parent
    +  if_body_ast.parent = ast
    +  eifs.each { |eif| eif.parent = ast }
    +  final_else_ast.parent = ast
    +  ast
    +end
    +
    +
    + +
    + +
    + + + +
    + + \ No newline at end of file diff --git a/docs/ruby/Idl/InstructionOperationAst.html b/docs/ruby/Idl/InstructionOperationAst.html index 36f8c45c1..2c0c5ea2b 100644 --- a/docs/ruby/Idl/InstructionOperationAst.html +++ b/docs/ruby/Idl/InstructionOperationAst.html @@ -223,14 +223,14 @@

     
     
    -3096
    -3097
    -3098
    -3099
    -3100
    +3264 +3265 +3266 +3267 +3268

    -
    # File 'lib/idl/ast.rb', line 3096
    +      
    # File 'lib/idl/ast.rb', line 3264
     
     def execute(symtab)
       op_stmt_list.elements.each do |e|
    @@ -257,10 +257,10 @@ 

     
     
    -3102
    +3270

    -
    # File 'lib/idl/ast.rb', line 3102
    +      
    # File 'lib/idl/ast.rb', line 3270
     
     def to_idl = op_stmt_list.elements.map { |e| e.choice.to_idl }.join("")
    @@ -348,14 +348,14 @@

     
     
    -3090
    -3091
    -3092
    -3093
    -3094
    +3258 +3259 +3260 +3261 +3262

    -
    # File 'lib/idl/ast.rb', line 3090
    +      
    # File 'lib/idl/ast.rb', line 3258
     
     def type_check(symtab)
       op_stmt_list.elements.each do |e|
    @@ -372,7 +372,7 @@ 

    diff --git a/docs/ruby/Idl/InstructionOperationSyntaxNode.html b/docs/ruby/Idl/InstructionOperationSyntaxNode.html new file mode 100644 index 000000000..1300b3614 --- /dev/null +++ b/docs/ruby/Idl/InstructionOperationSyntaxNode.html @@ -0,0 +1,211 @@ + + + + + + + Class: Idl::InstructionOperationSyntaxNode + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Class: Idl::InstructionOperationSyntaxNode + + + +

    +
    + +
    +
    Inherits:
    +
    + Treetop::Runtime::SyntaxNode + + + show all + +
    +
    + + + + + + + + + + + +
    +
    Defined in:
    +
    lib/idl/ast.rb
    +
    + +
    + +

    Overview

    +
    + +

    def execute(symtab)

    + +
      raise "WHere is this AST?"
    +end
    +
    + +

    end

    + + +
    +
    +
    + + +
    + + + + + + + +

    + Instance Method Summary + collapse +

    + + + + + + + + +
    +

    Instance Method Details

    + + +
    +

    + + #to_astObject + + + + + +

    + + + + +
    +
    +
    +
    +3249
    +3250
    +3251
    +
    +
    # File 'lib/idl/ast.rb', line 3249
    +
    +def to_ast
    +  FunctionBodyAst.new(input, interval, op_stmt_list.elements.map(&:choice).map(&:to_ast) )
    +end
    +
    +
    + +
    + +
    + + + +
    + + \ No newline at end of file diff --git a/docs/ruby/Idl/IntAst.html b/docs/ruby/Idl/IntAst.html deleted file mode 100644 index e2a139af7..000000000 --- a/docs/ruby/Idl/IntAst.html +++ /dev/null @@ -1,1669 +0,0 @@ - - - - - - - Module: Idl::IntAst - - — Documentation by YARD 0.9.36 - - - - - - - - - - - - - - - - - - - -
    - - -

    Module: Idl::IntAst - - - -

    -
    - - - - - - -
    -
    Includes:
    -
    AstNodeFuncs, Rvalue
    -
    - - - - - - -
    -
    Defined in:
    -
    lib/idl/ast.rb
    -
    - -
    - - - - - - - - - -

    - Instance Method Summary - collapse -

    - - - - - - - - - - -
    -

    Instance Method Details

    - - -
    -

    - - #childrenArray<AstNode> - - - - - - - Originally defined in module - AstNodeFuncs - - -

    -
    - -

    Returns list of children, or an empty array for a terminal.

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Array<AstNode>) - - - - — -
      -

      list of children, or an empty array for a terminal

      -
      - -
    • - -
    - -
    -
    - -
    -

    - - #internal_error(reason) ⇒ Object - - - - - - - Originally defined in module - AstNodeFuncs - - -

    -
    - -

    raise an internal error

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - reason - - - (String) - - - - — -
      -

      Error message

      -
      - -
    • - -
    - -

    Raises:

    - - -
    -
    - -
    -

    - - #nodesArray<AstNode> - - - - - - - Originally defined in module - AstNodeFuncs - - -

    -
    - -

    Returns an array of AST sub nodes (notably, excludes anything, like whitespace, that wasn’t subclassed to AST).

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Array<AstNode>) - - - - — -
      -

      an array of AST sub nodes (notably, excludes anything, like whitespace, that wasn’t subclassed to AST)

      -
      - -
    • - -
    - -
    -
    - -
    -
    -
    - -

    pretty print the AST rooted at this node

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - indent - - - (Integer) - - - (defaults to: 0) - - - — -
      -

      The starting indentation, in # of spaces

      -
      - -
    • - -
    • - - indent_size - - - (Integer) - - - (defaults to: 2) - - - — -
      -

      The extra indentation applied to each level of the tree

      -
      - -
    • - -
    • - - io - - - (IO) - - - (defaults to: $stdout) - - - — -
      -

      Where to write the output

      -
      - -
    • - -
    - - -
    -
    - -
    -

    - - #to_idlString - - - - - -

    -
    - -

    Return valid IDL representation of the node (and its subtree)

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (String) - - - - — -
      -

      IDL code for the node

      -
      - -
    • - -
    - -
    - - - - -
    -
    -
    -
    -2911
    -
    -
    # File 'lib/idl/ast.rb', line 2911
    -
    -def to_idl = text_value
    -
    -
    - -
    -

    - - #type(symtab) ⇒ Type - - - - - -

    -
    - -

    Given a specific symbol table, return the type of this node.

    - -

    Should not be called until #type_check is called with the same arguments

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - symtab - - - (SymbolTable) - - - - — -
      -

      Symbol table for lookup

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (Type) - - - - — -
      -

      The type of the node

      -
      - -
    • - -
    -

    Raises:

    -
      - -
    • - - - (AstNode::InternalError) - - - - — -
      -

      if the type is dependent on symtab, and type_check was not called first

      -
      - -
    • - -
    - -
    - - - - -
    -
    -
    -
    -2775
    -2776
    -2777
    -2778
    -2779
    -2780
    -2781
    -2782
    -2783
    -2784
    -2785
    -2786
    -2787
    -2788
    -2789
    -2790
    -2791
    -2792
    -2793
    -2794
    -2795
    -2796
    -2797
    -2798
    -2799
    -2800
    -2801
    -2802
    -2803
    -2804
    -2805
    -2806
    -2807
    -2808
    -2809
    -2810
    -2811
    -2812
    -2813
    -2814
    -2815
    -2816
    -2817
    -2818
    -2819
    -2820
    -2821
    -2822
    -2823
    -2824
    -2825
    -2826
    -2827
    -2828
    -2829
    -2830
    -2831
    -2832
    -2833
    -2834
    -2835
    -2836
    -2837
    -2838
    -2839
    -2840
    -2841
    -2842
    -2843
    -2844
    -2845
    -
    -
    # File 'lib/idl/ast.rb', line 2775
    -
    -def type(symtab)
    -  text_value_no_underscores = text_value.delete("_")
    -  if text_value_no_underscores =~ /([0-9]+)?'(s?)([bodh]?)(.*)/
    -    width = ::Regexp.last_match(1)
    -    signed = ::Regexp.last_match(2)
    -    radix_id = ::Regexp.last_match(3)
    -    value = ::Regexp.last_match(4)
    -
    -    if width.nil?
    -      archdef = symtab.archdef
    -      width = archdef.config_params["XLEN"] if width.nil?
    -    end
    -    radix_id = "d" if radix_id.empty?
    -
    -    # ensure we actually have enough bits to represent the value
    -    case radix_id
    -    when "b"
    -      @value = value.to_i(2)
    -      type_error("#{value} cannot be represented in #{width} bits") if @value.bit_length > width.to_i
    -    when "o"
    -      @value = value.to_i(8)
    -      type_error("#{value} cannot be represented in #{width} bits") if @value.bit_length > width.to_i
    -    when "d"
    -      @value = value.to_i(10)
    -      type_error("#{value} cannot be represented in #{width} bits") if @value.bit_length > width.to_i
    -    when "h"
    -      @value = value.to_i(16)
    -      type_error("#{value} cannot be represented in #{width} bits") if @value.bit_length > width.to_i
    -    end
    -
    -    qualifiers = signed == "s" ? [:signed, :const] : [:const]
    -    @type = Type.new(:bits, width: width.to_i, qualifiers:)
    -  elsif text_value_no_underscores =~ /0([bdx]?)([0-9a-fA-F]*)(s?)/
    -    radix_id = ::Regexp.last_match(1)
    -    value = ::Regexp.last_match(2)
    -    signed = ::Regexp.last_match(3)
    -
    -    radix_id = "o" if radix_id.empty?
    -
    -    case radix_id
    -    when "b"
    -      @value = value.to_i(2)
    -    when "o"
    -      @value = value.to_i(8)
    -    when "d"
    -      @value = value.to_i(10)
    -    when "x"
    -      @value = value.to_i(16)
    -    end
    -
    -    qualifiers = signed == "s" ? [:signed, :const] : [:const]
    -    width = signed == "s" ? @value.bit_length + 1 : @value.bit_length
    -    width = 1 if width.zero? # happens when the literal is '0'
    -    @type = Type.new(:bits, width:, qualifiers:)
    -  elsif text_value_no_underscores =~ /([0-9]*)(s?)/
    -    value = ::Regexp.last_match(1)
    -    signed = ::Regexp.last_match(2)
    -
    -    @value = value.to_i(10)
    -
    -    qualifiers = signed == "s" ? [:signed, :const] : [:const]
    -    width = signed == "s" ? @value.bit_length + 1 : @value.bit_length
    -    width = 1 if width.zero? # happens when the literal is '0'
    -    @type = Type.new(:bits, width:, qualifiers:)
    -  else
    -    internal_error "Unhandled int value"
    -  end
    -  type_error(text_value) if @value.nil?
    -
    -  return @type
    -end
    -
    -
    - -
    -

    - - #type_check(symtab) ⇒ void - - - - - -

    -
    -

    This method returns an undefined value.

    -

    type check this node and all children

    - -

    Calls to #type and/or #value may depend on type_check being called first with the same symtab. If not, those functions may raise an AstNode::InternalError

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - symtab - - - (SymbolTable) - - - - — -
      -

      Symbol table for lookup

      -
      - -
    • - -
    - -

    Raises:

    - - -
    - - - - -
    -
    -
    -
    -2706
    -2707
    -2708
    -2709
    -2710
    -2711
    -2712
    -2713
    -2714
    -2715
    -2716
    -2717
    -2718
    -2719
    -2720
    -2721
    -2722
    -2723
    -2724
    -2725
    -2726
    -2727
    -2728
    -2729
    -2730
    -2731
    -2732
    -2733
    -2734
    -2735
    -2736
    -2737
    -2738
    -2739
    -2740
    -2741
    -2742
    -2743
    -2744
    -2745
    -2746
    -2747
    -2748
    -2749
    -2750
    -2751
    -2752
    -2753
    -2754
    -2755
    -2756
    -2757
    -2758
    -2759
    -2760
    -2761
    -2762
    -2763
    -2764
    -2765
    -2766
    -2767
    -2768
    -2769
    -2770
    -2771
    -2772
    -
    -
    # File 'lib/idl/ast.rb', line 2706
    -
    -def type_check(symtab)
    -  archdef = symtab.archdef
    -  text_value_no_underscores = text_value.delete("_")
    -  if text_value_no_underscores =~ /([0-9]+)?'(s?)([bodh]?)(.*)/
    -    width = ::Regexp.last_match(1)
    -    signed = ::Regexp.last_match(2)
    -    radix_id = ::Regexp.last_match(3)
    -    value = ::Regexp.last_match(4)
    -
    -    width = archdef.config_params["XLEN"] if width.nil?
    -    radix_id = "d" if radix_id.empty?
    -
    -    # ensure we actually have enough bits to represent the value
    -    case radix_id
    -    when "b"
    -      @value = value.to_i(2)
    -      type_error("#{value} cannot be represented in #{width} bits") if @value.bit_length > width.to_i
    -    when "o"
    -      @value = value.to_i(8)
    -      type_error("#{value} cannot be represented in #{width} bits") if @value.bit_length > width.to_i
    -    when "d"
    -      @value = value.to_i(10)
    -      type_error("#{value} cannot be represented in #{width} bits") if @value.bit_length > width.to_i
    -    when "h"
    -      @value = value.to_i(16)
    -      type_error("#{value} cannot be represented in #{width} bits") if @value.bit_length > width.to_i
    -    end
    -
    -    qualifiers = signed == "s" ? [:signed, :const] : [:const]
    -    @type = Type.new(:bits, width: width.to_i, qualifiers:)
    -  elsif text_value_no_underscores =~ /0([bdx]?)([0-9a-fA-F]*)(s?)/
    -    radix_id = ::Regexp.last_match(1)
    -    value = ::Regexp.last_match(2)
    -    signed = ::Regexp.last_match(3)
    -
    -    radix_id = "o" if radix_id.empty?
    -
    -    case radix_id
    -    when "b"
    -      @value = value.to_i(2)
    -    when "o"
    -      @value = value.to_i(8)
    -    when "d"
    -      @value = value.to_i(10)
    -    when "x"
    -      @value = value.to_i(16)
    -    end
    -
    -    qualifiers = signed == "s" ? [:signed, :const] : [:const]
    -    width = signed == "s" ? @value.bit_length + 1 : @value.bit_length
    -    width = 1 if width.zero? # happens when the literal is '0'
    -    @type = Type.new(:bits, width:, qualifiers:)
    -  elsif text_value_no_underscores =~ /([0-9]*)(s?)/
    -    value = ::Regexp.last_match(1)
    -    signed = ::Regexp.last_match(2)
    -
    -    @value = value.to_i(10)
    -
    -    qualifiers = signed == "s" ? [:signed, :const] : [:const]
    -    width = signed == "s" ? @value.bit_length + 1 : @value.bit_length
    -    width = 1 if width.zero? # happens when the literal is '0'
    -    @type = Type.new(:bits, width:, qualifiers:)
    -  else
    -    internal_error "Unhandled int value"
    -  end
    -  type_error(text_value) if @value.nil?
    -end
    -
    -
    - -
    -

    - - #type_error(reason) ⇒ Object - - - - - - - Originally defined in module - AstNodeFuncs - - -

    -
    - -

    raise a type error

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - reason - - - (String) - - - - — -
      -

      Error message

      -
      - -
    • - -
    - -

    Raises:

    - - -
    -
    - -
    -

    - - #unindent(s) ⇒ String - - - - - - - Originally defined in module - AstNodeFuncs - - -

    -
    - -

    unindent a multiline string, getting rid of all common leading whitespace (like <<~ heredocs)

    - -

    borrowed from stackoverflow.com/questions/33527064/multiline-strings-with-no-indent

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - s - - - (String) - - - - — -
      -

      A string (presumably with newlines)

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (String) - - - - — -
      -

      Unindented string

      -
      - -
    • - -
    - -
    -
    - -
    -

    - - #value(symtab) ⇒ Object - - - - - -

    -
    - -

    Return the compile-time-known value of the node

    - - -
    -
    -
    - - -
    - - - - -
    -
    -
    -
    -2848
    -2849
    -2850
    -2851
    -2852
    -2853
    -2854
    -2855
    -2856
    -2857
    -2858
    -2859
    -2860
    -2861
    -2862
    -2863
    -2864
    -2865
    -2866
    -2867
    -2868
    -2869
    -2870
    -2871
    -2872
    -2873
    -2874
    -2875
    -2876
    -2877
    -2878
    -2879
    -2880
    -2881
    -2882
    -2883
    -2884
    -2885
    -2886
    -2887
    -2888
    -2889
    -2890
    -2891
    -2892
    -2893
    -2894
    -2895
    -2896
    -2897
    -2898
    -2899
    -2900
    -2901
    -2902
    -2903
    -2904
    -2905
    -2906
    -2907
    -2908
    -
    -
    # File 'lib/idl/ast.rb', line 2848
    -
    -def value(symtab)
    -  text_value_no_underscores = text_value.delete("_")
    -  if text_value_no_underscores =~ /([0-9]+)?'(s?)([bodh]?)(.*)/
    -    width = ::Regexp.last_match(1)
    -    _signed = ::Regexp.last_match(2)
    -    radix_id = ::Regexp.last_match(3)
    -    value = ::Regexp.last_match(4)
    -
    -    if width.nil?
    -      archdef = symtab.archdef
    -      width = archdef.config_params["XLEN"] if width.nil?
    -    end
    -
    -    radix_id = "d" if radix_id.empty?
    -
    -    # ensure we actually have enough bits to represent the value
    -    case radix_id
    -    when "b"
    -      v = value.to_i(2)
    -      type_error("#{value} cannot be represented in #{width} bits") if v.bit_length > width.to_i
    -    when "o"
    -      v = value.to_i(8)
    -      type_error("#{value} cannot be represented in #{width} bits") if v.bit_length > width.to_i
    -    when "d"
    -      v = value.to_i(10)
    -      type_error("#{value} cannot be represented in #{width} bits") if v.bit_length > width.to_i
    -    when "h"
    -      v = value.to_i(16)
    -      type_error("#{value} cannot be represented in #{width} bits") if v.bit_length > width.to_i
    -    end
    -    
    -    v
    -
    -  elsif text_value_no_underscores =~ /0([bdx]?)([0-9a-fA-F]*)(s?)/
    -    radix_id = ::Regexp.last_match(1)
    -    value = ::Regexp.last_match(2)
    -    signed = ::Regexp.last_match(3)
    -
    -    radix_id = "o" if radix_id.empty?
    -
    -    case radix_id
    -    when "b"
    -      value.to_i(2)
    -    when "o"
    -      value.to_i(8)
    -    when "d"
    -      value.to_i(10)
    -    when "x"
    -      value.to_i(16)
    -    end
    -
    -  elsif text_value_no_underscores =~ /([0-9]*)(s?)/
    -    value = ::Regexp.last_match(1)
    -    signed = ::Regexp.last_match(2)
    -
    -    value.to_i(10)
    -
    -  else
    -    internal_error "Unhandled int value"
    -  end
    -end
    -
    -
    - -
    -

    - - #value_error(reason) ⇒ Object - - - - - - - Originally defined in module - AstNodeFuncs - - -

    -
    - -

    raise a value error, indicating that the value is not known at compile time

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - reason - - - (String) - - - - — -
      -

      Error message

      -
      - -
    • - -
    - -

    Raises:

    - - -
    -
    - -
    -

    - - #values(symtab) ⇒ Array<Integer>, ... - - - - - - - Originally defined in module - Rvalue - - -

    -
    - -

    Return a complete list of possible compile-time-known values of the node, or raise a ValueError if the full list cannot be determined

    - -

    For most AstNodes, this will just be a single-entry array

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - symtab - - - (SymbolTable) - - - - — -
      -

      The context for the evaulation

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (Array<Integer>) - - - - — -
      -

      The complete list of compile-time-known values, when they are integral

      -
      - -
    • - -
    • - - - (Array<Boolean>) - - - - — -
      -

      The complete list of compile-time-known values, when they are booleans

      -
      - -
    • - -
    • - - - (AstNode::ValueError) - - - - — -
      -

      if the list of values is not knowable at compile time

      -
      - -
    • - -
    - -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/ruby/Idl/IntLiteralAst.html b/docs/ruby/Idl/IntLiteralAst.html new file mode 100644 index 000000000..faa03dd2d --- /dev/null +++ b/docs/ruby/Idl/IntLiteralAst.html @@ -0,0 +1,1871 @@ + + + + + + + Class: Idl::IntLiteralAst + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Class: Idl::IntLiteralAst + + + +

    +
    + +
    +
    Inherits:
    +
    + AstNode + + + show all + +
    +
    + + + + + + +
    +
    Includes:
    +
    AstNodeFuncs, Rvalue
    +
    + + + + + + +
    +
    Defined in:
    +
    lib/idl/ast.rb,
    + lib/idl/passes/gen_adoc.rb
    +
    +
    + +
    + + + + + + + + + +

    + Instance Method Summary + collapse +

    + + + + + + + + + + + + +
    +

    Constructor Details

    + +
    +

    + + #initialize(input, interval) ⇒ IntLiteralAst + + + + + +

    +
    + +

    Returns a new instance of IntLiteralAst.

    + + +
    +
    +
    + + +
    + + + + +
    +
    +
    +
    +2880
    +2881
    +2882
    +
    +
    # File 'lib/idl/ast.rb', line 2880
    +
    +def initialize(input, interval)
    +  super(input, interval, [])
    +end
    +
    +
    + +
    + + +
    +

    Instance Method Details

    + + +
    +

    + + #childrenArray<AstNode> + + + + + + + Originally defined in module + AstNodeFuncs + + +

    +
    + +

    Returns list of children, or an empty array for a terminal.

    + + +
    +
    +
    + +

    Returns:

    +
      + +
    • + + + (Array<AstNode>) + + + + — +
      +

      list of children, or an empty array for a terminal

      +
      + +
    • + +
    + +
    +
    + +
    +

    + + #gen_adoc(indent = 0, indent_spaces: 2) ⇒ Object + + + + + +

    + + + + +
    +
    +
    +
    +51
    +52
    +53
    +54
    +
    +
    # File 'lib/idl/passes/gen_adoc.rb', line 51
    +
    +def gen_adoc(indent = 0, indent_spaces: 2)
    +  raise "?" if text_value.empty?
    +  text_value
    +end
    +
    +
    + +
    +

    + + #internal_error(reason) ⇒ Object + + + + + + + Originally defined in module + AstNodeFuncs + + +

    +
    + +

    raise an internal error

    + + +
    +
    +
    +

    Parameters:

    +
      + +
    • + + reason + + + (String) + + + + — +
      +

      Error message

      +
      + +
    • + +
    + +

    Raises:

    + + +
    +
    + +
    +

    + + #nodesArray<AstNode> + + + + + + + Originally defined in module + AstNodeFuncs + + +

    +
    + +

    Returns an array of AST sub nodes (notably, excludes anything, like whitespace, that wasn’t subclassed to AST).

    + + +
    +
    +
    + +

    Returns:

    +
      + +
    • + + + (Array<AstNode>) + + + + — +
      +

      an array of AST sub nodes (notably, excludes anything, like whitespace, that wasn’t subclassed to AST)

      +
      + +
    • + +
    + +
    +
    + +
    +
    +
    + +

    pretty print the AST rooted at this node

    + + +
    +
    +
    +

    Parameters:

    +
      + +
    • + + indent + + + (Integer) + + + (defaults to: 0) + + + — +
      +

      The starting indentation, in # of spaces

      +
      + +
    • + +
    • + + indent_size + + + (Integer) + + + (defaults to: 2) + + + — +
      +

      The extra indentation applied to each level of the tree

      +
      + +
    • + +
    • + + io + + + (IO) + + + (defaults to: $stdout) + + + — +
      +

      Where to write the output

      +
      + +
    • + +
    + + +
    +
    + +
    +

    + + #to_idlString + + + + + +

    +
    + +

    Return valid IDL representation of the node (and its subtree)

    + + +
    +
    +
    + +

    Returns:

    +
      + +
    • + + + (String) + + + + — +
      +

      IDL code for the node

      +
      + +
    • + +
    + +
    + + + + +
    +
    +
    +
    +3058
    +
    +
    # File 'lib/idl/ast.rb', line 3058
    +
    +def to_idl = text_value
    +
    +
    + +
    +

    + + #type(symtab) ⇒ Type + + + + + +

    +
    + +

    Given a specific symbol table, return the type of this node.

    + +

    Should not be called until #type_check is called with the same arguments

    + + +
    +
    +
    +

    Parameters:

    +
      + +
    • + + symtab + + + (SymbolTable) + + + + — +
      +

      Symbol table for lookup

      +
      + +
    • + +
    + +

    Returns:

    +
      + +
    • + + + (Type) + + + + — +
      +

      The type of the node

      +
      + +
    • + +
    +

    Raises:

    +
      + +
    • + + + (AstNode::InternalError) + + + + — +
      +

      if the type is dependent on symtab, and type_check was not called first

      +
      + +
    • + +
    + +
    + + + + +
    +
    +
    +
    +2902
    +2903
    +2904
    +2905
    +2906
    +2907
    +2908
    +2909
    +2910
    +2911
    +2912
    +2913
    +2914
    +2915
    +2916
    +2917
    +2918
    +2919
    +2920
    +2921
    +2922
    +2923
    +2924
    +2925
    +2926
    +2927
    +2928
    +2929
    +2930
    +2931
    +2932
    +2933
    +2934
    +2935
    +2936
    +
    +
    # File 'lib/idl/ast.rb', line 2902
    +
    +def type(symtab)
    +  return @type unless @type.nil?
    +
    +  case text_value.delete("_")
    +  when /([0-9]+)?'(s?)([bodh]?)(.*)/
    +    # verilog-style literal
    +    width = ::Regexp.last_match(1)
    +    signed = ::Regexp.last_match(2)
    +
    +    memoize = true
    +    if width.nil?
    +      width = symtab.archdef.config_params["XLEN"]
    +      memoize = false
    +    end
    +
    +    qualifiers = signed == "s" ? [:signed, :const] : [:const]
    +    t = Type.new(:bits, width: width.to_i, qualifiers:)
    +    @type = t if memoize
    +    t
    +  when /0([bdx]?)([0-9a-fA-F]*)(s?)/
    +    # C++-style literal
    +    signed = ::Regexp.last_match(3)
    +
    +    qualifiers = signed == "s" ? [:signed, :const] : [:const]
    +    @type = Type.new(:bits, width: width(symtab), qualifiers:)
    +  when /([0-9]*)(s?)/
    +    # basic decimal
    +    signed = ::Regexp.last_match(2)
    +
    +    qualifiers = signed == "s" ? [:signed, :const] : [:const]
    +    @type = Type.new(:bits, width: width(symtab), qualifiers:)
    +  else
    +    internal_error "Unhandled int value"
    +  end
    +end
    +
    +
    + +
    +

    + + #type_check(symtab) ⇒ void + + + + + +

    +
    +

    This method returns an undefined value.

    +

    type check this node and all children

    + +

    Calls to #type and/or #value may depend on type_check being called first with the same symtab. If not, those functions may raise an AstNode::InternalError

    + + +
    +
    +
    +

    Parameters:

    +
      + +
    • + + symtab + + + (SymbolTable) + + + + — +
      +

      Symbol table for lookup

      +
      + +
    • + +
    + +

    Raises:

    + + +
    + + + + +
    +
    +
    +
    +2885
    +2886
    +2887
    +2888
    +2889
    +2890
    +2891
    +2892
    +2893
    +2894
    +2895
    +2896
    +2897
    +2898
    +2899
    +
    +
    # File 'lib/idl/ast.rb', line 2885
    +
    +def type_check(symtab)
    +  if text_value.delete("_") =~ /([0-9]+)?'(s?)([bodh]?)(.*)/
    +    # verilog-style literal
    +    width = ::Regexp.last_match(1)
    +    value_text = ::Regexp.last_match(4)
    +
    +    if width.nil?
    +      width = symtab.archdef.config_params["XLEN"]
    +      memoize = false
    +    end
    +
    +    # ensure we actually have enough bits to represent the value
    +    type_error("#{value_text} cannot be represented in #{width} bits") if unsigned_value.bit_length > width.to_i
    +  end
    +end
    +
    +
    + +
    +

    + + #type_error(reason) ⇒ Object + + + + + + + Originally defined in module + AstNodeFuncs + + +

    +
    + +

    raise a type error

    + + +
    +
    +
    +

    Parameters:

    +
      + +
    • + + reason + + + (String) + + + + — +
      +

      Error message

      +
      + +
    • + +
    + +

    Raises:

    + + +
    +
    + +
    +

    + + #unindent(s) ⇒ String + + + + + + + Originally defined in module + AstNodeFuncs + + +

    +
    + +

    unindent a multiline string, getting rid of all common leading whitespace (like <<~ heredocs)

    + +

    borrowed from stackoverflow.com/questions/33527064/multiline-strings-with-no-indent

    + + +
    +
    +
    +

    Parameters:

    +
      + +
    • + + s + + + (String) + + + + — +
      +

      A string (presumably with newlines)

      +
      + +
    • + +
    + +

    Returns:

    +
      + +
    • + + + (String) + + + + — +
      +

      Unindented string

      +
      + +
    • + +
    + +
    +
    + +
    +

    + + #unsigned_valueInteger + + + + + +

    +
    + +

    Returns the unsigned value of this literal (i.e., treating it as unsigned even if the signed specifier is present).

    + + +
    +
    +
    + +

    Returns:

    +
      + +
    • + + + (Integer) + + + + — +
      +

      the unsigned value of this literal (i.e., treating it as unsigned even if the signed specifier is present)

      +
      + +
    • + +
    + +
    + + + + +
    +
    +
    +
    +3004
    +3005
    +3006
    +3007
    +3008
    +3009
    +3010
    +3011
    +3012
    +3013
    +3014
    +3015
    +3016
    +3017
    +3018
    +3019
    +3020
    +3021
    +3022
    +3023
    +3024
    +3025
    +3026
    +3027
    +3028
    +3029
    +3030
    +3031
    +3032
    +3033
    +3034
    +3035
    +3036
    +3037
    +3038
    +3039
    +3040
    +3041
    +3042
    +3043
    +3044
    +3045
    +3046
    +3047
    +3048
    +3049
    +3050
    +3051
    +3052
    +3053
    +3054
    +3055
    +
    +
    # File 'lib/idl/ast.rb', line 3004
    +
    +def unsigned_value
    +  return @unsigned_value unless @unsigned_value.nil?
    +
    +  case text_value.delete("_")
    +  when /([0-9]+)?'(s?)([bodh]?)(.*)/
    +    # verilog-style literal
    +    radix_id = ::Regexp.last_match(3)
    +    value = ::Regexp.last_match(4)
    +
    +    radix_id = "d" if radix_id.empty?
    +
    +    # ensure we actually have enough bits to represent the value
    +    @unsigned_value =
    +      case radix_id
    +      when "b"
    +        value.to_i(2)
    +      when "o"
    +        value.to_i(8)
    +      when "d"
    +        value.to_i(10)
    +      when "h"
    +        value.to_i(16)
    +      end
    +  when /0([bdx]?)([0-9a-fA-F]*)(s?)/
    +    # C++-style literal
    +    radix_id = ::Regexp.last_match(1)
    +    value = ::Regexp.last_match(2)
    +    signed = ::Regexp.last_match(3)
    +
    +    radix_id = "o" if radix_id.empty?
    +
    +    @unsigned_value =
    +      case radix_id
    +      when "b"
    +        value.to_i(2)
    +      when "o"
    +        value.to_i(8)
    +      when "d"
    +        value.to_i(10)
    +      when "x"
    +        value.to_i(16)
    +      end
    +  when /([0-9]*)(s?)/
    +    # basic decimal
    +    value = ::Regexp.last_match(1)
    +    signed = ::Regexp.last_match(2)
    +
    +    @unsigned_value = value.to_i(10)
    +  else
    +    internal_error "Unhandled int value"
    +  end
    +end
    +
    +
    + +
    +

    + + #value(symtab) ⇒ Object + + + + + +

    +
    + +

    Return the compile-time-known value of the node

    + + +
    +
    +
    + + +
    + + + + +
    +
    +
    +
    +2974
    +2975
    +2976
    +2977
    +2978
    +2979
    +2980
    +2981
    +2982
    +2983
    +2984
    +2985
    +2986
    +2987
    +2988
    +2989
    +2990
    +2991
    +2992
    +2993
    +2994
    +2995
    +2996
    +2997
    +2998
    +2999
    +3000
    +
    +
    # File 'lib/idl/ast.rb', line 2974
    +
    +def value(symtab)
    +  return @value unless @value.nil?
    +
    +  if text_value.delete("_") =~ /([0-9]+)?'(s?)([bodh]?)(.*)/
    +    # verilog-style literal
    +    width = ::Regexp.last_match(1)
    +    signed = ::Regexp.last_match(2)
    +
    +    memoize = true
    +    if width.nil?
    +      width = symtab.archdef.config_params["XLEN"]
    +      memoize = false
    +    end
    +
    +    v =
    +      if !signed.empty? && ((unsigned_value >> (width.to_i - 1)) == 1)
    +        -(2**width.to_i - unsigned_value) 
    +      else
    +        unsigned_value
    +      end
    +
    +    @value = v if memoize
    +    v
    +  else
    +    @value = unsigned_value
    +  end
    +end
    +
    +
    + +
    +

    + + #value_error(reason) ⇒ Object + + + + + + + Originally defined in module + AstNodeFuncs + + +

    +
    + +

    raise a value error, indicating that the value is not known at compile time

    + + +
    +
    +
    +

    Parameters:

    +
      + +
    • + + reason + + + (String) + + + + — +
      +

      Error message

      +
      + +
    • + +
    + +

    Raises:

    + + +
    +
    + +
    +

    + + #values(symtab) ⇒ Array<Integer>, ... + + + + + + + Originally defined in module + Rvalue + + +

    +
    + +

    Return a complete list of possible compile-time-known values of the node, or raise a ValueError if the full list cannot be determined

    + +

    For most AstNodes, this will just be a single-entry array

    + + +
    +
    +
    +

    Parameters:

    +
      + +
    • + + symtab + + + (SymbolTable) + + + + — +
      +

      The context for the evaulation

      +
      + +
    • + +
    + +

    Returns:

    +
      + +
    • + + + (Array<Integer>) + + + + — +
      +

      The complete list of compile-time-known values, when they are integral

      +
      + +
    • + +
    • + + + (Array<Boolean>) + + + + — +
      +

      The complete list of compile-time-known values, when they are booleans

      +
      + +
    • + +
    • + + + (AstNode::ValueError) + + + + — +
      +

      if the list of values is not knowable at compile time

      +
      + +
    • + +
    + +
    +
    + +
    +

    + + #width(symtab) ⇒ Object + + + + + +

    + + + + +
    +
    +
    +
    +2938
    +2939
    +2940
    +2941
    +2942
    +2943
    +2944
    +2945
    +2946
    +2947
    +2948
    +2949
    +2950
    +2951
    +2952
    +2953
    +2954
    +2955
    +2956
    +2957
    +2958
    +2959
    +2960
    +2961
    +2962
    +2963
    +2964
    +2965
    +2966
    +2967
    +2968
    +2969
    +2970
    +2971
    +
    +
    # File 'lib/idl/ast.rb', line 2938
    +
    +def width(symtab)
    +  return @width unless @width.nil?
    +
    +  text_value_no_underscores = text_value.delete("_")
    +
    +  case text_value_no_underscores
    +  when /([0-9]+)?'(s?)([bodh]?)(.*)/
    +    # verilog-style literal
    +    width = ::Regexp.last_match(1)
    +    memoize = true
    +    if width.nil?
    +      width = archdef.config_params["XLEN"]
    +      memoize = false
    +    end
    +    @width = width if memoize
    +    width
    +  when /0([bdx]?)([0-9a-fA-F]*)(s?)/
    +    signed = ::Regexp.last_match(3)
    +
    +    @width = signed == "s" ? value(symtab).bit_length + 1 : value(symtab).bit_length
    +    @width = 1 if @width.zero? # happens when the literal is '0'
    +
    +    @width
    +  when /([0-9]*)(s?)/
    +    signed = ::Regexp.last_match(3)
    +
    +    @width = signed == "s" ? value(symtab).bit_length + 1 : value(symtab).bit_length
    +    @width = 1 if @width.zero? # happens when the literal is '0'
    +
    +    @width
    +  else
    +    internal_error "No match on int literal"
    +  end
    +end
    +
    +
    + +
    + +
    + + + +
    + + \ No newline at end of file diff --git a/docs/ruby/Idl/IntLiteralSyntaxNode.html b/docs/ruby/Idl/IntLiteralSyntaxNode.html new file mode 100644 index 000000000..b2b449554 --- /dev/null +++ b/docs/ruby/Idl/IntLiteralSyntaxNode.html @@ -0,0 +1,174 @@ + + + + + + + Module: Idl::IntLiteralSyntaxNode + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Module: Idl::IntLiteralSyntaxNode + + + +

    +
    + + + + + + + + + + + +
    +
    Defined in:
    +
    lib/idl/ast.rb
    +
    + +
    + + + + + + + + + +

    + Instance Method Summary + collapse +

    + + + + + + +
    +

    Instance Method Details

    + + +
    +

    + + #to_astObject + + + + + +

    + + + + +
    +
    +
    +
    +2871
    +2872
    +2873
    +
    +
    # File 'lib/idl/ast.rb', line 2871
    +
    +def to_ast
    +  IntLiteralAst.new(input, interval)
    +end
    +
    +
    + +
    + +
    + + + +
    + + \ No newline at end of file diff --git a/docs/ruby/Idl/IsaAst.html b/docs/ruby/Idl/IsaAst.html index eaf927884..52b9bc1ed 100644 --- a/docs/ruby/Idl/IsaAst.html +++ b/docs/ruby/Idl/IsaAst.html @@ -315,18 +315,18 @@

     
     
    -522
    -523
    -524
    -525
    -526
    -527
    -528
    -529
    -530
    +534 +535 +536 +537 +538 +539 +540 +541 +542

    -
    # File 'lib/idl/ast.rb', line 522
    +      
    # File 'lib/idl/ast.rb', line 534
     
     def bitfields
       return @bitfields unless @bitfields.nil?
    @@ -357,12 +357,12 @@ 

     
     
    -495
    -496
    -497
    +507 +508 +509

    -
    # File 'lib/idl/ast.rb', line 495
    +      
    # File 'lib/idl/ast.rb', line 507
     
     def children
       enums + bitfields + functions + globals
    @@ -398,19 +398,19 @@ 

     
     
    -511
    -512
    -513
    -514
    -515
    -516
    -517
    -518
    -519
    -520
    +523 +524 +525 +526 +527 +528 +529 +530 +531 +532

    -
    # File 'lib/idl/ast.rb', line 511
    +      
    # File 'lib/idl/ast.rb', line 523
     
     def enums
       return @enums unless @enums.nil?
    @@ -442,19 +442,19 @@ 

     
     
    -532
    -533
    -534
    -535
    -536
    -537
    -538
    -539
    -540
    -541
    +544 +545 +546 +547 +548 +549 +550 +551 +552 +553

    -
    # File 'lib/idl/ast.rb', line 532
    +      
    # File 'lib/idl/ast.rb', line 544
     
     def functions
       return @functions unless @functions.nil?
    @@ -486,19 +486,19 @@ 

     
     
    -499
    -500
    -501
    -502
    -503
    -504
    -505
    -506
    -507
    -508
    +511 +512 +513 +514 +515 +516 +517 +518 +519 +520

    -
    # File 'lib/idl/ast.rb', line 499
    +      
    # File 'lib/idl/ast.rb', line 511
     
     def globals
       return @globals unless @globals.nil?
    @@ -530,18 +530,18 @@ 

     
     
    -552
    -553
    -554
    -555
    -556
    -557
    -558
    -559
    -560
    +564 +565 +566 +567 +568 +569 +570 +571 +572

    -
    # File 'lib/idl/ast.rb', line 552
    +      
    # File 'lib/idl/ast.rb', line 564
     
     def instructions
       return @instructions unless @instructions.nil?
    @@ -572,17 +572,17 @@ 

     
     
    -543
    -544
    -545
    -546
    -547
    -548
    -549
    -550
    +555 +556 +557 +558 +559 +560 +561 +562

    -
    # File 'lib/idl/ast.rb', line 543
    +      
    # File 'lib/idl/ast.rb', line 555
     
     def type_check(symtab)
       definitions.elements.each do |e|
    @@ -602,7 +602,7 @@ 

    diff --git a/docs/ruby/Idl/MultiVariableAssignmentAst.html b/docs/ruby/Idl/MultiVariableAssignmentAst.html index 8f680d87f..2bdc3d185 100644 --- a/docs/ruby/Idl/MultiVariableAssignmentAst.html +++ b/docs/ruby/Idl/MultiVariableAssignmentAst.html @@ -286,21 +286,21 @@

     
     
    -1254
    -1255
    -1256
    -1257
    -1258
    -1259
    -1260
    -1261
    -1262
    -1263
    -1264
    -1265
    +1280 +1281 +1282 +1283 +1284 +1285 +1286 +1287 +1288 +1289 +1290 +1291

    -
    # File 'lib/idl/ast.rb', line 1254
    +      
    # File 'lib/idl/ast.rb', line 1280
     
     def execute(symtab)
       values = function_call.execute(symtab)
    @@ -334,12 +334,12 @@ 

     
     
    -1219
    -1220
    -1221
    +1245 +1246 +1247

    -
    # File 'lib/idl/ast.rb', line 1219
    +      
    # File 'lib/idl/ast.rb', line 1245
     
     def rhs
       function_call
    @@ -393,10 +393,10 @@ 

     
     
    -1268
    +1294

    -
    # File 'lib/idl/ast.rb', line 1268
    +      
    # File 'lib/idl/ast.rb', line 1294
     
     def to_idl = "(#{vars.map(&:to_idl).join(', ')}) = #{function_call.to_idl}"
    @@ -484,38 +484,38 @@

     
     
    -1224
    -1225
    -1226
    -1227
    -1228
    -1229
    -1230
    -1231
    -1232
    -1233
    -1234
    -1235
    -1236
    -1237
    -1238
    -1239
    -1240
    -1241
    -1242
    -1243
    -1244
    -1245
    -1246
    -1247
    -1248
    -1249
     1250
     1251
    -1252
    +1252 +1253 +1254 +1255 +1256 +1257 +1258 +1259 +1260 +1261 +1262 +1263 +1264 +1265 +1266 +1267 +1268 +1269 +1270 +1271 +1272 +1273 +1274 +1275 +1276 +1277 +1278

    -
    # File 'lib/idl/ast.rb', line 1224
    +      
    # File 'lib/idl/ast.rb', line 1250
     
     def type_check(symtab)
       function_call.type_check(symtab)
    @@ -595,12 +595,12 @@ 

     
     
    -1215
    -1216
    -1217
    +1241 +1242 +1243

    -
    # File 'lib/idl/ast.rb', line 1215
    +      
    # File 'lib/idl/ast.rb', line 1241
     
     def vars
       [first] + rest.elements.map(&:var)
    @@ -615,7 +615,7 @@ 

    diff --git a/docs/ruby/Idl/MultiVariableDeclarationAst.html b/docs/ruby/Idl/MultiVariableDeclarationAst.html index 176afb27d..a1a380f61 100644 --- a/docs/ruby/Idl/MultiVariableDeclarationAst.html +++ b/docs/ruby/Idl/MultiVariableDeclarationAst.html @@ -299,14 +299,14 @@

     
     
    -1321
    -1322
    -1323
    -1324
    -1325
    +1347 +1348 +1349 +1350 +1351

    -
    # File 'lib/idl/ast.rb', line 1321
    +      
    # File 'lib/idl/ast.rb', line 1347
     
     def add_symbol(symtab)
       var_names.each do |vname|
    @@ -362,10 +362,10 @@ 

     
     
    -1328
    +1354

    -
    # File 'lib/idl/ast.rb', line 1328
    +      
    # File 'lib/idl/ast.rb', line 1354
     
     def to_idl = "#{type.to_idl} #{var_names.map(&:to_idl).join(', ')}"
    @@ -453,16 +453,16 @@

     
     
    -1312
    -1313
    -1314
    -1315
    -1316
    -1317
    -1318
    +1338 +1339 +1340 +1341 +1342 +1343 +1344

    -
    # File 'lib/idl/ast.rb', line 1312
    +      
    # File 'lib/idl/ast.rb', line 1338
     
     def type_check(symtab)
       type_error "No type named '#{type_name.text_value}' on line #{lineno}" if type.nil?
    @@ -520,19 +520,19 @@ 

     
     
    -1300
    -1301
    -1302
    -1303
    -1304
    -1305
    -1306
    -1307
    -1308
    -1309
    +1326 +1327 +1328 +1329 +1330 +1331 +1332 +1333 +1334 +1335

    -
    # File 'lib/idl/ast.rb', line 1300
    +      
    # File 'lib/idl/ast.rb', line 1326
     
     def var_names
       return @var_names unless @var_names.nil?
    @@ -554,7 +554,7 @@ 

    diff --git a/docs/ruby/Idl/BitsTypeAst.html b/docs/ruby/Idl/NoopAst.html similarity index 56% rename from docs/ruby/Idl/BitsTypeAst.html rename to docs/ruby/Idl/NoopAst.html index eef5221bd..7616caa04 100644 --- a/docs/ruby/Idl/BitsTypeAst.html +++ b/docs/ruby/Idl/NoopAst.html @@ -4,7 +4,7 @@ - Class: Idl::BitsTypeAst + Class: Idl::NoopAst — Documentation by YARD 0.9.36 @@ -15,7 +15,7 @@ <link rel="stylesheet" href="../css/common.css" type="text/css" /> <script type="text/javascript"> - pathId = "Idl::BitsTypeAst"; + pathId = "Idl::NoopAst"; relpath = '../'; </script> @@ -36,10 +36,10 @@ <div id="header"> <div id="menu"> - <a href="../_index.html">Index (B)</a> » + <a href="../_index.html">Index (N)</a> » <span class='title'><span class='object_link'><a href="../Idl.html" title="Idl (module)">Idl</a></span></span> » - <span class="title">BitsTypeAst</span> + <span class="title">NoopAst</span> </div> @@ -59,7 +59,7 @@ <div class="clear"></div> </div> - <div id="content"><h1>Class: Idl::BitsTypeAst + <div id="content"><h1>Class: Idl::NoopAst @@ -78,7 +78,7 @@ <li class="next"><span class='object_link'><a href="AstNode.html" title="Idl::AstNode (class)">AstNode</a></span></li> - <li class="next">Idl::BitsTypeAst</li> + <li class="next">Idl::NoopAst</li> </ul> <a href="#" class="inheritanceTree">show all</a> @@ -121,7 +121,7 @@ <h2> <li class="public "> <span class="summary_signature"> - <a href="#to_idl-instance_method" title="#to_idl (instance method)">#<strong>to_idl</strong> ⇒ String </a> + <a href="#execute-instance_method" title="#execute (instance method)">#<strong>execute</strong>(symtab) ⇒ void </a> @@ -136,7 +136,7 @@ <h2> <span class="summary_desc"><div class='inline'> -<p>Return valid IDL representation of the node (and its subtree).</p> +<p>“execute” the statement by updating the variables in the symbol table.</p> </div></span> </li> @@ -145,13 +145,15 @@ <h2> <li class="public "> <span class="summary_signature"> - <a href="#type-instance_method" title="#type (instance method)">#<strong>type</strong>(symtab) ⇒ Type </a> + <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> ⇒ NoopAst </a> </span> + <span class="note title constructor">constructor</span> + @@ -160,9 +162,31 @@ <h2> <span class="summary_desc"><div class='inline'> -<p>Given a specific symbol table, return the type of this node.</p> +<p>A new instance of NoopAst.</p> </div></span> +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#to_idl-instance_method" title="#to_idl (instance method)">#<strong>to_idl</strong> ⇒ Object </a> + + + + </span> + + + + + + + + + + <span class="summary_desc"><div class='inline'></div></span> + </li> @@ -199,16 +223,13 @@ <h2> + <div id="constructor_details" class="method_details_list"> + <h2>Constructor Details</h2> - - <div id="instance_method_details" class="method_details_list"> - <h2>Instance Method Details</h2> - - - <div class="method_details first"> - <h3 class="signature first" id="to_idl-instance_method"> + <div class="method_details first"> + <h3 class="signature first" id="initialize-instance_method"> - #<strong>to_idl</strong> ⇒ <tt>String</tt> + #<strong>initialize</strong> ⇒ <tt><span class='object_link'><a href="" title="Idl::NoopAst (class)">NoopAst</a></span></tt> @@ -217,31 +238,13 @@ <h3 class="signature first" id="to_idl-instance_method"> </h3><div class="docstring"> <div class="discussion"> -<p>Return valid IDL representation of the node (and its subtree)</p> +<p>Returns a new instance of NoopAst.</p> </div> </div> <div class="tags"> -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'>(<tt>String</tt>)</span> - - - - — - <div class='inline'> -<p>IDL code for the node</p> -</div> - - </li> - -</ul> </div><table class="source_code"> <tr> @@ -249,21 +252,32 @@ <h3 class="signature first" id="to_idl-instance_method"> <pre class="lines"> -2670</pre> +2496 +2497 +2498</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 2670</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 2496</span> -<span class='kw'>def</span> <span class='id identifier rubyid_to_idl'>to_idl</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Bits<</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_i'>i</span><span class='period'>.</span><span class='id identifier rubyid_to_idl'>to_idl</span><span class='embexpr_end'>}</span><span class='tstring_content'>></span><span class='tstring_end'>"</span></span></pre> +<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> + <span class='kw'>super</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='int'>0</span><span class='op'>...</span><span class='int'>0</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> +<span class='kw'>end</span></pre> </td> </tr> </table> </div> + +</div> + + + <div id="instance_method_details" class="method_details_list"> + <h2>Instance Method Details</h2> + - <div class="method_details "> - <h3 class="signature " id="type-instance_method"> + <div class="method_details first"> + <h3 class="signature first" id="execute-instance_method"> - #<strong>type</strong>(symtab) ⇒ <tt><span class='object_link'><a href="Type.html" title="Idl::Type (class)">Type</a></span></tt> + #<strong>execute</strong>(symtab) ⇒ <tt>void</tt> @@ -271,10 +285,8 @@ <h3 class="signature " id="type-instance_method"> </h3><div class="docstring"> <div class="discussion"> - -<p>Given a specific symbol table, return the type of this node.</p> - -<p>Should not be called until <span class='object_link'><a href="#type_check-instance_method" title="Idl::BitsTypeAst#type_check (method)">#type_check</a></span> is called with the same arguments</p> + <p class="note returns_void">This method returns an undefined value.</p> +<p>“execute” the statement by updating the variables in the symbol table</p> </div> @@ -294,44 +306,26 @@ <h3 class="signature " id="type-instance_method"> — <div class='inline'> -<p>Symbol table for lookup</p> +<p>The symbol table for the context</p> </div> </li> </ul> -<p class="tag_title">Returns:</p> -<ul class="return"> - - <li> - - - <span class='type'>(<tt><span class='object_link'><a href="Type.html" title="Idl::Type (class)">Type</a></span></tt>)</span> - - - - — - <div class='inline'> -<p>The type of the node</p> -</div> - - </li> - -</ul> <p class="tag_title">Raises:</p> <ul class="raise"> <li> - <span class='type'>(<tt><span class='object_link'><a href="AstNode/InternalError.html" title="Idl::AstNode::InternalError (class)">AstNode::InternalError</a></span></tt>)</span> + <span class='type'></span> - — + <div class='inline'> -<p>if the type is dependent on symtab, and type_check was not called first</p> +<p>ValueError if some part of the statement cannot be executed at compile time</p> </div> </li> @@ -344,16 +338,38 @@ <h3 class="signature " id="type-instance_method"> <pre class="lines"> -2665 -2666 -2667</pre> +2504</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 2665</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 2504</span> -<span class='kw'>def</span> <span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> - <span class='const'><span class='object_link'><a href="Type.html" title="Idl::Type (class)">Type</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Type.html#initialize-instance_method" title="Idl::Type#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='symbol'>:bits</span><span class='comma'>,</span> <span class='label'>width:</span> <span class='id identifier rubyid_i'>i</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='rparen'>)</span> -<span class='kw'>end</span></pre> +<span class='kw'>def</span> <span class='id identifier rubyid_execute'>execute</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + <div class="method_details "> + <h3 class="signature " id="to_idl-instance_method"> + + #<strong>to_idl</strong> ⇒ <tt>Object</tt> + + + + + +</h3><table class="source_code"> + <tr> + <td> + <pre class="lines"> + + +2507</pre> + </td> + <td> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 2507</span> + +<span class='kw'>def</span> <span class='id identifier rubyid_to_idl'>to_idl</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span></pre> </td> </tr> </table> @@ -373,7 +389,7 @@ <h3 class="signature " id="type_check-instance_method"> <p class="note returns_void">This method returns an undefined value.</p> <p>type check this node and all children</p> -<p>Calls to <span class='object_link'><a href="#type-instance_method" title="Idl::BitsTypeAst#type (method)">#type</a></span> and/or #value may depend on type_check being called first with the same symtab. If not, those functions may raise an AstNode::InternalError</p> +<p>Calls to #type and/or #value may depend on type_check being called first with the same symtab. If not, those functions may raise an AstNode::InternalError</p> </div> @@ -439,30 +455,12 @@ <h3 class="signature " id="type_check-instance_method"> <pre class="lines"> -2653 -2654 -2655 -2656 -2657 -2658 -2659 -2660 -2661 -2662</pre> +2501</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 2653</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 2501</span> -<span class='kw'>def</span> <span class='id identifier rubyid_type_check'>type_check</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> - <span class='id identifier rubyid_i'>i</span><span class='period'>.</span><span class='id identifier rubyid_type_check'>type_check</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> - - <span class='kw'>begin</span> - <span class='id identifier rubyid_i'>i</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> - <span class='kw'>rescue</span> <span class='const'><span class='object_link'><a href="AstNode/ValueError.html" title="Idl::AstNode::ValueError (class)">ValueError</a></span></span> - <span class='id identifier rubyid_type_error'>type_error</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Bit width is not compile-time known</span><span class='tstring_end'>"</span></span> - <span class='kw'>end</span> - <span class='id identifier rubyid_type_error'>type_error</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Bit widht must be integral</span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_i'>i</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_integral?'>integral?</span> -<span class='kw'>end</span></pre> +<span class='kw'>def</span> <span class='id identifier rubyid_type_check'>type_check</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre> </td> </tr> </table> @@ -473,7 +471,7 @@ <h3 class="signature " id="type_check-instance_method"> </div> <div id="footer"> - Generated on Tue Jul 16 12:06:47 2024 by + Generated on Thu Jul 18 13:55:46 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.36 (ruby-3.2.3). </div> diff --git a/docs/ruby/Idl/ParenExpressionAst.html b/docs/ruby/Idl/ParenExpressionAst.html index 325051b66..710aa42a9 100644 --- a/docs/ruby/Idl/ParenExpressionAst.html +++ b/docs/ruby/Idl/ParenExpressionAst.html @@ -103,7 +103,9 @@ <dl> <dt>Defined in:</dt> - <dd>lib/idl/ast.rb</dd> + <dd>lib/idl/ast.rb<span class="defines">,<br /> + lib/idl/passes/gen_adoc.rb</span> +</dd> </dl> </div> @@ -128,6 +130,40 @@ <h2>Overview</h2><div class="docstring"> + <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2> + <ul class="summary"> + + <li class="public "> + <span class="summary_signature"> + + <a href="#expression-instance_method" title="#expression (instance method)">#<strong>expression</strong> ⇒ Object </a> + + + + </span> + + + + + <span class="note title readonly">readonly</span> + + + + + + + + + + <span class="summary_desc"><div class='inline'> +<p>Returns the value of attribute expression.</p> +</div></span> + +</li> + + + </ul> + @@ -142,6 +178,54 @@ <h2> <li class="public "> <span class="summary_signature"> + <a href="#gen_adoc-instance_method" title="#gen_adoc (instance method)">#<strong>gen_adoc</strong>(indent = 0, indent_spaces: 2) ⇒ Object </a> + + + + </span> + + + + + + + + + + <span class="summary_desc"><div class='inline'></div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(input, interval, expression) ⇒ ParenExpressionAst </a> + + + + </span> + + + <span class="note title constructor">constructor</span> + + + + + + + + + <span class="summary_desc"><div class='inline'> +<p>A new instance of ParenExpressionAst.</p> +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + <a href="#invert-instance_method" title="#invert (instance method)">#<strong>invert</strong>(symtab) ⇒ Object </a> @@ -297,14 +381,139 @@ <h2> + <div id="constructor_details" class="method_details_list"> + <h2>Constructor Details</h2> + + <div class="method_details first"> + <h3 class="signature first" id="initialize-instance_method"> + + #<strong>initialize</strong>(input, interval, expression) ⇒ <tt><span class='object_link'><a href="" title="Idl::ParenExpressionAst (class)">ParenExpressionAst</a></span></tt> + + + + +</h3><div class="docstring"> + <div class="discussion"> + +<p>Returns a new instance of ParenExpressionAst.</p> + + + </div> +</div> +<div class="tags"> + + +</div><table class="source_code"> + <tr> + <td> + <pre class="lines"> + + +1925 +1926 +1927 +1928</pre> + </td> + <td> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1925</span> + +<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_input'>input</span><span class='comma'>,</span> <span class='id identifier rubyid_interval'>interval</span><span class='comma'>,</span> <span class='id identifier rubyid_expression'>expression</span><span class='rparen'>)</span> + <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_input'>input</span><span class='comma'>,</span> <span class='id identifier rubyid_interval'>interval</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_expression'>expression</span><span class='rbracket'>]</span><span class='rparen'>)</span> + <span class='ivar'>@expression</span> <span class='op'>=</span> <span class='id identifier rubyid_expression'>expression</span> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + +</div> + + <div id="instance_attr_details" class="attr_details"> + <h2>Instance Attribute Details</h2> + + + <span id=""></span> + <div class="method_details first"> + <h3 class="signature first" id="expression-instance_method"> + + #<strong>expression</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span> + + + + + +</h3><div class="docstring"> + <div class="discussion"> + +<p>Returns the value of attribute expression.</p> + + + </div> +</div> +<div class="tags"> + + +</div><table class="source_code"> + <tr> + <td> + <pre class="lines"> + + +1923 +1924 +1925</pre> + </td> + <td> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1923</span> + +<span class='kw'>def</span> <span class='id identifier rubyid_expression'>expression</span> + <span class='ivar'>@expression</span> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + </div> + <div id="instance_method_details" class="method_details_list"> <h2>Instance Method Details</h2> <div class="method_details first"> - <h3 class="signature first" id="invert-instance_method"> + <h3 class="signature first" id="gen_adoc-instance_method"> + + #<strong>gen_adoc</strong>(indent = 0, indent_spaces: 2) ⇒ <tt>Object</tt> + + + + + +</h3><table class="source_code"> + <tr> + <td> + <pre class="lines"> + + +46 +47 +48</pre> + </td> + <td> + <pre class="code"><span class="info file"># File 'lib/idl/passes/gen_adoc.rb', line 46</span> + +<span class='kw'>def</span> <span class='id identifier rubyid_gen_adoc'>gen_adoc</span><span class='lparen'>(</span><span class='id identifier rubyid_indent'>indent</span> <span class='op'>=</span> <span class='int'>0</span><span class='comma'>,</span> <span class='label'>indent_spaces:</span> <span class='int'>2</span><span class='rparen'>)</span> + <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_expression'>expression</span><span class='period'>.</span><span class='id identifier rubyid_gen_adoc'>gen_adoc</span><span class='lparen'>(</span><span class='id identifier rubyid_indent'>indent</span><span class='comma'>,</span> <span class='label'>indent_spaces:</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>"</span></span> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + <div class="method_details "> + <h3 class="signature " id="invert-instance_method"> #<strong>invert</strong>(symtab) ⇒ <tt>Object</tt> @@ -318,12 +527,12 @@ <h3 class="signature first" id="invert-instance_method"> <pre class="lines"> -1854</pre> +1930</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1854</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1930</span> -<span class='kw'>def</span> <span class='id identifier rubyid_invert'>invert</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> <span class='op'>=</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_invert'>invert</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span></pre> +<span class='kw'>def</span> <span class='id identifier rubyid_invert'>invert</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> <span class='op'>=</span> <span class='id identifier rubyid_expression'>expression</span><span class='period'>.</span><span class='id identifier rubyid_invert'>invert</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span></pre> </td> </tr> </table> @@ -373,10 +582,10 @@ <h3 class="signature " id="to_idl-instance_method"> <pre class="lines"> -1866</pre> +1942</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1866</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1942</span> <span class='kw'>def</span> <span class='id identifier rubyid_to_idl'>to_idl</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_to_idl'>to_idl</span><span class='embexpr_end'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>"</span></span></pre> </td> @@ -468,12 +677,12 @@ <h3 class="signature " id="type-instance_method"> <pre class="lines"> -1860</pre> +1936</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1860</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1936</span> -<span class='kw'>def</span> <span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> <span class='op'>=</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span></pre> +<span class='kw'>def</span> <span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> <span class='op'>=</span> <span class='id identifier rubyid_expression'>expression</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span></pre> </td> </tr> </table> @@ -559,12 +768,12 @@ <h3 class="signature " id="type_check-instance_method"> <pre class="lines"> -1857</pre> +1933</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1857</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1933</span> -<span class='kw'>def</span> <span class='id identifier rubyid_type_check'>type_check</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> <span class='op'>=</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_type_check'>type_check</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span></pre> +<span class='kw'>def</span> <span class='id identifier rubyid_type_check'>type_check</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> <span class='op'>=</span> <span class='id identifier rubyid_expression'>expression</span><span class='period'>.</span><span class='id identifier rubyid_type_check'>type_check</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span></pre> </td> </tr> </table> @@ -596,12 +805,12 @@ <h3 class="signature " id="value-instance_method"> <pre class="lines"> -1863</pre> +1939</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1863</span> + <pre class="code"><span class="info file"># File 'lib/idl/ast.rb', line 1939</span> -<span class='kw'>def</span> <span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> <span class='op'>=</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span></pre> +<span class='kw'>def</span> <span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span> <span class='op'>=</span> <span class='id identifier rubyid_expression'>expression</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_symtab'>symtab</span><span class='rparen'>)</span></pre> </td> </tr> </table> @@ -708,7 +917,7 @@ <h3 class="signature " id="values-instance_method"> </div> <div id="footer"> - Generated on Tue Jul 16 12:06:46 2024 by + Generated on Thu Jul 18 13:55:45 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.36 (ruby-3.2.3). </div> diff --git a/docs/ruby/Idl/ParenExpressionSyntaxNode.html b/docs/ruby/Idl/ParenExpressionSyntaxNode.html new file mode 100644 index 000000000..c466426bc --- /dev/null +++ b/docs/ruby/Idl/ParenExpressionSyntaxNode.html @@ -0,0 +1,194 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> +<meta name="viewport" content="width=device-width, initial-scale=1.0"> +<title> + Class: Idl::ParenExpressionSyntaxNode + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Class: Idl::ParenExpressionSyntaxNode + + + +

    +
    + +
    +
    Inherits:
    +
    + Treetop::Runtime::SyntaxNode + + + show all + +
    +
    + + + + + + + + + + + +
    +
    Defined in:
    +
    lib/idl/ast.rb
    +
    + +
    + + + + + + + + + +

    + Instance Method Summary + collapse +

    + + + + + + + + +
    +

    Instance Method Details

    + + +
    +

    + + #to_astObject + + + + + +

    + + + + +
    +
    +
    +
    +1911
    +1912
    +1913
    +
    +
    # File 'lib/idl/ast.rb', line 1911
    +
    +def to_ast
    +  ParenExpressionAst.new(input, interval, e.to_ast)
    +end
    +
    +
    + +
    + +
    + + + +
    + + \ No newline at end of file diff --git a/docs/ruby/Idl/PostDecrementExpressionAst.html b/docs/ruby/Idl/PostDecrementExpressionAst.html index f09bff11b..8b869756a 100644 --- a/docs/ruby/Idl/PostDecrementExpressionAst.html +++ b/docs/ruby/Idl/PostDecrementExpressionAst.html @@ -310,20 +310,24 @@

     
     
    -2002
    -2003
    -2004
    -2005
    -2006
    -2007
    +2093 +2094 +2095 +2096 +2097 +2098 +2099 +2100

    -
    # File 'lib/idl/ast.rb', line 2002
    +      
    # File 'lib/idl/ast.rb', line 2093
     
     def execute(symtab)
       var = symtab.get(rval.text_value)
       internal_error "No symbol #{rval.text_value}" if var.nil?
     
    +  value_error "value of variable '#{rval.text_value}' not know" if var.value.nil?
    +
       var.value = var.value - 1
     end
    @@ -346,10 +350,10 @@

     
     
    -2009
    +2102

    -
    # File 'lib/idl/ast.rb', line 2009
    +      
    # File 'lib/idl/ast.rb', line 2102
     
     def to_idl = "#{rval.to_idl}--"
    @@ -372,12 +376,12 @@

     
     
    -1997
    -1998
    -1999
    +2088 +2089 +2090

    -
    # File 'lib/idl/ast.rb', line 1997
    +      
    # File 'lib/idl/ast.rb', line 2088
     
     def type(symtab)
       rval.type(symtab)
    @@ -402,13 +406,13 @@ 

     
     
    -1992
    -1993
    -1994
    -1995
    +2083 +2084 +2085 +2086

    -
    # File 'lib/idl/ast.rb', line 1992
    +      
    # File 'lib/idl/ast.rb', line 2083
     
     def type_check(symtab)
       rval.type_check(symtab)
    @@ -424,7 +428,7 @@ 

    diff --git a/docs/ruby/Idl/PostIncrementExpressionAst.html b/docs/ruby/Idl/PostIncrementExpressionAst.html index 3aca399ef..fbf06f6aa 100644 --- a/docs/ruby/Idl/PostIncrementExpressionAst.html +++ b/docs/ruby/Idl/PostIncrementExpressionAst.html @@ -316,15 +316,15 @@

     
     
    -2031
    -2032
    -2033
    -2034
    -2035
    -2036
    +2159 +2160 +2161 +2162 +2163 +2164

    -
    # File 'lib/idl/ast.rb', line 2031
    +      
    # File 'lib/idl/ast.rb', line 2159
     
     def execute(symtab)
       var = symtab.get(rval.text_value)
    @@ -381,10 +381,10 @@ 

     
     
    -2039
    +2167

    -
    # File 'lib/idl/ast.rb', line 2039
    +      
    # File 'lib/idl/ast.rb', line 2167
     
     def to_idl = "#{rval.to_idl}++"
    @@ -476,12 +476,12 @@

     
     
    -2026
    -2027
    -2028
    +2154 +2155 +2156

    -
    # File 'lib/idl/ast.rb', line 2026
    +      
    # File 'lib/idl/ast.rb', line 2154
     
     def type(symtab)
       rval.type(symtab)
    @@ -571,17 +571,19 @@ 

     
     
    -2020
    -2021
    -2022
    -2023
    +2147 +2148 +2149 +2150 +2151

    -
    # File 'lib/idl/ast.rb', line 2020
    +      
    # File 'lib/idl/ast.rb', line 2147
     
     def type_check(symtab)
       rval.type_check(symtab)
       var = symtab.get(rval.text_value)
    +  type_error "Post increment variable must be integral" unless var.type.integral?
     end
    @@ -593,7 +595,7 @@

    diff --git a/docs/ruby/Idl/ReplicationExpressionAst.html b/docs/ruby/Idl/ReplicationExpressionAst.html index 80d939c73..05501b279 100644 --- a/docs/ruby/Idl/ReplicationExpressionAst.html +++ b/docs/ruby/Idl/ReplicationExpressionAst.html @@ -103,7 +103,9 @@
    Defined in:
    -
    lib/idl/ast.rb
    +
    lib/idl/ast.rb,
    + lib/idl/passes/gen_adoc.rb
    +
    @@ -128,6 +130,69 @@

    Overview

    +

    Instance Attribute Summary collapse

    +
      + +
    • + + + #n ⇒ Object + + + + + + + + + readonly + + + + + + + + + +
      +

      Returns the value of attribute n.

      +
      + +
    • + + +
    • + + + #v ⇒ Object + + + + + + + + + readonly + + + + + + + + + +
      +

      Returns the value of attribute v.

      +
      + +
    • + + +
    + @@ -142,6 +207,54 @@

  • + #gen_adoc(indent = 0, indent_spaces: 2) ⇒ Object + + + + + + + + + + + + + +
    + +
  • + + +
  • + + + #initialize(input, interval, n, v) ⇒ ReplicationExpressionAst + + + + + + + constructor + + + + + + + + +
    +

    A new instance of ReplicationExpressionAst.

    +
    + +
  • + + +
  • + + #to_idl ⇒ String @@ -275,14 +388,186 @@

    +
    +

    Constructor Details

    + +
    +

    + + #initialize(input, interval, n, v) ⇒ ReplicationExpressionAst + + + + + +

    +
    + +

    Returns a new instance of ReplicationExpressionAst.

    + + +
    +
    +
    + + +
    + + + + +
    +
    +
    +
    +2038
    +2039
    +2040
    +2041
    +2042
    +
    +
    # File 'lib/idl/ast.rb', line 2038
    +
    +def initialize(input, interval, n, v)
    +  super(input, interval, [n, v])
    +  @n = n
    +  @v = v
    +end
    +
    +
    + +
    + +
    +

    Instance Attribute Details

    + + + +
    +

    + + #nObject (readonly) + + + + + +

    +
    + +

    Returns the value of attribute n.

    + + +
    +
    +
    + + +
    + + + + +
    +
    +
    +
    +2036
    +2037
    +2038
    +
    +
    # File 'lib/idl/ast.rb', line 2036
    +
    +def n
    +  @n
    +end
    +
    +
    + + + +
    +

    + + #vObject (readonly) + + + +

    +
    + +

    Returns the value of attribute v.

    + + +
    +
    +
    + + +
    + + + + +
    +
    +
    +
    +2036
    +2037
    +2038
    +
    +
    # File 'lib/idl/ast.rb', line 2036
    +
    +def v
    +  @v
    +end
    +
    +
    + +
    + +

    Instance Method Details

    -

    +

    + + #gen_adoc(indent = 0, indent_spaces: 2) ⇒ Object + + + + + +

    + + + + +
    +
    +
    +
    +165
    +166
    +167
    +168
    +
    +
    # File 'lib/idl/passes/gen_adoc.rb', line 165
    +
    +def gen_adoc(indent = 0, indent_spaces: 2)
    +  puts v.class.name
    +  "{#{n.gen_adoc(indent, indent_spaces:)}{#{v.gen_adoc(indent, indent_spaces:)}}}"
    +end
    +
    +
    + +
    +

    #to_idlString @@ -325,10 +610,10 @@

     
     
    -1982
    +2073

  • -
    # File 'lib/idl/ast.rb', line 1982
    +      
    # File 'lib/idl/ast.rb', line 2073
     
     def to_idl = "{#{n.to_idl}{#{v.to_idl}}}"
    @@ -420,13 +705,13 @@

     
     
    -1976
    -1977
    -1978
    -1979
    +2067 +2068 +2069 +2070

    -
    # File 'lib/idl/ast.rb', line 1976
    +      
    # File 'lib/idl/ast.rb', line 2067
     
     def type(symtab)
       width = (n.value(symtab) * v.type(symtab).width)
    @@ -517,20 +802,20 @@ 

     
     
    -1954
    -1955
    -1956
    -1957
    -1958
    -1959
    -1960
    -1961
    -1962
    -1963
    -1964
    +2045 +2046 +2047 +2048 +2049 +2050 +2051 +2052 +2053 +2054 +2055

    -
    # File 'lib/idl/ast.rb', line 1954
    +      
    # File 'lib/idl/ast.rb', line 2045
     
     def type_check(symtab)
       n.type_check(symtab)
    @@ -574,16 +859,16 @@ 

     
     
    -1967
    -1968
    -1969
    -1970
    -1971
    -1972
    -1973
    +2058 +2059 +2060 +2061 +2062 +2063 +2064

    -
    # File 'lib/idl/ast.rb', line 1967
    +      
    # File 'lib/idl/ast.rb', line 2058
     
     def value(symtab)
       result = 0
    @@ -698,7 +983,7 @@ 

    diff --git a/docs/ruby/Idl/ReplicationExpressionSyntaxNode.html b/docs/ruby/Idl/ReplicationExpressionSyntaxNode.html new file mode 100644 index 000000000..f8c8314c6 --- /dev/null +++ b/docs/ruby/Idl/ReplicationExpressionSyntaxNode.html @@ -0,0 +1,194 @@ + + + + + + + Class: Idl::ReplicationExpressionSyntaxNode + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Class: Idl::ReplicationExpressionSyntaxNode + + + +

    +
    + +
    +
    Inherits:
    +
    + Treetop::Runtime::SyntaxNode + + + show all + +
    +
    + + + + + + + + + + + +
    +
    Defined in:
    +
    lib/idl/ast.rb
    +
    + +
    + + + + + + + + + +

    + Instance Method Summary + collapse +

    + + + + + + + + +
    +

    Instance Method Details

    + + +
    +

    + + #to_astObject + + + + + +

    + + + + +
    +
    +
    +
    +2024
    +2025
    +2026
    +
    +
    # File 'lib/idl/ast.rb', line 2024
    +
    +def to_ast
    +  ReplicationExpressionAst.new(input, interval, n.to_ast, v.to_ast)
    +end
    +
    +
    + +
    + +
    + + + +
    + + \ No newline at end of file diff --git a/docs/ruby/Idl/ReturnStatementAst.html b/docs/ruby/Idl/ReturnStatementAst.html index 65f2955a8..70abffc00 100644 --- a/docs/ruby/Idl/ReturnStatementAst.html +++ b/docs/ruby/Idl/ReturnStatementAst.html @@ -428,12 +428,12 @@

     
     
    -2590
    -2591
    -2592
    +2747 +2748 +2749

    -
    # File 'lib/idl/ast.rb', line 2590
    +      
    # File 'lib/idl/ast.rb', line 2747
     
     def enclosing_function
       find_ancestor(FunctionDefAst)
    @@ -487,35 +487,35 @@ 

     
     
    -2527
    -2528
    -2529
    -2530
    -2531
    -2532
    -2533
    -2534
    -2535
    -2536
    -2537
    -2538
    -2539
    -2540
    -2541
    -2542
    -2543
    -2544
    -2545
    -2546
    -2547
    -2548
    -2549
    -2550
    -2551
    -2552
    +2685 +2686 +2687 +2688 +2689 +2690 +2691 +2692 +2693 +2694 +2695 +2696 +2697 +2698 +2699 +2700 +2701 +2702 +2703 +2704 +2705 +2706 +2707 +2708 +2709 +2710

    -
    # File 'lib/idl/ast.rb', line 2527
    +      
    # File 'lib/idl/ast.rb', line 2685
     
     def expected_return_type(symtab)
       func_def = find_ancestor(FunctionDefAst)
    @@ -563,13 +563,13 @@ 

     
     
    -72
    -73
    -74
    -75
    +158 +159 +160 +161

    -
    # File 'lib/idl/passes/gen_adoc.rb', line 72
    +      
    # File 'lib/idl/passes/gen_adoc.rb', line 158
     
     def gen_adoc(indent = 0, indent_spaces: 2)
       values = [first.gen_adoc(0, indent_spaces:)] + rest.elements.each { |e| e.e.gen_adoc(0, indent_spaces: )}
    @@ -645,17 +645,17 @@ 

     
     
    -2517
    -2518
    -2519
    -2520
    -2521
    -2522
    -2523
    -2524
    +2675 +2676 +2677 +2678 +2679 +2680 +2681 +2682

    -
    # File 'lib/idl/ast.rb', line 2517
    +      
    # File 'lib/idl/ast.rb', line 2675
     
     def return_type(symtab)
       types = return_types(symtab)
    @@ -714,20 +714,20 @@ 

     
     
    -2504
    -2505
    -2506
    -2507
    -2508
    -2509
    -2510
    -2511
    -2512
    -2513
    -2514
    +2662 +2663 +2664 +2665 +2666 +2667 +2668 +2669 +2670 +2671 +2672

    -
    # File 'lib/idl/ast.rb', line 2504
    +      
    # File 'lib/idl/ast.rb', line 2662
     
     def return_types(symtab)
       if first.type(symtab).kind == :tuple
    @@ -760,16 +760,16 @@ 

     
     
    -2595
    -2596
    -2597
    -2598
    -2599
    -2600
    -2601
    +2752 +2753 +2754 +2755 +2756 +2757 +2758

    -
    # File 'lib/idl/ast.rb', line 2595
    +      
    # File 'lib/idl/ast.rb', line 2752
     
     def return_value(symtab)
       if return_value_nodes.size == 1
    @@ -827,18 +827,18 @@ 

     
     
    -2580
    -2581
    -2582
    -2583
    -2584
    -2585
    -2586
    -2587
    -2588
    +2737 +2738 +2739 +2740 +2741 +2742 +2743 +2744 +2745

    -
    # File 'lib/idl/ast.rb', line 2580
    +      
    # File 'lib/idl/ast.rb', line 2737
     
     def return_value_nodes
       v = [first]
    @@ -869,16 +869,16 @@ 

     
     
    -2604
    -2605
    -2606
    -2607
    -2608
    -2609
    -2610
    +2761 +2762 +2763 +2764 +2765 +2766 +2767

    -
    # File 'lib/idl/ast.rb', line 2604
    +      
    # File 'lib/idl/ast.rb', line 2761
     
     def return_values(symtab)
       if return_value_nodes.size == 1
    @@ -907,10 +907,10 @@ 

     
     
    -2612
    +2769

    -
    # File 'lib/idl/ast.rb', line 2612
    +      
    # File 'lib/idl/ast.rb', line 2769
     
     def to_idl = "return #{return_value_nodes.map(&:to_idl).join(',')};"
    @@ -998,32 +998,31 @@

     
     
    -2555
    -2556
    -2557
    -2558
    -2559
    -2560
    -2561
    -2562
    -2563
    -2564
    -2565
    -2566
    -2567
    -2568
    -2569
    -2570
    -2571
    -2572
    -2573
    -2574
    -2575
    -2576
    -2577
    +2713 +2714 +2715 +2716 +2717 +2718 +2719 +2720 +2721 +2722 +2723 +2724 +2725 +2726 +2727 +2728 +2729 +2730 +2731 +2732 +2733 +2734

    -
    # File 'lib/idl/ast.rb', line 2555
    +      
    # File 'lib/idl/ast.rb', line 2713
     
     def type_check(symtab)
       first.type_check(symtab)
    @@ -1034,7 +1033,6 @@ 

    types = [] if first.type(symtab).kind == :tuple type_error("Can't combine tuple types in return") unless rest.elements.empty? - num_values = first.type(symtab).tuple_types.size types = first.type(symtab).tuple_types else types = [first.type(symtab)] @@ -1058,7 +1056,7 @@

    diff --git a/docs/ruby/Idl/Returns.html b/docs/ruby/Idl/Returns.html index ed0ce45b3..ba68d6269 100644 --- a/docs/ruby/Idl/Returns.html +++ b/docs/ruby/Idl/Returns.html @@ -204,10 +204,10 @@

     
     
    -332
    +335

    -
    # File 'lib/idl/ast.rb', line 332
    +      
    # File 'lib/idl/ast.rb', line 335
     
     def return_value(symtab) = raise NotImplementedError, "#{self.class.name} must implement return_value"
    @@ -252,10 +252,10 @@

     
     
    -345
    +348

    -
    # File 'lib/idl/ast.rb', line 345
    +      
    # File 'lib/idl/ast.rb', line 348
     
     def return_values(symtab) = raise NotImplementedError, "#{self.class.name} must implement return_values"
    @@ -268,7 +268,7 @@

    diff --git a/docs/ruby/Idl/Rvalue.html b/docs/ruby/Idl/Rvalue.html index 5b4f50fd2..cce511876 100644 --- a/docs/ruby/Idl/Rvalue.html +++ b/docs/ruby/Idl/Rvalue.html @@ -76,7 +76,7 @@
    Included in:
    -
    ArrayLiteralAst, AryElementAccessAst, AryRangeAccessAst, BinaryExpressionAst, BitfieldAccessExpressionAst, BitsCastAst, ConcatenationExpressionAst, CsrFieldReadExpressionAst, CsrReadExpressionAst, CsrSoftwareReadAst, DontCareLvalueAst, DontCareReturnAst, EnumRefAst, FunctionCallExpressionAst, IdAst, IntAst, ParenExpressionAst, ReplicationExpressionAst, SignCastAst, TernaryOperatorExpressionAst, UnaryOperatorExpressionAst, VarReadExpressionAst
    +
    ArrayLiteralAst, AryElementAccessAst, AryRangeAccessAst, BinaryExpressionAst, BitfieldAccessExpressionAst, BitsCastAst, ConcatenationExpressionAst, CsrFieldReadExpressionAst, CsrReadExpressionAst, CsrSoftwareReadAst, DontCareLvalueAst, DontCareReturnAst, EnumRefAst, FunctionCallExpressionAst, IdAst, IntLiteralAst, ParenExpressionAst, ReplicationExpressionAst, SignCastAst, TernaryOperatorExpressionAst, UnaryOperatorExpressionAst
    @@ -283,10 +283,10 @@

     
     
    -367
    +370

    -
    # File 'lib/idl/ast.rb', line 367
    +      
    # File 'lib/idl/ast.rb', line 370
     
     def type(symtab) = raise NotImplementedError, "#{self.class.name} has no type"
    @@ -337,10 +337,10 @@

     
     
    -390
    +393

    -
    # File 'lib/idl/ast.rb', line 390
    +      
    # File 'lib/idl/ast.rb', line 393
     
     def value(symtab) = raise NotImplementedError, "#{self.class.name} must implement value(symtab)"
    @@ -442,10 +442,10 @@

     
     
    -404
    +407

    -
    # File 'lib/idl/ast.rb', line 404
    +      
    # File 'lib/idl/ast.rb', line 407
     
     def values(symtab) = [value(symtab)]
    @@ -458,7 +458,7 @@

    diff --git a/docs/ruby/Idl/SignCastAst.html b/docs/ruby/Idl/SignCastAst.html index 048e14617..d847472ff 100644 --- a/docs/ruby/Idl/SignCastAst.html +++ b/docs/ruby/Idl/SignCastAst.html @@ -103,7 +103,9 @@
    Defined in:
    -
    lib/idl/ast.rb
    +
    lib/idl/ast.rb,
    + lib/idl/passes/gen_adoc.rb
    +
    @@ -112,6 +114,40 @@ +

    Instance Attribute Summary collapse

    +
      + +
    • + + + #expression ⇒ Object + + + + + + + + + readonly + + + + + + + + + +
      +

      Returns the value of attribute expression.

      +
      + +
    • + + +
    + @@ -126,6 +162,54 @@

  • + #gen_adoc(indent = 0, indent_spaces: 2) ⇒ Object + + + + + + + + + + + + + +
    + +
  • + + +
  • + + + #initialize(input, interval, expression) ⇒ SignCastAst + + + + + + + constructor + + + + + + + + +
    +

    A new instance of SignCastAst.

    +
    + +
  • + + +
  • + + #to_idl ⇒ String @@ -259,14 +343,139 @@

    +
    +

    Constructor Details

    + +
    +

    + + #initialize(input, interval, expression) ⇒ SignCastAst + + + + + +

    +
    + +

    Returns a new instance of SignCastAst.

    + + +
    +
    +
    + + +
    + + + + +
    +
    +
    +
    +1575
    +1576
    +1577
    +1578
    +
    +
    # File 'lib/idl/ast.rb', line 1575
    +
    +def initialize(input, interval, expression)
    +  super(input, interval, [expression])
    +  @expression = expression
    +end
    +
    +
    + +
    + +
    +

    Instance Attribute Details

    + + + +
    +

    + + #expressionObject (readonly) + + + + + +

    +
    + +

    Returns the value of attribute expression.

    + + +
    +
    +
    +
    + + + + +
    +
    +
    +
    +1573
    +1574
    +1575
    +
    +
    # File 'lib/idl/ast.rb', line 1573
    +
    +def expression
    +  @expression
    +end
    +
    +
    + +
    + +

    Instance Method Details

    -

    +

    + + #gen_adoc(indent = 0, indent_spaces: 2) ⇒ Object + + + + + +

    + + + + +
    +
    +
    +
    +62
    +63
    +64
    +
    +
    # File 'lib/idl/passes/gen_adoc.rb', line 62
    +
    +def gen_adoc(indent = 0, indent_spaces: 2)
    +  "$signed(#{expression.gen_adoc(0, indent_spaces:)})"
    +end
    +
    +
    + +
    +

    #to_idlString @@ -309,10 +518,10 @@

     
     
    -1542
    +1603

  • -
    # File 'lib/idl/ast.rb', line 1542
    +      
    # File 'lib/idl/ast.rb', line 1603
     
     def to_idl = "$signed(#{expression.to_idl})"
    @@ -404,10 +613,10 @@

     
     
    -1525
    +1586

    -
    # File 'lib/idl/ast.rb', line 1525
    +      
    # File 'lib/idl/ast.rb', line 1586
     
     def type(symtab) = expression.type(symtab).clone.make_signed
    @@ -495,12 +704,12 @@

     
     
    -1520
    -1521
    -1522
    +1581 +1582 +1583

    -
    # File 'lib/idl/ast.rb', line 1520
    +      
    # File 'lib/idl/ast.rb', line 1581
     
     def type_check(symtab)
       expression.type_check(symtab)
    @@ -536,21 +745,21 @@ 

     
     
    -1528
    -1529
    -1530
    -1531
    -1532
    -1533
    -1534
    -1535
    -1536
    -1537
    -1538
    -1539
    +1589 +1590 +1591 +1592 +1593 +1594 +1595 +1596 +1597 +1598 +1599 +1600

    -
    # File 'lib/idl/ast.rb', line 1528
    +      
    # File 'lib/idl/ast.rb', line 1589
     
     def value(symtab)
       t = expression.type(symtab)
    @@ -670,7 +879,7 @@ 

    diff --git a/docs/ruby/Idl/SignCastSyntaxNode.html b/docs/ruby/Idl/SignCastSyntaxNode.html new file mode 100644 index 000000000..b48600d65 --- /dev/null +++ b/docs/ruby/Idl/SignCastSyntaxNode.html @@ -0,0 +1,194 @@ + + + + + + + Class: Idl::SignCastSyntaxNode + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Class: Idl::SignCastSyntaxNode + + + +

    +
    + +
    +
    Inherits:
    +
    + Treetop::Runtime::SyntaxNode + + + show all + +
    +
    + + + + + + + + + + + +
    +
    Defined in:
    +
    lib/idl/ast.rb
    +
    + +
    + + + + + + + + + +

    + Instance Method Summary + collapse +

    + + + + + + + + +
    +

    Instance Method Details

    + + +
    +

    + + #to_astObject + + + + + +

    + + + + +
    +
    +
    +
    +1565
    +1566
    +1567
    +
    +
    # File 'lib/idl/ast.rb', line 1565
    +
    +def to_ast
    +  SignCastAst.new(input, interval, expression.to_ast)
    +end
    +
    +
    + +
    + +
    + + + +
    + + \ No newline at end of file diff --git a/docs/ruby/Idl/StatementAst.html b/docs/ruby/Idl/StatementAst.html index 826c73788..8ad01faa3 100644 --- a/docs/ruby/Idl/StatementAst.html +++ b/docs/ruby/Idl/StatementAst.html @@ -359,13 +359,13 @@

     
     
    -2373
    -2374
    -2375
    -2376
    +2521 +2522 +2523 +2524

    -
    # File 'lib/idl/ast.rb', line 2373
    +      
    # File 'lib/idl/ast.rb', line 2521
     
     def initialize(action)
       super(action.input, action.interval, [action])
    @@ -409,12 +409,12 @@ 

     
     
    -2371
    -2372
    -2373
    +2519 +2520 +2521

    -
    # File 'lib/idl/ast.rb', line 2371
    +      
    # File 'lib/idl/ast.rb', line 2519
     
     def action
       @action
    @@ -495,17 +495,17 @@ 

     
     
    -2384
    -2385
    -2386
    -2387
    -2388
    -2389
    -2390
    -2391
    +2532 +2533 +2534 +2535 +2536 +2537 +2538 +2539

    -
    # File 'lib/idl/ast.rb', line 2384
    +      
    # File 'lib/idl/ast.rb', line 2532
     
     def execute(symtab)
       if @action.is_a?(Declaration)
    @@ -535,12 +535,12 @@ 

     
     
    -66
    -67
    -68
    +146 +147 +148

    -
    # File 'lib/idl/passes/gen_adoc.rb', line 66
    +      
    # File 'lib/idl/passes/gen_adoc.rb', line 146
     
     def gen_adoc(indent = 0, indent_spaces: 2)
       "#{' ' * indent}#{action.gen_adoc(0, indent_spaces:)};"
    @@ -565,37 +565,37 @@ 

     
     
    -75
    -76
    -77
    -78
    -79
    -80
    -81
    -82
    -83
    -84
    -85
    -86
    -87
    -88
    +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103

    -
    # File 'lib/idl/passes/prune.rb', line 75
    +      
    # File 'lib/idl/passes/prune.rb', line 90
     
     def prune(symtab)
    -  s = StatementAst.new(action.prune(symtab))
    -  if s.action.is_a?(Declaration)
    -    s.action.add_symbol(symtab)
    +  pruned_action = action.prune(symtab)
    +  if pruned_action.is_a?(Declaration)
    +    pruned_action.add_symbol(symtab)
       end
    -  if (s.action.is_a?(Executable))
    +  if pruned_action.is_a?(Executable)
         begin
    -      s.action.execute(symtab)
    +      pruned_action.execute(symtab)
         rescue ValueError
           # ok
         end
       end
    -  s
    +  StatementAst.new(pruned_action)
     end
    @@ -646,10 +646,10 @@

     
     
    -2394
    +2542

    -
    # File 'lib/idl/ast.rb', line 2394
    +      
    # File 'lib/idl/ast.rb', line 2542
     
     def to_idl = "#{@action.to_idl};"
    @@ -737,12 +737,12 @@

     
     
    -2379
    -2380
    -2381
    +2527 +2528 +2529

    -
    # File 'lib/idl/ast.rb', line 2379
    +      
    # File 'lib/idl/ast.rb', line 2527
     
     def type_check(symtab)
       @action.type_check(symtab)
    @@ -757,7 +757,7 @@ 

    diff --git a/docs/ruby/Idl/StatementSyntaxNode.html b/docs/ruby/Idl/StatementSyntaxNode.html new file mode 100644 index 000000000..91d7ca1e5 --- /dev/null +++ b/docs/ruby/Idl/StatementSyntaxNode.html @@ -0,0 +1,200 @@ + + + + + + + Class: Idl::StatementSyntaxNode + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Class: Idl::StatementSyntaxNode + + + +

    +
    + +
    +
    Inherits:
    +
    + AstNode + + + show all + +
    +
    + + + + + + + + + + + +
    +
    Defined in:
    +
    lib/idl/ast.rb
    +
    + +
    + + + + + + + + + +

    + Instance Method Summary + collapse +

    + + + + + + + + + + + + +
    +

    Instance Method Details

    + + +
    +

    + + #to_astObject + + + + + +

    + + + + +
    +
    +
    +
    +2490
    +2491
    +2492
    +
    +
    # File 'lib/idl/ast.rb', line 2490
    +
    +def to_ast
    +  StatementAst.new(a.to_ast)
    +end
    +
    +
    + +
    + +
    + + + +
    + + \ No newline at end of file diff --git a/docs/ruby/Idl/SymbolTable.html b/docs/ruby/Idl/SymbolTable.html index e1df427f2..b554b1e26 100644 --- a/docs/ruby/Idl/SymbolTable.html +++ b/docs/ruby/Idl/SymbolTable.html @@ -1798,7 +1798,7 @@

    diff --git a/docs/ruby/Idl/SymbolTable/DuplicateSymError.html b/docs/ruby/Idl/SymbolTable/DuplicateSymError.html index bf7b40dd7..cb1a525e8 100644 --- a/docs/ruby/Idl/SymbolTable/DuplicateSymError.html +++ b/docs/ruby/Idl/SymbolTable/DuplicateSymError.html @@ -114,7 +114,7 @@ diff --git a/docs/ruby/Idl/TemplateFunctionType.html b/docs/ruby/Idl/TemplateFunctionType.html deleted file mode 100644 index 957870845..000000000 --- a/docs/ruby/Idl/TemplateFunctionType.html +++ /dev/null @@ -1,376 +0,0 @@ - - - - - - - Class: Idl::TemplateFunctionType - - — Documentation by YARD 0.9.36 - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: Idl::TemplateFunctionType - - - -

    -
    - -
    -
    Inherits:
    -
    - Type - -
      -
    • Object
    • - - - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    lib/idl/type.rb
    -
    - -
    - -

    Overview

    -
    - -

    a function that is templated, and hasn’t been fully typed checked yet because it needs to have template arguments resolved

    - - -
    -
    -
    - - -
    - - - -

    Instance Attribute Summary collapse

    -
      - -
    • - - - #ast ⇒ Object - - - - - - - - - readonly - - - - - - - - - -
      -

      Returns the value of attribute ast.

      -
      - -
    • - - -
    • - - - #template_types ⇒ Object - - - - - - - - - readonly - - - - - - - - - -
      -

      Returns the value of attribute template_types.

      -
      - -
    • - - -
    - - - - - -

    - Instance Method Summary - collapse -

    - - - - - - -
    -

    Constructor Details

    - -
    -

    - - #initialize(func_name, template_types, ast) ⇒ TemplateFunctionType - - - - - -

    -
    - -

    Returns a new instance of TemplateFunctionType.

    - - -
    -
    -
    - - -
    - - - - -
    -
    -
    -
    -532
    -533
    -534
    -535
    -536
    -
    -
    # File 'lib/idl/type.rb', line 532
    -
    -def initialize(func_name, template_types, ast)
    -  super(:template_function, name: func_name, arguments: arguments)
    -  @template_types = template_types
    -  @ast = ast
    -end
    -
    -
    - -
    - -
    -

    Instance Attribute Details

    - - - -
    -

    - - #astObject (readonly) - - - - - -

    -
    - -

    Returns the value of attribute ast.

    - - -
    -
    -
    - - -
    - - - - -
    -
    -
    -
    -530
    -531
    -532
    -
    -
    # File 'lib/idl/type.rb', line 530
    -
    -def ast
    -  @ast
    -end
    -
    -
    - - - -
    -

    - - #template_typesObject (readonly) - - - - - -

    -
    - -

    Returns the value of attribute template_types.

    - - -
    -
    -
    - - -
    - - - - -
    -
    -
    -
    -530
    -531
    -532
    -
    -
    # File 'lib/idl/type.rb', line 530
    -
    -def template_types
    -  @template_types
    -end
    -
    -
    - -
    - - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/ruby/Idl/TernaryOperatorExpressionAst.html b/docs/ruby/Idl/TernaryOperatorExpressionAst.html index 050c7a9ad..2ba060938 100644 --- a/docs/ruby/Idl/TernaryOperatorExpressionAst.html +++ b/docs/ruby/Idl/TernaryOperatorExpressionAst.html @@ -103,7 +103,9 @@
    Defined in:
    -
    lib/idl/ast.rb
    +
    lib/idl/ast.rb,
    + lib/idl/passes/gen_adoc.rb
    +
    @@ -129,21 +131,71 @@

    Overview

    +

    Instance Attribute Summary collapse

    +
      + +
    • + + + #condition ⇒ Object + + + + + + + + + readonly + + + + + + + + +
      +

      Returns the value of attribute condition.

      +
      + +
    • + + +
    • + + + #false_expression ⇒ Object + + + + + + + + readonly + + + + + + + -

      - Instance Method Summary - collapse -

      +
      +

      Returns the value of attribute false_expression.

      +
      + +
    • - + + + + + +

      + Instance Method Summary + collapse +

      + +
      • - #false_expression ⇒ Object + #gen_adoc(indent = 0, indent_spaces: 2) ⇒ Object @@ -187,13 +259,15 @@

      • - #to_idl ⇒ String + #initialize(input, interval, condition, true_expression, false_expression) ⇒ TernaryOperatorExpressionAst + constructor + @@ -202,7 +276,7 @@

        -

        Return valid IDL representation of the node (and its subtree).

        +

        A new instance of TernaryOperatorExpressionAst.

      • @@ -211,7 +285,7 @@

      • - #true_expression ⇒ Object + #to_idl ⇒ String @@ -225,7 +299,9 @@

        -
        +
        +

        Return valid IDL representation of the node (and its subtree).

        +

      • @@ -337,76 +413,155 @@

        +
        +

        Constructor Details

        + +
        +

        + + #initialize(input, interval, condition, true_expression, false_expression) ⇒ TernaryOperatorExpressionAst -
        -

        Instance Method Details

        + + + +

        +
        + +

        Returns a new instance of TernaryOperatorExpressionAst.

        + + +
        +
        +
        + + +
        + + + + +
        +
        +
        +
        +2384
        +2385
        +2386
        +2387
        +2388
        +2389
        +2390
        +
        +
        # File 'lib/idl/ast.rb', line 2384
        +
        +def initialize(input, interval, condition, true_expression, false_expression)
        +  super(input, interval, [condition, true_expression, false_expression])
        +
        +  @condition = condition
        +  @true_expression = true_expression
        +  @false_expression = false_expression
        +end
        +
        +
        + +
        +
        +

        Instance Attribute Details

        + +

        - #conditionObject + #conditionObject (readonly) -

        +
        +
        + +

        Returns the value of attribute condition.

        + + +
        +
        +
        + + +
         
         
        -2278
        -2279
        -2280
        +2382 +2383 +2384
        -
        # File 'lib/idl/ast.rb', line 2278
        +      
        # File 'lib/idl/ast.rb', line 2382
         
         def condition
        -  p9_binary_expression
        +  @condition
         end
        + +

        - #false_expressionObject + #false_expressionObject (readonly) -

        +
        +
        + +

        Returns the value of attribute false_expression.

        + + +
        +
        +
        + + +
         
         
        -2286
        -2287
        -2288
        +2382 +2383 +2384
        -
        # File 'lib/idl/ast.rb', line 2286
        +      
        # File 'lib/idl/ast.rb', line 2382
         
         def false_expression
        -  f
        +  @false_expression
         end
        + +
        -

        +

        - #to_idlString + #true_expressionObject (readonly) @@ -415,31 +570,13 @@

        -

        Return valid IDL representation of the node (and its subtree)

        +

        Returns the value of attribute true_expression.

        -

        Returns:

        -
          - -
        • - - - (String) - - - - — -
          -

          IDL code for the node

          -
          - -
        • - -
        @@ -447,21 +584,32 @@

         
         
        -2303
        +2382 +2383 +2384

        -
        # File 'lib/idl/ast.rb', line 2303
        +      
        # File 'lib/idl/ast.rb', line 2382
         
        -def to_idl = "#{condition.to_idl} ? #{true_expression.to_idl} : #{false_expression.to_idl}"
        +def true_expression + @true_expression +end
        -
        -

        +

        + + +
        +

        Instance Method Details

        + + +
        +

        - #true_expressionObject + #gen_adoc(indent = 0, indent_spaces: 2) ⇒ Object @@ -473,19 +621,74 @@

         
         
        -2282
        -2283
        -2284
        +79 +80 +81

    -
    # File 'lib/idl/ast.rb', line 2282
    +      
    # File 'lib/idl/passes/gen_adoc.rb', line 79
     
    -def true_expression
    -  t
    +def gen_adoc(indent = 0, indent_spaces: 2)
    +  "#{' ' * indent}#{condition.gen_adoc(0, indent_spaces:)} ? #{true_expression.gen_adoc(0, indent_spaces:)} : #{false_expression.gen_adoc(0, indent_spaces:)}"
     end
    + + +
    +

    + + #to_idlString + + + + + +

    +
    + +

    Return valid IDL representation of the node (and its subtree)

    + + +
    +
    +
    + +

    Returns:

    +
      + +
    • + + + (String) + + + + — +
      +

      IDL code for the node

      +
      + +
    • + +
    + +
    + + + + +
    +
    +
    +
    +2451
    +
    +
    # File 'lib/idl/ast.rb', line 2451
    +
    +def to_idl = "#{@condition.to_idl} ? #{@true_expression.to_idl} : #{@false_expression.to_idl}"
    +
    @@ -572,43 +775,43 @@

     
     
    -2259
    -2260
    -2261
    -2262
    -2263
    -2264
    -2265
    -2266
    -2267
    -2268
    -2269
    -2270
    -2271
    -2272
    -2273
    -2274
    -2275
    -2276
    +2419 +2420 +2421 +2422 +2423 +2424 +2425 +2426 +2427 +2428 +2429 +2430 +2431 +2432 +2433 +2434 +2435 +2436

    -
    # File 'lib/idl/ast.rb', line 2259
    +      
    # File 'lib/idl/ast.rb', line 2419
     
     def type(symtab)
    -  p9_binary_expression.type_check(symtab)
    +  @condition.type_check(symtab)
       begin
    -    cond = p9_binary_expression.value(symtab)
    +    cond = @condition.value(symtab)
         # if the condition is compile-time-known, only check the used field
         if (cond)
    -      t.type(symtab)
    +      @true_expression.type(symtab)
         else
    -      f.type(symtab)
    +      @false_expression.type(symtab)
         end
       rescue ValueError
    -    if t.type(symtab).kind == :bits && f.type(symtab).kind == :bits
    -      Type.new(:bits, width: [t.type(symtab).width, f.type(symtab).width].max)
    +    if @true_expression.type(symtab).kind == :bits && @false_expression.type(symtab).kind == :bits
    +      Type.new(:bits, width: [@true_expression.type(symtab).width, @false_expression.type(symtab).width].max)
         else
    -      t.type(symtab)
    +      @true_expression.type(symtab)
         end
       end
     end
    @@ -697,61 +900,57 @@

     
     
    -2231
    -2232
    -2233
    -2234
    -2235
    -2236
    -2237
    -2238
    -2239
    -2240
    -2241
    -2242
    -2243
    -2244
    -2245
    -2246
    -2247
    -2248
    -2249
    -2250
    -2251
    -2252
    -2253
    -2254
    -2255
    -2256
    +2393 +2394 +2395 +2396 +2397 +2398 +2399 +2400 +2401 +2402 +2403 +2404 +2405 +2406 +2407 +2408 +2409 +2410 +2411 +2412 +2413 +2414 +2415 +2416

    -
    # File 'lib/idl/ast.rb', line 2231
    +      
    # File 'lib/idl/ast.rb', line 2393
     
     def type_check(symtab)
    -  p9_binary_expression.type_check(symtab)
    +  @condition.type_check(symtab)
    +  type_error "ternary selector must be bool" unless @condition.type(symtab).kind == :boolean
    +
       begin
    -    cond = p9_binary_expression.value(symtab)
    +    cond = @condition.value(symtab)
         # if the condition is compile-time-known, only check the used field
         if (cond)
    -      t.type_check(symtab)
    +      @true_expression.type_check(symtab)
         else
    -      f.type_check(symtab)
    +      @false_expression.type_check(symtab)
         end
       rescue ValueError
    -    t.type_check(symtab)
    -    f.type_check(symtab)
    +    @true_expression.type_check(symtab)
    +    @false_expression.type_check(symtab)
     
    -    unless t.type(symtab).equal_to?(f.type(symtab))
    +    unless @true_expression.type(symtab).equal_to?(@false_expression.type(symtab))
           # we'll allow dissimilar if they are both bits type
    -      unless t.type(symtab).kind == :bits && f.type(symtab).kind == :bits
    -        type_error "True and false options must be same type (have #{t.type(symtab)} and #{f.type(symtab)})"
    +      unless @true_expression.type(symtab).kind == :bits && @false_expression.type(symtab).kind == :bits
    +        type_error "True and false options must be same type (have #{@true_expression.type(symtab)} and #{@false_expression.type(symtab)})"
           end
         end
       end
    -
    -  type_error "ternary selector must be bool" unless p9_binary_expression.type(symtab).kind == :boolean
    -
    -
     end
    @@ -784,15 +983,15 @@

     
     
    -2291
    -2292
    -2293
    +2439 +2440 +2441

    -
    # File 'lib/idl/ast.rb', line 2291
    +      
    # File 'lib/idl/ast.rb', line 2439
     
     def value(symtab)
    -  condition.value(symtab) ? t.value(symtab) : f.value(symtab)
    +  @condition.value(symtab) ? @true_expression.value(symtab) : @false_expression.value(symtab)
     end
    @@ -893,19 +1092,19 @@

     
     
    -2296
    -2297
    -2298
    -2299
    -2300
    +2444 +2445 +2446 +2447 +2448

    -
    # File 'lib/idl/ast.rb', line 2296
    +      
    # File 'lib/idl/ast.rb', line 2444
     
     def values(symtab)
    -  condition.value(symtab) ? t.values(symtab) : f.values(symtab)
    +  @condition.value(symtab) ? @true_expression.values(symtab) : @false_expression.values(symtab)
     rescue ValueError
    -  (t.values(symtab) + f.values(symtab)).uniq
    +  (@true_expression.values(symtab) + @false_expression.values(symtab)).uniq
     end
    @@ -917,7 +1116,7 @@

    diff --git a/docs/ruby/Idl/TernaryOperatorExpressionSyntaxNode.html b/docs/ruby/Idl/TernaryOperatorExpressionSyntaxNode.html new file mode 100644 index 000000000..abfa1cf39 --- /dev/null +++ b/docs/ruby/Idl/TernaryOperatorExpressionSyntaxNode.html @@ -0,0 +1,194 @@ + + + + + + + Class: Idl::TernaryOperatorExpressionSyntaxNode + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Class: Idl::TernaryOperatorExpressionSyntaxNode + + + +

    +
    + +
    +
    Inherits:
    +
    + Treetop::Runtime::SyntaxNode + + + show all + +
    +
    + + + + + + + + + + + +
    +
    Defined in:
    +
    lib/idl/ast.rb
    +
    + +
    + + + + + + + + + +

    + Instance Method Summary + collapse +

    + + + + + + + + +
    +

    Instance Method Details

    + + +
    +

    + + #to_astObject + + + + + +

    + + + + +
    +
    +
    +
    +2369
    +2370
    +2371
    +
    +
    # File 'lib/idl/ast.rb', line 2369
    +
    +def to_ast
    +  TernaryOperatorExpressionAst.new(input, interval, p9_binary_expression.to_ast, t.to_ast, f.to_ast)
    +end
    +
    +
    + +
    + +
    + + + +
    + + \ No newline at end of file diff --git a/docs/ruby/Idl/Type.html b/docs/ruby/Idl/Type.html index 81b7218c4..9a90007ac 100644 --- a/docs/ruby/Idl/Type.html +++ b/docs/ruby/Idl/Type.html @@ -2525,7 +2525,7 @@

    diff --git a/docs/ruby/Idl/UnaryOperatorExpressionAst.html b/docs/ruby/Idl/UnaryOperatorExpressionAst.html index 6b1e9ae87..0789ec85f 100644 --- a/docs/ruby/Idl/UnaryOperatorExpressionAst.html +++ b/docs/ruby/Idl/UnaryOperatorExpressionAst.html @@ -103,7 +103,9 @@
    Defined in:
    -
    lib/idl/ast.rb
    +
    lib/idl/ast.rb,
    + lib/idl/passes/gen_adoc.rb
    +
    @@ -162,6 +164,28 @@

    return the operated-on expression.

    + + + +
  • + + + #gen_adoc(indent = 0, indent_spaces: 2) ⇒ Object + + + + + + + + + + + + + +
    +
  • @@ -357,12 +381,12 @@

     
     
    -2209
    -2210
    -2211
    +2355 +2356 +2357

    -
    # File 'lib/idl/ast.rb', line 2209
    +      
    # File 'lib/idl/ast.rb', line 2355
     
     def exp
       e
    @@ -370,6 +394,36 @@ 

    + + +
    +

    + + #gen_adoc(indent = 0, indent_spaces: 2) ⇒ Object + + + + + +

    + + + + +
    +
    +
    +
    +152
    +153
    +154
    +
    +
    # File 'lib/idl/passes/gen_adoc.rb', line 152
    +
    +def gen_adoc(indent = 0, indent_spaces: 2)
    +  "#{op}#{exp.gen_adoc(0, indent_spaces:)}"
    +end
    +
    @@ -416,12 +470,12 @@

     
     
    -2214
    -2215
    -2216
    +2360 +2361 +2362

    -
    # File 'lib/idl/ast.rb', line 2214
    +      
    # File 'lib/idl/ast.rb', line 2360
     
     def op
       o.text_value
    @@ -475,10 +529,10 @@ 

     
     
    -2219
    +2365

    -
    # File 'lib/idl/ast.rb', line 2219
    +      
    # File 'lib/idl/ast.rb', line 2365
     
     def to_idl = "#{op}#{e.to_idl}"
    @@ -570,19 +624,19 @@

     
     
    -2157
    -2158
    -2159
    -2160
    -2161
    -2162
    -2163
    -2164
    -2165
    -2166
    +2302 +2303 +2304 +2305 +2306 +2307 +2308 +2309 +2310 +2311

    -
    # File 'lib/idl/ast.rb', line 2157
    +      
    # File 'lib/idl/ast.rb', line 2302
     
     def type(symtab)
       case op
    @@ -679,31 +733,31 @@ 

     
     
    -2169
    -2170
    -2171
    -2172
    -2173
    -2174
    -2175
    -2176
    -2177
    -2178
    -2179
    -2180
    -2181
    -2182
    -2183
    -2184
    -2185
    -2186
    -2187
    -2188
    -2189
    -2190
    +2314 +2315 +2316 +2317 +2318 +2319 +2320 +2321 +2322 +2323 +2324 +2325 +2326 +2327 +2328 +2329 +2330 +2331 +2332 +2333 +2334 +2335

    -
    # File 'lib/idl/ast.rb', line 2169
    +      
    # File 'lib/idl/ast.rb', line 2314
     
     def type_check(symtab)
       exp.type_check(symtab)
    @@ -714,8 +768,8 @@ 

    type_error "#{exp.type(symtab)} does not support unary #{op} operator" end - type_error "Unary minus only works on signed values" unless exp.type(symtab).signed? - when "~" + # type_error "Unary minus only works on signed values" unless exp.type(symtab).signed? + when "~" unless [:bits, :bitfield].include?(exp.type(symtab).kind) type_error "#{exp.type(symtab)} does not support unary #{op} operator" end @@ -758,37 +812,39 @@

     
     
    -2193
    -2194
    -2195
    -2196
    -2197
    -2198
    -2199
    -2200
    -2201
    -2202
    -2203
    -2204
    -2205
    -2206
    +2338 +2339 +2340 +2341 +2342 +2343 +2344 +2345 +2346 +2347 +2348 +2349 +2350 +2351 +2352

    -
    # File 'lib/idl/ast.rb', line 2193
    +      
    # File 'lib/idl/ast.rb', line 2338
     
     def value(symtab)
    -  val = eval("#{op}#{exp.value(symtab)}", binding, __FILE__, __LINE__)
    -  if type(symtab).integral? && type(symtab).width > val.bit_length
    -    # need to truncate
    -    val &= ((1 << type(symtab).width) - 1)
    -    if type(symtab).signed? && ((((val >> (type(symtab).width - 1))) & 1) == 1)
    +  val = val_trunc = eval("#{op}#{exp.value(symtab)}", binding, __FILE__, __LINE__)
    +  if type(symtab).integral?
    +    val_trunc = val & ((1 << type(symtab).width) - 1)
    +    if type(symtab).signed? && ((((val_trunc >> (type(symtab).width - 1))) & 1) == 1)
           # need to make this negative!
           # take the twos compliment
    -      val = -((1 << type(symtab).width) - val)
    +      val_trunc = -((1 << type(symtab).width) - val_trunc)
         end
       end
     
    -  val
    +  warn "#{text_value} is truncated due to insufficient bit width (from #{val} to #{val_trunc})" if val_trunc != val
    +
    +  val_trunc
     end
    @@ -896,7 +952,7 @@

    diff --git a/docs/ruby/Idl/UserTypeNameAst.html b/docs/ruby/Idl/UserTypeNameAst.html index bb5731910..8db4ba01b 100644 --- a/docs/ruby/Idl/UserTypeNameAst.html +++ b/docs/ruby/Idl/UserTypeNameAst.html @@ -265,10 +265,10 @@

     
     
    -3063
    +3225

    -
    # File 'lib/idl/ast.rb', line 3063
    +      
    # File 'lib/idl/ast.rb', line 3225
     
     def to_idl = text_value
    @@ -291,12 +291,12 @@

     
     
    -3058
    -3059
    -3060
    +3220 +3221 +3222

    -
    # File 'lib/idl/ast.rb', line 3058
    +      
    # File 'lib/idl/ast.rb', line 3220
     
     def type(symtab)
       symtab.get(text_value)
    @@ -386,14 +386,14 @@ 

     
     
    -3051
    -3052
    -3053
    -3054
    -3055
    +3213 +3214 +3215 +3216 +3217

    -
    # File 'lib/idl/ast.rb', line 3051
    +      
    # File 'lib/idl/ast.rb', line 3213
     
     def type_check(symtab)
       type = symtab.get(text_value)
    @@ -410,7 +410,7 @@ 

    diff --git a/docs/ruby/Idl/Var.html b/docs/ruby/Idl/Var.html index a8a19b627..0a97d558a 100644 --- a/docs/ruby/Idl/Var.html +++ b/docs/ruby/Idl/Var.html @@ -1009,7 +1009,7 @@

    diff --git a/docs/ruby/Idl/VarReadExpressionAst.html b/docs/ruby/Idl/VarReadExpressionAst.html deleted file mode 100644 index ac52995b4..000000000 --- a/docs/ruby/Idl/VarReadExpressionAst.html +++ /dev/null @@ -1,580 +0,0 @@ - - - - - - - Module: Idl::VarReadExpressionAst - - — Documentation by YARD 0.9.36 - - - - - - - - - - - - - - - - - - - -
    - - -

    Module: Idl::VarReadExpressionAst - - - -

    -
    - - - - - - -
    -
    Includes:
    -
    Rvalue
    -
    - - - - - - -
    -
    Defined in:
    -
    lib/idl/ast.rb
    -
    - -
    - - - - - - - - - -

    - Instance Method Summary - collapse -

    - - - - - - - - -
    -

    Instance Method Details

    - - -
    -

    - - #to_idlString - - - - - -

    -
    - -

    Return valid IDL representation of the node (and its subtree)

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (String) - - - - — -
      -

      IDL code for the node

      -
      - -
    • - -
    - -
    - - - - -
    -
    -
    -
    -2337
    -
    -
    # File 'lib/idl/ast.rb', line 2337
    -
    -def to_idl = text_value
    -
    -
    - -
    -

    - - #type(symtab) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -2319
    -2320
    -2321
    -2322
    -2323
    -
    -
    # File 'lib/idl/ast.rb', line 2319
    -
    -def type(symtab)
    -  internal_error "While checking VarRead type, no symbol '#{text_value}' found" if symtab.get(text_value).nil?
    -
    -  symtab.get(text_value).type
    -end
    -
    -
    - -
    -

    - - #type_check(symtab) ⇒ void - - - - - -

    -
    -

    This method returns an undefined value.

    -

    type check this node and all children

    - -

    Calls to #type and/or #value may depend on type_check being called first with the same symtab. If not, those functions may raise an AstNode::InternalError

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - symtab - - - (SymbolTable) - - - - — -
      -

      Symbol table for lookup

      -
      - -
    • - -
    - -

    Raises:

    - - -
    - - - - -
    -
    -
    -
    -2310
    -2311
    -2312
    -2313
    -2314
    -2315
    -2316
    -
    -
    # File 'lib/idl/ast.rb', line 2310
    -
    -def type_check(symtab)
    -  var = symtab.get(text_value)
    -
    -  type_error "No symbol named '#{text_value}'" if var.nil?
    -
    -  type_error "'#{text_value}' is not a variable" unless var.is_a?(Var)
    -end
    -
    -
    - -
    -

    - - #value(symtab) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -2326
    -2327
    -2328
    -2329
    -2330
    -2331
    -2332
    -2333
    -2334
    -
    -
    # File 'lib/idl/ast.rb', line 2326
    -
    -def value(symtab)
    -  var = symtab.get(text_value)
    -
    -  internal_error "Cannot find variable #{text_value}" if var.nil?
    -
    -  value_error "The value of '#{text_value}' is not known" if var.value.nil?
    -  
    -  var.value
    -end
    -
    -
    - -
    -

    - - #values(symtab) ⇒ Array<Integer>, ... - - - - - - - Originally defined in module - Rvalue - - -

    -
    - -

    Return a complete list of possible compile-time-known values of the node, or raise a ValueError if the full list cannot be determined

    - -

    For most AstNodes, this will just be a single-entry array

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - symtab - - - (SymbolTable) - - - - — -
      -

      The context for the evaulation

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (Array<Integer>) - - - - — -
      -

      The complete list of compile-time-known values, when they are integral

      -
      - -
    • - -
    • - - - (Array<Boolean>) - - - - — -
      -

      The complete list of compile-time-known values, when they are booleans

      -
      - -
    • - -
    • - - - (AstNode::ValueError) - - - - — -
      -

      if the list of values is not knowable at compile time

      -
      - -
    • - -
    - -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/ruby/Idl/VariableAssignmentAst.html b/docs/ruby/Idl/VariableAssignmentAst.html index 195cdc959..ca3a3902f 100644 --- a/docs/ruby/Idl/VariableAssignmentAst.html +++ b/docs/ruby/Idl/VariableAssignmentAst.html @@ -69,7 +69,7 @@
    Inherits:
    - AssignmentAst + AstNode @@ -128,21 +126,42 @@

    Overview

    +

    Instance Attribute Summary collapse

    +
      + +
    • + + + #lhs ⇒ Object + - + + + + + + + readonly + + + + + + + -

      - Instance Method Summary - collapse -

      +
      +

      Returns the value of attribute lhs.

      +
      + +
    • - + + + + + +

      + Instance Method Summary + collapse +

      + +
      • - #gen_adoc(indent = 0, indent_spaces: 2) ⇒ Object + #execute(symtab) ⇒ Object @@ -186,7 +225,7 @@

      • - #lhs ⇒ Object + #gen_adoc(indent = 0, indent_spaces: 2) ⇒ Object @@ -208,13 +247,15 @@

      • - #rhs ⇒ Object + #initialize(input, interval, lhs_ast, rhs_ast) ⇒ VariableAssignmentAst + constructor + @@ -222,7 +263,9 @@

        -
        +
        +

        A new instance of VariableAssignmentAst.

        +

      • @@ -284,96 +327,156 @@

        +
        +

        Constructor Details

        +
        +

        + #initialize(input, interval, lhs_ast, rhs_ast) ⇒ VariableAssignmentAst + + +

        +
        + +

        Returns a new instance of VariableAssignmentAst.

        -
        -

        Instance Method Details

        +
        +
        +
        + + +
        + + + + +
        +
        +
        +
        +986
        +987
        +988
        +989
        +990
        +
        +
        # File 'lib/idl/ast.rb', line 986
        +
        +def initialize(input, interval, lhs_ast, rhs_ast)
        +  super(input, interval, [lhs_ast, rhs_ast])
        +  @lhs = lhs_ast
        +  @rhs = rhs_ast
        +end
        +
        +
        + +
        + +
        +

        Instance Attribute Details

        + +
        -

        +

        - #execute(symtab) ⇒ Object + #lhsObject (readonly) -

        +
        +
        + +

        Returns the value of attribute lhs.

        + + +
        +
        +
        + + +
         
         
        -983
         984
         985
        -986
        -987
        -988
        -989
        -990
        -991
        -992
        -993
        +986
        -
        # File 'lib/idl/ast.rb', line 983
        -
        -def execute(symtab)
        -  if var.is_a?(CsrWriteAst)
        -    value_error "CSR writes are never compile-time-known"
        -  else
        -    variable = symtab.get(var.text_value)
        +      
        # File 'lib/idl/ast.rb', line 984
         
        -    internal_error "No variable #{var.text_value}" if variable.nil?
        -
        -    variable.value = rval.value(symtab)
        -  end
        +def lhs
        +  @lhs
         end
        + +
        -

        +

        - #gen_adoc(indent = 0, indent_spaces: 2) ⇒ Object + #rhsObject (readonly) -

        +
        +
        + +

        Returns the value of attribute rhs.

        + + +
        +
        +
        + + +
         
         
        -60
        -61
        -62
        +984 +985 +986
        -
        # File 'lib/idl/passes/gen_adoc.rb', line 60
        +      
        # File 'lib/idl/ast.rb', line 984
         
        -def gen_adoc(indent = 0, indent_spaces: 2)
        -  "#{var.gen_adoc(0, indent_spaces:)} = #{rval.gen_adoc(0, indent_spaces:)}"
        +def rhs
        +  @rhs
         end
        -
        -

        +

        + + +
        +

        Instance Method Details

        + + +
        +

        - #lhsObject + #execute(symtab) ⇒ Object @@ -385,15 +488,31 @@

         
         
        -975
        -976
        -977
        +1001 +1002 +1003 +1004 +1005 +1006 +1007 +1008 +1009 +1010 +1011

    -
    # File 'lib/idl/ast.rb', line 975
    +      
    # File 'lib/idl/ast.rb', line 1001
     
    -def lhs
    -  var
    +def execute(symtab)
    +  if @lhs.is_a?(CsrWriteAst)
    +    value_error "CSR writes are never compile-time-known"
    +  else
    +    variable = symtab.get(@lhs.text_value)
    +
    +    internal_error "No variable #{@lhs.text_value}" if variable.nil?
    +
    +    variable.value = @rhs.value(symtab)
    +  end
     end
    @@ -401,9 +520,9 @@

    -

    +

    - #rhsObject + #gen_adoc(indent = 0, indent_spaces: 2) ⇒ Object @@ -415,15 +534,15 @@

     
     
    -979
    -980
    -981
    +134 +135 +136

    -
    # File 'lib/idl/ast.rb', line 979
    +      
    # File 'lib/idl/passes/gen_adoc.rb', line 134
     
    -def rhs
    -  rval
    +def gen_adoc(indent = 0, indent_spaces: 2)
    +  "#{lhs.gen_adoc(0, indent_spaces:)} = #{rhs.gen_adoc(0, indent_spaces:)}"
     end
    @@ -474,12 +593,12 @@

     
     
    -996
    +1014

    -
    # File 'lib/idl/ast.rb', line 996
    +      
    # File 'lib/idl/ast.rb', line 1014
     
    -def to_idl = "#{var.to_idl} = #{rval.to_idl}"
    +def to_idl = "#{@lhs.to_idl} = #{@rhs.to_idl}"
    @@ -565,22 +684,22 @@

     
     
    -967
    -968
    -969
    -970
    -971
    -972
    -973
    +993 +994 +995 +996 +997 +998 +999

    -
    # File 'lib/idl/ast.rb', line 967
    +      
    # File 'lib/idl/ast.rb', line 993
     
     def type_check(symtab)
    -  var.type_check(symtab)
    -  rval.type_check(symtab)
    -  unless rval.type(symtab).convertable_to?(var.type(symtab))
    -    type_error "Incompatible type in assignment (#{var.type(symtab)}, #{rval.type(symtab)}) on line #{lineno}"
    +  @lhs.type_check(symtab)
    +  @rhs.type_check(symtab)
    +  unless @rhs.type(symtab).convertable_to?(@lhs.type(symtab))
    +    type_error "Incompatible type in assignment (#{@lhs.type(symtab)}, #{@rhs.type(symtab)})"
       end
     end
    @@ -593,7 +712,7 @@

    diff --git a/docs/ruby/Idl/VariableAssignmentSyntaxNode.html b/docs/ruby/Idl/VariableAssignmentSyntaxNode.html new file mode 100644 index 000000000..4d5211a4e --- /dev/null +++ b/docs/ruby/Idl/VariableAssignmentSyntaxNode.html @@ -0,0 +1,194 @@ + + + + + + + Class: Idl::VariableAssignmentSyntaxNode + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Class: Idl::VariableAssignmentSyntaxNode + + + +

    +
    + +
    +
    Inherits:
    +
    + Treetop::Runtime::SyntaxNode + + + show all + +
    +
    + + + + + + + + + + + +
    +
    Defined in:
    +
    lib/idl/ast.rb
    +
    + +
    + + + + + + + + + +

    + Instance Method Summary + collapse +

    + + + + + + + + +
    +

    Instance Method Details

    + + +
    +

    + + #to_astObject + + + + + +

    + + + + +
    +
    +
    +
    +973
    +974
    +975
    +
    +
    # File 'lib/idl/ast.rb', line 973
    +
    +def to_ast
    +  VariableAssignmentAst.new(input, interval, var.to_ast, rval.to_ast)
    +end
    +
    +
    + +
    + +
    + + + +
    + + \ No newline at end of file diff --git a/docs/ruby/Idl/VariableDeclarationAst.html b/docs/ruby/Idl/VariableDeclarationAst.html index 13953ff20..7eb66a2f8 100644 --- a/docs/ruby/Idl/VariableDeclarationAst.html +++ b/docs/ruby/Idl/VariableDeclarationAst.html @@ -103,7 +103,9 @@
    Defined in:
    -
    lib/idl/ast.rb
    +
    lib/idl/ast.rb,
    + lib/idl/passes/gen_adoc.rb
    +
    @@ -181,6 +183,28 @@

    +
    + + + + +
  • + + + #gen_adoc(indent = 0, indent_spaces: 2) ⇒ Object + + + + + + + + + + + + +
  • @@ -297,12 +321,12 @@

     
     
    -1386
    -1387
    -1388
    +1412 +1413 +1414

    -
    # File 'lib/idl/ast.rb', line 1386
    +      
    # File 'lib/idl/ast.rb', line 1412
     
     def add_symbol(symtab)
       symtab.add(var_write.text_value, Var.new(var_write.text_value, decl_type(symtab), decl_type(symtab).default))
    @@ -327,31 +351,31 @@ 

     
     
    -1339
    -1340
    -1341
    -1342
    -1343
    -1344
    -1345
    -1346
    -1347
    -1348
    -1349
    -1350
    -1351
    -1352
    -1353
    -1354
    -1355
    -1356
    -1357
    -1358
    -1359
    -1360
    +1365 +1366 +1367 +1368 +1369 +1370 +1371 +1372 +1373 +1374 +1375 +1376 +1377 +1378 +1379 +1380 +1381 +1382 +1383 +1384 +1385 +1386

    -
    # File 'lib/idl/ast.rb', line 1339
    +      
    # File 'lib/idl/ast.rb', line 1365
     
     def decl_type(symtab)
       dtype = type_name.type(symtab)
    @@ -378,6 +402,36 @@ 

    + + +
    +

    + + #gen_adoc(indent = 0, indent_spaces: 2) ⇒ Object + + + + + +

    + + + + +
    +
    +
    +
    +73
    +74
    +75
    +
    +
    # File 'lib/idl/passes/gen_adoc.rb', line 73
    +
    +def gen_adoc(indent = 0, indent_spaces: 2)
    +  "#{' ' * indent}#{type_name.gen_adoc(0, indent_spaces:)} #{var_write.gen_adoc(0, indent_spaces:)};"
    +end
    +
    @@ -424,16 +478,16 @@

     
     
    -1391
    -1392
    -1393
    -1394
    -1395
    -1396
    -1397
    +1417 +1418 +1419 +1420 +1421 +1422 +1423

    -
    # File 'lib/idl/ast.rb', line 1391
    +      
    # File 'lib/idl/ast.rb', line 1417
     
     def to_idl
       if ary_size.empty?
    @@ -527,30 +581,30 @@ 

     
     
    -1363
    -1364
    -1365
    -1366
    -1367
    -1368
    -1369
    -1370
    -1371
    -1372
    -1373
    -1374
    -1375
    -1376
    -1377
    -1378
    -1379
    -1380
    -1381
    -1382
    -1383
    +1389 +1390 +1391 +1392 +1393 +1394 +1395 +1396 +1397 +1398 +1399 +1400 +1401 +1402 +1403 +1404 +1405 +1406 +1407 +1408 +1409

    -
    # File 'lib/idl/ast.rb', line 1363
    +      
    # File 'lib/idl/ast.rb', line 1389
     
     def type_check(symtab)
       type_name.type_check(symtab)
    @@ -563,7 +617,7 @@ 

    unless ary_size.empty? ary_size.expression.type_check(symtab) begin - ary_size_value = ary_size.expression.value(symtab) + ary_size.expression.value(symtab) rescue ValueError type_error "Array size must be known at compile time" end @@ -583,7 +637,7 @@

    diff --git a/docs/ruby/Idl/VariableDeclarationWithInitializationAst.html b/docs/ruby/Idl/VariableDeclarationWithInitializationAst.html index 663f76c9a..d4771d047 100644 --- a/docs/ruby/Idl/VariableDeclarationWithInitializationAst.html +++ b/docs/ruby/Idl/VariableDeclarationWithInitializationAst.html @@ -69,7 +69,7 @@
    Inherits:
    - AssignmentAst + AstNode @@ -105,7 +103,9 @@
    Defined in:
    -
    lib/idl/ast.rb
    +
    lib/idl/ast.rb,
    + lib/idl/passes/gen_adoc.rb
    +
    @@ -131,6 +131,98 @@

    Overview

    +

    Instance Attribute Summary collapse

    +
      + +
    • + + + #lhs ⇒ Object + + + + + + + + + readonly + + + + + + + + + +
      +

      Returns the value of attribute lhs.

      +
      + +
    • + + +
    • + + + #rhs ⇒ Object + + + + + + + + + readonly + + + + + + + + + +
      +

      Returns the value of attribute rhs.

      +
      + +
    • + + +
    • + + + #type_name ⇒ Object + + + + + + + + + readonly + + + + + + + + + +
      +

      Returns the value of attribute type_name.

      +
      + +
    • + + +
    + @@ -193,7 +285,7 @@

  • - #lhs ⇒ Object + #gen_adoc(indent = 0, indent_spaces: 2) ⇒ Object @@ -215,13 +307,15 @@

  • - #lhs_type(symtab) ⇒ Object + #initialize(input, interval, type_name_ast, var_write_ast, ary_size, rval_ast) ⇒ VariableDeclarationWithInitializationAst + constructor + @@ -229,7 +323,9 @@

    -
    +
    +

    A new instance of VariableDeclarationWithInitializationAst.

    +

  • @@ -237,7 +333,7 @@

  • - #rhs ⇒ Object + #lhs_type(symtab) ⇒ Object @@ -317,10 +413,203 @@

    +
    +

    Constructor Details

    + +
    +

    + #initialize(input, interval, type_name_ast, var_write_ast, ary_size, rval_ast) ⇒ VariableDeclarationWithInitializationAst + + +

    +
    + +

    Returns a new instance of VariableDeclarationWithInitializationAst.

    + + +
    +
    +
    + + +
    + + + + +
    +
    +
    +
    +1447
    +1448
    +1449
    +1450
    +1451
    +1452
    +1453
    +1454
    +1455
    +1456
    +1457
    +
    +
    # File 'lib/idl/ast.rb', line 1447
    +
    +def initialize(input, interval, type_name_ast, var_write_ast, ary_size, rval_ast)
    +  if ary_size.nil?
    +    super(input, interval, [type_name_ast, var_write_ast, rval_ast])
    +  else
    +    super(input, interval, [type_name_ast, var_write_ast, ary_size, rval_ast])
    +  end
    +  @type_name = type_name_ast
    +  @lhs = var_write_ast
    +  @ary_size = ary_size
    +  @rhs = rval_ast
    +end
    +
    +
    + +
    + +
    +

    Instance Attribute Details

    + + + +
    +

    + + #lhsObject (readonly) + + + + + +

    +
    + +

    Returns the value of attribute lhs.

    + + +
    +
    +
    + + +
    + + + + +
    +
    +
    +
    +1445
    +1446
    +1447
    +
    +
    # File 'lib/idl/ast.rb', line 1445
    +
    +def lhs
    +  @lhs
    +end
    +
    +
    + + + +
    +

    + + #rhsObject (readonly) + + + + + +

    +
    + +

    Returns the value of attribute rhs.

    + + +
    +
    +
    + + +
    + + + + +
    +
    +
    +
    +1445
    +1446
    +1447
    +
    +
    # File 'lib/idl/ast.rb', line 1445
    +
    +def rhs
    +  @rhs
    +end
    +
    +
    + + + +
    +

    + + #type_nameObject (readonly) + + + + + +

    +
    + +

    Returns the value of attribute type_name.

    + + +
    +
    +
    + + +
    + + + + +
    +
    +
    +
    +1445
    +1446
    +1447
    +
    +
    # File 'lib/idl/ast.rb', line 1445
    +
    +def type_name
    +  @type_name
    +end
    +
    +
    + +
    + +

    Instance Method Details

    @@ -371,14 +660,14 @@

     
     
    -1474
    -1475
    -1476
    -1477
    -1478
    +1516 +1517 +1518 +1519 +1520

  • -
    # File 'lib/idl/ast.rb', line 1474
    +      
    # File 'lib/idl/ast.rb', line 1516
     
     def add_symbol(symtab)
       symtab.add(lhs.text_value, Var.new(lhs.text_value, lhs_type(symtab), rhs.value(symtab)))
    @@ -454,16 +743,16 @@ 

     
     
    -1481
    -1482
    -1483
    -1484
    +1523 +1524 +1525 +1526

    -
    # File 'lib/idl/ast.rb', line 1481
    +      
    # File 'lib/idl/ast.rb', line 1523
     
     def execute(symtab)
    -  value_error "TODO: Array declaration" unless ary_size.empty?
    +  value_error "TODO: Array declaration" unless @ary_size.nil?
       symtab.add(lhs.text_value, Var.new(lhs.text_value, lhs_type(symtab), rhs.value(symtab)))
     end
    @@ -472,9 +761,9 @@

    -

    +

    - #lhsObject + #gen_adoc(indent = 0, indent_spaces: 2) ⇒ Object @@ -486,15 +775,23 @@

     
     
    -1458
    -1459
    -1460
    +112 +113 +114 +115 +116 +117 +118

    -
    # File 'lib/idl/ast.rb', line 1458
    +      
    # File 'lib/idl/passes/gen_adoc.rb', line 112
     
    -def lhs
    -  var_write
    +def gen_adoc(indent = 0, indent_spaces: 2)
    +  if @ary_size.nil?
    +    "#{' ' * indent}#{type_name.gen_adoc(0, indent_spaces:)} #{lhs.gen_adoc(0, indent_spaces:)} = #{rhs.gen_adoc(0, indent_spaces:)};"
    +  else
    +    "#{' ' * indent}#{type_name.gen_adoc(0, indent_spaces:)} #{lhs.gen_adoc(0, indent_spaces:)}[#{@ary_size.gen_adoc(0, indent_spaces:)}] = #{rhs.gen_adoc(0, indent_spaces:)};"
    +  end
     end
    @@ -516,50 +813,9 @@

     
     
    -1409
    -1410
    -1411
    -1412
    -1413
    -1414
    -1415
    -1416
    -1417
    -1418
    - - -
    # File 'lib/idl/ast.rb', line 1409
    -
    -def lhs_type(symtab)
    -  decl_type = type_name.type(symtab).clone
    -  type_error "No type '#{type_name.text_value}' on line #{lineno}" if decl_type.nil?
    -
    -  decl_type = Type.new(:enum_ref, enum_class: decl_type) if decl_type.kind == :enum
    -
    -  decl_type = decl_type.clone.qualify(q.text_value.to_sym) unless q.empty?
    -
    -  decl_type
    -end
    - - - - - -
    -

    - - #rhsObject - - - - - -

    - - @@ -633,12 +916,24 @@

     
     
    -1487
    +1529 +1530 +1531 +1532 +1533 +1534 +1535

    -
    -
    -
    +1459
    +1460
    +1461
     1462
     1463
     1464
    @@ -569,20 +825,47 @@ 

    1468 1469 1470 -1471

    +1471 +1472 +1473 +1474 +1475 +1476 +1477 +1478 +1479 +1480 +1481 +1482 +1483
    -
    # File 'lib/idl/ast.rb', line 1462
    +      
    # File 'lib/idl/ast.rb', line 1459
     
    -def rhs
    -  # if rhs is nil, this is the non-initializing variant
    -  return nil unless respond_to?(:rval)
    +def lhs_type(symtab)
    +  decl_type = type_name.type(symtab).clone
    +  type_error "No type '#{type_name.text_value}' on line #{lineno}" if decl_type.nil?
     
    -  return rval if rval.is_a?(Rvalue)
    +  decl_type = Type.new(:enum_ref, enum_class: decl_type) if decl_type.kind == :enum
    +
    +  # decl_type = decl_type.clone.qualify(q.text_value.to_sym) unless q.empty?
    +
    +  if @lhs.text_value[0].upcase == @lhs.text_value[0]
    +    decl_type.make_const
    +  end
     
    -  internal_error "unexpected #{rval.inspect}" unless rval.is_a?(MemoryRValAst)
    +  unless @ary_size.nil?
    +    begin
    +      decl_type = Type.new(:array, sub_type: decl_type, width: @ary_size.value(symtab))
    +    rescue ValueError
    +      type_error "Array size must be known at compile time"
    +    end
    +    if @lhs.text_value[0].upcase == @lhs.text_value[0]
    +      decl_type.make_const
    +    end  
    +  end
     
    -  rval
    +  decl_type
     end
    -
    # File 'lib/idl/ast.rb', line 1487
    +      
    # File 'lib/idl/ast.rb', line 1529
     
    -def to_idl = "#{type_name.to_idl} #{var_write.to_idl} = #{rval.to_idl}"
    +def to_idl + if @ary_size.nil? + "#{type_name.to_idl} #{lhs.to_idl} = #{rhs.to_idl}" + else + "#{type_name.to_idl} #{lhs.to_idl}[#{@ary_size.to_idl}] = #{rhs.to_idl}" + end +end
    @@ -724,81 +1019,65 @@

     
     
    -1421
    -1422
    -1423
    -1424
    -1425
    -1426
    -1427
    -1428
    -1429
    -1430
    -1431
    -1432
    -1433
    -1434
    -1435
    -1436
    -1437
    -1438
    -1439
    -1440
    -1441
    -1442
    -1443
    -1444
    -1445
    -1446
    -1447
    -1448
    -1449
    -1450
    -1451
    -1452
    -1453
    -1454
    -1455
    -1456
    +1486 +1487 +1488 +1489 +1490 +1491 +1492 +1493 +1494 +1495 +1496 +1497 +1498 +1499 +1500 +1501 +1502 +1503 +1504 +1505 +1506 +1507 +1508 +1509 +1510 +1511 +1512 +1513

    -
    # File 'lib/idl/ast.rb', line 1421
    +      
    # File 'lib/idl/ast.rb', line 1486
     
     def type_check(symtab)
    -  rval.type_check(symtab)
    +  @rhs.type_check(symtab)
     
    -  type_name.type_check(symtab)
    +  @type_name.type_check(symtab)
     
    -  decl_type = lhs_type(symtab)
    +  @ary_size&.type_check(symtab)
     
    -  unless ary_size.empty?
    -    ary_size.expression.type_check(symtab)
    -    begin
    -      ary_size_value = ary_size.expression.value(symtab)
    -    rescue ValueError
    -      type_error "Array size must be known at compile time"
    -    end
    +  decl_type = lhs_type(symtab)
     
    -    decl_type = Type.new(:array, width: ary_size_value, sub_type: decl_type)
    -  end
     
    -  if (var_write.text_value == var_write.text_value.upcase) && ary_size.empty?
    +  if decl_type.const?
         # this is a constant; ensure we are assigning a constant value
         begin
    -      symtab.add(var_write.text_value, Var.new(var_write.text_value, decl_type.clone.make_const, rval.value(symtab)))
    +      symtab.add(@lhs.text_value, Var.new(@lhs.text_value, decl_type.clone, @rhs.value(symtab)))
         rescue ValueError => e
           type_error "Declaring constant with a non-constant value (#{e})"
         end
       else
    -    symtab.add(var_write.text_value, Var.new(var_write.text_value, decl_type.clone))
    +    symtab.add(@lhs.text_value, Var.new(@lhs.text_value, decl_type.clone))
       end
     
    -  var_write.type_check(symtab)
    +  @lhs.type_check(symtab)
     
       # now check that the assignment is compatible
    -  return if rval.type(symtab).convertable_to?(decl_type)
    +  return if @rhs.type(symtab).convertable_to?(decl_type)
     
    -  type_error "Incompatible type (#{decl_type}, #{rval.type(symtab)}) in assignment"
    +  type_error "Incompatible type (#{decl_type}, #{@rhs.type(symtab)}) in assignment"
     end
    @@ -810,7 +1089,7 @@

    diff --git a/docs/ruby/Idl/VariableDeclarationWithInitializationSyntaxNode.html b/docs/ruby/Idl/VariableDeclarationWithInitializationSyntaxNode.html new file mode 100644 index 000000000..3554d92be --- /dev/null +++ b/docs/ruby/Idl/VariableDeclarationWithInitializationSyntaxNode.html @@ -0,0 +1,202 @@ + + + + + + + Class: Idl::VariableDeclarationWithInitializationSyntaxNode + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Class: Idl::VariableDeclarationWithInitializationSyntaxNode + + + +

    +
    + +
    +
    Inherits:
    +
    + Treetop::Runtime::SyntaxNode + + + show all + +
    +
    + + + + + + + + + + + +
    +
    Defined in:
    +
    lib/idl/ast.rb
    +
    + +
    + + + + + + + + + +

    + Instance Method Summary + collapse +

    + + + + + + + + +
    +

    Instance Method Details

    + + +
    +

    + + #to_astObject + + + + + +

    + + + + +
    +
    +
    +
    +1427
    +1428
    +1429
    +1430
    +1431
    +1432
    +1433
    +
    +
    # File 'lib/idl/ast.rb', line 1427
    +
    +def to_ast
    +  ary_size_ast = ary_size.empty? ? nil : ary_size.expression.to_ast
    +  VariableDeclarationWithInitializationAst.new(
    +    input, interval,
    +    type_name.to_ast, var_write.to_ast, ary_size_ast, rval.to_ast
    +  )
    +end
    +
    +
    + +
    + +
    + + + +
    + + \ No newline at end of file diff --git a/docs/ruby/Idl/XregType.html b/docs/ruby/Idl/XregType.html index aeb74a243..db833fb34 100644 --- a/docs/ruby/Idl/XregType.html +++ b/docs/ruby/Idl/XregType.html @@ -318,7 +318,7 @@

    diff --git a/docs/ruby/Instruction.html b/docs/ruby/Instruction.html index f08eb3462..c343c424e 100644 --- a/docs/ruby/Instruction.html +++ b/docs/ruby/Instruction.html @@ -222,7 +222,53 @@

  • - #encoding(base) ⇒ String + #defined_by?(*args) ⇒ Object + + + + + + + + + + + + + +
    + +
  • + + +
  • + + + #encoding(base) ⇒ Encoding + + + + + + + + + + + + + +
    +

    The encoding.

    +
    + +
  • + + +
  • + + + #encoding_width ⇒ Integer @@ -237,7 +283,7 @@

    -

    The encoding as, e.g.,: 0000101———-001—–0110011.

    +

    The width of the encoding.

  • @@ -246,7 +292,7 @@

  • - #extension ⇒ String+ + #excluded_by?(*args) ⇒ Object @@ -268,14 +314,60 @@

  • - #initialize(inst_data, full_opcode_data, sym_table, arch_def) ⇒ Instruction + #exists_in_cfg?(possible_xlens, extensions) ⇒ Boolean + + + + + + + + + + + + + +
    +

    Whether or not the instruction is implemented given the supplies config options.

    +
    + +
  • + + +
  • + + + #extension_exclusions ⇒ Array<ExtensionRequirement> - constructor + + + + + + + +
    +

    Extension exclusions for the instruction.

    +
    + +
  • + + +
  • + + + #extension_requirements ⇒ Array<ExtensionRequirement> + + + + + @@ -285,7 +377,7 @@

    -

    A new instance of Instruction.

    +

    Extension requirements for the instruction.

  • @@ -318,7 +410,7 @@

  • - #operation_ast ⇒ Idl::AstNode + #operation_ast(idl_compiler) ⇒ FunctionBodyAst @@ -333,7 +425,7 @@

    -

    Abstract syntax tree of the instruction operation().

    +

    The abstract syntax tree of the instruction operation.

  • @@ -342,7 +434,7 @@

  • - #operation_source ⇒ String + #pruned_operation_ast(global_symtab) ⇒ Idl::FunctionBodyAst @@ -357,7 +449,7 @@

    -

    The operation() IDL code.

    +

    A pruned abstract syntax tree.

  • @@ -366,7 +458,7 @@

  • - #pruned_operation_ast ⇒ Object + #rv32? ⇒ Boolean @@ -380,7 +472,57 @@

    -
    +
    +

    Whether or not this instruction is defined for RV32.

    +
    + +

  • + + +
  • + + + #rv64? ⇒ Boolean + + + + + + + + + + + + + +
    +

    Whether or not this instruction is defined for RV64.

    +
    + +
  • + + +
  • + + + #type_check_operation(global_symtab) ⇒ Object + + + + + + + + + + + + + +
    +

    type check the instruction operation in the context of symtab.

    +
  • @@ -418,10 +560,29 @@

    Constructor Details

    -
    -

    +

    This class inherits a constructor from ArchDefObject

    + +

    +
    +

    Dynamic Method Handling

    +

    + This class handles dynamic methods through the method_missing method + + in the class ArchDefObject + +

    + +
    + +
    +

    Instance Attribute Details

    + + + +
    +

    - #initialize(inst_data, full_opcode_data, sym_table, arch_def) ⇒ Instruction + #arch_defArchDef (readonly) @@ -430,13 +591,31 @@

    -

    Returns a new instance of Instruction.

    +

    Returns The architecture definition.

    +

    Returns:

    +
      + +
    • + + + (ArchDef) + + + + — +
      +

      The architecture definition

      +
      + +
    • + +
    @@ -444,164 +623,696 @@

     
     
    -982
    -983
    -984
    -985
    -986
    -987
    -988
    -989
    -990
    -991
    -992
    -993
    -994
    -995
    -996
    -997
    -998
    -999
    -1000
    -1001
    -1002
    -1003
    -1004
    -1005
    -1006
    -1007
    -1008
    -1009
    -1010
    -1011
    -1012
    -1013
    -1014
    -1015
    -1016
    -1017
    -1018
    -1019
    -1020
    -1021
    -1022
    -1023
    -1024
    -1025
    -1026
    -1027
    -1028
    -1029
    -1030
    -1031
    -1032
    -1033
    -1034
    -1035
    -1036
    -1037
    -1038
    -1039
    -1040
    -1041
    -1042
    -1043
    -1044
    -1045
    +903 +904 +905

    + +
    -
    # File 'lib/arch_def.rb', line 982
    -
    -def initialize(inst_data, full_opcode_data, sym_table, arch_def)
    -  @arch_def = arch_def
    -  @sym_table = sym_table.deep_clone
    -
    -  super(inst_data)
    -
    -  if inst_data.key?("encoding")
    -    load_encoding
    -  else
    -    opcode_data_key = name.downcase.gsub(".", "_")
    -    raise "opcode data not found for #{name}" unless full_opcode_data.key?(opcode_data_key)
    -
    -    opcode_data = full_opcode_data[opcode_data_key]
    -    encoding_mask = opcode_data["encoding"]
    -
    -    opcode_fields = []
    -    msb = encoding_mask.size
    -    encoding_mask.split("-").each do |e|
    -      if e.empty?
    -        msb -= 1
    -      else
    -        opcode_fields << Encoding::Field.new(e, (msb - e.size + 1)..msb)
    -        msb -= e.size
    -      end
    -    end
    +      
    # File 'lib/arch_def.rb', line 903
     
    +def arch_def
    +  @arch_def
    +end
    +
    +
    + +
    - decode_variables = [] - opcode_data["variable_fields"].to_a.each do |f| - decode_field_data = RiscvOpcodes::VARIABLE_FIELDS.to_a.select do |d| - d[0] == f || (d[0].is_a?(Array) && d[0].any?(f)) - end - raise "didn't find '#{f}' in DECODER_RING" if decode_field_data.empty? - raise "Found multiple matches for '#{f}' in DECODER_RING" if decode_field_data.size > 1 +
    +

    Instance Method Details

    - data = decode_field_data[0][1] - names = [] - if data.key?(:decode_variable) - if data[:decode_variable].is_a?(String) - names << data[:decode_variable] - else - raise "unexpected" unless data[:decode_variable].is_a?(Array) + +
    +

    + + #access_detail?Boolean + - names = data[:decode_variable] - end - else - raise "?" unless decode_field_data[0][0].is_a?(String) + - names = [decode_field_data[0][0]] - end + +

    +
    + +

    Returns true if the instruction has an ‘access_detail’ field.

    - names.each do |name| - decode_variables << DecodeField.new(self, name, decode_field_data[0][0], decode_field_data[0][1]) - end - end - decode_variables.uniq! - @encodings ||= {} - klass = Struct.new(:opcode_fields, :decode_variables) - @encodings[32] = klass.new(opcode_fields, decode_variables) - @encodings[64] = klass.new(opcode_fields, decode_variables) - end -end

  • - - - + +
    -
    -
    -

    Dynamic Method Handling

    -

    - This class handles dynamic methods through the method_missing method +

    Returns:

    +
      + +
    • + + + (Boolean) + + + + — +
      +

      true if the instruction has an ‘access_detail’ field

      +
      + +
    • + +
    + +
    + + + + +
    +
    +
    +
    +1031
    +1032
    +1033
    +
    +
    # File 'lib/arch_def.rb', line 1031
    +
    +def access_detail?
    +  @data.key?("access_detail")
    +end
    +
    + + +
    +

    + + #decode_variables(base) ⇒ Array<DecodeVariable> + + + + + +

    +
    + +

    Returns The decode variables.

    + + +
    +
    +
    + +

    Returns:

    +
      + +
    • + + + (Array<DecodeVariable>) + + + + — +
      +

      The decode variables

      +
      + +
    • + +
    + +
    + + + + +
    +
    +
    +
    +1026
    +1027
    +1028
    +
    +
    # File 'lib/arch_def.rb', line 1026
    +
    +def decode_variables(base)
    +  encoding(base).decode_variables
    +end
    +
    +
    + +
    +

    + + + #defined_by?(ext_name, ext_version) ⇒ Boolean + + #defined_by?(ext_version) ⇒ Boolean + + + + + + +

    +
    + + +
    +
    +
    + +

    Overloads:

    +
      + + +
    • + #defined_by?(ext_name, ext_version) ⇒ Boolean +
      +
      + +

      Returns Whether or not the instruction is defined by extesion ‘ext`, version `version`.

      + + +
      +
      +
      +

      Parameters:

      +
        + +
      • + + ext_name + + + (#to_s) + + + + — +
        +

        An extension name

        +
        + +
      • + +
      • + + ext_version + + + (#to_s) + + + + — +
        +

        A specific extension version

        +
        + +
      • + +
      + +

      Returns:

      +
        + +
      • + + + (Boolean) + + + + — +
        +

        Whether or not the instruction is defined by extesion ‘ext`, version `version`

        +
        + +
      • + +
      + +
      +
    • + + +
    • + #defined_by?(ext_version) ⇒ Boolean +
      +
      + +

      Returns Whether or not the instruction is defined by ext_version.

      + + +
      +
      +
      +

      Parameters:

      +
        + +
      • + + ext_version + + + (ExtensionVersion) + + + + — +
        +

        An extension version

        +
        + +
      • + +
      + +

      Returns:

      +
        + +
      • + + + (Boolean) + + + + — +
        +

        Whether or not the instruction is defined by ext_version

        +
        + +
      • + +
      + +
      +
    • + +
    + + +
    + + + + +
    +
    +
    +
    +1134
    +1135
    +1136
    +1137
    +1138
    +1139
    +1140
    +1141
    +1142
    +1143
    +1144
    +1145
    +1146
    +1147
    +1148
    +1149
    +
    +
    # File 'lib/arch_def.rb', line 1134
    +
    +def defined_by?(*args)
    +  if args.size == 1
    +    raise ArgumentError, "Parameter must be an ExtensionVersion" unless args[0].is_a?(ExtensionVersion)
    +
    +    extension_requirements.any? do |r|
    +      r.satisfied_by?(args[0])
    +    end
    +  elsif args.size == 2
    +    raise ArgumentError, "First parameter must be an extension name" unless args[0].respond_to?(:to_s)
    +    raise ArgumentError, "Second parameter must be an extension version" unless args[0].respond_to?(:to_s)
    +
    +    extension_requirements.any? do |r|
    +      r.satisfied_by?(args[0].to_s, args[1].to_s)
    +    end
    +  end
    +end
    +
    +
    + +
    +

    + + #encoding(base) ⇒ Encoding + + + + + +

    +
    - in the class ArchDefObject +

    Returns the encoding.

    + + +
    +
    +
    +

    Parameters:

    +
      + +
    • + + base + + + (Integer) + + + + — +
      +

      32 or 64

      +
      + +
    • + +
    + +

    Returns:

    +
      + +
    • + + + (Encoding) + + + + — +
      +

      the encoding

      +
      + +
    • + +
    + +
    + + + + +
    +
    +
    +
    +1012
    +1013
    +1014
    +1015
    +1016
    +
    +
    # File 'lib/arch_def.rb', line 1012
    +
    +def encoding(base)
    +  load_encoding if @encodings.nil?
    +
    +  @encodings[base]
    +end
    +
    +
    -

    +
    +

    + + #encoding_widthInteger + + + + + +

    +
    + +

    Returns the width of the encoding.

    + + +
    +
    +
    + +

    Returns:

    +
      + +
    • + + + (Integer) + + + + — +
      +

      the width of the encoding

      +
      + +
    • + +
    + +
    + + + + +
    +
    +
    +
    +1019
    +1020
    +1021
    +1022
    +1023
    +
    +
    # File 'lib/arch_def.rb', line 1019
    +
    +def encoding_width
    +  raise "unexpected: encodings are different sizes" unless encoding(32).size == encoding(64).size
    +
    +  encoding(64).size
    +end
    +
    +
    + +
    +

    + + + #excluded_by?(ext_name, ext_version) ⇒ Boolean + + #excluded_by?(ext_version) ⇒ Boolean + + + + + + +

    +
    + + +
    +
    +
    + +

    Overloads:

    +
      + + +
    • + #excluded_by?(ext_name, ext_version) ⇒ Boolean +
      +
      + +

      Returns Whether or not the instruction is excluded by extesion ‘ext`, version `version`.

      + + +
      +
      +
      +

      Parameters:

      +
        + +
      • + + ext_name + + + (#to_s) + + + + — +
        +

        An extension name

        +
        + +
      • + +
      • + + ext_version + + + (#to_s) + + + + — +
        +

        A specific extension version

        +
        + +
      • + +
      + +

      Returns:

      +
        + +
      • + + + (Boolean) + + + + — +
        +

        Whether or not the instruction is excluded by extesion ‘ext`, version `version`

        +
        + +
      • + +
      + +
      +
    • + + +
    • + #excluded_by?(ext_version) ⇒ Boolean +
      +
      + +

      Returns Whether or not the instruction is excluded by ext_version.

      + + +
      +
      +
      +

      Parameters:

      +
        + +
      • + + ext_version + + + (ExtensionVersion) + + + + — +
        +

        An extension version

        +
        + +
      • + +
      + +

      Returns:

      +
        + +
      • + + + (Boolean) + + + + — +
        +

        Whether or not the instruction is excluded by ext_version

        +
        + +
      • +
      +
      +
    • + +
    + + +
    + + + + +
    +
    +
    +
    +1158
    +1159
    +1160
    +1161
    +1162
    +1163
    +1164
    +1165
    +1166
    +1167
    +1168
    +1169
    +1170
    +1171
    +1172
    +1173
    +
    +
    # File 'lib/arch_def.rb', line 1158
    +
    +def excluded_by?(*args)
    +  if args.size == 1
    +    raise ArgumentError, "Parameter must be an ExtensionVersion" unless args[0].is_a?(ExtensionVersion)
    +
    +    extension_exclusions.any? do |r|
    +      r.satisfied_by?(args[0])
    +    end
    +  elsif args.size == 2
    +    raise ArgumentError, "First parameter must be an extension name" unless args[0].respond_to?(:to_s)
    +    raise ArgumentError, "Second parameter must be an extension version" unless args[0].respond_to?(:to_s)
     
    -  
    -

    Instance Attribute Details

    + extension_exclusions.any? do |r| + r.satisfied_by?(args[0].to_s, args[1].to_s) + end + end +end
    +
    +
    - - -
    -

    +
    +

    - #arch_defArchDef (readonly) + #exists_in_cfg?(possible_xlens, extensions) ⇒ Boolean @@ -610,26 +1321,62 @@

    -

    Returns The architecture definition.

    +

    Returns whether or not the instruction is implemented given the supplies config options.

    +

    Parameters:

    +
      + +
    • + + possible_xlens + + + (Array<Integer>) + + + + — +
      +

      List of xlens that be used in any implemented mode

      +
      + +
    • + +
    • + + extensions + + + (Array<ExtensionVersion>) + + + + — +
      +

      List of extensions implemented

      +
      + +
    • +
    +

    Returns:

    • - (ArchDef) + (Boolean)
      -

      The architecture definition

      +

      whether or not the instruction is implemented given the supplies config options

    • @@ -642,32 +1389,29 @@

       
       
      -893
      -894
      -895
      +1178 +1179 +1180 +1181 +1182

    -
    # File 'lib/arch_def.rb', line 893
    +      
    # File 'lib/arch_def.rb', line 1178
     
    -def arch_def
    -  @arch_def
    +def exists_in_cfg?(possible_xlens, extensions)
    +  (@data["base"].nil? || (possible_xlens.include?(@data["base"]))) &&
    +    extensions.any? { |e| defined_by?(e) } &&
    +    extensions.none? { |e| excluded_by?(e) }
     end
    - - - -
    -

    Instance Method Details

    - - -
    -

    +
    +

    - #access_detail?Boolean + #extension_exclusionsArray<ExtensionRequirement> @@ -676,7 +1420,7 @@

    -

    Returns true if the instruction has an ‘access_detail’ field.

    +

    Returns Extension exclusions for the instruction. If any exclusion is met, the instruction is not defined.

    @@ -689,13 +1433,13 @@

  • - (Boolean) + (Array<ExtensionRequirement>)
    -

    true if the instruction has an ‘access_detail’ field

    +

    Extension exclusions for the instruction. If any exclusion is met, the instruction is not defined

  • @@ -708,15 +1452,53 @@

     
     
    +1104
    +1105
    +1106
    +1107
    +1108
    +1109
    +1110
    +1111
    +1112
    +1113
    +1114
    +1115
    +1116
    +1117
    +1118
    +1119
     1120
     1121
    -1122
    +1122 +1123 +1124 +1125

    -
    # File 'lib/arch_def.rb', line 1120
    +      
    # File 'lib/arch_def.rb', line 1104
     
    -def access_detail?
    -  @data.key?("access_detail")
    +def extension_exclusions
    +  return @extension_exclusions unless @extension_excludions.nil?
    +
    +  @extension_exclusions = []
    +  if @data.key?("excludedBy")
    +    if @data["exludedBy"].is_a?(Array)
    +      # could be either a single extension with exclusion, or a list of exclusions
    +      if extension_exclusion?(@data["definedBy"][0])
    +        @extension_exclusions << to_extension_requirement(@data["excludedBy"][0])
    +      else
    +        # this is a list
    +        @data["excludeddBy"].each do |r|
    +          @extension_exclusions << to_extension_exclusion(r)
    +        end
    +      end
    +    else
    +      @extension_exclusions << to_extension_requirement(@data["excludedBy"])
    +    end
    +  end
    +
    +  @extension_exclusions
     end
    @@ -724,9 +1506,9 @@

    -

    +

    - #decode_variables(base) ⇒ Array<DecodeVariable> + #extension_requirementsArray<ExtensionRequirement> @@ -735,7 +1517,7 @@

    -

    Returns The decode variables.

    +

    Returns Extension requirements for the instruction. If any requirement is met, the instruction is defined.

    @@ -748,13 +1530,13 @@

  • - (Array<DecodeVariable>) + (Array<ExtensionRequirement>)
    -

    The decode variables

    +

    Extension requirements for the instruction. If any requirement is met, the instruction is defined

  • @@ -767,15 +1549,53 @@

     
     
    +1080
    +1081
    +1082
    +1083
    +1084
    +1085
    +1086
    +1087
    +1088
    +1089
    +1090
    +1091
    +1092
    +1093
    +1094
    +1095
    +1096
    +1097
    +1098
     1099
     1100
     1101
    -
    # File 'lib/arch_def.rb', line 1099
    +      
    # File 'lib/arch_def.rb', line 1080
    +
    +def extension_requirements
    +  return @extension_requirements unless @extension_requirements.nil?
    +
    +  @extension_requirements = []
    +  if @data["definedBy"].is_a?(Array)
    +    # could be either a single extension with requirement, or a list of requirements
    +    if extension_requirement?(@data["definedBy"][0])
    +      @extension_requirements << to_extension_requirement(@data["definedBy"][0])
    +    else
    +      # this is a list
    +      @data["definedBy"].each do |r|
    +        @extension_requirements << to_extension_requirement(r)
    +      end
    +    end
    +  else
    +    @extension_requirements << to_extension_requirement(@data["definedBy"])
    +  end
     
    -def decode_variables(base)
    -  @encodings[base].decode_variables
    +  raise "empty requirements" if @extension_requirements.empty?
    +
    +  @extension_requirements
     end
    @@ -783,9 +1603,9 @@

    -

    +

    - #encoding(base) ⇒ String + #multi_encoding?Boolean @@ -794,7 +1614,7 @@

    -

    Returns the encoding as, e.g.,: 0000101———-001—–0110011.

    +

    Returns whether or not this instruction has different encodings depending on XLEN.

    @@ -807,13 +1627,13 @@

  • - (String) + (Boolean)
    -

    the encoding as, e.g.,: 0000101———-001—–0110011

    +

    whether or not this instruction has different encodings depending on XLEN

  • @@ -826,15 +1646,15 @@

     
     
    -1094
    -1095
    -1096
    +989 +990 +991

    -
    # File 'lib/arch_def.rb', line 1094
    +      
    # File 'lib/arch_def.rb', line 989
     
    -def encoding(base)
    -  @encodings[base].format
    +def multi_encoding?
    +  @data.key?("encoding") && @data["encoding"].key?("RV32")
     end
    @@ -842,9 +1662,9 @@

    -

    +

    - #extensionString+ + #operation_ast(idl_compiler) ⇒ FunctionBodyAst @@ -853,6 +1673,8 @@

    +

    Returns The abstract syntax tree of the instruction operation.

    +
    @@ -864,27 +1686,13 @@

  • - (String) - - - - — -
    -

    the extension that defines this instruction

    -
    - -
  • - -
  • - - - (Array<String>) + (FunctionBodyAst)
    -

    the extensions that define this instruction

    +

    The abstract syntax tree of the instruction operation

  • @@ -897,37 +1705,49 @@

     
     
    -1109
    -1110
    -1111
    -1112
    -1113
    -1114
    -1115
    -1116
    -1117
    +994 +995 +996 +997 +998 +999 +1000 +1001 +1002 +1003 +1004 +1005 +1006 +1007 +1008

    -
    # File 'lib/arch_def.rb', line 1109
    -
    -def extension
    -  @data["definedBy"]
    -  # parts = @data["extension"][0].split("_")
    -  # if @data["definedBy"].is_a?(String)
    -  #   parts[1].capitalize
    -  # else
    -  #   parts[1..].map(&:capitalize)
    -  # end
    -end
    +
    # File 'lib/arch_def.rb', line 994
    +
    +def operation_ast(idl_compiler)
    +  return @operation_ast unless @operation_ast.nil?
    +  return nil if @data["operation()"].nil?
    +
    +  # now, parse the operation
    +
    +  @operation_ast = idl_compiler.compile_inst_operation(
    +    self,
    +    input_file: "Instruction #{name}"
    +  )
    +
    +  raise "unexpected #{@operation_ast.class}" unless @operation_ast.is_a?(Idl::FunctionBodyAst)
    +
    +  @operation_ast
    +end
    -

    +

    - #multi_encoding?Boolean + #pruned_operation_ast(global_symtab) ⇒ Idl::FunctionBodyAst @@ -936,26 +1756,46 @@

    -

    Returns whether or not this instruction has different encodings depending on XLEN.

    +

    Returns A pruned abstract syntax tree.

    +

    Parameters:

    +
      + +
    • + + global_symtab + + + (Idl::SymbolTable) + + + + — +
      +

      Symbol table with global scope populated and a configuration loaded

      +
      + +
    • +
    +

    Returns:

    • - (Boolean) + (Idl::FunctionBodyAst)
      -

      whether or not this instruction has different encodings depending on XLEN

      +

      A pruned abstract syntax tree

    • @@ -968,15 +1808,19 @@

       
       
      -1048
      -1049
      -1050
      +896 +897 +898 +899 +900

    -
    # File 'lib/arch_def.rb', line 1048
    +      
    # File 'lib/arch_def.rb', line 896
     
    -def multi_encoding?
    -  @data.key?("encoding") && @data["encoding"].key?("RV32")
    +def pruned_operation_ast(global_symtab)
    +  type_check_operation(global_symtab)
    +  puts "PRUNING        #{name}"
    +  operation_ast(global_symtab.archdef.idl_compiler).prune(fill_symtab(global_symtab))
     end
    @@ -984,9 +1828,9 @@

    -

    +

    - #operation_astIdl::AstNode + #rv32?Boolean @@ -995,7 +1839,7 @@

    -

    Returns Abstract syntax tree of the instruction operation().

    +

    Returns whether or not this instruction is defined for RV32.

    @@ -1008,13 +1852,13 @@

  • - (Idl::AstNode) + (Boolean)
    -

    Abstract syntax tree of the instruction operation()

    +

    whether or not this instruction is defined for RV32

  • @@ -1027,19 +1871,15 @@

     
     
    -867
    -868
    -869
    -870
    -871
    +1055 +1056 +1057

    -
    # File 'lib/arch_def.rb', line 867
    +      
    # File 'lib/arch_def.rb', line 1055
     
    -def operation_ast
    -  parse_operation(@sym_table) if @operation_ast.nil?
    -
    -  @operation_ast
    +def rv32?
    +  !@data.key?("base") || base == 32
     end
    @@ -1047,9 +1887,9 @@

    -

    +

    - #operation_sourceString + #rv64?Boolean @@ -1058,7 +1898,7 @@

    -

    Returns The operation() IDL code.

    +

    Returns whether or not this instruction is defined for RV64.

    @@ -1071,13 +1911,13 @@

  • - (String) + (Boolean)
    -

    The operation() IDL code

    +

    whether or not this instruction is defined for RV64

  • @@ -1090,81 +1930,102 @@

     
     
    -1053
    -1054
    -1055
    -1056
    -1057
    -1058
    +1060 +1061 +1062

    -
    # File 'lib/arch_def.rb', line 1053
    +      
    # File 'lib/arch_def.rb', line 1060
     
    -def operation_source
    -  return "" if @data["operation()"].nil?
    -
    -  operation_ast.gen_adoc.gsub("{{", '\((')
    -  # @data['operation']
    -end
    +def rv64? + !@data.key?("base") || base == 64 +end
    -

    +

    + + #type_check_operation(global_symtab) ⇒ Object + + - #pruned_operation_astObject + +

    +
    + +

    type check the instruction operation in the context of symtab

    + +
    +
    +
    +

    Parameters:

    +
      + +
    • + + global_symtab + + + (Idl::SymbolTable) + + + + — +
      +

      A symbol table with global scope populated

      +
      + +
    • +
    +

    Raises:

    +
      + +
    • + + + + + + + +
      +

      Idl::AstNode::TypeError if there is a type problem

      +
      + +
    • -

    + + +
    @@ -1235,31 +2096,31 @@

     
     
    -1128
    -1129
    -1130
    -1131
    -1132
    -1133
    -1134
    -1135
    -1136
    -1137
    -1138
    -1139
    -1140
    -1141
    +1039 +1040 +1041 +1042 +1043 +1044 +1045 +1046 +1047 +1048 +1049 +1050 +1051 +1052

     
     
    -873
    -874
    -875
    -876
    -877
    -878
    -879
    -880
    -881
    -882
    -883
    -884
    -885
     886
     887
     888
     889
    -890
    +890 +891 +892
    -
    # File 'lib/arch_def.rb', line 873
    -
    -def pruned_operation_ast
    -  return @pruned_operation_ast unless @pruned_operation_ast.nil?
    -
    -  cloned_symtab = @sym_table.deep_clone(clone_values: true)
    -  cloned_symtab.push
    -
    -  @encodings[@arch_def.config_params["XLEN"]].decode_variables.each do |d|
    -    qualifiers = []
    -    qualifiers << :signed if d.sext?
    -    width = d.size
    -
    -    var = Idl::Var.new(d.name, Idl::Type.new(:bits, qualifiers:, width:), decode_var: true)
    -    cloned_symtab.add(d.name, var)
    -  end
    -
    -  puts "PRUNING        #{name}"
    -  @pruned_operation_ast = operation_ast.prune(cloned_symtab)
    +      
    # File 'lib/arch_def.rb', line 886
    +
    +def type_check_operation(global_symtab)
    +  global_symtab.archdef.idl_compiler.type_check(
    +    operation_ast(global_symtab.archdef.idl_compiler),
    +    fill_symtab(global_symtab),
    +    "#{name}.operation()"
    +  )
     end
    -
    # File 'lib/arch_def.rb', line 1128
    +      
    # File 'lib/arch_def.rb', line 1039
     
     def wavedrom_desc(base)
       desc = {
         "reg" => []
       }
     
    -  display_fields = @encodings[base].opcode_fields
    -  display_fields += @encodings[base].decode_variables.map(&:grouped_encoding_fields).flatten
    +  display_fields = encoding(base).opcode_fields
    +  display_fields += encoding(base).decode_variables.map(&:grouped_encoding_fields).flatten
     
       display_fields.sort { |a, b| b.range.last <=> a.range.last }.reverse.each do |e|
         desc["reg"] << { "bits" => e.range.size, "name" => e.name, "type" => (e.opcode? ? 2 : 4) }
    @@ -1277,7 +2138,7 @@ 

    diff --git a/docs/ruby/Instruction/Encoding.html b/docs/ruby/Instruction/Encoding.html index 6fb6e3b78..1988b8d74 100644 --- a/docs/ruby/Instruction/Encoding.html +++ b/docs/ruby/Instruction/Encoding.html @@ -345,16 +345,6 @@

     
     
    -937
    -938
    -939
    -940
    -941
    -942
    -943
    -944
    -945
    -946
     947
     948
     949
    @@ -363,10 +353,20 @@ 

    952 953 954 -955

    +955 +956 +957 +958 +959 +960 +961 +962 +963 +964 +965

    -
    # File 'lib/arch_def.rb', line 937
    +      
    # File 'lib/arch_def.rb', line 947
     
     def initialize(format, decode_vars)
       @format = format
    @@ -383,7 +383,7 @@ 

    end @decode_variables = [] - decode_vars.each do |var| + decode_vars&.each do |var| @decode_variables << DecodeVariable.new(self, var) end end

    @@ -443,12 +443,12 @@

     
     
    -908
    -909
    -910
    +918 +919 +920

    -
    # File 'lib/arch_def.rb', line 908
    +      
    # File 'lib/arch_def.rb', line 918
     
     def decode_variables
       @decode_variables
    @@ -516,12 +516,12 @@ 

     
     
    -900
    -901
    -902
    +910 +911 +912

    -
    # File 'lib/arch_def.rb', line 900
    +      
    # File 'lib/arch_def.rb', line 910
     
     def format
       @format
    @@ -589,12 +589,12 @@ 

     
     
    -905
    -906
    -907
    +915 +916 +917

    -
    # File 'lib/arch_def.rb', line 905
    +      
    # File 'lib/arch_def.rb', line 915
     
     def opcode_fields
       @opcode_fields
    @@ -655,12 +655,12 @@ 

     
     
    -958
    -959
    -960
    +968 +969 +970

    -
    # File 'lib/arch_def.rb', line 958
    +      
    # File 'lib/arch_def.rb', line 968
     
     def size
       @format.size
    @@ -675,7 +675,7 @@ 

    diff --git a/docs/ruby/Instruction/Encoding/Field.html b/docs/ruby/Instruction/Encoding/Field.html index 94f3769cb..7ed0989ab 100644 --- a/docs/ruby/Instruction/Encoding/Field.html +++ b/docs/ruby/Instruction/Encoding/Field.html @@ -306,13 +306,13 @@

     
     
    -924
    -925
    -926
    -927
    +934 +935 +936 +937

    -
    # File 'lib/arch_def.rb', line 924
    +      
    # File 'lib/arch_def.rb', line 934
     
     def initialize(name, range)
       @name = name.to_s
    @@ -393,12 +393,12 @@ 

     
     
    -917
    -918
    -919
    +927 +928 +929

    -
    # File 'lib/arch_def.rb', line 917
    +      
    # File 'lib/arch_def.rb', line 927
     
     def name
       @name
    @@ -454,12 +454,12 @@ 

     
     
    -920
    -921
    -922
    +930 +931 +932

    -
    # File 'lib/arch_def.rb', line 920
    +      
    # File 'lib/arch_def.rb', line 930
     
     def range
       @range
    @@ -520,12 +520,12 @@ 

     
     
    -930
    -931
    -932
    +940 +941 +942

    -
    # File 'lib/arch_def.rb', line 930
    +      
    # File 'lib/arch_def.rb', line 940
     
     def opcode?
       name.match?(/^[01]+$/)
    @@ -540,7 +540,7 @@ 

    diff --git a/docs/ruby/MockArchDef.html b/docs/ruby/MockArchDef.html new file mode 100644 index 000000000..1d631e21a --- /dev/null +++ b/docs/ruby/MockArchDef.html @@ -0,0 +1,245 @@ + + + + + + + Class: MockArchDef + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Class: MockArchDef + + + +

    +
    + +
    +
    Inherits:
    +
    + Object + +
      +
    • Object
    • + + + +
    + show all + +
    +
    + + + + + + + + + + + +
    +
    Defined in:
    +
    lib/idl/tests/helpers.rb
    +
    + +
    + +

    Overview

    +
    + +

    ArchDef mock that knows about XLEN and extensions

    + + +
    +
    +
    + + +
    + + + + + + + +

    + Instance Method Summary + collapse +

    + + + + + + +
    +

    Instance Method Details

    + + +
    +

    + + #config_paramsObject + + + + + +

    + + + + +
    +
    +
    +
    +13
    +
    +
    # File 'lib/idl/tests/helpers.rb', line 13
    +
    +def config_params = { "XLEN" => 32 }
    +
    +
    + +
    +

    + + #extensionsObject + + + + + +

    + + + + +
    +
    +
    +
    +14
    +
    +
    # File 'lib/idl/tests/helpers.rb', line 14
    +
    +def extensions = [MockExtension.new("I")]
    +
    +
    + +
    + +
    + + + +
    + + \ No newline at end of file diff --git a/docs/ruby/MockExtension.html b/docs/ruby/MockExtension.html new file mode 100644 index 000000000..84065ad6f --- /dev/null +++ b/docs/ruby/MockExtension.html @@ -0,0 +1,296 @@ + + + + + + + Class: MockExtension + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Class: MockExtension + + + +

    +
    + +
    +
    Inherits:
    +
    + Object + +
      +
    • Object
    • + + + +
    + show all + +
    +
    + + + + + + + + + + + +
    +
    Defined in:
    +
    lib/idl/tests/helpers.rb
    +
    + +
    + +

    Overview

    +
    + +

    Extension mock that returns an extension name

    + + +
    +
    +
    + + +
    + + + +

    Instance Attribute Summary collapse

    +
      + +
    • + + + #name ⇒ Object + + + + + + + + + readonly + + + + + + + + + +
      +

      Returns the value of attribute name.

      +
      + +
    • + + +
    + + + + + +

    + Instance Method Summary + collapse +

    + + + + +
    +

    Constructor Details

    + +
    +

    + + #initialize(name) ⇒ MockExtension + + + + + +

    +
    + +

    Returns a new instance of MockExtension.

    + + +
    +
    +
    + + +
    + + + + +
    +
    +
    +
    +6
    +7
    +8
    +
    +
    # File 'lib/idl/tests/helpers.rb', line 6
    +
    +def initialize(name)
    +  @name = name
    +end
    +
    +
    + +
    + +
    +

    Instance Attribute Details

    + + + +
    +

    + + #nameObject (readonly) + + + + + +

    +
    + +

    Returns the value of attribute name.

    + + +
    +
    +
    + + +
    + + + + +
    +
    +
    +
    +5
    +6
    +7
    +
    +
    # File 'lib/idl/tests/helpers.rb', line 5
    +
    +def name
    +  @name
    +end
    +
    +
    + +
    + + +
    + + + +
    + + \ No newline at end of file diff --git a/docs/ruby/Opcodes.html b/docs/ruby/Opcodes.html index 3c63f19e2..8699c1e95 100644 --- a/docs/ruby/Opcodes.html +++ b/docs/ruby/Opcodes.html @@ -408,16 +408,16 @@

     
     
    -607
    -608
    -609
    -610
    -611
    -612
    -613
    +614 +615 +616 +617 +618 +619 +620

    -
    # File 'lib/opcodes.rb', line 607
    +      
    # File 'lib/opcodes.rb', line 614
     
     def self.insn_table
       return @insn_table unless @insn_table.nil?
    @@ -436,7 +436,7 @@ 

    diff --git a/docs/ruby/RiscvOpcodes.html b/docs/ruby/RiscvOpcodes.html index 0086f6a41..d723ab3ad 100644 --- a/docs/ruby/RiscvOpcodes.html +++ b/docs/ruby/RiscvOpcodes.html @@ -370,7 +370,7 @@

    diff --git a/docs/ruby/TestExpressions.html b/docs/ruby/TestExpressions.html new file mode 100644 index 000000000..35663d586 --- /dev/null +++ b/docs/ruby/TestExpressions.html @@ -0,0 +1,613 @@ + + + + + + + Class: TestExpressions + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Class: TestExpressions + + + +

    +
    + +
    +
    Inherits:
    +
    + Minitest::Test + +
      +
    • Object
    • + + + + + +
    + show all + +
    +
    + + + + + + +
    +
    Includes:
    +
    TestMixin
    +
    + + + + + + +
    +
    Defined in:
    +
    lib/idl/tests/test_expressions.rb
    +
    + +
    + +

    Overview

    +
    + +

    Test IDL expressions

    + + +
    +
    +
    + + +
    + + + + + + + +

    + Instance Method Summary + collapse +

    + + + + + + + + + +
    +

    Instance Method Details

    + + +
    +

    + + #setupObject + + + + + + + Originally defined in module + TestMixin + + +

    +
    + +
    +

    + + #test_that_integer_literals_give_correct_valuesObject + + + + + +

    + + + + +
    +
    +
    +
    +48
    +49
    +50
    +51
    +52
    +53
    +54
    +55
    +56
    +57
    +58
    +59
    +60
    +61
    +62
    +63
    +64
    +65
    +66
    +67
    +68
    +69
    +70
    +71
    +72
    +73
    +74
    +75
    +76
    +77
    +78
    +79
    +80
    +81
    +82
    +83
    +84
    +85
    +86
    +87
    +88
    +89
    +90
    +91
    +92
    +93
    +94
    +95
    +96
    +97
    +98
    +99
    +100
    +101
    +102
    +103
    +104
    +105
    +106
    +107
    +108
    +109
    +110
    +111
    +112
    +113
    +114
    +115
    +116
    +117
    +118
    +119
    +120
    +121
    +122
    +123
    +124
    +125
    +126
    +127
    +
    +
    # File 'lib/idl/tests/test_expressions.rb', line 48
    +
    +def test_that_integer_literals_give_correct_values
    +  idl = "8'd13"
    +  ast = @compiler.compile_expression(idl, @symtab)
    +  assert_equal 13, ast.value(@symtab)
    +
    +  idl = "16'hd"
    +  ast = @compiler.compile_expression(idl, @symtab)
    +  assert_equal 13, ast.value(@symtab)
    +
    +  idl = "12'o15"
    +  ast = @compiler.compile_expression(idl, @symtab)
    +  assert_equal 13, ast.value(@symtab)
    +
    +  idl = "4'b1101"
    +  ast = @compiler.compile_expression(idl, @symtab)
    +  assert_equal 13, ast.value(@symtab)
    +
    +  idl = "-8'sd13"
    +  ast = @compiler.compile_expression(idl, @symtab)
    +  assert_equal(-13, ast.value(@symtab))
    +
    +  idl = "-16'shd"
    +  ast = @compiler.compile_expression(idl, @symtab)
    +  assert_equal(-13, ast.value(@symtab))
    +
    +  idl = "-12'so15"
    +  ast = @compiler.compile_expression(idl, @symtab)
    +  assert_equal(-13, ast.value(@symtab))
    +
    +  idl = "-4'sb1101"
    +  ast = @compiler.compile_expression(idl, @symtab)
    +  assert_equal 3, ast.value(@symtab)
    +
    +  idl = "4'sb1101"
    +  ast = @compiler.compile_expression(idl, @symtab)
    +  assert_equal(-3, ast.value(@symtab))
    +
    +  idl = "32'h80000000"
    +  ast = @compiler.compile_expression(idl, @symtab)
    +  assert_equal 0x80000000, ast.value(@symtab)
    +
    +  idl = "32'h8000_0000"
    +  ast = @compiler.compile_expression(idl, @symtab)
    +  assert_equal 0x80000000, ast.value(@symtab)
    +
    +  idl = "8'13"
    +  ast = @compiler.compile_expression(idl, @symtab)
    +  assert_equal 13, ast.value(@symtab)
    +
    +  # 13 decimal, unsigned XLEN-bit wide
    +  idl = "'13"
    +  ast = @compiler.compile_expression(idl, @symtab)
    +  assert_equal 13, ast.value(@symtab)
    +
    +  # 13 decimal, signed XLEN-bit wide
    +  idl = "'s13"
    +  ast = @compiler.compile_expression(idl, @symtab)
    +  assert_equal 13, ast.value(@symtab)
    +
    +  # compilation error: 300 does not fit in 8 bits
    +  idl = "'h1_0000_0000"
    +  assert_raises(Idl::AstNode::TypeError) { @compiler.compile_expression(idl, @symtab, pass_error: true) }
    +
    +  # 3 decimal: the literal is 13, unsigned, in 4-bits. when negated, the sign bit is lost
    +  idl = "-4'd13"
    +  ast = @compiler.compile_expression(idl, @symtab)
    +  assert_equal 3, ast.value(@symtab)
    +
    +  # compilation error: 300 does not fit in 8 bits
    +  idl = "8'sd300"
    +  assert_raises(Idl::AstNode::TypeError) { @compiler.compile_expression(idl, @symtab, pass_error: true) }
    +
    +  # compilation error: bit width must be positive
    +  idl = "0'15"
    +  assert_raises(Idl::AstNode::TypeError) { @compiler.compile_expression(idl, @symtab, pass_error: true) }
    +
    +  # compilation error: value does not fit in four bita
    +  idl = "4'hff"
    +  assert_raises(Idl::AstNode::TypeError) { @compiler.compile_expression(idl, @symtab, pass_error: true) }
    +end
    +
    +
    + +
    +

    + + #test_that_multplication_is_higher_precedence_than_additionObject + + + + + +

    + + + + +
    +
    +
    +
    +38
    +39
    +40
    +41
    +42
    +43
    +44
    +45
    +46
    +
    +
    # File 'lib/idl/tests/test_expressions.rb', line 38
    +
    +def test_that_multplication_is_higher_precedence_than_addition
    +  idl = <<~IDL.strip
    +    4 + 5'd3 * 2
    +  IDL
    +
    +  ast = @compiler.compile_expression(idl, @symtab)
    +  refute_equal 14, ast.value(@symtab)
    +  assert_equal 10, ast.value(@symtab)
    +end
    +
    +
    + +
    +

    + + #test_that_operators_are_left_recusriveObject + + + + + +

    + + + + +
    +
    +
    +
    +12
    +13
    +14
    +15
    +16
    +17
    +18
    +19
    +20
    +
    +
    # File 'lib/idl/tests/test_expressions.rb', line 12
    +
    +def test_that_operators_are_left_recusrive
    +  idl = <<~IDL.strip
    +    4 - 3 - 1
    +  IDL
    +
    +  ast = @compiler.compile_expression(idl, @symtab)
    +  assert_equal 0, ast.value(@symtab)
    +  assert_equal "((4 - 3) - 1)", ast.to_idl
    +end
    +
    +
    + +
    +

    + + #test_that_values_are_tuncatedObject + + + + + +

    + + + + +
    +
    +
    +
    +22
    +23
    +24
    +25
    +26
    +27
    +28
    +29
    +30
    +31
    +32
    +33
    +34
    +35
    +36
    +
    +
    # File 'lib/idl/tests/test_expressions.rb', line 22
    +
    +def test_that_values_are_tuncated
    +  idl = <<~IDL.strip
    +    4'hf + 4'h1
    +  IDL
    +
    +  ast = @compiler.compile_expression(idl, @symtab)
    +  assert_equal 0, ast.value(@symtab)
    +
    +  idl = <<~IDL.strip
    +    4'hf + 5'h1
    +  IDL
    +
    +  ast = @compiler.compile_expression(idl, @symtab)
    +  assert_equal 16, ast.value(@symtab)
    +end
    +
    +
    + +
    + +
    + + + +
    + + \ No newline at end of file diff --git a/docs/ruby/TestMixin.html b/docs/ruby/TestMixin.html new file mode 100644 index 000000000..eeaf1a5f0 --- /dev/null +++ b/docs/ruby/TestMixin.html @@ -0,0 +1,183 @@ + + + + + + + Module: TestMixin + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Module: TestMixin + + + +

    +
    + + + + + + + + + +
    +
    Included in:
    +
    TestExpressions, TestVariables
    +
    + + + +
    +
    Defined in:
    +
    lib/idl/tests/helpers.rb
    +
    + +
    + + + + + + + + + +

    + Instance Method Summary + collapse +

    + + + + + + +
    +

    Instance Method Details

    + + +
    +

    + + #setupObject + + + + + +

    + + + + +
    +
    +
    +
    +18
    +19
    +20
    +21
    +22
    +
    +
    # File 'lib/idl/tests/helpers.rb', line 18
    +
    +def setup
    +  @archdef = MockArchDef.new
    +  @symtab = Idl::SymbolTable.new(@archdef)
    +  @compiler = Idl::Compiler.new(@archdef)
    +end
    +
    +
    + +
    + +
    + + + +
    + + \ No newline at end of file diff --git a/docs/ruby/TestVariables.html b/docs/ruby/TestVariables.html new file mode 100644 index 000000000..c433f2b58 --- /dev/null +++ b/docs/ruby/TestVariables.html @@ -0,0 +1,269 @@ + + + + + + + Class: TestVariables + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Class: TestVariables + + + +

    +
    + +
    +
    Inherits:
    +
    + Minitest::Test + +
      +
    • Object
    • + + + + + +
    + show all + +
    +
    + + + + + + +
    +
    Includes:
    +
    TestMixin
    +
    + + + + + + +
    +
    Defined in:
    +
    lib/idl/tests/test_variables.rb
    +
    + +
    + +

    Overview

    +
    + +

    test IDL variables

    + + +
    +
    +
    + + +
    + + + + + + + +

    + Instance Method Summary + collapse +

    + + + + + + + + + +
    +

    Instance Method Details

    + + +
    +

    + + #setupObject + + + + + + + Originally defined in module + TestMixin + + +

    +
    + +
    +

    + + #test_that_constants_are_read_onlyObject + + + + + +

    + + + + +
    +
    +
    +
    +12
    +13
    +14
    +15
    +16
    +17
    +18
    +19
    +20
    +21
    +
    +
    # File 'lib/idl/tests/test_variables.rb', line 12
    +
    +def test_that_constants_are_read_only
    +  idl = <<~IDL.strip
    +    XReg MyConstant = 15;
    +    MyContant = 0;
    +  IDL
    +
    +  assert_raises(Idl::AstNode::TypeError) do
    +    @compiler.compile_func_body(idl, symtab: @symtab, no_rescue: true)
    +  end
    +end
    +
    +
    + +
    + +
    + + + +
    + + \ No newline at end of file diff --git a/docs/ruby/Treetop.html b/docs/ruby/Treetop.html index e30fd1d4f..8a88384f5 100644 --- a/docs/ruby/Treetop.html +++ b/docs/ruby/Treetop.html @@ -118,7 +118,7 @@

    Overview

    diff --git a/docs/ruby/Treetop/Runtime.html b/docs/ruby/Treetop/Runtime.html index d8c41d287..797bbcecf 100644 --- a/docs/ruby/Treetop/Runtime.html +++ b/docs/ruby/Treetop/Runtime.html @@ -107,7 +107,7 @@

    Defined Under Namespace

    diff --git a/docs/ruby/Treetop/Runtime/CompiledParser.html b/docs/ruby/Treetop/Runtime/CompiledParser.html index daff675d5..6e8e82637 100644 --- a/docs/ruby/Treetop/Runtime/CompiledParser.html +++ b/docs/ruby/Treetop/Runtime/CompiledParser.html @@ -405,7 +405,7 @@

    diff --git a/docs/ruby/Treetop/Runtime/SyntaxNode.html b/docs/ruby/Treetop/Runtime/SyntaxNode.html index 5c9886a39..ae31bf960 100644 --- a/docs/ruby/Treetop/Runtime/SyntaxNode.html +++ b/docs/ruby/Treetop/Runtime/SyntaxNode.html @@ -95,7 +95,7 @@
    Defined in:
    lib/idl/ast.rb,
    - lib/idl/passes/prune.rb,
    lib/idl/passes/gen_adoc.rb,
    lib/idl/passes/find_return_values.rb
    + lib/idl/passes/prune.rb,
    lib/idl/passes/find_return_values.rb
    @@ -114,7 +114,7 @@

    Overview

    @@ -210,28 +210,6 @@

    The first ancestor that is_a?(klass), or nil if none is found.

    - - - -
  • - - - #gen_adoc(indent = 0, indent_spaces: 2) ⇒ Object - - - - - - - - - - - - - -
    -
  • @@ -502,9 +480,6 @@

     
     
    -75
    -76
    -77
     78
     79
     80
    @@ -524,10 +499,13 @@ 

    94 95 96 -97

    +97 +98 +99 +100

    -
    # File 'lib/idl/ast.rb', line 75
    +      
    # File 'lib/idl/ast.rb', line 78
     
     def clone
       new_elements = nil
    @@ -601,18 +579,18 @@ 

     
     
    -64
    -65
    -66
     67
     68
     69
     70
     71
    -72
    +72 +73 +74 +75

    -
    # File 'lib/idl/ast.rb', line 64
    +      
    # File 'lib/idl/ast.rb', line 67
     
     def find_ancestor(klass)
       if parent.nil?
    @@ -626,52 +604,6 @@ 

    - - -
    -

    - - #gen_adoc(indent = 0, indent_spaces: 2) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -4
    -5
    -6
    -7
    -8
    -9
    -10
    -11
    -12
    -13
    -14
    -
    -
    # File 'lib/idl/passes/gen_adoc.rb', line 4
    -
    -def gen_adoc(indent = 0, indent_spaces: 2)
    -  if terminal?
    -    text_value
    -  else
    -    adoc = []
    -    elements.each do |e|
    -      adoc << e.gen_adoc(indent, indent_spaces:)
    -    end
    -    adoc.map{ |a| "#{' '*indent}#{a}" }.join('')
    -  end
    -end
    -
    @@ -848,12 +780,12 @@

     
     
    -59
    -60
    -61
    +62 +63 +64 -
    # File 'lib/idl/ast.rb', line 59
    +      
    # File 'lib/idl/ast.rb', line 62
     
     def lineno
       input[0..interval.first].count("\n") + 1 + (@starting_line.nil? ? 0 : @starting_line)
    @@ -983,19 +915,23 @@ 

    30 31 32 -33

    +33 +34 +35
    # File 'lib/idl/passes/prune.rb', line 11
     
     def prune(symtab)
    -
       new_elements = elements.nil? ? [] : elements.map { |e| e.prune(symtab) }
    -  new_node = self.class.new(input, interval, new_elements)
    -  extension_modules.each do |m|
    -    new_node.extend m
    -  end
    -
    +  new_node = clone # self.class.new(input, interval, new_elements)
    +  new_node.elements.clear
    +  new_node.elements.concat(new_elements)
    +
    +  # extension_modules.each do |m|
    +    # new_node.extend m
    +  # end
    +
       if is_a?(Idl::AstNode)
         begin
           if new_node.is_a?(Idl::Declaration)
    @@ -1005,8 +941,8 @@ 

    new_node.execute(symtab) # to update values end rescue Idl::AstNode::ValueError - new_node.type_check(symtab) - end + # new_node.type_check(symtab) + end end new_node @@ -1084,7 +1020,10 @@

    53 54 55 -56

    +56 +57 +58 +59
    # File 'lib/idl/ast.rb', line 52
    @@ -1092,6 +1031,9 @@ 

    def set_input_file(filename, starting_line = 0) @input_file = filename @starting_line = starting_line + elements.nil? || elements.length.times do |i| + elements[i].set_input_file(filename, starting_line) + end raise "?" if @starting_line.nil? end

    @@ -1185,7 +1127,7 @@

    diff --git a/docs/ruby/Validator.html b/docs/ruby/Validator.html index 6d3d348d7..1ea0c8632 100644 --- a/docs/ruby/Validator.html +++ b/docs/ruby/Validator.html @@ -655,7 +655,7 @@

    diff --git a/docs/ruby/Validator/SchemaError.html b/docs/ruby/Validator/SchemaError.html index 1dc80af7d..f425aae4c 100644 --- a/docs/ruby/Validator/SchemaError.html +++ b/docs/ruby/Validator/SchemaError.html @@ -299,7 +299,7 @@

    diff --git a/docs/ruby/Validator/ValidationError.html b/docs/ruby/Validator/ValidationError.html index b250ee573..23f18055c 100644 --- a/docs/ruby/Validator/ValidationError.html +++ b/docs/ruby/Validator/ValidationError.html @@ -369,7 +369,7 @@

    diff --git a/docs/ruby/_index.html b/docs/ruby/_index.html index 51e34c8b3..d57ba1be3 100644 --- a/docs/ruby/_index.html +++ b/docs/ruby/_index.html @@ -130,6 +130,13 @@

    Namespace Listing A-Z

    +
  • + AryElementAssignmentSyntaxNode + + (Idl) + +
  • +
  • AryRangeAccessAst @@ -216,21 +223,35 @@

    Namespace Listing A-Z

  • - BitsTypeAst + BuiltinEnumDefinitionAst (Idl)
  • - BuiltinEnumDefinitionAst + BuiltinTypeNameAst (Idl)
  • - BuiltinTypeNameAst + BuiltinTypeNameSyntaxNode + + (Idl) + +
  • + +
  • + BuiltinVariableAst + + (Idl) + +
  • + +
  • + BuiltinVariableSyntaxNode (Idl) @@ -377,6 +398,13 @@

    Namespace Listing A-Z

  • +
  • + DontCareReturnSyntaxNode + + (Idl) + +
  • +
  • DuplicateSymError @@ -425,6 +453,13 @@

    Namespace Listing A-Z

  • +
  • + EnumRefSyntaxNode + + (Idl) + +
  • +
  • EnumerationType @@ -451,6 +486,11 @@

    Namespace Listing A-Z

  • +
  • + ExtensionRequirement + +
  • +
  • ExtensionVersion @@ -492,6 +532,13 @@

    Namespace Listing A-Z

  • +
  • + ForLoopSyntaxNode + + (Idl) + +
  • +
  • FunctionBodyAst @@ -514,14 +561,14 @@

    Namespace Listing A-Z

  • - FunctionDefAst + FunctionCallExpressionSyntaxNode (Idl)
  • - FunctionStatementAst + FunctionDefAst (Idl) @@ -574,6 +621,13 @@

    Namespace Listing A-Z

  • +
  • + IdSyntaxNode + + (Idl) + +
  • +
  • Idl @@ -613,7 +667,21 @@

    Namespace Listing A-Z

  • - IntAst + InstructionOperationSyntaxNode + + (Idl) + +
  • + +
  • + IntLiteralAst + + (Idl) + +
  • + +
  • + IntLiteralSyntaxNode (Idl) @@ -642,16 +710,12 @@

    Namespace Listing A-Z

    @@ -977,7 +1086,7 @@

    Namespace Listing A-Z

    diff --git a/docs/ruby/class_list.html b/docs/ruby/class_list.html index 78c80de55..6c9b08234 100644 --- a/docs/ruby/class_list.html +++ b/docs/ruby/class_list.html @@ -43,7 +43,7 @@

    Class List

    diff --git a/docs/ruby/file.README.html b/docs/ruby/file.README.html index d3a335528..5be12bc75 100644 --- a/docs/ruby/file.README.html +++ b/docs/ruby/file.README.html @@ -224,7 +224,7 @@

    More info

    diff --git a/docs/ruby/index.html b/docs/ruby/index.html index acba22041..990e16bdd 100644 --- a/docs/ruby/index.html +++ b/docs/ruby/index.html @@ -224,7 +224,7 @@

    More info

    diff --git a/docs/ruby/method_list.html b/docs/ruby/method_list.html index f032dbe58..25dc25cdb 100644 --- a/docs/ruby/method_list.html +++ b/docs/ruby/method_list.html @@ -253,14 +253,6 @@

    Method List

  • -
    - #arch_def - ExtensionVersion -
    -
  • - - -
  • #archdef Idl::SymbolTable @@ -268,7 +260,7 @@

    Method List

  • -
  • +
  • #arg_nodes Idl::FunctionCallExpressionAst @@ -276,7 +268,7 @@

    Method List

  • -
  • +
  • #argument_name Idl::FunctionType @@ -284,7 +276,7 @@

    Method List

  • -
  • +
  • #argument_type Idl::FunctionType @@ -292,7 +284,7 @@

    Method List

  • -
  • +
  • #arguments Idl::FunctionDefAst @@ -300,7 +292,7 @@

    Method List

  • -
  • +
  • #arguments Idl::Type @@ -308,7 +300,7 @@

    Method List

  • -
  • +
  • #arguments_list_str Idl::FunctionDefAst @@ -316,7 +308,7 @@

    Method List

  • -
  • +
  • #ary? Idl::Type @@ -324,7 +316,7 @@

    Method List

  • -
  • +
  • #ary_type Idl::Type @@ -332,7 +324,7 @@

    Method List

  • -
  • +
  • #base32_only? CsrField @@ -340,7 +332,7 @@

    Method List

  • -
  • +
  • #base64_only? CsrField @@ -348,7 +340,7 @@

    Method List

  • -
  • +
  • #bf_type Idl::FieldAssignmentAst @@ -356,7 +348,7 @@

    Method List

  • -
  • +
  • #bitfields Idl::IsaAst @@ -364,7 +356,7 @@

    Method List

  • -
  • +
  • #bits DecodeVariable @@ -372,7 +364,7 @@

    Method List

  • -
  • +
  • #bits DecodeField @@ -380,7 +372,7 @@

    Method List

  • -
  • +
  • #body Idl::FunctionDefAst @@ -388,7 +380,7 @@

    Method List

  • -
  • +
  • #body Idl::ElseIfAst @@ -396,7 +388,7 @@

    Method List

  • -
  • +
  • #body Idl::FunctionType @@ -404,7 +396,7 @@

    Method List

  • -
  • +
  • #bt Idl::AstNode::TypeError @@ -412,7 +404,7 @@

    Method List

  • -
  • +
  • #bt Idl::AstNode::InternalError @@ -420,7 +412,7 @@

    Method List

  • -
  • +
  • #builtin? Idl::FunctionDefAst @@ -428,7 +420,7 @@

    Method List

  • -
  • +
  • #builtin? Idl::FunctionType @@ -436,7 +428,7 @@

    Method List

  • -
  • +
  • #check_extension_dependencies ArchGen @@ -444,7 +436,7 @@

    Method List

  • -
  • +
  • #children Idl::AstNodeFuncs @@ -452,7 +444,7 @@

    Method List

  • -
  • +
  • #children Idl::IsaAst @@ -460,6 +452,14 @@

    Method List

  • +
  • +
    + #class_name + Idl::EnumRefAst +
    +
  • + +
  • #clone @@ -582,21 +582,29 @@

    Method List

  • - #config_params - ArchDef + #condition + Idl::ForLoopAst
  • - #config_params - TestExpressions::MockArchDef + #config_params + ArchDef
  • +
    + #config_params + MockArchDef +
    +
  • + + +
  • #const? Idl::Type @@ -604,7 +612,7 @@

    Method List

  • -
  • +
  • #const? Idl::Var @@ -612,7 +620,7 @@

    Method List

  • -
  • +
  • #convertable_to? Idl::Type @@ -620,7 +628,7 @@

    Method List

  • -
  • +
  • #csr ArchDef @@ -628,7 +636,7 @@

    Method List

  • -
  • +
  • #csr Idl::CsrType @@ -636,7 +644,7 @@

    Method List

  • -
  • +
  • #csr_def Idl::CsrFieldReadExpressionAst @@ -644,7 +652,7 @@

    Method List

  • -
  • +
  • #csr_def Idl::CsrReadExpressionAst @@ -652,7 +660,7 @@

    Method List

  • -
  • +
  • #csr_def Idl::CsrSoftwareReadAst @@ -660,7 +668,7 @@

    Method List

  • -
  • +
  • #csr_def Idl::CsrWriteAst @@ -668,7 +676,7 @@

    Method List

  • -
  • +
  • #csr_hash ArchDef @@ -676,7 +684,7 @@

    Method List

  • -
  • +
  • #csr_known? Idl::CsrReadExpressionAst @@ -684,7 +692,7 @@

    Method List

  • -
  • +
  • #csr_known? Idl::CsrSoftwareWriteAst @@ -692,7 +700,7 @@

    Method List

  • -
  • +
  • #csr_known? Idl::CsrSoftwareReadAst @@ -700,7 +708,7 @@

    Method List

  • -
  • +
  • #csr_name Idl::CsrFieldReadExpressionAst @@ -708,7 +716,7 @@

    Method List

  • -
  • +
  • #csr_name Idl::CsrReadExpressionAst @@ -716,7 +724,7 @@

    Method List

  • -
  • +
  • #csr_name Idl::CsrSoftwareWriteAst @@ -724,7 +732,7 @@

    Method List

  • -
  • +
  • #csr_name Idl::CsrSoftwareReadAst @@ -732,7 +740,7 @@

    Method List

  • -
  • +
  • #csrs ArchDef @@ -740,7 +748,7 @@

    Method List

  • -
  • +
  • #data ArchDef @@ -748,7 +756,7 @@

    Method List

  • -
  • +
  • #decl_type Idl::VariableDeclarationAst @@ -756,7 +764,7 @@

    Method List

  • -
  • +
  • #decode_var? Idl::Var @@ -764,7 +772,7 @@

    Method List

  • -
  • +
  • #decode_variable DecodeField @@ -772,7 +780,7 @@

    Method List

  • -
  • +
  • #decode_variables Instruction::Encoding @@ -780,7 +788,7 @@

    Method List

  • -
  • +
  • #decode_variables Instruction @@ -788,7 +796,7 @@

    Method List

  • -
  • +
  • #deep_clone Idl::SymbolTable @@ -796,7 +804,7 @@

    Method List

  • -
  • +
  • #default Idl::Type @@ -804,6 +812,14 @@

    Method List

  • +
  • +
    + #defined_by? + Instruction +
    +
  • + +
  • #defined_in_all_bases? @@ -925,6 +941,14 @@

    Method List

  • +
    + #encoding_width + Instruction +
    +
  • + + +
  • #enum_class Idl::Type @@ -932,7 +956,7 @@

    Method List

  • -
  • +
  • #enums Idl::IsaAst @@ -940,7 +964,7 @@

    Method List

  • -
  • +
  • #eql? EncodingField @@ -948,7 +972,7 @@

    Method List

  • -
  • +
  • #eql? DecodeVariable @@ -956,7 +980,7 @@

    Method List

  • -
  • +
  • #eql? DecodeField @@ -964,7 +988,7 @@

    Method List

  • -
  • +
  • #equal_to? Idl::Type @@ -972,7 +996,7 @@

    Method List

  • -
  • +
  • #exception_codes ArchGen @@ -980,6 +1004,14 @@

    Method List

  • +
  • +
    + #excluded_by? + Instruction +
    +
  • + +
  • #execute @@ -1078,40 +1110,40 @@

    Method List

  • - #execute - Idl::FunctionStatementAst + #execute + Idl::InstructionOperationAst
  • - #execute - Idl::InstructionOperationAst + #execute + Idl::IfBodyAst
  • - #execute - Idl::IfBodyAst + #execute + Idl::CsrSoftwareWriteAst
  • - #execute - Idl::CsrSoftwareWriteAst + #execute + Idl::CsrWriteAst
  • - #execute - Idl::CsrWriteAst + #exists_in_cfg? + Instruction
  • @@ -1134,24 +1166,24 @@

    Method List

  • - #ext? - ArchDef + #expression + Idl::SignCastAst
  • - #extension - Instruction + #expression + Idl::ParenExpressionAst
  • - #extension - ExtensionVersion + #ext? + ArchDef
  • @@ -1165,6 +1197,14 @@

    Method List

  • +
    + #extension_exclusions + Instruction +
    +
  • + + +
  • #extension_hash ArchDef @@ -1172,6 +1212,14 @@

    Method List

  • +
  • +
    + #extension_requirements + Instruction +
    +
  • + +
  • #extensions @@ -1182,8 +1230,8 @@

    Method List

  • - #extensions - TestExpressions::MockArchDef + #extensions + MockArchDef
  • @@ -1366,263 +1414,263 @@

    Method List

  • - #gen_adoc - Treetop::Runtime::SyntaxNode + #gen_adoc + Idl::AstNode
  • - #gen_adoc - Idl::AryRangeAccessAst + #gen_adoc + Idl::EnumRefAst
  • - #gen_adoc - Idl::AryElementAccessAst + #gen_adoc + Idl::ParenExpressionAst
  • - #gen_adoc - Idl::BinaryExpressionAst + #gen_adoc + Idl::IntLiteralAst
  • - #gen_adoc - Idl::VariableAssignmentAst + #gen_adoc + Idl::IdAst
  • - #gen_adoc - Idl::StatementAst + #gen_adoc + Idl::SignCastAst
  • - #gen_adoc - Idl::ReturnStatementAst + #gen_adoc + Idl::AryRangeAccessAst
  • - #gen_adoc - Idl::ConditionalStatementAst + #gen_adoc + Idl::VariableDeclarationAst
  • - #gen_adoc - Idl::FunctionCallExpressionAst + #gen_adoc + Idl::TernaryOperatorExpressionAst
  • - #gen_adoc - Idl::FunctionBodyAst + #gen_adoc + Idl::BuiltinTypeNameAst
  • - #gen_adoc - Idl::CsrFieldReadExpressionAst + #gen_adoc + Idl::ForLoopAst
  • - #gen_adoc - Idl::CsrReadExpressionAst + #gen_adoc + Idl::BuiltinVariableAst
  • - #gen_adoc - Idl::IfAst + #gen_adoc + Idl::VariableDeclarationWithInitializationAst
  • - #gen_dir - ArchGen + #gen_adoc + Idl::AryElementAccessAst
  • - #generate - ArchGen + #gen_adoc + Idl::BinaryExpressionAst
  • - #get - Idl::SymbolTable + #gen_adoc + Idl::VariableAssignmentAst
  • - #get_from - Idl::SymbolTable + #gen_adoc + Idl::AryElementAssignmentAst
  • - #get_global - Idl::SymbolTable + #gen_adoc + Idl::StatementAst
  • - #global_ast - ArchDef + #gen_adoc + Idl::UnaryOperatorExpressionAst
  • - #globals - Idl::IsaAst -
    + #gen_adoc + Idl::ReturnStatementAst +
  • - #grouped_encoding_fields - DecodeVariable + #gen_adoc + Idl::ReplicationExpressionAst
  • - #grouped_encoding_fields - DecodeField + #gen_adoc + Idl::ConditionalStatementAst
  • - #has_custom_sw_read? - Csr + #gen_adoc + Idl::FunctionCallExpressionAst
  • - #has_custom_write? - CsrField + #gen_adoc + Idl::FunctionBodyAst
  • - #has_template_ancestor? - Treetop::Runtime::SyntaxNode + #gen_adoc + Idl::CsrFieldReadExpressionAst
  • - #hash - EncodingField + #gen_adoc + Idl::CsrReadExpressionAst
  • - #hash - DecodeVariable + #gen_adoc + Idl::IfAst
  • - #hash - DecodeField + #gen_dir + ArchGen
  • - #idl_compiler - ArchDef + #generate + ArchGen
  • - #if_body - Idl::IfAst + #get + Idl::SymbolTable
  • - #if_cond - Idl::IfAst + #get_from + Idl::SymbolTable
  • - #implemented_csr - ArchDef + #get_global + Idl::SymbolTable
  • - #implemented_csr_hash + #global_ast ArchDef
  • @@ -1630,831 +1678,831 @@

    Method List

  • - #implemented_csrs - ArchDef + #globals + Idl::IsaAst
  • - #implemented_csrs - ArchGen + #grouped_encoding_fields + DecodeVariable
  • - #implemented_extensions - ArchDef + #grouped_encoding_fields + DecodeField
  • - #implemented_extensions - ArchGen + #has_custom_sw_read? + Csr
  • - #implemented_fields - Csr + #has_custom_write? + CsrField
  • - #implemented_fields_for - Csr + #has_template_ancestor? + Treetop::Runtime::SyntaxNode
  • - #implemented_instructions - ArchDef + #hash + EncodingField
  • - #implemented_instructions - ArchGen + #hash + DecodeVariable
  • - #implies - Extension + #hash + DecodeField
  • - #index - Idl::AryElementAccessAst + #idl_compiler + ArchDef
  • - #initialize - Idl::Compiler + #idx + Idl::AryElementAssignmentAst
  • - #initialize - Idl::AstNode::TypeError + #if_body + Idl::IfAst
  • - #initialize - Idl::AstNode::InternalError + #if_cond + Idl::IfAst
  • - #initialize - Idl::AstNode::ValueError + #implemented_csr + ArchDef
  • - #initialize - Idl::AryElementAccessAst + #implemented_csr_hash + ArchDef
  • - #initialize - Idl::AryRangeAccessAst + #implemented_csrs + ArchDef
  • - #initialize - Idl::BinaryExpressionAst + #implemented_csrs + ArchGen
  • - #initialize - Idl::NoopAst + #implemented_extensions + ArchDef
  • - #initialize - Idl::StatementAst + #implemented_extensions + ArchGen
  • - #initialize - Idl::ConditionalStatementAst + #implemented_fields + Csr
  • - #initialize - Idl::FunctionBodyAst + #implemented_fields_for + Csr
  • - #initialize - Idl::IfBodyAst + #implemented_instructions + ArchDef
  • - #initialize - Idl::ElseIfAst + #implemented_instructions + ArchGen
  • - #initialize - Idl::IfAst + #implies + Extension
  • - #initialize - EncodingField + #index + Idl::AryElementAccessAst
  • - #initialize - DecodeVariable + #init + Idl::ForLoopAst
  • - #initialize - DecodeField + #initialize + Idl::Compiler
  • - #initialize - ArchDefObject + #initialize + Idl::AstNode::TypeError
  • - #initialize - CsrField + #initialize + Idl::AstNode::InternalError
  • - #initialize - Csr + #initialize + Idl::AstNode::ValueError
  • - #initialize - Instruction::Encoding::Field + #initialize + Idl::IdAst
  • - #initialize - Instruction::Encoding + #initialize + Idl::AryElementAccessAst
  • - #initialize - Instruction + #initialize + Idl::AryRangeAccessAst
  • - #initialize - Extension + #initialize + Idl::VariableAssignmentAst
  • - #initialize - ExtensionVersion + #initialize + Idl::AryElementAssignmentAst
  • - #initialize - ArchDef + #initialize + Idl::VariableDeclarationWithInitializationAst
  • - #initialize - ArchGen + #initialize + Idl::SignCastAst
  • - #initialize - Idl::Type + #initialize + Idl::BinaryExpressionAst
  • - #initialize - Idl::EnumerationType + #initialize + Idl::ParenExpressionAst
  • - #initialize - Idl::BitfieldType + #initialize + Idl::ReplicationExpressionAst
  • - #initialize - Idl::CsrType + #initialize + Idl::BuiltinVariableAst
  • - #initialize - Idl::FunctionType + #initialize + Idl::EnumRefAst
  • - #initialize - Idl::XregType + #initialize + Idl::TernaryOperatorExpressionAst
  • - #initialize - Validator::SchemaError + #initialize + Idl::NoopAst
  • - #initialize - Validator::ValidationError + #initialize + Idl::StatementAst
  • - #initialize - Validator + #initialize + Idl::ConditionalStatementAst
  • - #initialize - Idl::Var + #initialize + Idl::DontCareReturnAst
  • - #initialize - Idl::SymbolTable + #initialize + Idl::BuiltinTypeNameAst
  • - #initialize - TestExpressions::MockExtension + #initialize + Idl::IntLiteralAst
  • - #input_file - Treetop::Runtime::CompiledParser + #initialize + Idl::FunctionCallExpressionAst
  • - #input_file - Treetop::Runtime::SyntaxNode + #initialize + Idl::FunctionBodyAst
  • - insn_table - Opcodes + #initialize + Idl::ForLoopAst
  • - #inspect - ArchDefObject + #initialize + Idl::IfBodyAst
  • - #inst - ArchDef + #initialize + Idl::ElseIfAst
  • - #inst_pos_to_var_pos - DecodeVariable + #initialize + Idl::IfAst
  • - #instantiate_node - Treetop::Runtime::CompiledParser + #initialize + EncodingField
  • - #instruction_hash - ArchDef + #initialize + DecodeVariable
  • - #instructions - Idl::IsaAst + #initialize + DecodeField
  • - #instructions - ArchDef + #initialize + ArchDefObject
  • - #integral? - Idl::Type + #initialize + CsrField
  • - #internal_error - Idl::AstNodeFuncs + #initialize + Csr
  • - #interrupt_codes - ArchGen + #initialize + Instruction::Encoding::Field
  • - #invert - Idl::BinaryExpressionAst + #initialize + Instruction::Encoding
  • - #invert - Idl::ParenExpressionAst + #initialize + Extension
  • - #is_function_name? - Treetop::Runtime::SyntaxNode + #initialize + ExtensionVersion
  • - #key? - Idl::SymbolTable + #initialize + ExtensionRequirement
  • - #keys - ArchDefObject + #initialize + ArchDef
  • - #keys_pretty - Idl::SymbolTable + #initialize + ArchGen
  • - #kind - Idl::FieldAssignmentAst + #initialize + Idl::Type
  • - #kind - Idl::BitfieldAccessExpressionAst + #initialize + Idl::EnumerationType
  • - #kind - Idl::Type + #initialize + Idl::BitfieldType
  • - #left_shift - DecodeVariable + #initialize + Idl::CsrType
  • - #length - Csr + #initialize + Idl::FunctionType
  • - #length_cond32 - Csr + #initialize + Idl::XregType
  • - #length_cond64 - Csr + #initialize + Validator::SchemaError
  • - #length_pretty - Csr + #initialize + Validator::ValidationError
  • - #levels - Idl::SymbolTable + #initialize + Validator
  • - #lhs - Idl::AssignmentAst + #initialize + Idl::Var
  • - #lhs - Idl::VariableAssignmentAst + #initialize + Idl::SymbolTable
  • - #lhs - Idl::AryElementAssignmentAst + #initialize + MockExtension
  • - #lhs - Idl::AryRangeAssignmentAst + #input_file + Treetop::Runtime::CompiledParser
  • - #lhs - Idl::VariableDeclarationWithInitializationAst + #input_file + Treetop::Runtime::SyntaxNode
  • - #lhs - Idl::BinaryExpressionAst + insn_table + Opcodes
  • - #lhs_type - Idl::VariableDeclarationWithInitializationAst + #inspect + ArchDefObject
  • - #lineno - Treetop::Runtime::SyntaxNode + #inst + ArchDef
  • - #lineno - Idl::AstNode::ValueError + #inst_pos_to_var_pos + DecodeVariable
  • - #location - CsrField + #instantiate_node + Treetop::Runtime::CompiledParser
  • - #location_pretty - CsrField + #instruction_hash + ArchDef
  • - #lsb - Idl::AryRangeAccessAst + #instructions + Idl::IsaAst
  • - #make_const - Idl::Type + #instructions + Extension
  • - #make_signed - Idl::Type + #instructions + ArchDef
  • - #method_missing - ArchDefObject + #integral? + Idl::Type
  • - #msb - Idl::AryRangeAccessAst + #internal_error + Idl::AstNodeFuncs
  • - #multi_encoding? - Instruction + #interrupt_codes + ArchGen
  • - #multi_xlen? - ArchDef + #invert + Idl::BinaryExpressionAst
  • - #mutable? - Idl::Type + #invert + Idl::ParenExpressionAst
  • - #name - Idl::IdAst + #is_function_name? + Treetop::Runtime::SyntaxNode
  • - #name - Idl::EnumDefinitionAst + #key? + Idl::SymbolTable
  • - #name - Idl::BitfieldDefinitionAst + #keys + ArchDefObject
  • - #name - Idl::FunctionCallExpressionAst + #keys_pretty + Idl::SymbolTable
  • - #name - Idl::FunctionDefAst + #kind + Idl::FieldAssignmentAst
  • - #name - Idl::CsrWriteAst + #kind + Idl::BitfieldAccessExpressionAst
  • - #name - EncodingField + #kind + Idl::Type
  • - #name + #left_shift DecodeVariable
  • @@ -2462,335 +2510,335 @@

    Method List

  • - #name - DecodeField + #length + Csr
  • - #name - Instruction::Encoding::Field + #length_cond32 + Csr
  • - #name - ExtensionVersion + #length_cond64 + Csr
  • - #name - ArchDef + #length_pretty + Csr
  • - #name - ArchGen + #levels + Idl::SymbolTable
  • - #name - Idl::Type + #lhs + Idl::AssignmentAst
  • - #name - Idl::Var + #lhs + Idl::VariableAssignmentAst
  • - #name - TestExpressions::MockExtension + #lhs + Idl::AryElementAssignmentAst
  • - #nodes - Idl::AstNodeFuncs + #lhs + Idl::AryRangeAssignmentAst
  • - #num_args - Idl::FunctionDefAst + #lhs + Idl::VariableDeclarationWithInitializationAst
  • - #num_args - Idl::FunctionType + #lhs + Idl::BinaryExpressionAst
  • - #op - Idl::BinaryExpressionAst + #lhs_type + Idl::VariableDeclarationWithInitializationAst
  • - #op - Idl::UnaryOperatorExpressionAst + #lineno + Treetop::Runtime::SyntaxNode
  • - #opcode? - EncodingField + #lineno + Idl::AstNode::ValueError
  • - #opcode? - Instruction::Encoding::Field + #location + CsrField
  • - #opcode_fields - Instruction::Encoding + #location_pretty + CsrField
  • - #operation_ast - Instruction + #lsb + Idl::AryRangeAccessAst
  • - #operation_source - Instruction + #make_const + Idl::Type
  • - #orig_instantiate_node - Treetop::Runtime::CompiledParser + #make_signed + Idl::Type
  • - #params - ArchGen + #member_name + Idl::EnumRefAst
  • - #parent - CsrField + #method_missing + ArchDefObject
  • - #pass_find_return_values - Treetop::Runtime::SyntaxNode + #msb + Idl::AryRangeAccessAst
  • - #pass_find_return_values - Idl::ReturnStatementAst + #multi_encoding? + Instruction
  • - #pass_find_return_values - Idl::IfAst + #multi_xlen? + ArchDef
  • - #pass_find_return_values - Idl::FunctionBodyAst + #mutable? + Idl::Type
  • - #pop - Idl::SymbolTable + #n + Idl::ReplicationExpressionAst
  • - #pretty_to_s - EncodingField + #name + Idl::IdAst
  • - #print - Idl::SymbolTable + #name + Idl::EnumDefinitionAst
  • - #print_ast - Idl::AstNodeFuncs + #name + Idl::BitfieldDefinitionAst
  • - #prune - Treetop::Runtime::SyntaxNode + #name + Idl::BuiltinVariableAst
  • - #prune - Idl::FunctionBodyAst + #name + Idl::FunctionCallExpressionAst
  • - #prune - Idl::StatementAst + #name + Idl::FunctionDefAst
  • - #prune - Idl::AryElementAccessAst + #name + Idl::CsrWriteAst
  • - #prune - Idl::AryRangeAccessAst + #name + EncodingField
  • - #prune - Idl::BinaryExpressionAst + #name + DecodeVariable
  • - #prune - Idl::IfBodyAst + #name + DecodeField
  • - #prune - Idl::ElseIfAst + #name + Instruction::Encoding::Field
  • - #prune - Idl::IfAst + #name + ExtensionVersion
  • - #prune - Idl::ConditionalStatementAst + #name + ExtensionRequirement
  • - #pruned_operation_ast - Instruction + #name + ArchDef
  • - #push - Idl::SymbolTable + #name + ArchGen
  • - #qualifiers + #name Idl::Type
  • @@ -2798,127 +2846,127 @@

    Method List

  • - #qualify - Idl::Type + #name + Idl::Var
  • - #range - EncodingField + #name + MockExtension
  • - #range - CsrField::Alias + #nodes + Idl::AstNodeFuncs
  • - #range - Instruction::Encoding::Field + #num_args + Idl::FunctionDefAst
  • - #range - Idl::BitfieldType + #num_args + Idl::FunctionType
  • - #reset_value - CsrField + #op + Idl::BinaryExpressionAst
  • - #reset_value_func - CsrField + #op + Idl::UnaryOperatorExpressionAst
  • - #respond_to_missing? - ArchDefObject + #opcode? + EncodingField
  • - #result - Validator::SchemaError + #opcode? + Instruction::Encoding::Field
  • - #result - Validator::ValidationError + #opcode_fields + Instruction::Encoding
  • - #return_type - Idl::ReturnStatementAst + #operation_ast + Instruction
  • - #return_type - Idl::FunctionDefAst + #orig_instantiate_node + Treetop::Runtime::CompiledParser
  • - #return_type - Idl::Type + #params + ArchGen
  • - #return_type - Idl::FunctionType + #parent + CsrField
  • - #return_type_list_str - Idl::FunctionDefAst + #pass_find_return_values + Treetop::Runtime::SyntaxNode
  • - #return_types + #pass_find_return_values Idl::ReturnStatementAst
  • @@ -2926,240 +2974,560 @@

    Method List

  • - #return_types - Idl::FunctionType + #pass_find_return_values + Idl::IfAst
  • - #return_value - Idl::Returns + #pass_find_return_values + Idl::FunctionBodyAst
  • - #return_value - Idl::ReturnStatementAst + #pop + Idl::SymbolTable
  • - #return_value - Idl::ConditionalReturnStatementAst + #pretty_to_s + EncodingField
  • - #return_value - Idl::FunctionBodyAst + #print + Idl::SymbolTable
  • - #return_value - Idl::ForLoopAst + #print_ast + Idl::AstNodeFuncs
  • - #return_value - Idl::IfBodyAst + #prune + Treetop::Runtime::SyntaxNode
  • - #return_value - Idl::IfAst + #prune + Idl::AstNode
  • - #return_value - Idl::FunctionType + #prune + Idl::FunctionCallExpressionAst
  • - #return_value_nodes - Idl::ReturnStatementAst + #prune + Idl::FunctionBodyAst
  • - #return_values - Idl::Returns + #prune + Idl::StatementAst
  • - #return_values - Idl::ReturnStatementAst + #prune + Idl::AryElementAccessAst
  • - #return_values - Idl::ConditionalReturnStatementAst + #prune + Idl::AryRangeAccessAst
  • - #return_values - Idl::FunctionBodyAst + #prune + Idl::BinaryExpressionAst
  • - #return_values - Idl::ForLoopAst + #prune + Idl::IfBodyAst
  • - #return_values - Idl::IfBodyAst + #prune + Idl::ElseIfAst
  • - #return_values - Idl::ElseIfAst + #prune + Idl::IfAst
  • - #return_values - Idl::IfAst + #prune + Idl::ConditionalStatementAst
  • - #rhs - Idl::AssignmentAst + #pruned_operation_ast + Instruction
  • - #rhs - Idl::VariableAssignmentAst + #push + Idl::SymbolTable
  • - #rhs - Idl::AryElementAssignmentAst + #qualifiers + Idl::Type
  • - #rhs - Idl::AryRangeAssignmentAst + #qualify + Idl::Type
  • - #rhs - Idl::MultiVariableAssignmentAst + #range + EncodingField
  • - #rhs - Idl::VariableDeclarationWithInitializationAst + #range + CsrField::Alias
  • - #rhs - Idl::BinaryExpressionAst + #range + Instruction::Encoding::Field
  • - #satisfies? - ExtensionVersion + #range + Idl::BitfieldType
  • - #set_expected_type - Idl::DontCareReturnAst + #reset_value + CsrField
  • - #set_input_file - Treetop::Runtime::CompiledParser + #reset_value_func + CsrField
  • - #set_input_file - Treetop::Runtime::SyntaxNode -
    + #respond_to_missing? + ArchDefObject +
  • - #setup - TestExpressions + #result + Validator::SchemaError +
    +
  • + + +
  • +
    + #result + Validator::ValidationError +
    +
  • + + +
  • +
    + #return_type + Idl::ReturnStatementAst +
    +
  • + + +
  • +
    + #return_type + Idl::FunctionDefAst +
    +
  • + + +
  • +
    + #return_type + Idl::Type +
    +
  • + + +
  • +
    + #return_type + Idl::FunctionType +
    +
  • + + +
  • +
    + #return_type_list_str + Idl::FunctionDefAst +
    +
  • + + +
  • +
    + #return_types + Idl::ReturnStatementAst +
    +
  • + + +
  • +
    + #return_types + Idl::FunctionType +
    +
  • + + +
  • +
    + #return_value + Idl::Returns +
    +
  • + + +
  • +
    + #return_value + Idl::ReturnStatementAst +
    +
  • + + +
  • +
    + #return_value + Idl::ConditionalReturnStatementAst +
    +
  • + + +
  • +
    + #return_value + Idl::FunctionBodyAst +
    +
  • + + +
  • +
    + #return_value + Idl::ForLoopAst +
    +
  • + + +
  • +
    + #return_value + Idl::IfBodyAst +
    +
  • + + +
  • +
    + #return_value + Idl::IfAst +
    +
  • + + +
  • +
    + #return_value + Idl::FunctionType +
    +
  • + + +
  • +
    + #return_value_nodes + Idl::ReturnStatementAst +
    +
  • + + +
  • +
    + #return_values + Idl::Returns +
    +
  • + + +
  • +
    + #return_values + Idl::ReturnStatementAst +
    +
  • + + +
  • +
    + #return_values + Idl::ConditionalReturnStatementAst +
    +
  • + + +
  • +
    + #return_values + Idl::FunctionBodyAst +
    +
  • + + +
  • +
    + #return_values + Idl::ForLoopAst +
    +
  • + + +
  • +
    + #return_values + Idl::IfBodyAst +
    +
  • + + +
  • +
    + #return_values + Idl::ElseIfAst +
    +
  • + + +
  • +
    + #return_values + Idl::IfAst +
    +
  • + + +
  • +
    + #rhs + Idl::AssignmentAst +
    +
  • + + +
  • +
    + #rhs + Idl::VariableAssignmentAst +
    +
  • + + +
  • +
    + #rhs + Idl::AryElementAssignmentAst +
    +
  • + + +
  • +
    + #rhs + Idl::AryRangeAssignmentAst +
    +
  • + + +
  • +
    + #rhs + Idl::MultiVariableAssignmentAst +
    +
  • + + +
  • +
    + #rhs + Idl::VariableDeclarationWithInitializationAst +
    +
  • + + +
  • +
    + #rhs + Idl::BinaryExpressionAst +
    +
  • + + +
  • +
    + #rv32? + Instruction +
    +
  • + + +
  • +
    + #rv64? + Instruction +
    +
  • + + +
  • +
    + #satisfied_by? + ExtensionRequirement +
    +
  • + + +
  • +
    + #satisfies? + ExtensionVersion +
    +
  • + + +
  • +
    + #set_expected_type + Idl::DontCareReturnAst +
    +
  • + + +
  • +
    + #set_input_file + Treetop::Runtime::CompiledParser +
    +
  • + + +
  • +
    + #set_input_file + Treetop::Runtime::SyntaxNode +
    +
  • + + +
  • +
    + #setup + TestMixin
  • @@ -3182,280 +3550,424 @@

    Method List

  • - #signed? - Idl::Type + #signed? + Idl::Type +
    +
  • + + +
  • +
    + #size + EncodingField +
    +
  • + + +
  • +
    + #size + DecodeVariable +
    +
  • + + +
  • +
    + #size + DecodeField +
    +
  • + + +
  • +
    + #size + Instruction::Encoding +
    +
  • + + +
  • +
    + #size_in_encoding + DecodeVariable +
    +
  • + + +
  • +
    + #size_in_encoding + DecodeField +
    +
  • + + +
  • +
    + #split? + DecodeVariable +
    +
  • + + +
  • +
    + #split? + DecodeField +
    +
  • + + +
  • +
    + #statements + Idl::FunctionBodyAst +
    +
  • + + +
  • +
    + #stmts + Idl::ForLoopAst +
    +
  • + + +
  • +
    + #stmts + Idl::IfBodyAst +
    +
  • + + +
  • +
    + #sub_type + Idl::Type +
    +
  • + + +
  • +
    + #sym_table + Csr +
    +
  • + + +
  • +
    + #sym_table + ArchDef +
    +
  • + + +
  • +
    + #taken_body + Idl::IfAst +
    +
  • + + +
  • +
    + #template? + Idl::FunctionCallExpressionAst +
    +
  • + + +
  • +
    + #template_arg_nodes + Idl::FunctionCallExpressionAst +
    +
  • + + +
  • +
    + #template_index + Idl::Var
  • - #size - EncodingField + #template_names + Idl::FunctionDefAst
  • - #size - DecodeVariable + #template_names + Idl::FunctionType
  • - #size - DecodeField + #template_types + Idl::FunctionDefAst
  • - #size - Instruction::Encoding + #template_types + Idl::FunctionType
  • - #size_in_encoding - DecodeVariable + #template_val? + Idl::Var
  • - #size_in_encoding - DecodeField + #template_value_for? + Idl::Var
  • - #split? - DecodeVariable + #template_values + Idl::FunctionCallExpressionAst
  • - #split? - DecodeField + #templated? + Idl::FunctionDefAst
  • - #statements - Idl::FunctionBodyAst + #templated? + Idl::FunctionType
  • - #stmts - Idl::IfBodyAst + #test_that_constants_are_read_only + TestVariables
  • - #sub_type - Idl::Type + #test_that_integer_literals_give_correct_values + TestExpressions
  • - #sym_table - Csr + #test_that_multplication_is_higher_precedence_than_addition + TestExpressions
  • - #sym_table - ArchDef + #test_that_operators_are_left_recusrive + TestExpressions
  • - #taken_body - Idl::IfAst + #test_that_values_are_tuncated + TestExpressions
  • - #template? - Idl::FunctionCallExpressionAst + #to_ast + Treetop::Runtime::SyntaxNode
  • - #template_arg_nodes - Idl::FunctionCallExpressionAst + #to_ast + Idl::IdSyntaxNode
  • - #template_index - Idl::Var + #to_ast + Idl::AryAccessSyntaxNode
  • - #template_names - Idl::FunctionDefAst + #to_ast + Idl::VariableAssignmentSyntaxNode
  • - #template_names - Idl::FunctionType + #to_ast + Idl::AryElementAssignmentSyntaxNode
  • - #template_types - Idl::FunctionDefAst + #to_ast + Idl::VariableDeclarationWithInitializationSyntaxNode
  • - #template_types - Idl::FunctionType + #to_ast + Idl::BinaryExpressionRightSyntaxNode
  • - #template_val? - Idl::Var + #to_ast + Idl::SignCastSyntaxNode
  • - #template_value_for? - Idl::Var + #to_ast + Idl::ParenExpressionSyntaxNode
  • - #template_values - Idl::FunctionCallExpressionAst + #to_ast + Idl::ReplicationExpressionSyntaxNode
  • - #templated? - Idl::FunctionDefAst + #to_ast + Idl::BuiltinVariableSyntaxNode
  • - #templated? - Idl::FunctionType + #to_ast + Idl::EnumRefSyntaxNode
  • - #test_that_multplication_is_higher_precedence_than_addition - TestExpressions + #to_ast + Idl::TernaryOperatorExpressionSyntaxNode
  • - #test_that_operators_are_left_recusrive - TestExpressions + #to_ast + Idl::StatementSyntaxNode
  • - #test_that_values_are_tuncated - TestExpressions + #to_ast + Idl::ConditionalStatementSyntaxNode
  • - #to_ast - Treetop::Runtime::SyntaxNode + #to_ast + Idl::DontCareReturnSyntaxNode
  • - #to_ast - Idl::AryAccessSyntaxNode + #to_ast + Idl::BuiltinTypeNameSyntaxNode
  • - #to_ast - Idl::BinaryExpressionRightSyntaxNode + #to_ast + Idl::IntLiteralSyntaxNode
  • - #to_ast - Idl::StatementSyntaxNode + #to_ast + Idl::FunctionCallExpressionSyntaxNode
  • - #to_ast - Idl::ConditionalStatementSyntaxNode + #to_ast + Idl::InstructionOperationSyntaxNode
  • @@ -3469,6 +3981,14 @@

    Method List

  • +
    + #to_ast + Idl::ForLoopSyntaxNode +
    +
  • + + +
  • #to_ast Idl::IfSyntaxNode @@ -3476,7 +3996,7 @@

    Method List

  • -
  • +
  • #to_cxx Idl::Type @@ -3484,7 +4004,7 @@

    Method List

  • -
  • +
  • #to_cxx Idl::XregType @@ -3492,7 +4012,7 @@

    Method List

  • -
  • +
  • #to_cxx Idl::Var @@ -3500,7 +4020,7 @@

    Method List

  • -
  • +
  • #to_cxx_no_qualifiers Idl::Type @@ -3508,7 +4028,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::AstNodeFuncs @@ -3516,7 +4036,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::IdAst @@ -3524,7 +4044,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::GlobalWithInitializationAst @@ -3532,7 +4052,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::EnumDefinitionAst @@ -3540,7 +4060,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::BuiltinEnumDefinitionAst @@ -3548,7 +4068,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::BitfieldDefinitionAst @@ -3556,7 +4076,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::AryAccessSyntaxNode @@ -3564,7 +4084,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::AryElementAccessAst @@ -3572,7 +4092,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::AryRangeAccessAst @@ -3580,7 +4100,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::VariableAssignmentAst @@ -3588,7 +4108,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::AryElementAssignmentAst @@ -3596,7 +4116,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::AryRangeAssignmentAst @@ -3604,7 +4124,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::FieldAssignmentAst @@ -3612,7 +4132,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::MultiVariableAssignmentAst @@ -3620,7 +4140,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::MultiVariableDeclarationAst @@ -3628,7 +4148,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::VariableDeclarationAst @@ -3636,7 +4156,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::VariableDeclarationWithInitializationAst @@ -3644,7 +4164,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::SignCastAst @@ -3652,7 +4172,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::BitsCastAst @@ -3660,7 +4180,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::BinaryExpressionAst @@ -3668,7 +4188,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::ParenExpressionAst @@ -3676,7 +4196,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::ArrayLiteralAst @@ -3684,7 +4204,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::ConcatenationExpressionAst @@ -3692,7 +4212,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::ReplicationExpressionAst @@ -3700,7 +4220,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::PostDecrementExpressionAst @@ -3708,7 +4228,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::PostIncrementExpressionAst @@ -3716,7 +4236,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::BitfieldAccessExpressionAst @@ -3724,7 +4244,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::EnumRefAst @@ -3732,7 +4252,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::UnaryOperatorExpressionAst @@ -3740,7 +4260,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::TernaryOperatorExpressionAst @@ -3748,14 +4268,6 @@

    Method List

  • -
  • -
    - #to_idl - Idl::VarReadExpressionAst -
    -
  • - -
  • #to_idl @@ -3805,14 +4317,6 @@

    Method List

  • -
    - #to_idl - Idl::BitsTypeAst -
    -
  • - - -
  • #to_idl Idl::BuiltinTypeNameAst @@ -3820,15 +4324,15 @@

    Method List

  • -
  • +
  • - #to_idl - Idl::IntAst + #to_idl + Idl::IntLiteralAst
  • -
  • +
  • #to_idl Idl::FunctionCallExpressionAst @@ -3836,7 +4340,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::UserTypeNameAst @@ -3844,7 +4348,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::FieldNameAst @@ -3852,7 +4356,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::InstructionOperationAst @@ -3860,7 +4364,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::FunctionBodyAst @@ -3868,7 +4372,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::ForLoopAst @@ -3876,7 +4380,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::IfBodyAst @@ -3884,7 +4388,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::ElseIfAst @@ -3892,7 +4396,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::IfAst @@ -3900,7 +4404,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::CsrFieldReadExpressionAst @@ -3908,7 +4412,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::CsrReadExpressionAst @@ -3916,7 +4420,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::CsrSoftwareWriteAst @@ -3924,7 +4428,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::CsrSoftwareReadAst @@ -3932,7 +4436,7 @@

    Method List

  • -
  • +
  • #to_idl Idl::CsrWriteAst @@ -3940,7 +4444,7 @@

    Method List

  • -
  • +
  • #to_s Idl::Type @@ -3948,7 +4452,7 @@

    Method List

  • -
  • +
  • #to_s Idl::XregType @@ -3956,7 +4460,7 @@

    Method List

  • -
  • +
  • #true_expression Idl::TernaryOperatorExpressionAst @@ -3964,7 +4468,7 @@

    Method List

  • -
  • +
  • #tuple_types Idl::Type @@ -3972,7 +4476,7 @@

    Method List

  • -
  • +
  • #type Idl::Rvalue @@ -3980,7 +4484,7 @@

    Method List

  • -
  • +
  • #type Idl::IdAst @@ -3988,7 +4492,7 @@

    Method List

  • -
  • +
  • #type Idl::GlobalWithInitializationAst @@ -3996,7 +4500,7 @@

    Method List

  • -
  • +
  • #type Idl::GlobalAst @@ -4004,7 +4508,7 @@

    Method List

  • -
  • +
  • #type Idl::EnumDefinitionAst @@ -4012,7 +4516,7 @@

    Method List

  • -
  • +
  • #type Idl::BuiltinEnumDefinitionAst @@ -4020,7 +4524,7 @@

    Method List

  • -
  • +
  • #type Idl::BitfieldDefinitionAst @@ -4028,7 +4532,7 @@

    Method List

  • -
  • +
  • #type Idl::AryElementAccessAst @@ -4036,7 +4540,7 @@

    Method List

  • -
  • +
  • #type Idl::AryRangeAccessAst @@ -4044,7 +4548,7 @@

    Method List

  • -
  • +
  • #type Idl::FieldAssignmentAst @@ -4052,7 +4556,7 @@

    Method List

  • -
  • +
  • #type Idl::SignCastAst @@ -4060,7 +4564,7 @@

    Method List

  • -
  • +
  • #type Idl::BitsCastAst @@ -4068,7 +4572,7 @@

    Method List

  • -
  • +
  • #type Idl::BinaryExpressionAst @@ -4076,7 +4580,7 @@

    Method List

  • -
  • +
  • #type Idl::ParenExpressionAst @@ -4084,7 +4588,7 @@

    Method List

  • -
  • +
  • #type Idl::ArrayLiteralAst @@ -4092,7 +4596,7 @@

    Method List

  • -
  • +
  • #type Idl::ConcatenationExpressionAst @@ -4100,7 +4604,7 @@

    Method List

  • -
  • +
  • #type Idl::ReplicationExpressionAst @@ -4108,7 +4612,7 @@

    Method List

  • -
  • +
  • #type Idl::PostDecrementExpressionAst @@ -4116,6 +4620,14 @@

    Method List

  • +
  • +
    + #type + Idl::BuiltinVariableAst +
    +
  • + +
  • #type @@ -4157,14 +4669,6 @@

    Method List

  • -
    - #type - Idl::VarReadExpressionAst -
    -
  • - - -
  • #type Idl::DontCareReturnAst @@ -4172,7 +4676,7 @@

    Method List

  • -
  • +
  • #type Idl::DontCareLvalueAst @@ -4180,14 +4684,6 @@

    Method List

  • -
  • -
    - #type - Idl::BitsTypeAst -
    -
  • - -
  • #type @@ -4198,8 +4694,8 @@

    Method List

  • - #type - Idl::IntAst + #type + Idl::IntLiteralAst
  • @@ -4269,6 +4765,14 @@

    Method List

  • +
    + #type_check + Idl::Compiler +
    +
  • + + +
  • #type_check Idl::AstNodeFuncs @@ -4276,7 +4780,7 @@

    Method List

  • -
  • +
  • #type_check Idl::IdAst @@ -4284,7 +4788,7 @@

    Method List

  • -
  • +
  • #type_check Idl::GlobalWithInitializationAst @@ -4292,7 +4796,7 @@

    Method List

  • -
  • +
  • #type_check Idl::GlobalAst @@ -4300,7 +4804,7 @@

    Method List

  • -
  • +
  • #type_check Idl::IsaAst @@ -4308,7 +4812,7 @@

    Method List

  • -
  • +
  • #type_check Idl::EnumDefinitionAst @@ -4316,7 +4820,7 @@

    Method List

  • -
  • +
  • #type_check Idl::BuiltinEnumDefinitionAst @@ -4324,7 +4828,7 @@

    Method List

  • -
  • +
  • #type_check Idl::BitfieldDefinitionAst @@ -4332,7 +4836,7 @@

    Method List

  • -
  • +
  • #type_check Idl::AryElementAccessAst @@ -4340,7 +4844,7 @@

    Method List

  • -
  • +
  • #type_check Idl::AryRangeAccessAst @@ -4348,7 +4852,7 @@

    Method List

  • -
  • +
  • #type_check Idl::VariableAssignmentAst @@ -4356,7 +4860,7 @@

    Method List

  • -
  • +
  • #type_check Idl::AryElementAssignmentAst @@ -4364,7 +4868,7 @@

    Method List

  • -
  • +
  • #type_check Idl::AryRangeAssignmentAst @@ -4372,7 +4876,7 @@

    Method List

  • -
  • +
  • #type_check Idl::FieldAssignmentAst @@ -4380,7 +4884,7 @@

    Method List

  • -
  • +
  • #type_check Idl::MultiVariableAssignmentAst @@ -4388,7 +4892,7 @@

    Method List

  • -
  • +
  • #type_check Idl::MultiVariableDeclarationAst @@ -4396,7 +4900,7 @@

    Method List

  • -
  • +
  • #type_check Idl::VariableDeclarationAst @@ -4404,7 +4908,7 @@

    Method List

  • -
  • +
  • #type_check Idl::VariableDeclarationWithInitializationAst @@ -4412,7 +4916,7 @@

    Method List

  • -
  • +
  • #type_check Idl::BinaryExpressionRightSyntaxNode @@ -4420,7 +4924,7 @@

    Method List

  • -
  • +
  • #type_check Idl::SignCastAst @@ -4428,7 +4932,7 @@

    Method List

  • -
  • +
  • #type_check Idl::BitsCastAst @@ -4436,7 +4940,7 @@

    Method List

  • -
  • +
  • #type_check Idl::BinaryExpressionAst @@ -4444,7 +4948,7 @@

    Method List

  • -
  • +
  • #type_check Idl::ParenExpressionAst @@ -4452,7 +4956,7 @@

    Method List

  • -
  • +
  • #type_check Idl::ArrayLiteralAst @@ -4460,7 +4964,7 @@

    Method List

  • -
  • +
  • #type_check Idl::ConcatenationExpressionAst @@ -4468,7 +4972,7 @@

    Method List

  • -
  • +
  • #type_check Idl::ReplicationExpressionAst @@ -4476,7 +4980,7 @@

    Method List

  • -
  • +
  • #type_check Idl::PostDecrementExpressionAst @@ -4484,6 +4988,14 @@

    Method List

  • +
  • +
    + #type_check + Idl::BuiltinVariableAst +
    +
  • + +
  • #type_check @@ -4525,14 +5037,6 @@

    Method List

  • -
    - #type_check - Idl::VarReadExpressionAst -
    -
  • - - -
  • #type_check Idl::NoopAst @@ -4540,7 +5044,7 @@

    Method List

  • -
  • +
  • #type_check Idl::StatementAst @@ -4548,7 +5052,7 @@

    Method List

  • -
  • +
  • #type_check Idl::ConditionalStatementAst @@ -4556,7 +5060,7 @@

    Method List

  • -
  • +
  • #type_check Idl::DontCareReturnAst @@ -4564,7 +5068,7 @@

    Method List

  • -
  • +
  • #type_check Idl::DontCareLvalueAst @@ -4572,7 +5076,7 @@

    Method List

  • -
  • +
  • #type_check Idl::ReturnStatementAst @@ -4580,7 +5084,7 @@

    Method List

  • -
  • +
  • #type_check Idl::ExecutionCommentAst @@ -4588,14 +5092,6 @@

    Method List

  • -
  • -
    - #type_check - Idl::BitsTypeAst -
    -
  • - -
  • #type_check @@ -4606,8 +5102,8 @@

    Method List

  • - #type_check - Idl::IntAst + #type_check + Idl::IntLiteralAst
  • @@ -4765,6 +5261,14 @@

    Method List

  • +
    + #type_check_operation + Instruction +
    +
  • + + +
  • #type_check_return Idl::FunctionDefAst @@ -4772,7 +5276,7 @@

    Method List

  • -
  • +
  • #type_check_targs Idl::FunctionDefAst @@ -4780,7 +5284,7 @@

    Method List

  • -
  • +
  • #type_check_template_instance Idl::FunctionDefAst @@ -4788,7 +5292,7 @@

    Method List

  • -
  • +
  • #type_desc CsrField @@ -4796,7 +5300,7 @@

    Method List

  • -
  • +
  • #type_error Idl::AstNodeFuncs @@ -4804,6 +5308,14 @@

    Method List

  • +
  • +
    + #type_name + Idl::VariableDeclarationWithInitializationAst +
    +
  • + +
  • #unindent @@ -4813,6 +5325,30 @@

    Method List

  • +
    + #unsigned_value + Idl::IntLiteralAst +
    +
  • + + +
  • +
    + #update + Idl::ForLoopAst +
    +
  • + + +
  • +
    + #v + Idl::ReplicationExpressionAst +
    +
  • + + +
  • #validate Validator @@ -4820,7 +5356,7 @@

    Method List

  • -
  • +
  • #validate_config ArchGen @@ -4828,7 +5364,7 @@

    Method List

  • -
  • +
  • #validate_str Validator @@ -4836,7 +5372,7 @@

    Method List

  • -
  • +
  • #value Idl::Rvalue @@ -4844,7 +5380,7 @@

    Method List

  • -
  • +
  • #value Idl::IdAst @@ -4852,7 +5388,7 @@

    Method List

  • -
  • +
  • #value Idl::GlobalWithInitializationAst @@ -4860,7 +5396,7 @@

    Method List

  • -
  • +
  • #value Idl::EnumDefinitionAst @@ -4868,7 +5404,7 @@

    Method List

  • -
  • +
  • #value Idl::BitfieldDefinitionAst @@ -4876,7 +5412,7 @@

    Method List

  • -
  • +
  • #value Idl::AryElementAccessAst @@ -4884,7 +5420,7 @@

    Method List

  • -
  • +
  • #value Idl::AryRangeAccessAst @@ -4892,7 +5428,7 @@

    Method List

  • -
  • +
  • #value Idl::SignCastAst @@ -4900,7 +5436,7 @@

    Method List

  • -
  • +
  • #value Idl::BitsCastAst @@ -4908,7 +5444,7 @@

    Method List

  • -
  • +
  • #value Idl::BinaryExpressionAst @@ -4916,7 +5452,7 @@

    Method List

  • -
  • +
  • #value Idl::ParenExpressionAst @@ -4924,7 +5460,7 @@

    Method List

  • -
  • +
  • #value Idl::ArrayLiteralAst @@ -4932,7 +5468,7 @@

    Method List

  • -
  • +
  • #value Idl::ConcatenationExpressionAst @@ -4940,7 +5476,7 @@

    Method List

  • -
  • +
  • #value Idl::ReplicationExpressionAst @@ -4948,6 +5484,14 @@

    Method List

  • +
  • +
    + #value + Idl::BuiltinVariableAst +
    +
  • + +
  • #value @@ -4981,14 +5525,6 @@

    Method List

  • -
    - #value - Idl::VarReadExpressionAst -
    -
  • - - -
  • #value Idl::DontCareReturnAst @@ -4996,7 +5532,7 @@

    Method List

  • -
  • +
  • #value Idl::DontCareLvalueAst @@ -5004,15 +5540,15 @@

    Method List

  • -
  • +
  • - #value - Idl::IntAst + #value + Idl::IntLiteralAst
  • -
  • +
  • #value Idl::FunctionCallExpressionAst @@ -5020,7 +5556,7 @@

    Method List

  • -
  • +
  • #value Idl::CsrFieldReadExpressionAst @@ -5028,7 +5564,7 @@

    Method List

  • -
  • +
  • #value Idl::CsrReadExpressionAst @@ -5036,7 +5572,7 @@

    Method List

  • -
  • +
  • #value Idl::CsrSoftwareWriteAst @@ -5044,7 +5580,7 @@

    Method List

  • -
  • +
  • #value Idl::CsrSoftwareReadAst @@ -5052,7 +5588,7 @@

    Method List

  • -
  • +
  • #value Idl::EnumerationType @@ -5060,7 +5596,7 @@

    Method List

  • -
  • +
  • #value Idl::Var @@ -5068,7 +5604,7 @@

    Method List

  • -
  • +
  • #value_error Idl::AstNodeFuncs @@ -5076,7 +5612,7 @@

    Method List

  • -
  • +
  • #values Idl::Rvalue @@ -5084,7 +5620,7 @@

    Method List

  • -
  • +
  • #values Idl::TernaryOperatorExpressionAst @@ -5092,7 +5628,7 @@

    Method List

  • -
  • +
  • #var Idl::AryElementAccessAst @@ -5100,7 +5636,7 @@

    Method List

  • -
  • +
  • #var Idl::AryRangeAccessAst @@ -5108,7 +5644,7 @@

    Method List

  • -
  • +
  • #var_names Idl::MultiVariableDeclarationAst @@ -5116,7 +5652,7 @@

    Method List

  • -
  • +
  • #vars Idl::MultiVariableAssignmentAst @@ -5124,7 +5660,7 @@

    Method List

  • -
  • +
  • #version ExtensionVersion @@ -5132,6 +5668,14 @@

    Method List

  • +
  • +
    + #version_requirement + ExtensionRequirement +
    +
  • + +
  • #wavedrom_desc @@ -5165,6 +5709,14 @@

    Method List

  • +
    + #width + Idl::IntLiteralAst +
    +
  • + + +
  • #width CsrField @@ -5172,7 +5724,7 @@

    Method List

  • -
  • +
  • #width Idl::Type @@ -5180,7 +5732,7 @@

    Method List

  • -
  • +
  • #width Idl::EnumerationType diff --git a/docs/ruby/top-level-namespace.html b/docs/ruby/top-level-namespace.html index a460931e3..8d51e8a1d 100644 --- a/docs/ruby/top-level-namespace.html +++ b/docs/ruby/top-level-namespace.html @@ -82,11 +82,11 @@

    Defined Under Namespace

    - Modules: Idl, Opcodes, RiscvOpcodes, Treetop + Modules: Idl, Opcodes, RiscvOpcodes, TestMixin, Treetop - Classes: ArchDef, ArchDefObject, ArchGen, Csr, CsrField, DecodeField, DecodeVariable, EncodingField, Extension, ExtensionVersion, Instruction, TestExpressions, Validator + Classes: ArchDef, ArchDefObject, ArchGen, Csr, CsrField, DecodeField, DecodeVariable, EncodingField, Extension, ExtensionRequirement, ExtensionVersion, Instruction, MockArchDef, MockExtension, TestExpressions, TestVariables, Validator

    @@ -102,7 +102,7 @@

    Defined Under Namespace

    diff --git a/docs/schema/arch_schema.html b/docs/schema/arch_schema.html deleted file mode 100644 index d4950ae7e..000000000 --- a/docs/schema/arch_schema.html +++ /dev/null @@ -1 +0,0 @@ - Unified Architecture Specification

    Unified Architecture Specification

    Type: object
    No Additional Properties

    Type: object

    Type: enum (of integer)

    Base instruction set datapath width

    Must be one of:

    • 32
    • 64

    Type: string

    Name of the configuration

    Type: number

    Number of implemented ASID bits

    Value must be lesser or equal to 16

    Type: number

    Number of implemented PMP entries

    Value must be greater or equal to 0 and lesser or equal to 64

    Type: number

    Vendor-specific architecture ID presented in marchid

    Value must be greater or equal to 0 and lesser or equal to 18446744073709551615

    Type: number

    Vendor-specific implementation ID present in mimpid

    Value must be greater or equal to 0 and lesser or equal to 18446744073709551615

    Type: boolean

    whether or not the implementation supports misaligned loads and stores in main memory (not including atomics). Must be true when extension Zicclsm is implemented.

    Type: boolean Default: false

    whether or not the implementation supports misaligned atomics.

    Type: number

    Number of implemented programmable hardware counters (not including cycle, time, and instret)

    Value must be greater or equal to 0 and lesser or equal to 29

    Type: boolean Default: true

    When true, writing an illegal value to a WLRL CSR field raises an Illegal Instruction exception.
    When false, writing an illegal value to a WLRL CSR field is ignored.

    Type: boolean

    when true, *tval is written with the virtual PC of the EBREAK instruction (same information as *epc).
    when false, *tval is written with 0 on an EBREAK instruction

    regardless, *tval is always written with a virtual PC when an external breakpoint is generated.

    Type: number

    Physical address of the unified discovery configuration data structure (reported in mconfigptr).

    Value must be greater or equal to 0 and lesser or equal to 18446744073709551615

    Type: number

    log2 of the smallest supported PMP region.

    Value must be greater or equal to 2 and lesser or equal to 66

    Type: number

    log2 of the smallest supported PMA region.

    Value must be greater or equal to 2 and lesser or equal to 66

    Type: number

    Number of bits in the physical address space

    Value must be greater or equal to 1 and lesser or equal to 36028797018963968

    Type: boolean Default: "false"

    When C extension is supported, wether or not it can be dynamically disabled by writing the misa.C bit.

    Type: number

    Size, in bytes of a cache block (as seen by cache maintence operations)

    Value must be greater or equal to 1 and lesser or equal to 65536

    Type: number

    Number of supported virtualized guest external interrupts.
    Corresponds to the GEILEN parameter in RISC-V specifications.

    Value must be greater or equal to 1 and lesser or equal to 63

    Type: object

    Type: array of object

    Extensions implemented by this architecture

    No Additional Items

    Each item of this array must be:

    Type: object
    No Additional Properties

    Type: string

    Extension name

    Must match regular expression: ^([A-WY]|([SXZ][a-z0-9]+))$

    Type: object

    All properties whose name matches the following regular expression must respect the following conditions

    Property name regular expression: .*
    Type: object
    No Additional Properties

    Type: string

    Type: string

    Type: enum (of string)

    Must be one of:

    • "unprivileged"
    • "privileged"


    Extension(s) required by this extension

    Type: string
    Type: array of string
    No Additional Items

    Each item of this array must be:

    Type: array of object
    No Additional Items

    Each item of this array must be:

    Type: object
    No Additional Properties


    Type: string
    Must match regular expression: ^[0-9]+(\.[0-9]+(\.[0-9]+(-[a-fA-F0-9]+)?)?)?$


    Type: string
    Must match regular expression: ^20[0-9][0-9]-[0-9][0-9]$
    Type: string
    Must match regular expression: ^unknown$

    Type: string

    Changes since last version

    Type: stringFormat: uri

    Link to ratified document

    Type: array of object
    No Additional Items

    Each item of this array must be:

    Type: object

    Exceptions defined by this extension

    No Additional Properties

    Type: array of object
    No Additional Items

    Each item of this array must be:

    Type: object

    Interrupts defined by this extension

    No Additional Properties

    Type: object

    All properties whose name matches the following regular expression must respect the following conditions

    Property name regular expression: .*
    Type: object
    No Additional Properties

    If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.

    Type: object

    Type: const
    Specific value: "VS"
    Type: object

    Type: number

    Address of the CSR viewed from VS-mode

    Type: string

    Optional name (name is extracted from object key of parent), so information is redundant

    Type: enum (of integer)

    When a CSR is only defined in RV32, or RV64, the base that defines it. When defined in both, this field should be absent.

    Must be one of:

    • 32
    • 64

    Type: string

    Type: string

    Type: string
    Must match regular expression: ^([A-WY]|([SXZ][a-z]+))$

    Type: integer

    CSR address

    Type: object

    Type: object

    Type: enum (of string)

    Must be one of:

    • "M"
    • "S"
    • "U"
    • "VS"

    Type: enum (of integer or string)

    Length, in bits, of the CSR. Can either be a 32, 64, or XLEN

    Must be one of:

    • 32
    • 64
    • "XLEN"

    Type: string

    Extension that must be implemented for this CSR to exist

    Type: object
    No Additional Properties

    All properties whose name matches the following regular expression must respect the following conditions

    Property name regular expression: ^[a-zA-Z].*$
    Type: object

    Field in a CSR register

    No Additional Properties

    Type: object

    If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.

    Type: object

    Type: const
    Specific value: "RO"
    Type: object


    Type: string
    Must match regular expression: ^<%=.*%>$
    Type: object

    If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.

    Type: object

    Type: const
    Specific value: "RO-H"
    Type: object

    Type: object

    If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.

    Type: object

    Type: const
    Specific value: "RW"
    Type: object

    Type: object

    If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.

    Type: object

    Type: const
    Specific value: "RW-H"
    Type: object

    Type: object

    If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.

    Type: object

    Type: const
    Specific value: "RW-R"
    Type: object

    Type: string

    Function implementing custom write behavior for the CSR. Given a 'value', return either the value to be written in the field or false if the write would be illegal. 'value' is the value of the entire CSR, which is sometimes needed to detect illegal writes

    Type: object

    If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.

    Type: object

    Type: const
    Specific value: "RW-RH"
    Type: object

    Type: string

    Function implementing custom write behavior for the CSR. Given a 'value', return either the value to be written in the field or false if the write would be illegal. 'value' is the value of the entire CSR, which is sometimes needed to detect illegal writes

    Same definition as write(value)


    Location of the field within the CSR register

    Type: number

    Location of a single bit

    Type: string

    Location range of a multibit field

    Must match regular expression: ^[0-9]+-[0-9]+$

    Type: string

    Function of the field

    Type: enum (of string)

    Type of the field. One of:
    * RO: Read-only immutable
    * RO-H: Read-only, updated by hardware
    * RW: Read-write, not updated by hardware
    * RW-R: Read-write, but values are restricted. write(value) must be provided
    * RW-H: Read-write, with hardware updates
    * RW-RH: Read-write, with hardware updates, but values are restricted. write(value) must be provded

    Must be one of:

    • "RO"
    • "RO-H"
    • "RW"
    • "RW-R"
    • "RW-H"
    • "RW-RH"


    Other CSR fields that alias with this field

    Type: string
    Must match regular expression: ^[a-z]+\.[A-Z0-9]+$
    Type: array of string
    No Additional Items

    Each item of this array must be:

    Type: string
    Must match regular expression: ^[a-z]+\.[A-Z0-9]+$


    Where this field is defined: indicates that the field is only present if the extension(s) are implemented. If definedBy is not given, defaults to the definedBy field of the parent CSR

    Type: string

    An extension name

    Must match regular expression: ^([A-WY]|([SXZ][a-z]+))$
    Type: array of string
    No Additional Items

    Each item of this array must be:

    Type: string

    An extension name

    Must match regular expression: ^([A-WY]|([SXZ][a-z]+))$


    Extension(s) that affect the definition of the field beyond the extension (or base) the field is originally defined in

    Type: string
    Must match regular expression: ^(RV64)|([A-WY]|(Z[a-z]+)|(S[a-z]+))$
    Type: array of string
    No Additional Items

    Each item of this array must be:

    Type: string
    Must match regular expression: ^(RV64)|([A-WY]|(Z[a-z]+)|(S[a-z]+))$

    Type: object

    Type: string

    Optional function called to handle special-case checks for access permission.

    Type: string

    Function that returns the value of the CSR when read by software (i.e., a Zicsr instruction). If not specified, the value last written (through hw_write) is returned.

    Type: array of string

    CSRs implemented by this architecture

    No Additional Items

    Each item of this array must be:

    Type: string

    CSR name

    Must match regular expression: ^[a-z][a-zA-Z0-9]+$

    Type: object

    All properties whose name matches the following regular expression must respect the following conditions

    Property name regular expression: .*
    Type: object
    No Additional Properties

    Type: string
    Must match regular expression: ^[a-z0-9.]+$

    Type: string

    Short descrption of the instruction

    Type: string

    Detailed description of the instruction


    Extension(s) that defines the instruction

    Type: string

    RISC-V Extension

    Must match regular expression: ^[A-W,Y]|([XZ][a-z]+)$
    Type: array
    No Additional Items

    Each item of this array must be:

    Type: enum (of integer)

    When present, instruction is only defined for RV32 or RV64 base

    Must be one of:

    • 32
    • 64

    Type: object

    Type: enum (of string) Default: "always"

    Must be one of:

    • "always"
    • "sometimes"
    • "never"

    Type: enum (of string) Default: "always"

    Must be one of:

    • "always"
    • "sometimes"
    • "never"

    Type: enum (of string) Default: "always"

    Must be one of:

    • "always"
    • "sometimes"
    • "never"

    Type: enum (of string) Default: "always"

    Must be one of:

    • "always"
    • "sometimes"
    • "never"

    Type: enum (of string) Default: "always"

    Must be one of:

    • "always"
    • "sometimes"
    • "never"

    Type: string

    Extra detail about access when at least one mode is 'sometimes'

    Type: array of enum (of string) Default: []

    Types of exceptions that can be raised by this instruction (excluding Instruction Page/Access Fault)

    No Additional Items

    Each item of this array must be:

    Type: enum (of string)

    Must be one of:

    • "Store/AMO Page Fault"
    • "Store/AMO Guest-Page Fault"
    • "Store Access Fault"
    • "Illegal Instruction"
    • "Virtual Instruction"
    • "MisalignedAddress"

    Type: string

    Functional description of the instruction using ISA language

    Type: string

    Assembly format of the instruction. Can use decode variables

    All properties whose name matches the following regular expression must respect the following conditions

    Property name regular expression: additionalProperties
    Type: object

    Type: array of string

    Instructions implemented by this architecture

    No Additional Items

    Each item of this array must be:

    Type: string

    Instruction name

    Must match regular expression: ^[a-z][a-zA-Z0-9.]+$
    \ No newline at end of file diff --git a/docs/schema/arch_schema.md b/docs/schema/arch_schema.md deleted file mode 100644 index a084350e3..000000000 --- a/docs/schema/arch_schema.md +++ /dev/null @@ -1,1908 +0,0 @@ -# Unified Architecture Specification - -- [1. Property `Unified Architecture Specification > params`](#params) - - [1.1. Property `Unified Architecture Specification > params > XLEN`](#params_XLEN) - - [1.2. Property `Unified Architecture Specification > params > NAME`](#params_NAME) - - [1.3. Property `Unified Architecture Specification > params > ASID_WIDTH`](#params_ASID_WIDTH) - - [1.4. Property `Unified Architecture Specification > params > NUM_PMP_ENTRIES`](#params_NUM_PMP_ENTRIES) - - [1.5. Property `Unified Architecture Specification > params > ARCH_ID`](#params_ARCH_ID) - - [1.6. Property `Unified Architecture Specification > params > IMP_ID`](#params_IMP_ID) - - [1.7. Property `Unified Architecture Specification > params > MISALIGNED_LDST`](#params_MISALIGNED_LDST) - - [1.8. Property `Unified Architecture Specification > params > MISALIGNED_AMO`](#params_MISALIGNED_AMO) - - [1.9. Property `Unified Architecture Specification > params > NUM_HPM_COUNTERS`](#params_NUM_HPM_COUNTERS) - - [1.10. Property `Unified Architecture Specification > params > TRAP_ON_ILLEGAL_WLRL`](#params_TRAP_ON_ILLEGAL_WLRL) - - [1.11. Property `Unified Architecture Specification > params > REPORT_EBREAK_PC_IN_TVAL`](#params_REPORT_EBREAK_PC_IN_TVAL) - - [1.12. Property `Unified Architecture Specification > params > CONFIG_PTR_ADDRESS`](#params_CONFIG_PTR_ADDRESS) - - [1.13. Property `Unified Architecture Specification > params > PMP_GRANULARITY`](#params_PMP_GRANULARITY) - - [1.14. Property `Unified Architecture Specification > params > PMA_GRANULARITY`](#params_PMA_GRANULARITY) - - [1.15. Property `Unified Architecture Specification > params > PHYS_ADDR_WIDTH`](#params_PHYS_ADDR_WIDTH) - - [1.16. Property `Unified Architecture Specification > params > MUTABLE_MISA_C`](#params_MUTABLE_MISA_C) - - [1.17. Property `Unified Architecture Specification > params > CACHE_BLOCK_SIZE`](#params_CACHE_BLOCK_SIZE) - - [1.18. Property `Unified Architecture Specification > params > NUM_EXTERNAL_GUEST_INTERRUPTS`](#params_NUM_EXTERNAL_GUEST_INTERRUPTS) -- [2. Property `Unified Architecture Specification > exception_codes`](#exception_codes) -- [3. Property `Unified Architecture Specification > implemented_extensions`](#implemented_extensions) - - [3.1. Unified Architecture Specification > implemented_extensions > implemented_extensions items](#autogenerated_heading_2) - - [3.1.1. Property `Unified Architecture Specification > implemented_extensions > implemented_extensions items > name`](#implemented_extensions_items_name) - - [3.1.2. Property `Unified Architecture Specification > implemented_extensions > implemented_extensions items > version`](#implemented_extensions_items_version) - - [3.1.2.1. Property `Unified Architecture Specification > implemented_extensions > implemented_extensions items > version > oneOf > item 0`](#implemented_extensions_items_version_oneOf_i0) - - [3.1.2.2. Property `Unified Architecture Specification > implemented_extensions > implemented_extensions items > version > oneOf > item 1`](#implemented_extensions_items_version_oneOf_i1) -- [4. Property `Unified Architecture Specification > extensions`](#extensions) - - [4.1. Pattern Property `Unified Architecture Specification > extensions > ext_data`](#extensions_pattern1) - - [4.1.1. Property `Unified Architecture Specification > extensions > .* > name`](#extensions_pattern1_name) - - [4.1.2. Property `Unified Architecture Specification > extensions > .* > description`](#extensions_pattern1_description) - - [4.1.3. Property `Unified Architecture Specification > extensions > .* > type`](#extensions_pattern1_type) - - [4.1.4. Property `Unified Architecture Specification > extensions > .* > requires`](#extensions_pattern1_requires) - - [4.1.4.1. Property `Unified Architecture Specification > extensions > .* > requires > oneOf > item 0`](#extensions_pattern1_requires_oneOf_i0) - - [4.1.4.2. Property `Unified Architecture Specification > extensions > .* > requires > oneOf > item 1`](#extensions_pattern1_requires_oneOf_i1) - - [4.1.4.2.1. Unified Architecture Specification > extensions > .* > requires > oneOf > item 1 > item 1 items](#autogenerated_heading_3) - - [4.1.5. Property `Unified Architecture Specification > extensions > .* > versions`](#extensions_pattern1_versions) - - [4.1.5.1. Unified Architecture Specification > extensions > .* > versions > versions items](#autogenerated_heading_4) - - [4.1.5.1.1. Property `Unified Architecture Specification > extensions > .* > versions > versions items > version`](#extensions_pattern1_versions_items_version) - - [4.1.5.1.1.1. Property `Unified Architecture Specification > extensions > .* > versions > versions items > version > oneOf > item 0`](#extensions_pattern1_versions_items_version_oneOf_i0) - - [4.1.5.1.1.2. Property `Unified Architecture Specification > extensions > .* > versions > versions items > version > oneOf > item 1`](#extensions_pattern1_versions_items_version_oneOf_i1) - - [4.1.5.1.2. Property `Unified Architecture Specification > extensions > .* > versions > versions items > ratification_date`](#extensions_pattern1_versions_items_ratification_date) - - [4.1.5.1.2.1. Property `Unified Architecture Specification > extensions > .* > versions > versions items > ratification_date > oneOf > item 0`](#extensions_pattern1_versions_items_ratification_date_oneOf_i0) - - [4.1.5.1.2.2. Property `Unified Architecture Specification > extensions > .* > versions > versions items > ratification_date > oneOf > item 1`](#extensions_pattern1_versions_items_ratification_date_oneOf_i1) - - [4.1.5.1.2.3. Property `Unified Architecture Specification > extensions > .* > versions > versions items > ratification_date > oneOf > item 2`](#extensions_pattern1_versions_items_ratification_date_oneOf_i2) - - [4.1.5.1.3. Property `Unified Architecture Specification > extensions > .* > versions > versions items > changes`](#extensions_pattern1_versions_items_changes) - - [4.1.5.1.4. Property `Unified Architecture Specification > extensions > .* > versions > versions items > url`](#extensions_pattern1_versions_items_url) - - [4.1.6. Property `Unified Architecture Specification > extensions > .* > exception_codes`](#extensions_pattern1_exception_codes) - - [4.1.6.1. Unified Architecture Specification > extensions > .* > exception_codes > exception_codes items](#autogenerated_heading_5) - - [4.1.6.1.1. Property `Unified Architecture Specification > extensions > .* > exception_codes > exception_codes items > num`](#extensions_pattern1_exception_codes_items_num) - - [4.1.6.1.2. Property `Unified Architecture Specification > extensions > .* > exception_codes > exception_codes items > name`](#extensions_pattern1_exception_codes_items_name) - - [4.1.7. Property `Unified Architecture Specification > extensions > .* > interrupt_codes`](#extensions_pattern1_interrupt_codes) - - [4.1.7.1. Unified Architecture Specification > extensions > .* > interrupt_codes > interrupt_codes items](#autogenerated_heading_6) - - [4.1.7.1.1. Property `Unified Architecture Specification > extensions > .* > interrupt_codes > interrupt_codes items > num`](#extensions_pattern1_interrupt_codes_items_num) - - [4.1.7.1.2. Property `Unified Architecture Specification > extensions > .* > interrupt_codes > interrupt_codes items > name`](#extensions_pattern1_interrupt_codes_items_name) -- [5. Property `Unified Architecture Specification > csrs`](#csrs) - - [5.1. Pattern Property `Unified Architecture Specification > csrs > csr_register`](#csrs_pattern1) - - [5.1.1. If (priv_mode = "VS")](#autogenerated_heading_7) - - [5.1.1.1. Property `Unified Architecture Specification > csrs > .* > then > virtual_address`](#csrs_pattern1_pattern5_virtual_address) - - [5.1.2. Property `Unified Architecture Specification > csrs > .* > name`](#csrs_pattern1_name) - - [5.1.3. Property `Unified Architecture Specification > csrs > .* > base`](#csrs_pattern1_base) - - [5.1.4. Property `Unified Architecture Specification > csrs > .* > long_name`](#csrs_pattern1_long_name) - - [5.1.5. Property `Unified Architecture Specification > csrs > .* > description`](#csrs_pattern1_description) - - [5.1.6. Property `Unified Architecture Specification > csrs > .* > definedBy`](#csrs_pattern1_definedBy) - - [5.1.7. Property `Unified Architecture Specification > csrs > .* > address`](#csrs_pattern1_address) - - [5.1.8. Property `Unified Architecture Specification > csrs > .* > virtual_address`](#csrs_pattern1_virtual_address) - - [5.1.9. Property `Unified Architecture Specification > csrs > .* > $comment`](#csrs_pattern1_comment) - - [5.1.10. Property `Unified Architecture Specification > csrs > .* > priv_mode`](#csrs_pattern1_priv_mode) - - [5.1.11. Property `Unified Architecture Specification > csrs > .* > length`](#csrs_pattern1_length) - - [5.1.12. Property `Unified Architecture Specification > csrs > .* > requires`](#csrs_pattern1_requires) - - [5.1.13. Property `Unified Architecture Specification > csrs > .* > fields`](#csrs_pattern1_fields) - - [5.1.13.1. Pattern Property `Unified Architecture Specification > csrs > .* > fields > csr_field`](#csrs_pattern1_fields_pattern1) - - [5.1.13.1.1. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 0`](#csrs_pattern1_fields_pattern1_pattern4_i0) - - [5.1.13.1.1.1. If (type = "RO")](#autogenerated_heading_8) - - [5.1.13.1.1.1.1. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 0 > then > value`](#csrs_pattern1_fields_pattern1_pattern4_i0_then_value) - - [5.1.13.1.1.1.1.1. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 0 > then > value > oneOf > item 0`](#csrs_pattern1_fields_pattern1_pattern4_i0_then_value_oneOf_i0) - - [5.1.13.1.1.1.1.2. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 0 > then > value > oneOf > item 1`](#csrs_pattern1_fields_pattern1_pattern4_i0_then_value_oneOf_i1) - - [5.1.13.1.2. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 1`](#csrs_pattern1_fields_pattern1_pattern4_i1) - - [5.1.13.1.2.1. If (type = "RO-H")](#autogenerated_heading_9) - - [5.1.13.1.2.1.1. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 1 > then > reset_value`](#csrs_pattern1_fields_pattern1_pattern4_i1_then_reset_value) - - [5.1.13.1.3. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 2`](#csrs_pattern1_fields_pattern1_pattern4_i2) - - [5.1.13.1.3.1. If (type = "RW")](#autogenerated_heading_10) - - [5.1.13.1.3.1.1. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 2 > then > reset_value`](#csrs_pattern1_fields_pattern1_pattern4_i2_then_reset_value) - - [5.1.13.1.4. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 3`](#csrs_pattern1_fields_pattern1_pattern4_i3) - - [5.1.13.1.4.1. If (type = "RW-H")](#autogenerated_heading_11) - - [5.1.13.1.4.1.1. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 3 > then > reset_value`](#csrs_pattern1_fields_pattern1_pattern4_i3_then_reset_value) - - [5.1.13.1.5. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 4`](#csrs_pattern1_fields_pattern1_pattern4_i4) - - [5.1.13.1.5.1. If (type = "RW-R")](#autogenerated_heading_12) - - [5.1.13.1.5.1.1. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 4 > then > write(value)`](#csrs_pattern1_fields_pattern1_pattern4_i4_then_write(value)) - - [5.1.13.1.5.1.2. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 4 > then > reset_value`](#csrs_pattern1_fields_pattern1_pattern4_i4_then_reset_value) - - [5.1.13.1.6. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 5`](#csrs_pattern1_fields_pattern1_pattern4_i5) - - [5.1.13.1.6.1. If (type = "RW-RH")](#autogenerated_heading_13) - - [5.1.13.1.6.1.1. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 5 > then > write(value)`](#csrs_pattern1_fields_pattern1_pattern4_i5_then_write(value)) - - [5.1.13.1.6.1.2. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 5 > then > reset_value`](#csrs_pattern1_fields_pattern1_pattern4_i5_then_reset_value) - - [5.1.13.1.7. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > location`](#csrs_pattern1_fields_pattern1_location) - - [5.1.13.1.7.1. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > location > oneOf > item 0`](#csrs_pattern1_fields_pattern1_location_oneOf_i0) - - [5.1.13.1.7.2. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > location > oneOf > item 1`](#csrs_pattern1_fields_pattern1_location_oneOf_i1) - - [5.1.13.1.8. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > description`](#csrs_pattern1_fields_pattern1_description) - - [5.1.13.1.9. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > type`](#csrs_pattern1_fields_pattern1_type) - - [5.1.13.1.10. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > alias`](#csrs_pattern1_fields_pattern1_alias) - - [5.1.13.1.10.1. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > alias > oneOf > item 0`](#csrs_pattern1_fields_pattern1_alias_oneOf_i0) - - [5.1.13.1.10.2. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > alias > oneOf > item 1`](#csrs_pattern1_fields_pattern1_alias_oneOf_i1) - - [5.1.13.1.10.2.1. Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > alias > oneOf > item 1 > item 1 items](#autogenerated_heading_14) - - [5.1.13.1.11. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > definedBy`](#csrs_pattern1_fields_pattern1_definedBy) - - [5.1.13.1.11.1. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > definedBy > oneOf > item 0`](#csrs_pattern1_fields_pattern1_definedBy_oneOf_i0) - - [5.1.13.1.11.2. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > definedBy > oneOf > item 1`](#csrs_pattern1_fields_pattern1_definedBy_oneOf_i1) - - [5.1.13.1.11.2.1. Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > definedBy > oneOf > item 1 > item 1 items](#autogenerated_heading_15) - - [5.1.13.1.12. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > affectedBy`](#csrs_pattern1_fields_pattern1_affectedBy) - - [5.1.13.1.12.1. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > affectedBy > oneOf > item 0`](#csrs_pattern1_fields_pattern1_affectedBy_oneOf_i0) - - [5.1.13.1.12.2. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > affectedBy > oneOf > item 1`](#csrs_pattern1_fields_pattern1_affectedBy_oneOf_i1) - - [5.1.13.1.12.2.1. Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > affectedBy > oneOf > item 1 > item 1 items](#autogenerated_heading_16) - - [5.1.13.1.13. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > reset_value`](#csrs_pattern1_fields_pattern1_reset_value) - - [5.1.13.1.14. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > value`](#csrs_pattern1_fields_pattern1_value) - - [5.1.13.1.15. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > write(value)`](#csrs_pattern1_fields_pattern1_write(value)) - - [5.1.14. Property `Unified Architecture Specification > csrs > .* > access_check`](#csrs_pattern1_access_check) - - [5.1.15. Property `Unified Architecture Specification > csrs > .* > sw_read`](#csrs_pattern1_sw_read) -- [6. Property `Unified Architecture Specification > implemented_csrs`](#implemented_csrs) - - [6.1. Unified Architecture Specification > implemented_csrs > implemented_csrs items](#autogenerated_heading_17) -- [7. Property `Unified Architecture Specification > instructions`](#instructions) - - [7.1. Pattern Property `Unified Architecture Specification > instructions > inst_data`](#instructions_pattern1) - - [7.1.1. Property `Unified Architecture Specification > instructions > .* > name`](#instructions_pattern1_name) - - [7.1.2. Property `Unified Architecture Specification > instructions > .* > long_name`](#instructions_pattern1_long_name) - - [7.1.3. Property `Unified Architecture Specification > instructions > .* > description`](#instructions_pattern1_description) - - [7.1.4. Property `Unified Architecture Specification > instructions > .* > definedBy`](#instructions_pattern1_definedBy) - - [7.1.4.1. Property `Unified Architecture Specification > instructions > .* > definedBy > oneOf > extension`](#instructions_pattern1_definedBy_oneOf_i0) - - [7.1.4.2. Property `Unified Architecture Specification > instructions > .* > definedBy > oneOf > item 1`](#instructions_pattern1_definedBy_oneOf_i1) - - [7.1.4.2.1. Unified Architecture Specification > instructions > .* > definedBy > oneOf > item 1 > extension](#autogenerated_heading_18) - - [7.1.5. Property `Unified Architecture Specification > instructions > .* > base`](#instructions_pattern1_base) - - [7.1.6. Property `Unified Architecture Specification > instructions > .* > access`](#instructions_pattern1_access) - - [7.1.6.1. Property `Unified Architecture Specification > instructions > .* > access > m`](#instructions_pattern1_access_m) - - [7.1.6.2. Property `Unified Architecture Specification > instructions > .* > access > s`](#instructions_pattern1_access_s) - - [7.1.6.3. Property `Unified Architecture Specification > instructions > .* > access > u`](#instructions_pattern1_access_u) - - [7.1.6.4. Property `Unified Architecture Specification > instructions > .* > access > vs`](#instructions_pattern1_access_vs) - - [7.1.6.5. Property `Unified Architecture Specification > instructions > .* > access > vu`](#instructions_pattern1_access_vu) - - [7.1.7. Property `Unified Architecture Specification > instructions > .* > access_detail`](#instructions_pattern1_access_detail) - - [7.1.8. Property `Unified Architecture Specification > instructions > .* > raises`](#instructions_pattern1_raises) - - [7.1.8.1. Unified Architecture Specification > instructions > .* > raises > raises items](#autogenerated_heading_19) - - [7.1.9. Property `Unified Architecture Specification > instructions > .* > operation`](#instructions_pattern1_operation) - - [7.1.10. Property `Unified Architecture Specification > instructions > .* > assembly`](#instructions_pattern1_assembly) - - [7.2. Pattern Property `Unified Architecture Specification > instructions > additionalProperties`](#instructions_pattern2) -- [8. Property `Unified Architecture Specification > implemented_instructions`](#implemented_instructions) - - [8.1. Unified Architecture Specification > implemented_instructions > implemented_instructions items](#autogenerated_heading_20) - -**Title:** Unified Architecture Specification - -| | | -| ------------------------- | ------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| -------------------------------------------------------- | ------- | --------------- | ---------- | ------------------------------------------- | --------------------------------------------- | -| + [params](#params ) | No | object | No | In ../cfgs/config_schema.json#/$defs/params | - | -| - [exception_codes](#exception_codes ) | No | object | No | In misc/exception_code_schema.json | - | -| + [implemented_extensions](#implemented_extensions ) | No | array of object | No | - | Extensions implemented by this architecture | -| + [extensions](#extensions ) | No | object | No | - | - | -| + [csrs](#csrs ) | No | object | No | - | - | -| + [implemented_csrs](#implemented_csrs ) | No | array of string | No | - | CSRs implemented by this architecture | -| + [instructions](#instructions ) | No | object | No | - | - | -| + [implemented_instructions](#implemented_instructions ) | No | array of string | No | - | Instructions implemented by this architecture | - -## 1. Property `Unified Architecture Specification > params` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | Yes | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | -| **Defined in** | ../cfgs/config_schema.json#/$defs/params | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ------------------------------------------------------------------------- | ------- | ----------------- | ---------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| + [XLEN](#params_XLEN ) | No | enum (of integer) | No | - | Base instruction set datapath width | -| + [NAME](#params_NAME ) | No | string | No | - | Name of the configuration | -| - [ASID_WIDTH](#params_ASID_WIDTH ) | No | number | No | - | Number of implemented ASID bits | -| - [NUM_PMP_ENTRIES](#params_NUM_PMP_ENTRIES ) | No | number | No | - | Number of implemented PMP entries | -| - [ARCH_ID](#params_ARCH_ID ) | No | number | No | - | Vendor-specific architecture ID presented in \`marchid\` | -| - [IMP_ID](#params_IMP_ID ) | No | number | No | - | Vendor-specific implementation ID present in \`mimpid\` | -| - [MISALIGNED_LDST](#params_MISALIGNED_LDST ) | No | boolean | No | - | whether or not the implementation supports misaligned loads and stores in main memory (not including atomics). Must be true when extension Zicclsm is implemented. | -| - [MISALIGNED_AMO](#params_MISALIGNED_AMO ) | No | boolean | No | - | whether or not the implementation supports misaligned atomics. | -| - [NUM_HPM_COUNTERS](#params_NUM_HPM_COUNTERS ) | No | number | No | - | Number of implemented programmable hardware counters (not including cycle, time, and instret) | -| - [TRAP_ON_ILLEGAL_WLRL](#params_TRAP_ON_ILLEGAL_WLRL ) | No | boolean | No | - | When true, writing an illegal value to a WLRL CSR field raises an Illegal Instruction exception.
    When false, writing an illegal value to a WLRL CSR field is ignored. | -| - [REPORT_EBREAK_PC_IN_TVAL](#params_REPORT_EBREAK_PC_IN_TVAL ) | No | boolean | No | - | when true, *tval is written with the virtual PC of the EBREAK instruction (same information as *epc).
    when false, *tval is written with 0 on an EBREAK instruction

    regardless, *tval is always written with a virtual PC when an external breakpoint is generated. | -| - [CONFIG_PTR_ADDRESS](#params_CONFIG_PTR_ADDRESS ) | No | number | No | - | Physical address of the unified discovery configuration data structure (reported in \`mconfigptr\`). | -| - [PMP_GRANULARITY](#params_PMP_GRANULARITY ) | No | number | No | - | log2 of the smallest supported PMP region. | -| - [PMA_GRANULARITY](#params_PMA_GRANULARITY ) | No | number | No | - | log2 of the smallest supported PMA region. | -| - [PHYS_ADDR_WIDTH](#params_PHYS_ADDR_WIDTH ) | No | number | No | - | Number of bits in the physical address space | -| - [MUTABLE_MISA_C](#params_MUTABLE_MISA_C ) | No | boolean | No | - | When C extension is supported, wether or not it can be dynamically disabled by writing the \`misa.C\` bit. | -| - [CACHE_BLOCK_SIZE](#params_CACHE_BLOCK_SIZE ) | No | number | No | - | Size, in bytes of a cache block (as seen by cache maintence operations) | -| - [NUM_EXTERNAL_GUEST_INTERRUPTS](#params_NUM_EXTERNAL_GUEST_INTERRUPTS ) | No | number | No | - | Number of supported virtualized guest external interrupts.
    Corresponds to the GEILEN parameter in RISC-V specifications. | - -### 1.1. Property `Unified Architecture Specification > params > XLEN` - -| | | -| ------------ | ------------------- | -| **Type** | `enum (of integer)` | -| **Required** | Yes | - -**Description:** Base instruction set datapath width - -Must be one of: -* 32 -* 64 - -### 1.2. Property `Unified Architecture Specification > params > NAME` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | Yes | - -**Description:** Name of the configuration - -### 1.3. Property `Unified Architecture Specification > params > ASID_WIDTH` - -| | | -| ------------ | -------- | -| **Type** | `number` | -| **Required** | No | - -**Description:** Number of implemented ASID bits - -| Restrictions | | -| ------------ | ------- | -| **Maximum** | ≤ 16 | - -### 1.4. Property `Unified Architecture Specification > params > NUM_PMP_ENTRIES` - -| | | -| ------------ | -------- | -| **Type** | `number` | -| **Required** | No | - -**Description:** Number of implemented PMP entries - -| Restrictions | | -| ------------ | ------- | -| **Minimum** | ≥ 0 | -| **Maximum** | ≤ 64 | - -### 1.5. Property `Unified Architecture Specification > params > ARCH_ID` - -| | | -| ------------ | -------- | -| **Type** | `number` | -| **Required** | No | - -**Description:** Vendor-specific architecture ID presented in `marchid` - -| Restrictions | | -| ------------ | ------------------------- | -| **Minimum** | ≥ 0 | -| **Maximum** | ≤ 18446744073709551615 | - -### 1.6. Property `Unified Architecture Specification > params > IMP_ID` - -| | | -| ------------ | -------- | -| **Type** | `number` | -| **Required** | No | - -**Description:** Vendor-specific implementation ID present in `mimpid` - -| Restrictions | | -| ------------ | ------------------------- | -| **Minimum** | ≥ 0 | -| **Maximum** | ≤ 18446744073709551615 | - -### 1.7. Property `Unified Architecture Specification > params > MISALIGNED_LDST` - -| | | -| ------------ | --------- | -| **Type** | `boolean` | -| **Required** | No | - -**Description:** whether or not the implementation supports misaligned loads and stores in main memory (not including atomics). Must be true when extension Zicclsm is implemented. - -### 1.8. Property `Unified Architecture Specification > params > MISALIGNED_AMO` - -| | | -| ------------ | --------- | -| **Type** | `boolean` | -| **Required** | No | -| **Default** | `false` | - -**Description:** whether or not the implementation supports misaligned atomics. - -### 1.9. Property `Unified Architecture Specification > params > NUM_HPM_COUNTERS` - -| | | -| ------------ | -------- | -| **Type** | `number` | -| **Required** | No | - -**Description:** Number of implemented programmable hardware counters (not including cycle, time, and instret) - -| Restrictions | | -| ------------ | ------- | -| **Minimum** | ≥ 0 | -| **Maximum** | ≤ 29 | - -### 1.10. Property `Unified Architecture Specification > params > TRAP_ON_ILLEGAL_WLRL` - -| | | -| ------------ | --------- | -| **Type** | `boolean` | -| **Required** | No | -| **Default** | `true` | - -**Description:** When true, writing an illegal value to a WLRL CSR field raises an Illegal Instruction exception. -When false, writing an illegal value to a WLRL CSR field is ignored. - -### 1.11. Property `Unified Architecture Specification > params > REPORT_EBREAK_PC_IN_TVAL` - -| | | -| ------------ | --------- | -| **Type** | `boolean` | -| **Required** | No | - -**Description:** when true, *tval is written with the virtual PC of the EBREAK instruction (same information as *epc). -when false, *tval is written with 0 on an EBREAK instruction - -regardless, *tval is always written with a virtual PC when an external breakpoint is generated. - -### 1.12. Property `Unified Architecture Specification > params > CONFIG_PTR_ADDRESS` - -| | | -| ------------ | -------- | -| **Type** | `number` | -| **Required** | No | - -**Description:** Physical address of the unified discovery configuration data structure (reported in `mconfigptr`). - -| Restrictions | | -| ------------ | ------------------------- | -| **Minimum** | ≥ 0 | -| **Maximum** | ≤ 18446744073709551615 | - -### 1.13. Property `Unified Architecture Specification > params > PMP_GRANULARITY` - -| | | -| ------------ | -------- | -| **Type** | `number` | -| **Required** | No | - -**Description:** log2 of the smallest supported PMP region. - -| Restrictions | | -| ------------ | ------- | -| **Minimum** | ≥ 2 | -| **Maximum** | ≤ 66 | - -### 1.14. Property `Unified Architecture Specification > params > PMA_GRANULARITY` - -| | | -| ------------ | -------- | -| **Type** | `number` | -| **Required** | No | - -**Description:** log2 of the smallest supported PMA region. - -| Restrictions | | -| ------------ | ------- | -| **Minimum** | ≥ 2 | -| **Maximum** | ≤ 66 | - -### 1.15. Property `Unified Architecture Specification > params > PHYS_ADDR_WIDTH` - -| | | -| ------------ | -------- | -| **Type** | `number` | -| **Required** | No | - -**Description:** Number of bits in the physical address space - -| Restrictions | | -| ------------ | ---------------------- | -| **Minimum** | ≥ 1 | -| **Maximum** | ≤ 36028797018963968 | - -### 1.16. Property `Unified Architecture Specification > params > MUTABLE_MISA_C` - -| | | -| ------------ | --------- | -| **Type** | `boolean` | -| **Required** | No | -| **Default** | `"false"` | - -**Description:** When C extension is supported, wether or not it can be dynamically disabled by writing the `misa.C` bit. - -### 1.17. Property `Unified Architecture Specification > params > CACHE_BLOCK_SIZE` - -| | | -| ------------ | -------- | -| **Type** | `number` | -| **Required** | No | - -**Description:** Size, in bytes of a cache block (as seen by cache maintence operations) - -| Restrictions | | -| ------------ | ---------- | -| **Minimum** | ≥ 1 | -| **Maximum** | ≤ 65536 | - -### 1.18. Property `Unified Architecture Specification > params > NUM_EXTERNAL_GUEST_INTERRUPTS` - -| | | -| ------------ | -------- | -| **Type** | `number` | -| **Required** | No | - -**Description:** Number of supported virtualized guest external interrupts. -Corresponds to the GEILEN parameter in RISC-V specifications. - -| Restrictions | | -| ------------ | ------- | -| **Minimum** | ≥ 1 | -| **Maximum** | ≤ 63 | - -## 2. Property `Unified Architecture Specification > exception_codes` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | -| **Defined in** | misc/exception_code_schema.json | - -## 3. Property `Unified Architecture Specification > implemented_extensions` - -| | | -| ------------ | ----------------- | -| **Type** | `array of object` | -| **Required** | Yes | - -**Description:** Extensions implemented by this architecture - -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | - -| Each item of this array must be | Description | -| ------------------------------------------------------------- | ----------- | -| [implemented_extensions items](#implemented_extensions_items) | - | - -### 3.1. Unified Architecture Specification > implemented_extensions > implemented_extensions items - -| | | -| ------------------------- | ------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| --------------------------------------------------- | ------- | ----------- | ---------- | ---------- | ----------------- | -| + [name](#implemented_extensions_items_name ) | No | string | No | - | Extension name | -| + [version](#implemented_extensions_items_version ) | No | Combination | No | - | - | - -#### 3.1.1. Property `Unified Architecture Specification > implemented_extensions > implemented_extensions items > name` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | Yes | - -**Description:** Extension name - -| Restrictions | | -| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | -| **Must match regular expression** | ```^([A-WY]\|([SXZ][a-z0-9]+))$``` [Test](https://regex101.com/?regex=%5E%28%5BA-WY%5D%7C%28%5BSXZ%5D%5Ba-z0-9%5D%2B%29%29%24) | - -#### 3.1.2. Property `Unified Architecture Specification > implemented_extensions > implemented_extensions items > version` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `combining` | -| **Required** | Yes | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -| One of(Option) | -| -------------------------------------------------------- | -| [item 0](#implemented_extensions_items_version_oneOf_i0) | -| [item 1](#implemented_extensions_items_version_oneOf_i1) | - -##### 3.1.2.1. Property `Unified Architecture Specification > implemented_extensions > implemented_extensions items > version > oneOf > item 0` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -**Description:** Extension version - -##### 3.1.2.2. Property `Unified Architecture Specification > implemented_extensions > implemented_extensions items > version > oneOf > item 1` - -| | | -| ------------ | -------- | -| **Type** | `number` | -| **Required** | No | - -## 4. Property `Unified Architecture Specification > extensions` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | Yes | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ----------------------------- | ------- | ------ | ---------- | -------------------------------------------- | ----------------- | -| - [.*](#extensions_pattern1 ) | Yes | object | No | In ext/extension_schema.json#/$defs/ext_data | - | - -### 4.1. Pattern Property `Unified Architecture Specification > extensions > ext_data` -> All properties whose name matches the regular expression -```.*``` ([Test](https://regex101.com/?regex=.%2A)) -must respect the following conditions - -| | | -| ------------------------- | ------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") | -| **Defined in** | ext/extension_schema.json#/$defs/ext_data | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ---------------------------------------------------------- | ------- | ---------------- | ---------- | ---------- | --------------------------------------- | -| - [name](#extensions_pattern1_name ) | No | string | No | - | - | -| + [description](#extensions_pattern1_description ) | No | string | No | - | - | -| - [type](#extensions_pattern1_type ) | No | enum (of string) | No | - | - | -| - [requires](#extensions_pattern1_requires ) | No | Combination | No | - | Extension(s) required by this extension | -| + [versions](#extensions_pattern1_versions ) | No | array of object | No | - | - | -| - [exception_codes](#extensions_pattern1_exception_codes ) | No | array of object | No | - | - | -| - [interrupt_codes](#extensions_pattern1_interrupt_codes ) | No | array of object | No | - | - | - -#### 4.1.1. Property `Unified Architecture Specification > extensions > .* > name` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -#### 4.1.2. Property `Unified Architecture Specification > extensions > .* > description` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | Yes | - -#### 4.1.3. Property `Unified Architecture Specification > extensions > .* > type` - -| | | -| ------------ | ------------------ | -| **Type** | `enum (of string)` | -| **Required** | No | - -Must be one of: -* "unprivileged" -* "privileged" - -#### 4.1.4. Property `Unified Architecture Specification > extensions > .* > requires` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `combining` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -**Description:** Extension(s) required by this extension - -| One of(Option) | -| ------------------------------------------------ | -| [item 0](#extensions_pattern1_requires_oneOf_i0) | -| [item 1](#extensions_pattern1_requires_oneOf_i1) | - -##### 4.1.4.1. Property `Unified Architecture Specification > extensions > .* > requires > oneOf > item 0` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -##### 4.1.4.2. Property `Unified Architecture Specification > extensions > .* > requires > oneOf > item 1` - -| | | -| ------------ | ----------------- | -| **Type** | `array of string` | -| **Required** | No | - -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | - -| Each item of this array must be | Description | -| ------------------------------------------------------------ | ----------- | -| [item 1 items](#extensions_pattern1_requires_oneOf_i1_items) | - | - -###### 4.1.4.2.1. Unified Architecture Specification > extensions > .* > requires > oneOf > item 1 > item 1 items - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -#### 4.1.5. Property `Unified Architecture Specification > extensions > .* > versions` - -| | | -| ------------ | ----------------- | -| **Type** | `array of object` | -| **Required** | Yes | - -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | - -| Each item of this array must be | Description | -| ----------------------------------------------------- | ----------- | -| [versions items](#extensions_pattern1_versions_items) | - | - -##### 4.1.5.1. Unified Architecture Specification > extensions > .* > versions > versions items - -| | | -| ------------------------- | ------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ----------------------------------------------------------------------------- | ------- | ----------- | ---------- | ---------- | -------------------------- | -| + [version](#extensions_pattern1_versions_items_version ) | No | Combination | No | - | - | -| + [ratification_date](#extensions_pattern1_versions_items_ratification_date ) | No | Combination | No | - | - | -| - [changes](#extensions_pattern1_versions_items_changes ) | No | string | No | - | Changes since last version | -| - [url](#extensions_pattern1_versions_items_url ) | No | string | No | - | Link to ratified document | - -###### 4.1.5.1.1. Property `Unified Architecture Specification > extensions > .* > versions > versions items > version` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `combining` | -| **Required** | Yes | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -| One of(Option) | -| -------------------------------------------------------------- | -| [item 0](#extensions_pattern1_versions_items_version_oneOf_i0) | -| [item 1](#extensions_pattern1_versions_items_version_oneOf_i1) | - -###### 4.1.5.1.1.1. Property `Unified Architecture Specification > extensions > .* > versions > versions items > version > oneOf > item 0` - -| | | -| ------------ | -------- | -| **Type** | `number` | -| **Required** | No | - -###### 4.1.5.1.1.2. Property `Unified Architecture Specification > extensions > .* > versions > versions items > version > oneOf > item 1` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -| Restrictions | | -| --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Must match regular expression** | ```^[0-9]+(\.[0-9]+(\.[0-9]+(-[a-fA-F0-9]+)?)?)?$``` [Test](https://regex101.com/?regex=%5E%5B0-9%5D%2B%28%5C.%5B0-9%5D%2B%28%5C.%5B0-9%5D%2B%28-%5Ba-fA-F0-9%5D%2B%29%3F%29%3F%29%3F%24) | - -###### 4.1.5.1.2. Property `Unified Architecture Specification > extensions > .* > versions > versions items > ratification_date` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `combining` | -| **Required** | Yes | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -| One of(Option) | -| ------------------------------------------------------------------------ | -| [item 0](#extensions_pattern1_versions_items_ratification_date_oneOf_i0) | -| [item 1](#extensions_pattern1_versions_items_ratification_date_oneOf_i1) | -| [item 2](#extensions_pattern1_versions_items_ratification_date_oneOf_i2) | - -###### 4.1.5.1.2.1. Property `Unified Architecture Specification > extensions > .* > versions > versions items > ratification_date > oneOf > item 0` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -| Restrictions | | -| --------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| **Must match regular expression** | ```^20[0-9][0-9]-[0-9][0-9]$``` [Test](https://regex101.com/?regex=%5E20%5B0-9%5D%5B0-9%5D-%5B0-9%5D%5B0-9%5D%24) | - -###### 4.1.5.1.2.2. Property `Unified Architecture Specification > extensions > .* > versions > versions items > ratification_date > oneOf > item 1` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -| Restrictions | | -| --------------------------------- | ----------------------------------------------------------------- | -| **Must match regular expression** | ```^unknown$``` [Test](https://regex101.com/?regex=%5Eunknown%24) | - -###### 4.1.5.1.2.3. Property `Unified Architecture Specification > extensions > .* > versions > versions items > ratification_date > oneOf > item 2` - -| | | -| ------------ | ------ | -| **Type** | `null` | -| **Required** | No | - -###### 4.1.5.1.3. Property `Unified Architecture Specification > extensions > .* > versions > versions items > changes` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -**Description:** Changes since last version - -###### 4.1.5.1.4. Property `Unified Architecture Specification > extensions > .* > versions > versions items > url` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | -| **Format** | `uri` | - -**Description:** Link to ratified document - -#### 4.1.6. Property `Unified Architecture Specification > extensions > .* > exception_codes` - -| | | -| ------------ | ----------------- | -| **Type** | `array of object` | -| **Required** | No | - -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | - -| Each item of this array must be | Description | -| ------------------------------------------------------------------- | ------------------------------------ | -| [exception_codes items](#extensions_pattern1_exception_codes_items) | Exceptions defined by this extension | - -##### 4.1.6.1. Unified Architecture Specification > extensions > .* > exception_codes > exception_codes items - -| | | -| ------------------------- | ------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") | - -**Description:** Exceptions defined by this extension - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ---------------------------------------------------------- | ------- | ------- | ---------- | ---------- | ----------------- | -| - [num](#extensions_pattern1_exception_codes_items_num ) | No | integer | No | - | - | -| - [name](#extensions_pattern1_exception_codes_items_name ) | No | string | No | - | - | - -###### 4.1.6.1.1. Property `Unified Architecture Specification > extensions > .* > exception_codes > exception_codes items > num` - -| | | -| ------------ | --------- | -| **Type** | `integer` | -| **Required** | No | - -###### 4.1.6.1.2. Property `Unified Architecture Specification > extensions > .* > exception_codes > exception_codes items > name` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -#### 4.1.7. Property `Unified Architecture Specification > extensions > .* > interrupt_codes` - -| | | -| ------------ | ----------------- | -| **Type** | `array of object` | -| **Required** | No | - -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | - -| Each item of this array must be | Description | -| ------------------------------------------------------------------- | ------------------------------------ | -| [interrupt_codes items](#extensions_pattern1_interrupt_codes_items) | Interrupts defined by this extension | - -##### 4.1.7.1. Unified Architecture Specification > extensions > .* > interrupt_codes > interrupt_codes items - -| | | -| ------------------------- | ------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") | - -**Description:** Interrupts defined by this extension - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ---------------------------------------------------------- | ------- | ------- | ---------- | ---------- | ----------------- | -| - [num](#extensions_pattern1_interrupt_codes_items_num ) | No | integer | No | - | - | -| - [name](#extensions_pattern1_interrupt_codes_items_name ) | No | string | No | - | - | - -###### 4.1.7.1.1. Property `Unified Architecture Specification > extensions > .* > interrupt_codes > interrupt_codes items > num` - -| | | -| ------------ | --------- | -| **Type** | `integer` | -| **Required** | No | - -###### 4.1.7.1.2. Property `Unified Architecture Specification > extensions > .* > interrupt_codes > interrupt_codes items > name` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -## 5. Property `Unified Architecture Specification > csrs` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | Yes | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ----------------------- | ------- | ------ | ---------- | ------------------------------------------ | ----------------- | -| - [.*](#csrs_pattern1 ) | Yes | object | No | In csr/csr_schema.json#/$defs/csr_register | - | - -### 5.1. Pattern Property `Unified Architecture Specification > csrs > csr_register` -> All properties whose name matches the regular expression -```.*``` ([Test](https://regex101.com/?regex=.%2A)) -must respect the following conditions - -| | | -| ------------------------- | ------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") | -| **Defined in** | csr/csr_schema.json#/$defs/csr_register | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ---------------------------------------------------- | ------- | --------------------------- | ---------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| - [name](#csrs_pattern1_name ) | No | string | No | - | Optional name (name is extracted from object key of parent), so information is redundant | -| - [base](#csrs_pattern1_base ) | No | enum (of integer) | No | - | When a CSR is only defined in RV32, or RV64, the base that defines it. When defined in both, this field should be absent. | -| + [long_name](#csrs_pattern1_long_name ) | No | string | No | - | - | -| + [description](#csrs_pattern1_description ) | No | string | No | - | - | -| + [definedBy](#csrs_pattern1_definedBy ) | No | string | No | - | - | -| + [address](#csrs_pattern1_address ) | No | integer | No | - | CSR address | -| - [virtual_address](#csrs_pattern1_virtual_address ) | No | object | No | - | - | -| - [$comment](#csrs_pattern1_comment ) | No | object | No | - | - | -| + [priv_mode](#csrs_pattern1_priv_mode ) | No | enum (of string) | No | - | - | -| + [length](#csrs_pattern1_length ) | No | enum (of integer or string) | No | - | Length, in bits, of the CSR. Can either be a 32, 64, or XLEN | -| - [requires](#csrs_pattern1_requires ) | No | string | No | - | Extension that must be implemented for this CSR to exist | -| - [fields](#csrs_pattern1_fields ) | No | object | No | - | - | -| - [access_check](#csrs_pattern1_access_check ) | No | string | No | - | Optional function called to handle special-case checks for access permission. | -| - [sw_read](#csrs_pattern1_sw_read ) | No | string | No | - | Function that returns the value of the CSR when read by software (i.e., a Zicsr instruction). If not specified, the value last written (through hw_write) is returned. | - -#### 5.1.1. If (priv_mode = "VS") - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ------------------------------------------------------------- | ------- | ------ | ---------- | ---------- | -------------------------------------- | -| + [virtual_address](#csrs_pattern1_pattern5_virtual_address ) | No | number | No | - | Address of the CSR viewed from VS-mode | - -##### 5.1.1.1. Property `Unified Architecture Specification > csrs > .* > then > virtual_address` - -| | | -| ------------ | -------- | -| **Type** | `number` | -| **Required** | Yes | - -**Description:** Address of the CSR viewed from VS-mode - -#### 5.1.2. Property `Unified Architecture Specification > csrs > .* > name` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -**Description:** Optional name (name is extracted from object key of parent), so information is redundant - -#### 5.1.3. Property `Unified Architecture Specification > csrs > .* > base` - -| | | -| ------------ | ------------------- | -| **Type** | `enum (of integer)` | -| **Required** | No | - -**Description:** When a CSR is only defined in RV32, or RV64, the base that defines it. When defined in both, this field should be absent. - -Must be one of: -* 32 -* 64 - -#### 5.1.4. Property `Unified Architecture Specification > csrs > .* > long_name` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | Yes | - -#### 5.1.5. Property `Unified Architecture Specification > csrs > .* > description` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | Yes | - -#### 5.1.6. Property `Unified Architecture Specification > csrs > .* > definedBy` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | Yes | - -| Restrictions | | -| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| **Must match regular expression** | ```^([A-WY]\|([SXZ][a-z]+))$``` [Test](https://regex101.com/?regex=%5E%28%5BA-WY%5D%7C%28%5BSXZ%5D%5Ba-z%5D%2B%29%29%24) | - -#### 5.1.7. Property `Unified Architecture Specification > csrs > .* > address` - -| | | -| ------------ | --------- | -| **Type** | `integer` | -| **Required** | Yes | - -**Description:** CSR address - -#### 5.1.8. Property `Unified Architecture Specification > csrs > .* > virtual_address` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -#### 5.1.9. Property `Unified Architecture Specification > csrs > .* > $comment` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -#### 5.1.10. Property `Unified Architecture Specification > csrs > .* > priv_mode` - -| | | -| ------------ | ------------------ | -| **Type** | `enum (of string)` | -| **Required** | Yes | - -Must be one of: -* "M" -* "S" -* "U" -* "VS" - -#### 5.1.11. Property `Unified Architecture Specification > csrs > .* > length` - -| | | -| ------------ | ----------------------------- | -| **Type** | `enum (of integer or string)` | -| **Required** | Yes | - -**Description:** Length, in bits, of the CSR. Can either be a 32, 64, or XLEN - -Must be one of: -* 32 -* 64 -* "XLEN" - -#### 5.1.12. Property `Unified Architecture Specification > csrs > .* > requires` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -**Description:** Extension that must be implemented for this CSR to exist - -#### 5.1.13. Property `Unified Architecture Specification > csrs > .* > fields` - -| | | -| ------------------------- | ------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ------------------------------------------------- | ------- | ------ | ---------- | -------------------- | ----------------------- | -| - [^[a-zA-Z].*$](#csrs_pattern1_fields_pattern1 ) | Yes | object | No | In #/$defs/csr_field | Field in a CSR register | - -##### 5.1.13.1. Pattern Property `Unified Architecture Specification > csrs > .* > fields > csr_field` -> All properties whose name matches the regular expression -```^[a-zA-Z].*$``` ([Test](https://regex101.com/?regex=%5E%5Ba-zA-Z%5D.%2A%24)) -must respect the following conditions - -| | | -| ------------------------- | ------------------------------------------------------- | -| **Type** | `combining` | -| **Required** | No | -| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") | -| **Defined in** | #/$defs/csr_field | - -**Description:** Field in a CSR register - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| -------------------------------------------------------------- | ------- | ---------------- | ---------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| + [location](#csrs_pattern1_fields_pattern1_location ) | No | Combination | No | - | Location of the field within the CSR register | -| + [description](#csrs_pattern1_fields_pattern1_description ) | No | string | No | - | Function of the field | -| + [type](#csrs_pattern1_fields_pattern1_type ) | No | enum (of string) | No | - | Type of the field. One of:
    * RO: Read-only immutable
    * RO-H: Read-only, updated by hardware
    * RW: Read-write, not updated by hardware
    * RW-R: Read-write, but values are restricted. write(value) must be provided
    * RW-H: Read-write, with hardware updates
    * RW-RH: Read-write, with hardware updates, but values are restricted. write(value) must be provded | -| - [alias](#csrs_pattern1_fields_pattern1_alias ) | No | Combination | No | - | Other CSR fields that alias with this field | -| - [definedBy](#csrs_pattern1_fields_pattern1_definedBy ) | No | Combination | No | - | Where this field is defined: indicates that the field is only present if the extension(s) are implemented. If definedBy is not given, defaults to the definedBy field of the parent CSR | -| - [affectedBy](#csrs_pattern1_fields_pattern1_affectedBy ) | No | Combination | No | - | Extension(s) that affect the definition of the field beyond the extension (or base) the field is originally defined in | -| - [reset_value](#csrs_pattern1_fields_pattern1_reset_value ) | No | object | No | - | - | -| - [value](#csrs_pattern1_fields_pattern1_value ) | No | object | No | - | - | -| - [write(value)](#csrs_pattern1_fields_pattern1_write(value) ) | No | object | No | - | - | - -| All of(Requirement) | -| ---------------------------------------------------- | -| [item 0](#csrs_pattern1_fields_pattern1_pattern4_i0) | -| [item 1](#csrs_pattern1_fields_pattern1_pattern4_i1) | -| [item 2](#csrs_pattern1_fields_pattern1_pattern4_i2) | -| [item 3](#csrs_pattern1_fields_pattern1_pattern4_i3) | -| [item 4](#csrs_pattern1_fields_pattern1_pattern4_i4) | -| [item 5](#csrs_pattern1_fields_pattern1_pattern4_i5) | - -###### 5.1.13.1.1. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 0` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -###### 5.1.13.1.1.1. If (type = "RO") - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ----------------------------------------------------------------- | ------- | ----------- | ---------- | ---------- | ----------------- | -| + [value](#csrs_pattern1_fields_pattern1_pattern4_i0_then_value ) | No | Combination | No | - | - | - -###### 5.1.13.1.1.1.1. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 0 > then > value` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `combining` | -| **Required** | Yes | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -| One of(Option) | -| ------------------------------------------------------------------------ | -| [item 0](#csrs_pattern1_fields_pattern1_pattern4_i0_then_value_oneOf_i0) | -| [item 1](#csrs_pattern1_fields_pattern1_pattern4_i0_then_value_oneOf_i1) | - -###### 5.1.13.1.1.1.1.1. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 0 > then > value > oneOf > item 0` - -| | | -| ------------ | --------- | -| **Type** | `integer` | -| **Required** | No | - -###### 5.1.13.1.1.1.1.2. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 0 > then > value > oneOf > item 1` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -| Restrictions | | -| --------------------------------- | ----------------------------------------------------------------------------- | -| **Must match regular expression** | ```^<%=.*%>$``` [Test](https://regex101.com/?regex=%5E%3C%25%3D.%2A%25%3E%24) | - -###### 5.1.13.1.2. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 1` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -###### 5.1.13.1.2.1. If (type = "RO-H") - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ----------------------------------------------------------------------------- | ------- | ------- | ---------- | ---------- | ----------------- | -| + [reset_value](#csrs_pattern1_fields_pattern1_pattern4_i1_then_reset_value ) | No | integer | No | - | - | - -###### 5.1.13.1.2.1.1. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 1 > then > reset_value` - -| | | -| ------------ | --------- | -| **Type** | `integer` | -| **Required** | Yes | - -###### 5.1.13.1.3. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 2` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -###### 5.1.13.1.3.1. If (type = "RW") - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ----------------------------------------------------------------------------- | ------- | ------- | ---------- | ---------- | ----------------- | -| + [reset_value](#csrs_pattern1_fields_pattern1_pattern4_i2_then_reset_value ) | No | integer | No | - | - | - -###### 5.1.13.1.3.1.1. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 2 > then > reset_value` - -| | | -| ------------ | --------- | -| **Type** | `integer` | -| **Required** | Yes | - -###### 5.1.13.1.4. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 3` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -###### 5.1.13.1.4.1. If (type = "RW-H") - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ----------------------------------------------------------------------------- | ------- | ------- | ---------- | ---------- | ----------------- | -| + [reset_value](#csrs_pattern1_fields_pattern1_pattern4_i3_then_reset_value ) | No | integer | No | - | - | - -###### 5.1.13.1.4.1.1. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 3 > then > reset_value` - -| | | -| ------------ | --------- | -| **Type** | `integer` | -| **Required** | Yes | - -###### 5.1.13.1.5. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 4` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -###### 5.1.13.1.5.1. If (type = "RW-R") - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ------------------------------------------------------------------------------- | ------- | ------- | ---------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| + [write(value)](#csrs_pattern1_fields_pattern1_pattern4_i4_then_write(value) ) | No | string | No | In #/$defs/write(value) | Function implementing custom write behavior for the CSR. Given a 'value', return either the value to be written in the field or false if the write would be illegal. 'value' is the value of the entire CSR, which is sometimes needed to detect illegal writes | -| + [reset_value](#csrs_pattern1_fields_pattern1_pattern4_i4_then_reset_value ) | No | integer | No | - | - | - -###### 5.1.13.1.5.1.1. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 4 > then > write(value)` - -| | | -| -------------- | -------------------- | -| **Type** | `string` | -| **Required** | Yes | -| **Defined in** | #/$defs/write(value) | - -**Description:** Function implementing custom write behavior for the CSR. Given a 'value', return either the value to be written in the field or false if the write would be illegal. 'value' is the value of the entire CSR, which is sometimes needed to detect illegal writes - -###### 5.1.13.1.5.1.2. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 4 > then > reset_value` - -| | | -| ------------ | --------- | -| **Type** | `integer` | -| **Required** | Yes | - -###### 5.1.13.1.6. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 5` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -###### 5.1.13.1.6.1. If (type = "RW-RH") - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ------------------------------------------------------------------------------- | ------- | ------- | ---------- | ------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| + [write(value)](#csrs_pattern1_fields_pattern1_pattern4_i5_then_write(value) ) | No | string | No | Same as [write(value)](#csrs_pattern1_fields_pattern1_pattern4_i4_then_write(value) ) | Function implementing custom write behavior for the CSR. Given a 'value', return either the value to be written in the field or false if the write would be illegal. 'value' is the value of the entire CSR, which is sometimes needed to detect illegal writes | -| + [reset_value](#csrs_pattern1_fields_pattern1_pattern4_i5_then_reset_value ) | No | integer | No | - | - | - -###### 5.1.13.1.6.1.1. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 5 > then > write(value)` - -| | | -| ---------------------- | ---------------------------------------------------------------------------- | -| **Type** | `string` | -| **Required** | Yes | -| **Same definition as** | [write(value)](#csrs_pattern1_fields_pattern1_pattern4_i4_then_write(value)) | - -**Description:** Function implementing custom write behavior for the CSR. Given a 'value', return either the value to be written in the field or false if the write would be illegal. 'value' is the value of the entire CSR, which is sometimes needed to detect illegal writes - -###### 5.1.13.1.6.1.2. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > allOf > item 5 > then > reset_value` - -| | | -| ------------ | --------- | -| **Type** | `integer` | -| **Required** | Yes | - -###### 5.1.13.1.7. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > location` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `combining` | -| **Required** | Yes | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -**Description:** Location of the field within the CSR register - -| One of(Option) | -| ---------------------------------------------------------- | -| [item 0](#csrs_pattern1_fields_pattern1_location_oneOf_i0) | -| [item 1](#csrs_pattern1_fields_pattern1_location_oneOf_i1) | - -###### 5.1.13.1.7.1. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > location > oneOf > item 0` - -| | | -| ------------ | -------- | -| **Type** | `number` | -| **Required** | No | - -**Description:** Location of a single bit - -###### 5.1.13.1.7.2. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > location > oneOf > item 1` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -**Description:** Location range of a multibit field - -| Restrictions | | -| --------------------------------- | ----------------------------------------------------------------------------------------- | -| **Must match regular expression** | ```^[0-9]+-[0-9]+$``` [Test](https://regex101.com/?regex=%5E%5B0-9%5D%2B-%5B0-9%5D%2B%24) | - -###### 5.1.13.1.8. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > description` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | Yes | - -**Description:** Function of the field - -###### 5.1.13.1.9. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > type` - -| | | -| ------------ | ------------------ | -| **Type** | `enum (of string)` | -| **Required** | Yes | - -**Description:** Type of the field. One of: - * RO: Read-only immutable - * RO-H: Read-only, updated by hardware - * RW: Read-write, not updated by hardware - * RW-R: Read-write, but values are restricted. write(value) must be provided - * RW-H: Read-write, with hardware updates - * RW-RH: Read-write, with hardware updates, but values are restricted. write(value) must be provded - -Must be one of: -* "RO" -* "RO-H" -* "RW" -* "RW-R" -* "RW-H" -* "RW-RH" - -###### 5.1.13.1.10. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > alias` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `combining` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -**Description:** Other CSR fields that alias with this field - -| One of(Option) | -| ------------------------------------------------------- | -| [item 0](#csrs_pattern1_fields_pattern1_alias_oneOf_i0) | -| [item 1](#csrs_pattern1_fields_pattern1_alias_oneOf_i1) | - -###### 5.1.13.1.10.1. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > alias > oneOf > item 0` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -| Restrictions | | -| --------------------------------- | --------------------------------------------------------------------------------------------------- | -| **Must match regular expression** | ```^[a-z]+\.[A-Z0-9]+$``` [Test](https://regex101.com/?regex=%5E%5Ba-z%5D%2B%5C.%5BA-Z0-9%5D%2B%24) | - -###### 5.1.13.1.10.2. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > alias > oneOf > item 1` - -| | | -| ------------ | ----------------- | -| **Type** | `array of string` | -| **Required** | No | - -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | - -| Each item of this array must be | Description | -| ------------------------------------------------------------------- | ----------- | -| [item 1 items](#csrs_pattern1_fields_pattern1_alias_oneOf_i1_items) | - | - -###### 5.1.13.1.10.2.1. Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > alias > oneOf > item 1 > item 1 items - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -| Restrictions | | -| --------------------------------- | --------------------------------------------------------------------------------------------------- | -| **Must match regular expression** | ```^[a-z]+\.[A-Z0-9]+$``` [Test](https://regex101.com/?regex=%5E%5Ba-z%5D%2B%5C.%5BA-Z0-9%5D%2B%24) | - -###### 5.1.13.1.11. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > definedBy` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `combining` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -**Description:** Where this field is defined: indicates that the field is only present if the extension(s) are implemented. If definedBy is not given, defaults to the definedBy field of the parent CSR - -| One of(Option) | -| ----------------------------------------------------------- | -| [item 0](#csrs_pattern1_fields_pattern1_definedBy_oneOf_i0) | -| [item 1](#csrs_pattern1_fields_pattern1_definedBy_oneOf_i1) | - -###### 5.1.13.1.11.1. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > definedBy > oneOf > item 0` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -**Description:** An extension name - -| Restrictions | | -| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| **Must match regular expression** | ```^([A-WY]\|([SXZ][a-z]+))$``` [Test](https://regex101.com/?regex=%5E%28%5BA-WY%5D%7C%28%5BSXZ%5D%5Ba-z%5D%2B%29%29%24) | - -###### 5.1.13.1.11.2. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > definedBy > oneOf > item 1` - -| | | -| ------------ | ----------------- | -| **Type** | `array of string` | -| **Required** | No | - -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | - -| Each item of this array must be | Description | -| ----------------------------------------------------------------------- | ----------------- | -| [item 1 items](#csrs_pattern1_fields_pattern1_definedBy_oneOf_i1_items) | An extension name | - -###### 5.1.13.1.11.2.1. Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > definedBy > oneOf > item 1 > item 1 items - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -**Description:** An extension name - -| Restrictions | | -| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| **Must match regular expression** | ```^([A-WY]\|([SXZ][a-z]+))$``` [Test](https://regex101.com/?regex=%5E%28%5BA-WY%5D%7C%28%5BSXZ%5D%5Ba-z%5D%2B%29%29%24) | - -###### 5.1.13.1.12. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > affectedBy` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `combining` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -**Description:** Extension(s) that affect the definition of the field beyond the extension (or base) the field is originally defined in - -| One of(Option) | -| ------------------------------------------------------------ | -| [item 0](#csrs_pattern1_fields_pattern1_affectedBy_oneOf_i0) | -| [item 1](#csrs_pattern1_fields_pattern1_affectedBy_oneOf_i1) | - -###### 5.1.13.1.12.1. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > affectedBy > oneOf > item 0` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -| Restrictions | | -| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| **Must match regular expression** | ```^(RV64)\|([A-WY]\|(Z[a-z]+)\|(S[a-z]+))$``` [Test](https://regex101.com/?regex=%5E%28RV64%29%7C%28%5BA-WY%5D%7C%28Z%5Ba-z%5D%2B%29%7C%28S%5Ba-z%5D%2B%29%29%24) | - -###### 5.1.13.1.12.2. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > affectedBy > oneOf > item 1` - -| | | -| ------------ | ----------------- | -| **Type** | `array of string` | -| **Required** | No | - -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | - -| Each item of this array must be | Description | -| ------------------------------------------------------------------------ | ----------- | -| [item 1 items](#csrs_pattern1_fields_pattern1_affectedBy_oneOf_i1_items) | - | - -###### 5.1.13.1.12.2.1. Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > affectedBy > oneOf > item 1 > item 1 items - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -| Restrictions | | -| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| **Must match regular expression** | ```^(RV64)\|([A-WY]\|(Z[a-z]+)\|(S[a-z]+))$``` [Test](https://regex101.com/?regex=%5E%28RV64%29%7C%28%5BA-WY%5D%7C%28Z%5Ba-z%5D%2B%29%7C%28S%5Ba-z%5D%2B%29%29%24) | - -###### 5.1.13.1.13. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > reset_value` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -###### 5.1.13.1.14. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > value` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -###### 5.1.13.1.15. Property `Unified Architecture Specification > csrs > .* > fields > ^[a-zA-Z].*$ > write(value)` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -#### 5.1.14. Property `Unified Architecture Specification > csrs > .* > access_check` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -**Description:** Optional function called to handle special-case checks for access permission. - -#### 5.1.15. Property `Unified Architecture Specification > csrs > .* > sw_read` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -**Description:** Function that returns the value of the CSR when read by software (i.e., a Zicsr instruction). If not specified, the value last written (through hw_write) is returned. - -## 6. Property `Unified Architecture Specification > implemented_csrs` - -| | | -| ------------ | ----------------- | -| **Type** | `array of string` | -| **Required** | Yes | - -**Description:** CSRs implemented by this architecture - -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | - -| Each item of this array must be | Description | -| ------------------------------------------------- | ----------- | -| [implemented_csrs items](#implemented_csrs_items) | CSR name | - -### 6.1. Unified Architecture Specification > implemented_csrs > implemented_csrs items - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -**Description:** CSR name - -| Restrictions | | -| --------------------------------- | ----------------------------------------------------------------------------------------------- | -| **Must match regular expression** | ```^[a-z][a-zA-Z0-9]+$``` [Test](https://regex101.com/?regex=%5E%5Ba-z%5D%5Ba-zA-Z0-9%5D%2B%24) | - -## 7. Property `Unified Architecture Specification > instructions` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | Yes | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ------------------------------------------------- | ------- | ------ | ---------- | ----------------------------------------- | ----------------- | -| - [.*](#instructions_pattern1 ) | Yes | object | No | In inst/inst_schema.json#/$defs/inst_data | - | -| - [additionalProperties](#instructions_pattern2 ) | Yes | object | No | - | - | - -### 7.1. Pattern Property `Unified Architecture Specification > instructions > inst_data` -> All properties whose name matches the regular expression -```.*``` ([Test](https://regex101.com/?regex=.%2A)) -must respect the following conditions - -| | | -| ------------------------- | ------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") | -| **Defined in** | inst/inst_schema.json#/$defs/inst_data | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| -------------------------------------------------------- | ------- | ------------------------- | ---------- | ---------- | ---------------------------------------------------------------------------------------------------- | -| - [name](#instructions_pattern1_name ) | No | string | No | - | - | -| + [long_name](#instructions_pattern1_long_name ) | No | string | No | - | Short descrption of the instruction | -| + [description](#instructions_pattern1_description ) | No | string | No | - | Detailed description of the instruction | -| + [definedBy](#instructions_pattern1_definedBy ) | No | Combination | No | - | Extension(s) that defines the instruction | -| - [base](#instructions_pattern1_base ) | No | enum (of integer) | No | - | When present, instruction is only defined for RV32 or RV64 base | -| + [access](#instructions_pattern1_access ) | No | object | No | - | - | -| - [access_detail](#instructions_pattern1_access_detail ) | No | string | No | - | Extra detail about access when at least one mode is 'sometimes' | -| - [raises](#instructions_pattern1_raises ) | No | array of enum (of string) | No | - | Types of exceptions that can be raised by this instruction (excluding Instruction Page/Access Fault) | -| - [operation](#instructions_pattern1_operation ) | No | string | No | - | Functional description of the instruction using ISA language | -| + [assembly](#instructions_pattern1_assembly ) | No | string | No | - | Assembly format of the instruction. Can use decode variables | - -#### 7.1.1. Property `Unified Architecture Specification > instructions > .* > name` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -| Restrictions | | -| --------------------------------- | ----------------------------------------------------------------------------- | -| **Must match regular expression** | ```^[a-z0-9.]+$``` [Test](https://regex101.com/?regex=%5E%5Ba-z0-9.%5D%2B%24) | - -#### 7.1.2. Property `Unified Architecture Specification > instructions > .* > long_name` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | Yes | - -**Description:** Short descrption of the instruction - -#### 7.1.3. Property `Unified Architecture Specification > instructions > .* > description` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | Yes | - -**Description:** Detailed description of the instruction - -#### 7.1.4. Property `Unified Architecture Specification > instructions > .* > definedBy` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `combining` | -| **Required** | Yes | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -**Description:** Extension(s) that defines the instruction - -| One of(Option) | -| ------------------------------------------------------ | -| [extension](#instructions_pattern1_definedBy_oneOf_i0) | -| [item 1](#instructions_pattern1_definedBy_oneOf_i1) | - -##### 7.1.4.1. Property `Unified Architecture Specification > instructions > .* > definedBy > oneOf > extension` - -| | | -| -------------- | ----------------- | -| **Type** | `string` | -| **Required** | No | -| **Defined in** | #/$defs/extension | - -**Description:** RISC-V Extension - -| Restrictions | | -| --------------------------------- | ------------------------------------------------------------------------------------------------------------------ | -| **Must match regular expression** | ```^[A-W,Y]\|([XZ][a-z]+)$``` [Test](https://regex101.com/?regex=%5E%5BA-W%2CY%5D%7C%28%5BXZ%5D%5Ba-z%5D%2B%29%24) | - -##### 7.1.4.2. Property `Unified Architecture Specification > instructions > .* > definedBy > oneOf > item 1` - -| | | -| ------------ | ------- | -| **Type** | `array` | -| **Required** | No | - -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | - -| Each item of this array must be | Description | -| ------------------------------------------------------------ | ---------------- | -| [extension](#instructions_pattern1_definedBy_oneOf_i1_items) | RISC-V Extension | - -###### 7.1.4.2.1. Unified Architecture Specification > instructions > .* > definedBy > oneOf > item 1 > extension - -| | | -| ---------------------- | ------------------------------------------------------------------------------------- | -| **Type** | `string` | -| **Required** | No | -| **Same definition as** | [instructions_pattern1_definedBy_oneOf_i0](#instructions_pattern1_definedBy_oneOf_i0) | - -**Description:** RISC-V Extension - -#### 7.1.5. Property `Unified Architecture Specification > instructions > .* > base` - -| | | -| ------------ | ------------------- | -| **Type** | `enum (of integer)` | -| **Required** | No | - -**Description:** When present, instruction is only defined for RV32 or RV64 base - -Must be one of: -* 32 -* 64 - -#### 7.1.6. Property `Unified Architecture Specification > instructions > .* > access` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | Yes | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ----------------------------------------- | ------- | ---------------- | ---------- | ---------- | ----------------- | -| - [m](#instructions_pattern1_access_m ) | No | enum (of string) | No | - | - | -| + [s](#instructions_pattern1_access_s ) | No | enum (of string) | No | - | - | -| + [u](#instructions_pattern1_access_u ) | No | enum (of string) | No | - | - | -| + [vs](#instructions_pattern1_access_vs ) | No | enum (of string) | No | - | - | -| + [vu](#instructions_pattern1_access_vu ) | No | enum (of string) | No | - | - | - -##### 7.1.6.1. Property `Unified Architecture Specification > instructions > .* > access > m` - -| | | -| ------------ | ------------------ | -| **Type** | `enum (of string)` | -| **Required** | No | -| **Default** | `"always"` | - -Must be one of: -* "always" -* "sometimes" -* "never" - -##### 7.1.6.2. Property `Unified Architecture Specification > instructions > .* > access > s` - -| | | -| ------------ | ------------------ | -| **Type** | `enum (of string)` | -| **Required** | Yes | -| **Default** | `"always"` | - -Must be one of: -* "always" -* "sometimes" -* "never" - -##### 7.1.6.3. Property `Unified Architecture Specification > instructions > .* > access > u` - -| | | -| ------------ | ------------------ | -| **Type** | `enum (of string)` | -| **Required** | Yes | -| **Default** | `"always"` | - -Must be one of: -* "always" -* "sometimes" -* "never" - -##### 7.1.6.4. Property `Unified Architecture Specification > instructions > .* > access > vs` - -| | | -| ------------ | ------------------ | -| **Type** | `enum (of string)` | -| **Required** | Yes | -| **Default** | `"always"` | - -Must be one of: -* "always" -* "sometimes" -* "never" - -##### 7.1.6.5. Property `Unified Architecture Specification > instructions > .* > access > vu` - -| | | -| ------------ | ------------------ | -| **Type** | `enum (of string)` | -| **Required** | Yes | -| **Default** | `"always"` | - -Must be one of: -* "always" -* "sometimes" -* "never" - -#### 7.1.7. Property `Unified Architecture Specification > instructions > .* > access_detail` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -**Description:** Extra detail about access when at least one mode is 'sometimes' - -#### 7.1.8. Property `Unified Architecture Specification > instructions > .* > raises` - -| | | -| ------------ | --------------------------- | -| **Type** | `array of enum (of string)` | -| **Required** | No | -| **Default** | `[]` | - -**Description:** Types of exceptions that can be raised by this instruction (excluding Instruction Page/Access Fault) - -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | - -| Each item of this array must be | Description | -| --------------------------------------------------- | ----------- | -| [raises items](#instructions_pattern1_raises_items) | - | - -##### 7.1.8.1. Unified Architecture Specification > instructions > .* > raises > raises items - -| | | -| ------------ | ------------------ | -| **Type** | `enum (of string)` | -| **Required** | No | - -Must be one of: -* "Store/AMO Page Fault" -* "Store/AMO Guest-Page Fault" -* "Store Access Fault" -* "Illegal Instruction" -* "Virtual Instruction" -* "MisalignedAddress" - -#### 7.1.9. Property `Unified Architecture Specification > instructions > .* > operation` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -**Description:** Functional description of the instruction using ISA language - -#### 7.1.10. Property `Unified Architecture Specification > instructions > .* > assembly` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | Yes | - -**Description:** Assembly format of the instruction. Can use decode variables - -### 7.2. Pattern Property `Unified Architecture Specification > instructions > additionalProperties` -> All properties whose name matches the regular expression -```additionalProperties``` ([Test](https://regex101.com/?regex=additionalProperties)) -must respect the following conditions - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -## 8. Property `Unified Architecture Specification > implemented_instructions` - -| | | -| ------------ | ----------------- | -| **Type** | `array of string` | -| **Required** | Yes | - -**Description:** Instructions implemented by this architecture - -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | - -| Each item of this array must be | Description | -| ----------------------------------------------------------------- | ---------------- | -| [implemented_instructions items](#implemented_instructions_items) | Instruction name | - -### 8.1. Unified Architecture Specification > implemented_instructions > implemented_instructions items - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -**Description:** Instruction name - -| Restrictions | | -| --------------------------------- | ------------------------------------------------------------------------------------------------- | -| **Must match regular expression** | ```^[a-z][a-zA-Z0-9.]+$``` [Test](https://regex101.com/?regex=%5E%5Ba-z%5D%5Ba-zA-Z0-9.%5D%2B%24) | - ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2024-06-12 at 20:18:06 -0700 diff --git a/docs/schema/csr_schema.html b/docs/schema/csr_schema.html deleted file mode 100644 index 9c07ce019..000000000 --- a/docs/schema/csr_schema.html +++ /dev/null @@ -1,2 +0,0 @@ - CSR description

    CSR description

    Type: object

    A CSR register specification

    No Additional Properties
    Example:

    "misa:\\n  long_name: Machine ISA Control\\n  address: 0x301\\n  priv_mode: M\\n  length: 64\\n  description: Reports the XLEN and 'major' extensions supported by the ISA.\\n  definedBy: I\\n  fields:\\n    MXL:\\n      location: 63-62\\n      description: XLEN in M-mode.\\n      type: RO\\n      value: 2\\n    Extensions:      location: 25-0\\n      description: |\\n        Indicates support for major (single letter) ISA extensions.\\n\\n        Value corresponds to A, D, F, H, I, M, S, U\\n      type: RO\\n      value: 0x1411A9"
    -

    All properties whose name matches the following regular expression must respect the following conditions

    Property name regular expression: ^[a-z][a-z0-9A-Z]+$
    Type: object

    CSR name

    No Additional Properties

    If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.

    Type: object

    Type: const
    Specific value: "VS"
    Type: object

    Type: number

    Address of the CSR viewed from VS-mode

    Type: string

    Optional name (name is extracted from object key of parent), so information is redundant

    Type: enum (of integer)

    When a CSR is only defined in RV32, or RV64, the base that defines it. When defined in both, this field should be absent.

    Must be one of:

    • 32
    • 64

    Type: string

    Type: string

    Type: string
    Must match regular expression: ^([A-WY]|([SXZ][a-z]+))$

    Type: integer

    CSR address

    Type: object

    Type: enum (of string)

    Must be one of:

    • "M"
    • "S"
    • "U"
    • "VS"

    Type: enum (of integer or string)

    Length, in bits, of the CSR. Can either be a 32, 64, or XLEN

    Must be one of:

    • 32
    • 64
    • "XLEN"

    Type: string

    Extension that must be implemented for this CSR to exist

    Type: object
    No Additional Properties

    All properties whose name matches the following regular expression must respect the following conditions

    Property name regular expression: ^[a-zA-Z].*$
    Type: object

    Field in a CSR register

    No Additional Properties

    Type: object

    If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.

    Type: object

    If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.

    Type: object

    Type: const
    Specific value: "RO-H"
    Type: object

    If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.

    Type: object

    Type: const
    Specific value: "RW"
    Type: object

    If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.

    Type: object

    Type: const
    Specific value: "RW-H"
    Type: object

    If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.

    Type: object

    Type: const
    Specific value: "RW-R"
    Type: object

    Type: string

    Function implementing custom write behavior for the CSR. Given a 'value', return either the value to be written in the field or false if the write would be illegal. 'value' is the value of the entire CSR, which is sometimes needed to detect illegal writes

    Type: object

    If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.

    Type: object

    Type: const
    Specific value: "RW-RH"
    Type: object

    Type: string

    Function implementing custom write behavior for the CSR. Given a 'value', return either the value to be written in the field or false if the write would be illegal. 'value' is the value of the entire CSR, which is sometimes needed to detect illegal writes

    Same definition as write(value)


    Location of the field within the CSR register

    Type: number

    Location of a single bit

    Type: string

    Location range of a multibit field

    Must match regular expression: ^[0-9]+-[0-9]+$

    Type: string

    Function of the field

    Type: enum (of string)

    Type of the field. One of:
    * RO: Read-only immutable
    * RO-H: Read-only, updated by hardware
    * RW: Read-write, not updated by hardware
    * RW-R: Read-write, but values are restricted. write(value) must be provided
    * RW-H: Read-write, with hardware updates
    * RW-RH: Read-write, with hardware updates, but values are restricted. write(value) must be provded

    Must be one of:

    • "RO"
    • "RO-H"
    • "RW"
    • "RW-R"
    • "RW-H"
    • "RW-RH"


    Other CSR fields that alias with this field

    Type: string
    Must match regular expression: ^[a-z]+\.[A-Z0-9]+$
    Type: array of string
    No Additional Items

    Each item of this array must be:

    Type: string
    Must match regular expression: ^[a-z]+\.[A-Z0-9]+$


    Where this field is defined: indicates that the field is only present if the extension(s) are implemented. If definedBy is not given, defaults to the definedBy field of the parent CSR

    Type: string

    An extension name

    Must match regular expression: ^([A-WY]|([SXZ][a-z]+))$
    Type: array of string
    No Additional Items

    Each item of this array must be:

    Type: string

    An extension name

    Must match regular expression: ^([A-WY]|([SXZ][a-z]+))$


    Extension(s) that affect the definition of the field beyond the extension (or base) the field is originally defined in

    Type: string
    Must match regular expression: ^(RV64)|([A-WY]|(Z[a-z]+)|(S[a-z]+))$
    Type: array of string
    No Additional Items

    Each item of this array must be:

    Type: string
    Must match regular expression: ^(RV64)|([A-WY]|(Z[a-z]+)|(S[a-z]+))$

    Type: string

    Optional function called to handle special-case checks for access permission.

    Type: string

    Function that returns the value of the CSR when read by software (i.e., a Zicsr instruction). If not specified, the value last written (through hw_write) is returned.

    \ No newline at end of file diff --git a/docs/schema/csr_schema.md b/docs/schema/csr_schema.md deleted file mode 100644 index 58a264b32..000000000 --- a/docs/schema/csr_schema.md +++ /dev/null @@ -1,783 +0,0 @@ -# CSR description - -- [1. Pattern Property `CSR description > csr_register`](#pattern1) - - [1.1. If (priv_mode = "VS")](#autogenerated_heading_2) - - [1.1.1. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > then > virtual_address`](#pattern1_pattern5_virtual_address) - - [1.2. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > name`](#pattern1_name) - - [1.3. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > base`](#pattern1_base) - - [1.4. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > long_name`](#pattern1_long_name) - - [1.5. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > description`](#pattern1_description) - - [1.6. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > definedBy`](#pattern1_definedBy) - - [1.7. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > address`](#pattern1_address) - - [1.8. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > virtual_address`](#pattern1_virtual_address) - - [1.9. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > $comment`](#pattern1_comment) - - [1.10. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > priv_mode`](#pattern1_priv_mode) - - [1.11. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > length`](#pattern1_length) - - [1.12. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > requires`](#pattern1_requires) - - [1.13. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields`](#pattern1_fields) - - [1.13.1. Pattern Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > csr_field`](#pattern1_fields_pattern1) - - [1.13.1.1. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 0`](#pattern1_fields_pattern1_pattern4_i0) - - [1.13.1.1.1. If (type = "RO")](#autogenerated_heading_3) - - [1.13.1.1.1.1. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 0 > then > value`](#pattern1_fields_pattern1_pattern4_i0_then_value) - - [1.13.1.1.1.1.1. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 0 > then > value > oneOf > item 0`](#pattern1_fields_pattern1_pattern4_i0_then_value_oneOf_i0) - - [1.13.1.1.1.1.2. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 0 > then > value > oneOf > item 1`](#pattern1_fields_pattern1_pattern4_i0_then_value_oneOf_i1) - - [1.13.1.2. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 1`](#pattern1_fields_pattern1_pattern4_i1) - - [1.13.1.2.1. If (type = "RO-H")](#autogenerated_heading_4) - - [1.13.1.2.1.1. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 1 > then > reset_value`](#pattern1_fields_pattern1_pattern4_i1_then_reset_value) - - [1.13.1.3. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 2`](#pattern1_fields_pattern1_pattern4_i2) - - [1.13.1.3.1. If (type = "RW")](#autogenerated_heading_5) - - [1.13.1.3.1.1. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 2 > then > reset_value`](#pattern1_fields_pattern1_pattern4_i2_then_reset_value) - - [1.13.1.4. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 3`](#pattern1_fields_pattern1_pattern4_i3) - - [1.13.1.4.1. If (type = "RW-H")](#autogenerated_heading_6) - - [1.13.1.4.1.1. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 3 > then > reset_value`](#pattern1_fields_pattern1_pattern4_i3_then_reset_value) - - [1.13.1.5. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 4`](#pattern1_fields_pattern1_pattern4_i4) - - [1.13.1.5.1. If (type = "RW-R")](#autogenerated_heading_7) - - [1.13.1.5.1.1. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 4 > then > write(value)`](#pattern1_fields_pattern1_pattern4_i4_then_write(value)) - - [1.13.1.5.1.2. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 4 > then > reset_value`](#pattern1_fields_pattern1_pattern4_i4_then_reset_value) - - [1.13.1.6. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 5`](#pattern1_fields_pattern1_pattern4_i5) - - [1.13.1.6.1. If (type = "RW-RH")](#autogenerated_heading_8) - - [1.13.1.6.1.1. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 5 > then > write(value)`](#pattern1_fields_pattern1_pattern4_i5_then_write(value)) - - [1.13.1.6.1.2. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 5 > then > reset_value`](#pattern1_fields_pattern1_pattern4_i5_then_reset_value) - - [1.13.1.7. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > location`](#pattern1_fields_pattern1_location) - - [1.13.1.7.1. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > location > oneOf > item 0`](#pattern1_fields_pattern1_location_oneOf_i0) - - [1.13.1.7.2. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > location > oneOf > item 1`](#pattern1_fields_pattern1_location_oneOf_i1) - - [1.13.1.8. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > description`](#pattern1_fields_pattern1_description) - - [1.13.1.9. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > type`](#pattern1_fields_pattern1_type) - - [1.13.1.10. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > alias`](#pattern1_fields_pattern1_alias) - - [1.13.1.10.1. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > alias > oneOf > item 0`](#pattern1_fields_pattern1_alias_oneOf_i0) - - [1.13.1.10.2. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > alias > oneOf > item 1`](#pattern1_fields_pattern1_alias_oneOf_i1) - - [1.13.1.10.2.1. CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > alias > oneOf > item 1 > item 1 items](#autogenerated_heading_9) - - [1.13.1.11. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > definedBy`](#pattern1_fields_pattern1_definedBy) - - [1.13.1.11.1. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > definedBy > oneOf > item 0`](#pattern1_fields_pattern1_definedBy_oneOf_i0) - - [1.13.1.11.2. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > definedBy > oneOf > item 1`](#pattern1_fields_pattern1_definedBy_oneOf_i1) - - [1.13.1.11.2.1. CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > definedBy > oneOf > item 1 > item 1 items](#autogenerated_heading_10) - - [1.13.1.12. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > affectedBy`](#pattern1_fields_pattern1_affectedBy) - - [1.13.1.12.1. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > affectedBy > oneOf > item 0`](#pattern1_fields_pattern1_affectedBy_oneOf_i0) - - [1.13.1.12.2. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > affectedBy > oneOf > item 1`](#pattern1_fields_pattern1_affectedBy_oneOf_i1) - - [1.13.1.12.2.1. CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > affectedBy > oneOf > item 1 > item 1 items](#autogenerated_heading_11) - - [1.13.1.13. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > reset_value`](#pattern1_fields_pattern1_reset_value) - - [1.13.1.14. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > value`](#pattern1_fields_pattern1_value) - - [1.13.1.15. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > write(value)`](#pattern1_fields_pattern1_write(value)) - - [1.14. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > access_check`](#pattern1_access_check) - - [1.15. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > sw_read`](#pattern1_sw_read) - -**Title:** CSR description - -| | | -| ------------------------- | ------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") | - -**Description:** A CSR register specification - -**Example:** - -```json -"misa:\\n long_name: Machine ISA Control\\n address: 0x301\\n priv_mode: M\\n length: 64\\n description: Reports the XLEN and 'major' extensions supported by the ISA.\\n definedBy: I\\n fields:\\n MXL:\\n location: 63-62\\n description: XLEN in M-mode.\\n type: RO\\n value: 2\\n Extensions: location: 25-0\\n description: |\\n Indicates support for major (single letter) ISA extensions.\\n\\n Value corresponds to A, D, F, H, I, M, S, U\\n type: RO\\n value: 0x1411A9" -``` - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ----------------------------------- | ------- | ------ | ---------- | ----------------------- | ----------------- | -| - [^[a-z][a-z0-9A-Z]+$](#pattern1 ) | Yes | object | No | In #/$defs/csr_register | CSR name | - -## 1. Pattern Property `CSR description > csr_register` -> All properties whose name matches the regular expression -```^[a-z][a-z0-9A-Z]+$``` ([Test](https://regex101.com/?regex=%5E%5Ba-z%5D%5Ba-z0-9A-Z%5D%2B%24)) -must respect the following conditions - -| | | -| ------------------------- | ------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") | -| **Defined in** | #/$defs/csr_register | - -**Description:** CSR name - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ----------------------------------------------- | ------- | --------------------------- | ---------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| - [name](#pattern1_name ) | No | string | No | - | Optional name (name is extracted from object key of parent), so information is redundant | -| - [base](#pattern1_base ) | No | enum (of integer) | No | - | When a CSR is only defined in RV32, or RV64, the base that defines it. When defined in both, this field should be absent. | -| + [long_name](#pattern1_long_name ) | No | string | No | - | - | -| + [description](#pattern1_description ) | No | string | No | - | - | -| + [definedBy](#pattern1_definedBy ) | No | string | No | - | - | -| + [address](#pattern1_address ) | No | integer | No | - | CSR address | -| - [virtual_address](#pattern1_virtual_address ) | No | object | No | - | - | -| - [$comment](#pattern1_comment ) | No | object | No | - | - | -| + [priv_mode](#pattern1_priv_mode ) | No | enum (of string) | No | - | - | -| + [length](#pattern1_length ) | No | enum (of integer or string) | No | - | Length, in bits, of the CSR. Can either be a 32, 64, or XLEN | -| - [requires](#pattern1_requires ) | No | string | No | - | Extension that must be implemented for this CSR to exist | -| - [fields](#pattern1_fields ) | No | object | No | - | - | -| - [access_check](#pattern1_access_check ) | No | string | No | - | Optional function called to handle special-case checks for access permission. | -| - [sw_read](#pattern1_sw_read ) | No | string | No | - | Function that returns the value of the CSR when read by software (i.e., a Zicsr instruction). If not specified, the value last written (through hw_write) is returned. | - -### 1.1. If (priv_mode = "VS") - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| -------------------------------------------------------- | ------- | ------ | ---------- | ---------- | -------------------------------------- | -| + [virtual_address](#pattern1_pattern5_virtual_address ) | No | number | No | - | Address of the CSR viewed from VS-mode | - -#### 1.1.1. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > then > virtual_address` - -| | | -| ------------ | -------- | -| **Type** | `number` | -| **Required** | Yes | - -**Description:** Address of the CSR viewed from VS-mode - -### 1.2. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > name` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -**Description:** Optional name (name is extracted from object key of parent), so information is redundant - -### 1.3. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > base` - -| | | -| ------------ | ------------------- | -| **Type** | `enum (of integer)` | -| **Required** | No | - -**Description:** When a CSR is only defined in RV32, or RV64, the base that defines it. When defined in both, this field should be absent. - -Must be one of: -* 32 -* 64 - -### 1.4. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > long_name` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | Yes | - -### 1.5. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > description` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | Yes | - -### 1.6. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > definedBy` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | Yes | - -| Restrictions | | -| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| **Must match regular expression** | ```^([A-WY]\|([SXZ][a-z]+))$``` [Test](https://regex101.com/?regex=%5E%28%5BA-WY%5D%7C%28%5BSXZ%5D%5Ba-z%5D%2B%29%29%24) | - -### 1.7. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > address` - -| | | -| ------------ | --------- | -| **Type** | `integer` | -| **Required** | Yes | - -**Description:** CSR address - -### 1.8. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > virtual_address` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -### 1.9. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > $comment` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -### 1.10. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > priv_mode` - -| | | -| ------------ | ------------------ | -| **Type** | `enum (of string)` | -| **Required** | Yes | - -Must be one of: -* "M" -* "S" -* "U" -* "VS" - -### 1.11. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > length` - -| | | -| ------------ | ----------------------------- | -| **Type** | `enum (of integer or string)` | -| **Required** | Yes | - -**Description:** Length, in bits, of the CSR. Can either be a 32, 64, or XLEN - -Must be one of: -* 32 -* 64 -* "XLEN" - -### 1.12. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > requires` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -**Description:** Extension that must be implemented for this CSR to exist - -### 1.13. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields` - -| | | -| ------------------------- | ------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| -------------------------------------------- | ------- | ------ | ---------- | -------------------- | ----------------------- | -| - [^[a-zA-Z].*$](#pattern1_fields_pattern1 ) | Yes | object | No | In #/$defs/csr_field | Field in a CSR register | - -#### 1.13.1. Pattern Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > csr_field` -> All properties whose name matches the regular expression -```^[a-zA-Z].*$``` ([Test](https://regex101.com/?regex=%5E%5Ba-zA-Z%5D.%2A%24)) -must respect the following conditions - -| | | -| ------------------------- | ------------------------------------------------------- | -| **Type** | `combining` | -| **Required** | No | -| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") | -| **Defined in** | #/$defs/csr_field | - -**Description:** Field in a CSR register - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| --------------------------------------------------------- | ------- | ---------------- | ---------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| + [location](#pattern1_fields_pattern1_location ) | No | Combination | No | - | Location of the field within the CSR register | -| + [description](#pattern1_fields_pattern1_description ) | No | string | No | - | Function of the field | -| + [type](#pattern1_fields_pattern1_type ) | No | enum (of string) | No | - | Type of the field. One of:
    * RO: Read-only immutable
    * RO-H: Read-only, updated by hardware
    * RW: Read-write, not updated by hardware
    * RW-R: Read-write, but values are restricted. write(value) must be provided
    * RW-H: Read-write, with hardware updates
    * RW-RH: Read-write, with hardware updates, but values are restricted. write(value) must be provded | -| - [alias](#pattern1_fields_pattern1_alias ) | No | Combination | No | - | Other CSR fields that alias with this field | -| - [definedBy](#pattern1_fields_pattern1_definedBy ) | No | Combination | No | - | Where this field is defined: indicates that the field is only present if the extension(s) are implemented. If definedBy is not given, defaults to the definedBy field of the parent CSR | -| - [affectedBy](#pattern1_fields_pattern1_affectedBy ) | No | Combination | No | - | Extension(s) that affect the definition of the field beyond the extension (or base) the field is originally defined in | -| - [reset_value](#pattern1_fields_pattern1_reset_value ) | No | object | No | - | - | -| - [value](#pattern1_fields_pattern1_value ) | No | object | No | - | - | -| - [write(value)](#pattern1_fields_pattern1_write(value) ) | No | object | No | - | - | - -| All of(Requirement) | -| ----------------------------------------------- | -| [item 0](#pattern1_fields_pattern1_pattern4_i0) | -| [item 1](#pattern1_fields_pattern1_pattern4_i1) | -| [item 2](#pattern1_fields_pattern1_pattern4_i2) | -| [item 3](#pattern1_fields_pattern1_pattern4_i3) | -| [item 4](#pattern1_fields_pattern1_pattern4_i4) | -| [item 5](#pattern1_fields_pattern1_pattern4_i5) | - -##### 1.13.1.1. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 0` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -###### 1.13.1.1.1. If (type = "RO") - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ------------------------------------------------------------ | ------- | ----------- | ---------- | ---------- | ----------------- | -| + [value](#pattern1_fields_pattern1_pattern4_i0_then_value ) | No | Combination | No | - | - | - -###### 1.13.1.1.1.1. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 0 > then > value` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `combining` | -| **Required** | Yes | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -| One of(Option) | -| ------------------------------------------------------------------- | -| [item 0](#pattern1_fields_pattern1_pattern4_i0_then_value_oneOf_i0) | -| [item 1](#pattern1_fields_pattern1_pattern4_i0_then_value_oneOf_i1) | - -###### 1.13.1.1.1.1.1. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 0 > then > value > oneOf > item 0` - -| | | -| ------------ | --------- | -| **Type** | `integer` | -| **Required** | No | - -###### 1.13.1.1.1.1.2. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 0 > then > value > oneOf > item 1` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -| Restrictions | | -| --------------------------------- | ----------------------------------------------------------------------------- | -| **Must match regular expression** | ```^<%=.*%>$``` [Test](https://regex101.com/?regex=%5E%3C%25%3D.%2A%25%3E%24) | - -##### 1.13.1.2. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 1` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -###### 1.13.1.2.1. If (type = "RO-H") - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ------------------------------------------------------------------------ | ------- | ------- | ---------- | ---------- | ----------------- | -| + [reset_value](#pattern1_fields_pattern1_pattern4_i1_then_reset_value ) | No | integer | No | - | - | - -###### 1.13.1.2.1.1. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 1 > then > reset_value` - -| | | -| ------------ | --------- | -| **Type** | `integer` | -| **Required** | Yes | - -##### 1.13.1.3. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 2` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -###### 1.13.1.3.1. If (type = "RW") - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ------------------------------------------------------------------------ | ------- | ------- | ---------- | ---------- | ----------------- | -| + [reset_value](#pattern1_fields_pattern1_pattern4_i2_then_reset_value ) | No | integer | No | - | - | - -###### 1.13.1.3.1.1. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 2 > then > reset_value` - -| | | -| ------------ | --------- | -| **Type** | `integer` | -| **Required** | Yes | - -##### 1.13.1.4. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 3` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -###### 1.13.1.4.1. If (type = "RW-H") - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ------------------------------------------------------------------------ | ------- | ------- | ---------- | ---------- | ----------------- | -| + [reset_value](#pattern1_fields_pattern1_pattern4_i3_then_reset_value ) | No | integer | No | - | - | - -###### 1.13.1.4.1.1. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 3 > then > reset_value` - -| | | -| ------------ | --------- | -| **Type** | `integer` | -| **Required** | Yes | - -##### 1.13.1.5. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 4` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -###### 1.13.1.5.1. If (type = "RW-R") - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| -------------------------------------------------------------------------- | ------- | ------- | ---------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| + [write(value)](#pattern1_fields_pattern1_pattern4_i4_then_write(value) ) | No | string | No | In #/$defs/write(value) | Function implementing custom write behavior for the CSR. Given a 'value', return either the value to be written in the field or false if the write would be illegal. 'value' is the value of the entire CSR, which is sometimes needed to detect illegal writes | -| + [reset_value](#pattern1_fields_pattern1_pattern4_i4_then_reset_value ) | No | integer | No | - | - | - -###### 1.13.1.5.1.1. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 4 > then > write(value)` - -| | | -| -------------- | -------------------- | -| **Type** | `string` | -| **Required** | Yes | -| **Defined in** | #/$defs/write(value) | - -**Description:** Function implementing custom write behavior for the CSR. Given a 'value', return either the value to be written in the field or false if the write would be illegal. 'value' is the value of the entire CSR, which is sometimes needed to detect illegal writes - -###### 1.13.1.5.1.2. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 4 > then > reset_value` - -| | | -| ------------ | --------- | -| **Type** | `integer` | -| **Required** | Yes | - -##### 1.13.1.6. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 5` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -###### 1.13.1.6.1. If (type = "RW-RH") - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| -------------------------------------------------------------------------- | ------- | ------- | ---------- | -------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| + [write(value)](#pattern1_fields_pattern1_pattern4_i5_then_write(value) ) | No | string | No | Same as [write(value)](#pattern1_fields_pattern1_pattern4_i4_then_write(value) ) | Function implementing custom write behavior for the CSR. Given a 'value', return either the value to be written in the field or false if the write would be illegal. 'value' is the value of the entire CSR, which is sometimes needed to detect illegal writes | -| + [reset_value](#pattern1_fields_pattern1_pattern4_i5_then_reset_value ) | No | integer | No | - | - | - -###### 1.13.1.6.1.1. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 5 > then > write(value)` - -| | | -| ---------------------- | ----------------------------------------------------------------------- | -| **Type** | `string` | -| **Required** | Yes | -| **Same definition as** | [write(value)](#pattern1_fields_pattern1_pattern4_i4_then_write(value)) | - -**Description:** Function implementing custom write behavior for the CSR. Given a 'value', return either the value to be written in the field or false if the write would be illegal. 'value' is the value of the entire CSR, which is sometimes needed to detect illegal writes - -###### 1.13.1.6.1.2. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > allOf > item 5 > then > reset_value` - -| | | -| ------------ | --------- | -| **Type** | `integer` | -| **Required** | Yes | - -##### 1.13.1.7. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > location` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `combining` | -| **Required** | Yes | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -**Description:** Location of the field within the CSR register - -| One of(Option) | -| ----------------------------------------------------- | -| [item 0](#pattern1_fields_pattern1_location_oneOf_i0) | -| [item 1](#pattern1_fields_pattern1_location_oneOf_i1) | - -###### 1.13.1.7.1. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > location > oneOf > item 0` - -| | | -| ------------ | -------- | -| **Type** | `number` | -| **Required** | No | - -**Description:** Location of a single bit - -###### 1.13.1.7.2. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > location > oneOf > item 1` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -**Description:** Location range of a multibit field - -| Restrictions | | -| --------------------------------- | ----------------------------------------------------------------------------------------- | -| **Must match regular expression** | ```^[0-9]+-[0-9]+$``` [Test](https://regex101.com/?regex=%5E%5B0-9%5D%2B-%5B0-9%5D%2B%24) | - -##### 1.13.1.8. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > description` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | Yes | - -**Description:** Function of the field - -##### 1.13.1.9. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > type` - -| | | -| ------------ | ------------------ | -| **Type** | `enum (of string)` | -| **Required** | Yes | - -**Description:** Type of the field. One of: - * RO: Read-only immutable - * RO-H: Read-only, updated by hardware - * RW: Read-write, not updated by hardware - * RW-R: Read-write, but values are restricted. write(value) must be provided - * RW-H: Read-write, with hardware updates - * RW-RH: Read-write, with hardware updates, but values are restricted. write(value) must be provded - -Must be one of: -* "RO" -* "RO-H" -* "RW" -* "RW-R" -* "RW-H" -* "RW-RH" - -##### 1.13.1.10. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > alias` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `combining` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -**Description:** Other CSR fields that alias with this field - -| One of(Option) | -| -------------------------------------------------- | -| [item 0](#pattern1_fields_pattern1_alias_oneOf_i0) | -| [item 1](#pattern1_fields_pattern1_alias_oneOf_i1) | - -###### 1.13.1.10.1. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > alias > oneOf > item 0` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -| Restrictions | | -| --------------------------------- | --------------------------------------------------------------------------------------------------- | -| **Must match regular expression** | ```^[a-z]+\.[A-Z0-9]+$``` [Test](https://regex101.com/?regex=%5E%5Ba-z%5D%2B%5C.%5BA-Z0-9%5D%2B%24) | - -###### 1.13.1.10.2. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > alias > oneOf > item 1` - -| | | -| ------------ | ----------------- | -| **Type** | `array of string` | -| **Required** | No | - -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | - -| Each item of this array must be | Description | -| -------------------------------------------------------------- | ----------- | -| [item 1 items](#pattern1_fields_pattern1_alias_oneOf_i1_items) | - | - -###### 1.13.1.10.2.1. CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > alias > oneOf > item 1 > item 1 items - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -| Restrictions | | -| --------------------------------- | --------------------------------------------------------------------------------------------------- | -| **Must match regular expression** | ```^[a-z]+\.[A-Z0-9]+$``` [Test](https://regex101.com/?regex=%5E%5Ba-z%5D%2B%5C.%5BA-Z0-9%5D%2B%24) | - -##### 1.13.1.11. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > definedBy` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `combining` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -**Description:** Where this field is defined: indicates that the field is only present if the extension(s) are implemented. If definedBy is not given, defaults to the definedBy field of the parent CSR - -| One of(Option) | -| ------------------------------------------------------ | -| [item 0](#pattern1_fields_pattern1_definedBy_oneOf_i0) | -| [item 1](#pattern1_fields_pattern1_definedBy_oneOf_i1) | - -###### 1.13.1.11.1. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > definedBy > oneOf > item 0` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -**Description:** An extension name - -| Restrictions | | -| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| **Must match regular expression** | ```^([A-WY]\|([SXZ][a-z]+))$``` [Test](https://regex101.com/?regex=%5E%28%5BA-WY%5D%7C%28%5BSXZ%5D%5Ba-z%5D%2B%29%29%24) | - -###### 1.13.1.11.2. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > definedBy > oneOf > item 1` - -| | | -| ------------ | ----------------- | -| **Type** | `array of string` | -| **Required** | No | - -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | - -| Each item of this array must be | Description | -| ------------------------------------------------------------------ | ----------------- | -| [item 1 items](#pattern1_fields_pattern1_definedBy_oneOf_i1_items) | An extension name | - -###### 1.13.1.11.2.1. CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > definedBy > oneOf > item 1 > item 1 items - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -**Description:** An extension name - -| Restrictions | | -| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| **Must match regular expression** | ```^([A-WY]\|([SXZ][a-z]+))$``` [Test](https://regex101.com/?regex=%5E%28%5BA-WY%5D%7C%28%5BSXZ%5D%5Ba-z%5D%2B%29%29%24) | - -##### 1.13.1.12. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > affectedBy` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `combining` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -**Description:** Extension(s) that affect the definition of the field beyond the extension (or base) the field is originally defined in - -| One of(Option) | -| ------------------------------------------------------- | -| [item 0](#pattern1_fields_pattern1_affectedBy_oneOf_i0) | -| [item 1](#pattern1_fields_pattern1_affectedBy_oneOf_i1) | - -###### 1.13.1.12.1. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > affectedBy > oneOf > item 0` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -| Restrictions | | -| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| **Must match regular expression** | ```^(RV64)\|([A-WY]\|(Z[a-z]+)\|(S[a-z]+))$``` [Test](https://regex101.com/?regex=%5E%28RV64%29%7C%28%5BA-WY%5D%7C%28Z%5Ba-z%5D%2B%29%7C%28S%5Ba-z%5D%2B%29%29%24) | - -###### 1.13.1.12.2. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > affectedBy > oneOf > item 1` - -| | | -| ------------ | ----------------- | -| **Type** | `array of string` | -| **Required** | No | - -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | - -| Each item of this array must be | Description | -| ------------------------------------------------------------------- | ----------- | -| [item 1 items](#pattern1_fields_pattern1_affectedBy_oneOf_i1_items) | - | - -###### 1.13.1.12.2.1. CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > affectedBy > oneOf > item 1 > item 1 items - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -| Restrictions | | -| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| **Must match regular expression** | ```^(RV64)\|([A-WY]\|(Z[a-z]+)\|(S[a-z]+))$``` [Test](https://regex101.com/?regex=%5E%28RV64%29%7C%28%5BA-WY%5D%7C%28Z%5Ba-z%5D%2B%29%7C%28S%5Ba-z%5D%2B%29%29%24) | - -##### 1.13.1.13. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > reset_value` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -##### 1.13.1.14. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > value` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -##### 1.13.1.15. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > fields > ^[a-zA-Z].*$ > write(value)` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -### 1.14. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > access_check` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -**Description:** Optional function called to handle special-case checks for access permission. - -### 1.15. Property `CSR description > ^[a-z][a-z0-9A-Z]+$ > sw_read` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -**Description:** Function that returns the value of the CSR when read by software (i.e., a Zicsr instruction). If not specified, the value last written (through hw_write) is returned. - ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2024-06-12 at 20:18:06 -0700 diff --git a/docs/schema/exception_code_schema.html b/docs/schema/exception_code_schema.html deleted file mode 100644 index 10b748f79..000000000 --- a/docs/schema/exception_code_schema.html +++ /dev/null @@ -1 +0,0 @@ - Schema Docs Type: object
    \ No newline at end of file diff --git a/docs/schema/exception_code_schema.md b/docs/schema/exception_code_schema.md deleted file mode 100644 index c11833b17..000000000 --- a/docs/schema/exception_code_schema.md +++ /dev/null @@ -1,10 +0,0 @@ -# Schema Docs - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2024-06-12 at 20:18:06 -0700 diff --git a/docs/schema/extension_schema.html b/docs/schema/extension_schema.html deleted file mode 100644 index 2df430c51..000000000 --- a/docs/schema/extension_schema.html +++ /dev/null @@ -1 +0,0 @@ - Schema Docs Type: object
    No Additional Properties

    All properties whose name matches the following regular expression must respect the following conditions

    Property name regular expression: [A-W,Y]|([X,Z].*)
    Type: object
    No Additional Properties

    Type: string

    Type: string

    Type: enum (of string)

    Must be one of:

    • "unprivileged"
    • "privileged"


    Extension(s) required by this extension

    Type: array of string
    No Additional Items

    Each item of this array must be:

    Type: array of object
    No Additional Items

    Each item of this array must be:

    Type: object
    No Additional Properties


    Type: string
    Must match regular expression: ^[0-9]+(\.[0-9]+(\.[0-9]+(-[a-fA-F0-9]+)?)?)?$

    Type: string

    Changes since last version

    Type: stringFormat: uri

    Link to ratified document

    Type: array of object
    No Additional Items

    Each item of this array must be:

    Type: object

    Exceptions defined by this extension

    No Additional Properties

    Type: array of object
    No Additional Items

    Each item of this array must be:

    Type: object

    Interrupts defined by this extension

    No Additional Properties
    \ No newline at end of file diff --git a/docs/schema/extension_schema.md b/docs/schema/extension_schema.md deleted file mode 100644 index dd0433720..000000000 --- a/docs/schema/extension_schema.md +++ /dev/null @@ -1,360 +0,0 @@ -# Schema Docs - -- [1. Pattern Property `root > ext_data`](#pattern1) - - [1.1. Property `root > [A-W,Y]\|([X,Z].*) > name`](#pattern1_name) - - [1.2. Property `root > [A-W,Y]\|([X,Z].*) > description`](#pattern1_description) - - [1.3. Property `root > [A-W,Y]\|([X,Z].*) > type`](#pattern1_type) - - [1.4. Property `root > [A-W,Y]\|([X,Z].*) > requires`](#pattern1_requires) - - [1.4.1. Property `root > [A-W,Y]\|([X,Z].*) > requires > oneOf > item 0`](#pattern1_requires_oneOf_i0) - - [1.4.2. Property `root > [A-W,Y]\|([X,Z].*) > requires > oneOf > item 1`](#pattern1_requires_oneOf_i1) - - [1.4.2.1. root > [A-W,Y]\|([X,Z].*) > requires > oneOf > item 1 > item 1 items](#autogenerated_heading_2) - - [1.5. Property `root > [A-W,Y]\|([X,Z].*) > versions`](#pattern1_versions) - - [1.5.1. root > [A-W,Y]\|([X,Z].*) > versions > versions items](#autogenerated_heading_3) - - [1.5.1.1. Property `root > [A-W,Y]\|([X,Z].*) > versions > versions items > version`](#pattern1_versions_items_version) - - [1.5.1.1.1. Property `root > [A-W,Y]\|([X,Z].*) > versions > versions items > version > oneOf > item 0`](#pattern1_versions_items_version_oneOf_i0) - - [1.5.1.1.2. Property `root > [A-W,Y]\|([X,Z].*) > versions > versions items > version > oneOf > item 1`](#pattern1_versions_items_version_oneOf_i1) - - [1.5.1.2. Property `root > [A-W,Y]\|([X,Z].*) > versions > versions items > ratification_date`](#pattern1_versions_items_ratification_date) - - [1.5.1.2.1. Property `root > [A-W,Y]\|([X,Z].*) > versions > versions items > ratification_date > oneOf > item 0`](#pattern1_versions_items_ratification_date_oneOf_i0) - - [1.5.1.2.2. Property `root > [A-W,Y]\|([X,Z].*) > versions > versions items > ratification_date > oneOf > item 1`](#pattern1_versions_items_ratification_date_oneOf_i1) - - [1.5.1.2.3. Property `root > [A-W,Y]\|([X,Z].*) > versions > versions items > ratification_date > oneOf > item 2`](#pattern1_versions_items_ratification_date_oneOf_i2) - - [1.5.1.3. Property `root > [A-W,Y]\|([X,Z].*) > versions > versions items > changes`](#pattern1_versions_items_changes) - - [1.5.1.4. Property `root > [A-W,Y]\|([X,Z].*) > versions > versions items > url`](#pattern1_versions_items_url) - - [1.6. Property `root > [A-W,Y]\|([X,Z].*) > exception_codes`](#pattern1_exception_codes) - - [1.6.1. root > [A-W,Y]\|([X,Z].*) > exception_codes > exception_codes items](#autogenerated_heading_4) - - [1.6.1.1. Property `root > [A-W,Y]\|([X,Z].*) > exception_codes > exception_codes items > num`](#pattern1_exception_codes_items_num) - - [1.6.1.2. Property `root > [A-W,Y]\|([X,Z].*) > exception_codes > exception_codes items > name`](#pattern1_exception_codes_items_name) - - [1.7. Property `root > [A-W,Y]\|([X,Z].*) > interrupt_codes`](#pattern1_interrupt_codes) - - [1.7.1. root > [A-W,Y]\|([X,Z].*) > interrupt_codes > interrupt_codes items](#autogenerated_heading_5) - - [1.7.1.1. Property `root > [A-W,Y]\|([X,Z].*) > interrupt_codes > interrupt_codes items > num`](#pattern1_interrupt_codes_items_num) - - [1.7.1.2. Property `root > [A-W,Y]\|([X,Z].*) > interrupt_codes > interrupt_codes items > name`](#pattern1_interrupt_codes_items_name) - -| | | -| ------------------------- | ------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ---------------------------------- | ------- | ------ | ---------- | ------------------- | ----------------- | -| - [[A-W,Y]\|([X,Z].*)](#pattern1 ) | Yes | object | No | In #/$defs/ext_data | - | - -## 1. Pattern Property `root > ext_data` -> All properties whose name matches the regular expression -```[A-W,Y]|([X,Z].*)``` ([Test](https://regex101.com/?regex=%5BA-W%2CY%5D%7C%28%5BX%2CZ%5D.%2A%29)) -must respect the following conditions - -| | | -| ------------------------- | ------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") | -| **Defined in** | #/$defs/ext_data | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ----------------------------------------------- | ------- | ---------------- | ---------- | ---------- | --------------------------------------- | -| - [name](#pattern1_name ) | No | string | No | - | - | -| + [description](#pattern1_description ) | No | string | No | - | - | -| - [type](#pattern1_type ) | No | enum (of string) | No | - | - | -| - [requires](#pattern1_requires ) | No | Combination | No | - | Extension(s) required by this extension | -| + [versions](#pattern1_versions ) | No | array of object | No | - | - | -| - [exception_codes](#pattern1_exception_codes ) | No | array of object | No | - | - | -| - [interrupt_codes](#pattern1_interrupt_codes ) | No | array of object | No | - | - | - -### 1.1. Property `root > [A-W,Y]\|([X,Z].*) > name` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -### 1.2. Property `root > [A-W,Y]\|([X,Z].*) > description` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | Yes | - -### 1.3. Property `root > [A-W,Y]\|([X,Z].*) > type` - -| | | -| ------------ | ------------------ | -| **Type** | `enum (of string)` | -| **Required** | No | - -Must be one of: -* "unprivileged" -* "privileged" - -### 1.4. Property `root > [A-W,Y]\|([X,Z].*) > requires` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `combining` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -**Description:** Extension(s) required by this extension - -| One of(Option) | -| ------------------------------------- | -| [item 0](#pattern1_requires_oneOf_i0) | -| [item 1](#pattern1_requires_oneOf_i1) | - -#### 1.4.1. Property `root > [A-W,Y]\|([X,Z].*) > requires > oneOf > item 0` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -#### 1.4.2. Property `root > [A-W,Y]\|([X,Z].*) > requires > oneOf > item 1` - -| | | -| ------------ | ----------------- | -| **Type** | `array of string` | -| **Required** | No | - -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | - -| Each item of this array must be | Description | -| ------------------------------------------------- | ----------- | -| [item 1 items](#pattern1_requires_oneOf_i1_items) | - | - -##### 1.4.2.1. root > [A-W,Y]\|([X,Z].*) > requires > oneOf > item 1 > item 1 items - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -### 1.5. Property `root > [A-W,Y]\|([X,Z].*) > versions` - -| | | -| ------------ | ----------------- | -| **Type** | `array of object` | -| **Required** | Yes | - -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | - -| Each item of this array must be | Description | -| ------------------------------------------ | ----------- | -| [versions items](#pattern1_versions_items) | - | - -#### 1.5.1. root > [A-W,Y]\|([X,Z].*) > versions > versions items - -| | | -| ------------------------- | ------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ------------------------------------------------------------------ | ------- | ----------- | ---------- | ---------- | -------------------------- | -| + [version](#pattern1_versions_items_version ) | No | Combination | No | - | - | -| + [ratification_date](#pattern1_versions_items_ratification_date ) | No | Combination | No | - | - | -| - [changes](#pattern1_versions_items_changes ) | No | string | No | - | Changes since last version | -| - [url](#pattern1_versions_items_url ) | No | string | No | - | Link to ratified document | - -##### 1.5.1.1. Property `root > [A-W,Y]\|([X,Z].*) > versions > versions items > version` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `combining` | -| **Required** | Yes | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -| One of(Option) | -| --------------------------------------------------- | -| [item 0](#pattern1_versions_items_version_oneOf_i0) | -| [item 1](#pattern1_versions_items_version_oneOf_i1) | - -###### 1.5.1.1.1. Property `root > [A-W,Y]\|([X,Z].*) > versions > versions items > version > oneOf > item 0` - -| | | -| ------------ | -------- | -| **Type** | `number` | -| **Required** | No | - -###### 1.5.1.1.2. Property `root > [A-W,Y]\|([X,Z].*) > versions > versions items > version > oneOf > item 1` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -| Restrictions | | -| --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Must match regular expression** | ```^[0-9]+(\.[0-9]+(\.[0-9]+(-[a-fA-F0-9]+)?)?)?$``` [Test](https://regex101.com/?regex=%5E%5B0-9%5D%2B%28%5C.%5B0-9%5D%2B%28%5C.%5B0-9%5D%2B%28-%5Ba-fA-F0-9%5D%2B%29%3F%29%3F%29%3F%24) | - -##### 1.5.1.2. Property `root > [A-W,Y]\|([X,Z].*) > versions > versions items > ratification_date` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `combining` | -| **Required** | Yes | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -| One of(Option) | -| ------------------------------------------------------------- | -| [item 0](#pattern1_versions_items_ratification_date_oneOf_i0) | -| [item 1](#pattern1_versions_items_ratification_date_oneOf_i1) | -| [item 2](#pattern1_versions_items_ratification_date_oneOf_i2) | - -###### 1.5.1.2.1. Property `root > [A-W,Y]\|([X,Z].*) > versions > versions items > ratification_date > oneOf > item 0` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -| Restrictions | | -| --------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| **Must match regular expression** | ```^20[0-9][0-9]-[0-9][0-9]$``` [Test](https://regex101.com/?regex=%5E20%5B0-9%5D%5B0-9%5D-%5B0-9%5D%5B0-9%5D%24) | - -###### 1.5.1.2.2. Property `root > [A-W,Y]\|([X,Z].*) > versions > versions items > ratification_date > oneOf > item 1` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -| Restrictions | | -| --------------------------------- | ----------------------------------------------------------------- | -| **Must match regular expression** | ```^unknown$``` [Test](https://regex101.com/?regex=%5Eunknown%24) | - -###### 1.5.1.2.3. Property `root > [A-W,Y]\|([X,Z].*) > versions > versions items > ratification_date > oneOf > item 2` - -| | | -| ------------ | ------ | -| **Type** | `null` | -| **Required** | No | - -##### 1.5.1.3. Property `root > [A-W,Y]\|([X,Z].*) > versions > versions items > changes` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -**Description:** Changes since last version - -##### 1.5.1.4. Property `root > [A-W,Y]\|([X,Z].*) > versions > versions items > url` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | -| **Format** | `uri` | - -**Description:** Link to ratified document - -### 1.6. Property `root > [A-W,Y]\|([X,Z].*) > exception_codes` - -| | | -| ------------ | ----------------- | -| **Type** | `array of object` | -| **Required** | No | - -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | - -| Each item of this array must be | Description | -| -------------------------------------------------------- | ------------------------------------ | -| [exception_codes items](#pattern1_exception_codes_items) | Exceptions defined by this extension | - -#### 1.6.1. root > [A-W,Y]\|([X,Z].*) > exception_codes > exception_codes items - -| | | -| ------------------------- | ------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") | - -**Description:** Exceptions defined by this extension - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ----------------------------------------------- | ------- | ------- | ---------- | ---------- | ----------------- | -| - [num](#pattern1_exception_codes_items_num ) | No | integer | No | - | - | -| - [name](#pattern1_exception_codes_items_name ) | No | string | No | - | - | - -##### 1.6.1.1. Property `root > [A-W,Y]\|([X,Z].*) > exception_codes > exception_codes items > num` - -| | | -| ------------ | --------- | -| **Type** | `integer` | -| **Required** | No | - -##### 1.6.1.2. Property `root > [A-W,Y]\|([X,Z].*) > exception_codes > exception_codes items > name` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -### 1.7. Property `root > [A-W,Y]\|([X,Z].*) > interrupt_codes` - -| | | -| ------------ | ----------------- | -| **Type** | `array of object` | -| **Required** | No | - -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | - -| Each item of this array must be | Description | -| -------------------------------------------------------- | ------------------------------------ | -| [interrupt_codes items](#pattern1_interrupt_codes_items) | Interrupts defined by this extension | - -#### 1.7.1. root > [A-W,Y]\|([X,Z].*) > interrupt_codes > interrupt_codes items - -| | | -| ------------------------- | ------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") | - -**Description:** Interrupts defined by this extension - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ----------------------------------------------- | ------- | ------- | ---------- | ---------- | ----------------- | -| - [num](#pattern1_interrupt_codes_items_num ) | No | integer | No | - | - | -| - [name](#pattern1_interrupt_codes_items_name ) | No | string | No | - | - | - -##### 1.7.1.1. Property `root > [A-W,Y]\|([X,Z].*) > interrupt_codes > interrupt_codes items > num` - -| | | -| ------------ | --------- | -| **Type** | `integer` | -| **Required** | No | - -##### 1.7.1.2. Property `root > [A-W,Y]\|([X,Z].*) > interrupt_codes > interrupt_codes items > name` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2024-06-12 at 20:18:06 -0700 diff --git a/docs/schema/extensions.schema.html b/docs/schema/extensions.schema.html deleted file mode 100644 index 041b03843..000000000 --- a/docs/schema/extensions.schema.html +++ /dev/null @@ -1 +0,0 @@ - Schema Docs Type: object

    RISC-V standard extensions

    No Additional Properties

    All properties whose name matches the following regular expression must respect the following conditions

    Property name regular expression: ^[A-FH-WY]|([XZ][a-z]+)$
    Type: object
    No Additional Properties

    Type: string

    Type: enum (of string)

    Must be one of:

    • "Ratified"
    • "Proposed"

    Type: array of object
    No Additional Items

    Each item of this array must be:

    Type: array of string
    No Additional Items

    Each item of this array must be:

    Type: string
    Must match regular expression: ^[A-FH-WY]|([XZ][a-z]+)$

    Type: array of string
    No Additional Items

    Each item of this array must be:

    Type: string
    Must match regular expression: ^[A-FH-WY]|([XZ][a-z]+)$

    \ No newline at end of file diff --git a/docs/schema/extensions.schema.md b/docs/schema/extensions.schema.md deleted file mode 100644 index 7e11bfe51..000000000 --- a/docs/schema/extensions.schema.md +++ /dev/null @@ -1,249 +0,0 @@ -# Schema Docs - -- [1. Pattern Property `root > ^[A-FH-WY]\|([XZ][a-z]+)$`](#pattern1) - - [1.1. Property `root > ^[A-FH-WY]\|([XZ][a-z]+)$ > name`](#pattern1_name) - - [1.2. Property `root > ^[A-FH-WY]\|([XZ][a-z]+)$ > status`](#pattern1_status) - - [1.3. Property `root > ^[A-FH-WY]\|([XZ][a-z]+)$ > versions`](#pattern1_versions) - - [1.3.1. root > ^[A-FH-WY]\|([XZ][a-z]+)$ > versions > versions items](#autogenerated_heading_2) - - [1.3.1.1. Property `root > ^[A-FH-WY]\|([XZ][a-z]+)$ > versions > versions items > id`](#pattern1_versions_items_id) - - [1.3.1.2. Property `root > ^[A-FH-WY]\|([XZ][a-z]+)$ > versions > versions items > ratification_date`](#pattern1_versions_items_ratification_date) - - [1.3.1.2.1. Property `root > ^[A-FH-WY]\|([XZ][a-z]+)$ > versions > versions items > ratification_date > anyOf > item 0`](#pattern1_versions_items_ratification_date_anyOf_i0) - - [1.3.1.2.2. Property `root > ^[A-FH-WY]\|([XZ][a-z]+)$ > versions > versions items > ratification_date > anyOf > item 1`](#pattern1_versions_items_ratification_date_anyOf_i1) - - [1.3.1.3. Property `root > ^[A-FH-WY]\|([XZ][a-z]+)$ > versions > versions items > ratified_document`](#pattern1_versions_items_ratified_document) - - [1.3.1.3.1. Property `root > ^[A-FH-WY]\|([XZ][a-z]+)$ > versions > versions items > ratified_document > anyOf > item 0`](#pattern1_versions_items_ratified_document_anyOf_i0) - - [1.3.1.3.2. Property `root > ^[A-FH-WY]\|([XZ][a-z]+)$ > versions > versions items > ratified_document > anyOf > item 1`](#pattern1_versions_items_ratified_document_anyOf_i1) - - [1.3.1.4. Property `root > ^[A-FH-WY]\|([XZ][a-z]+)$ > versions > versions items > additionalProperties`](#pattern1_versions_items_additionalProperties) - - [1.4. Property `root > ^[A-FH-WY]\|([XZ][a-z]+)$ > subsumes`](#pattern1_subsumes) - - [1.4.1. root > ^[A-FH-WY]\|([XZ][a-z]+)$ > subsumes > subsumes items](#autogenerated_heading_3) - - [1.5. Property `root > ^[A-FH-WY]\|([XZ][a-z]+)$ > requires`](#pattern1_requires) - - [1.5.1. root > ^[A-FH-WY]\|([XZ][a-z]+)$ > requires > requires items](#autogenerated_heading_4) - - [1.6. Property `root > ^[A-FH-WY]\|([XZ][a-z]+)$ > description`](#pattern1_description) - -| | | -| ------------------------- | ------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") | - -**Description:** RISC-V standard extensions - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ----------------------------------------- | ------- | ------ | ---------- | ---------- | ----------------- | -| - [^[A-FH-WY]\|([XZ][a-z]+)$](#pattern1 ) | Yes | object | No | - | - | - -## 1. Pattern Property `root > ^[A-FH-WY]\|([XZ][a-z]+)$` -> All properties whose name matches the regular expression -```^[A-FH-WY]|([XZ][a-z]+)$``` ([Test](https://regex101.com/?regex=%5E%5BA-FH-WY%5D%7C%28%5BXZ%5D%5Ba-z%5D%2B%29%24)) -must respect the following conditions - -| | | -| ------------------------- | ------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| --------------------------------------- | ------- | ---------------- | ---------- | ---------- | ----------------- | -| + [name](#pattern1_name ) | No | string | No | - | - | -| + [status](#pattern1_status ) | No | enum (of string) | No | - | - | -| - [versions](#pattern1_versions ) | No | array of object | No | - | - | -| - [subsumes](#pattern1_subsumes ) | No | array of string | No | - | - | -| - [requires](#pattern1_requires ) | No | array of string | No | - | - | -| + [description](#pattern1_description ) | No | string | No | - | - | - -### 1.1. Property `root > ^[A-FH-WY]\|([XZ][a-z]+)$ > name` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | Yes | - -### 1.2. Property `root > ^[A-FH-WY]\|([XZ][a-z]+)$ > status` - -| | | -| ------------ | ------------------ | -| **Type** | `enum (of string)` | -| **Required** | Yes | - -Must be one of: -* "Ratified" -* "Proposed" - -### 1.3. Property `root > ^[A-FH-WY]\|([XZ][a-z]+)$ > versions` - -| | | -| ------------ | ----------------- | -| **Type** | `array of object` | -| **Required** | No | - -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | - -| Each item of this array must be | Description | -| ------------------------------------------ | ----------- | -| [versions items](#pattern1_versions_items) | - | - -#### 1.3.1. root > ^[A-FH-WY]\|([XZ][a-z]+)$ > versions > versions items - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ------------------------------------------------------------------------ | ------- | ----------- | ---------- | ---------- | ----------------- | -| - [id](#pattern1_versions_items_id ) | No | number | No | - | - | -| - [ratification_date](#pattern1_versions_items_ratification_date ) | No | Combination | No | - | - | -| - [ratified_document](#pattern1_versions_items_ratified_document ) | No | Combination | No | - | - | -| - [additionalProperties](#pattern1_versions_items_additionalProperties ) | No | object | No | - | - | - -##### 1.3.1.1. Property `root > ^[A-FH-WY]\|([XZ][a-z]+)$ > versions > versions items > id` - -| | | -| ------------ | -------- | -| **Type** | `number` | -| **Required** | No | - -##### 1.3.1.2. Property `root > ^[A-FH-WY]\|([XZ][a-z]+)$ > versions > versions items > ratification_date` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `combining` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -| Any of(Option) | -| ------------------------------------------------------------- | -| [item 0](#pattern1_versions_items_ratification_date_anyOf_i0) | -| [item 1](#pattern1_versions_items_ratification_date_anyOf_i1) | - -###### 1.3.1.2.1. Property `root > ^[A-FH-WY]\|([XZ][a-z]+)$ > versions > versions items > ratification_date > anyOf > item 0` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | -| **Format** | `date` | - -| Restrictions | | -| --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Must match regular expression** | ```^2[0-9]{3}-(10\|11\|12\|(0?[1-9]))-(31\|30\|[12][0-9]\|0?[0-9])$``` [Test](https://regex101.com/?regex=%5E2%5B0-9%5D%7B3%7D-%2810%7C11%7C12%7C%280%3F%5B1-9%5D%29%29-%2831%7C30%7C%5B12%5D%5B0-9%5D%7C0%3F%5B0-9%5D%29%24) | - -###### 1.3.1.2.2. Property `root > ^[A-FH-WY]\|([XZ][a-z]+)$ > versions > versions items > ratification_date > anyOf > item 1` - -| | | -| ------------ | ------ | -| **Type** | `null` | -| **Required** | No | - -##### 1.3.1.3. Property `root > ^[A-FH-WY]\|([XZ][a-z]+)$ > versions > versions items > ratified_document` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `combining` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -| Any of(Option) | -| ------------------------------------------------------------- | -| [item 0](#pattern1_versions_items_ratified_document_anyOf_i0) | -| [item 1](#pattern1_versions_items_ratified_document_anyOf_i1) | - -###### 1.3.1.3.1. Property `root > ^[A-FH-WY]\|([XZ][a-z]+)$ > versions > versions items > ratified_document > anyOf > item 0` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | -| **Format** | `uri` | - -###### 1.3.1.3.2. Property `root > ^[A-FH-WY]\|([XZ][a-z]+)$ > versions > versions items > ratified_document > anyOf > item 1` - -| | | -| ------------ | ------ | -| **Type** | `null` | -| **Required** | No | - -##### 1.3.1.4. Property `root > ^[A-FH-WY]\|([XZ][a-z]+)$ > versions > versions items > additionalProperties` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -### 1.4. Property `root > ^[A-FH-WY]\|([XZ][a-z]+)$ > subsumes` - -| | | -| ------------ | ----------------- | -| **Type** | `array of string` | -| **Required** | No | - -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | - -| Each item of this array must be | Description | -| ------------------------------------------ | ----------- | -| [subsumes items](#pattern1_subsumes_items) | - | - -#### 1.4.1. root > ^[A-FH-WY]\|([XZ][a-z]+)$ > subsumes > subsumes items - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -| Restrictions | | -| --------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| **Must match regular expression** | ```^[A-FH-WY]\|([XZ][a-z]+)$``` [Test](https://regex101.com/?regex=%5E%5BA-FH-WY%5D%7C%28%5BXZ%5D%5Ba-z%5D%2B%29%24) | - -### 1.5. Property `root > ^[A-FH-WY]\|([XZ][a-z]+)$ > requires` - -| | | -| ------------ | ----------------- | -| **Type** | `array of string` | -| **Required** | No | - -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | - -| Each item of this array must be | Description | -| ------------------------------------------ | ----------- | -| [requires items](#pattern1_requires_items) | - | - -#### 1.5.1. root > ^[A-FH-WY]\|([XZ][a-z]+)$ > requires > requires items - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -| Restrictions | | -| --------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| **Must match regular expression** | ```^[A-FH-WY]\|([XZ][a-z]+)$``` [Test](https://regex101.com/?regex=%5E%5BA-FH-WY%5D%7C%28%5BXZ%5D%5Ba-z%5D%2B%29%24) | - -### 1.6. Property `root > ^[A-FH-WY]\|([XZ][a-z]+)$ > description` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | Yes | - ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2024-06-12 at 20:18:06 -0700 diff --git a/docs/schema/inst_schema.html b/docs/schema/inst_schema.html deleted file mode 100644 index 2bc258022..000000000 --- a/docs/schema/inst_schema.html +++ /dev/null @@ -1 +0,0 @@ - Instruction description

    Instruction description

    Type: object
    No Additional Properties

    All properties whose name matches the following regular expression must respect the following conditions

    Property name regular expression: .*
    Type: object
    No Additional Properties

    Type: string
    Must match regular expression: ^[a-z0-9.]+$

    Type: string

    Short descrption of the instruction

    Type: string

    Detailed description of the instruction


    Extension(s) that defines the instruction

    Type: string

    RISC-V Extension

    Must match regular expression: ^[A-W,Y]|([XZ][a-z]+)$
    Type: array
    No Additional Items

    Each item of this array must be:

    Type: enum (of integer)

    When present, instruction is only defined for RV32 or RV64 base

    Must be one of:

    • 32
    • 64

    Type: object

    Type: enum (of string) Default: "always"

    Must be one of:

    • "always"
    • "sometimes"
    • "never"

    Type: enum (of string) Default: "always"

    Must be one of:

    • "always"
    • "sometimes"
    • "never"

    Type: enum (of string) Default: "always"

    Must be one of:

    • "always"
    • "sometimes"
    • "never"

    Type: enum (of string) Default: "always"

    Must be one of:

    • "always"
    • "sometimes"
    • "never"

    Type: enum (of string) Default: "always"

    Must be one of:

    • "always"
    • "sometimes"
    • "never"

    Type: string

    Extra detail about access when at least one mode is 'sometimes'

    Type: array of enum (of string) Default: []

    Types of exceptions that can be raised by this instruction (excluding Instruction Page/Access Fault)

    No Additional Items

    Each item of this array must be:

    Type: enum (of string)

    Must be one of:

    • "Store/AMO Page Fault"
    • "Store/AMO Guest-Page Fault"
    • "Store Access Fault"
    • "Illegal Instruction"
    • "Virtual Instruction"
    • "MisalignedAddress"

    Type: string

    Functional description of the instruction using ISA language

    Type: string

    Assembly format of the instruction. Can use decode variables

    \ No newline at end of file diff --git a/docs/schema/inst_schema.md b/docs/schema/inst_schema.md deleted file mode 100644 index caf1a285b..000000000 --- a/docs/schema/inst_schema.md +++ /dev/null @@ -1,307 +0,0 @@ -# Instruction description - -- [1. Pattern Property `Instruction description > inst_data`](#pattern1) - - [1.1. Property `Instruction description > .* > name`](#pattern1_name) - - [1.2. Property `Instruction description > .* > long_name`](#pattern1_long_name) - - [1.3. Property `Instruction description > .* > description`](#pattern1_description) - - [1.4. Property `Instruction description > .* > definedBy`](#pattern1_definedBy) - - [1.4.1. Property `Instruction description > .* > definedBy > oneOf > extension`](#pattern1_definedBy_oneOf_i0) - - [1.4.2. Property `Instruction description > .* > definedBy > oneOf > item 1`](#pattern1_definedBy_oneOf_i1) - - [1.4.2.1. Instruction description > .* > definedBy > oneOf > item 1 > extension](#autogenerated_heading_2) - - [1.5. Property `Instruction description > .* > base`](#pattern1_base) - - [1.6. Property `Instruction description > .* > access`](#pattern1_access) - - [1.6.1. Property `Instruction description > .* > access > m`](#pattern1_access_m) - - [1.6.2. Property `Instruction description > .* > access > s`](#pattern1_access_s) - - [1.6.3. Property `Instruction description > .* > access > u`](#pattern1_access_u) - - [1.6.4. Property `Instruction description > .* > access > vs`](#pattern1_access_vs) - - [1.6.5. Property `Instruction description > .* > access > vu`](#pattern1_access_vu) - - [1.7. Property `Instruction description > .* > access_detail`](#pattern1_access_detail) - - [1.8. Property `Instruction description > .* > raises`](#pattern1_raises) - - [1.8.1. Instruction description > .* > raises > raises items](#autogenerated_heading_3) - - [1.9. Property `Instruction description > .* > operation`](#pattern1_operation) - - [1.10. Property `Instruction description > .* > assembly`](#pattern1_assembly) - -**Title:** Instruction description - -| | | -| ------------------------- | ------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ------------------ | ------- | ------ | ---------- | -------------------- | ----------------- | -| - [.*](#pattern1 ) | Yes | object | No | In #/$defs/inst_data | - | - -## 1. Pattern Property `Instruction description > inst_data` -> All properties whose name matches the regular expression -```.*``` ([Test](https://regex101.com/?regex=.%2A)) -must respect the following conditions - -| | | -| ------------------------- | ------------------------------------------------------- | -| **Type** | `object` | -| **Required** | No | -| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") | -| **Defined in** | #/$defs/inst_data | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ------------------------------------------- | ------- | ------------------------- | ---------- | ---------- | ---------------------------------------------------------------------------------------------------- | -| - [name](#pattern1_name ) | No | string | No | - | - | -| + [long_name](#pattern1_long_name ) | No | string | No | - | Short descrption of the instruction | -| + [description](#pattern1_description ) | No | string | No | - | Detailed description of the instruction | -| + [definedBy](#pattern1_definedBy ) | No | Combination | No | - | Extension(s) that defines the instruction | -| - [base](#pattern1_base ) | No | enum (of integer) | No | - | When present, instruction is only defined for RV32 or RV64 base | -| + [access](#pattern1_access ) | No | object | No | - | - | -| - [access_detail](#pattern1_access_detail ) | No | string | No | - | Extra detail about access when at least one mode is 'sometimes' | -| - [raises](#pattern1_raises ) | No | array of enum (of string) | No | - | Types of exceptions that can be raised by this instruction (excluding Instruction Page/Access Fault) | -| - [operation](#pattern1_operation ) | No | string | No | - | Functional description of the instruction using ISA language | -| + [assembly](#pattern1_assembly ) | No | string | No | - | Assembly format of the instruction. Can use decode variables | - -### 1.1. Property `Instruction description > .* > name` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -| Restrictions | | -| --------------------------------- | ----------------------------------------------------------------------------- | -| **Must match regular expression** | ```^[a-z0-9.]+$``` [Test](https://regex101.com/?regex=%5E%5Ba-z0-9.%5D%2B%24) | - -### 1.2. Property `Instruction description > .* > long_name` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | Yes | - -**Description:** Short descrption of the instruction - -### 1.3. Property `Instruction description > .* > description` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | Yes | - -**Description:** Detailed description of the instruction - -### 1.4. Property `Instruction description > .* > definedBy` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `combining` | -| **Required** | Yes | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -**Description:** Extension(s) that defines the instruction - -| One of(Option) | -| ----------------------------------------- | -| [extension](#pattern1_definedBy_oneOf_i0) | -| [item 1](#pattern1_definedBy_oneOf_i1) | - -#### 1.4.1. Property `Instruction description > .* > definedBy > oneOf > extension` - -| | | -| -------------- | ----------------- | -| **Type** | `string` | -| **Required** | No | -| **Defined in** | #/$defs/extension | - -**Description:** RISC-V Extension - -| Restrictions | | -| --------------------------------- | ------------------------------------------------------------------------------------------------------------------ | -| **Must match regular expression** | ```^[A-W,Y]\|([XZ][a-z]+)$``` [Test](https://regex101.com/?regex=%5E%5BA-W%2CY%5D%7C%28%5BXZ%5D%5Ba-z%5D%2B%29%24) | - -#### 1.4.2. Property `Instruction description > .* > definedBy > oneOf > item 1` - -| | | -| ------------ | ------- | -| **Type** | `array` | -| **Required** | No | - -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | - -| Each item of this array must be | Description | -| ----------------------------------------------- | ---------------- | -| [extension](#pattern1_definedBy_oneOf_i1_items) | RISC-V Extension | - -##### 1.4.2.1. Instruction description > .* > definedBy > oneOf > item 1 > extension - -| | | -| ---------------------- | ----------------------------------------------------------- | -| **Type** | `string` | -| **Required** | No | -| **Same definition as** | [pattern1_definedBy_oneOf_i0](#pattern1_definedBy_oneOf_i0) | - -**Description:** RISC-V Extension - -### 1.5. Property `Instruction description > .* > base` - -| | | -| ------------ | ------------------- | -| **Type** | `enum (of integer)` | -| **Required** | No | - -**Description:** When present, instruction is only defined for RV32 or RV64 base - -Must be one of: -* 32 -* 64 - -### 1.6. Property `Instruction description > .* > access` - -| | | -| ------------------------- | ------------------------------------------------------------------------- | -| **Type** | `object` | -| **Required** | Yes | -| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") | - -| Property | Pattern | Type | Deprecated | Definition | Title/Description | -| ---------------------------- | ------- | ---------------- | ---------- | ---------- | ----------------- | -| - [m](#pattern1_access_m ) | No | enum (of string) | No | - | - | -| + [s](#pattern1_access_s ) | No | enum (of string) | No | - | - | -| + [u](#pattern1_access_u ) | No | enum (of string) | No | - | - | -| + [vs](#pattern1_access_vs ) | No | enum (of string) | No | - | - | -| + [vu](#pattern1_access_vu ) | No | enum (of string) | No | - | - | - -#### 1.6.1. Property `Instruction description > .* > access > m` - -| | | -| ------------ | ------------------ | -| **Type** | `enum (of string)` | -| **Required** | No | -| **Default** | `"always"` | - -Must be one of: -* "always" -* "sometimes" -* "never" - -#### 1.6.2. Property `Instruction description > .* > access > s` - -| | | -| ------------ | ------------------ | -| **Type** | `enum (of string)` | -| **Required** | Yes | -| **Default** | `"always"` | - -Must be one of: -* "always" -* "sometimes" -* "never" - -#### 1.6.3. Property `Instruction description > .* > access > u` - -| | | -| ------------ | ------------------ | -| **Type** | `enum (of string)` | -| **Required** | Yes | -| **Default** | `"always"` | - -Must be one of: -* "always" -* "sometimes" -* "never" - -#### 1.6.4. Property `Instruction description > .* > access > vs` - -| | | -| ------------ | ------------------ | -| **Type** | `enum (of string)` | -| **Required** | Yes | -| **Default** | `"always"` | - -Must be one of: -* "always" -* "sometimes" -* "never" - -#### 1.6.5. Property `Instruction description > .* > access > vu` - -| | | -| ------------ | ------------------ | -| **Type** | `enum (of string)` | -| **Required** | Yes | -| **Default** | `"always"` | - -Must be one of: -* "always" -* "sometimes" -* "never" - -### 1.7. Property `Instruction description > .* > access_detail` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -**Description:** Extra detail about access when at least one mode is 'sometimes' - -### 1.8. Property `Instruction description > .* > raises` - -| | | -| ------------ | --------------------------- | -| **Type** | `array of enum (of string)` | -| **Required** | No | -| **Default** | `[]` | - -**Description:** Types of exceptions that can be raised by this instruction (excluding Instruction Page/Access Fault) - -| | Array restrictions | -| -------------------- | ------------------ | -| **Min items** | N/A | -| **Max items** | N/A | -| **Items unicity** | False | -| **Additional items** | False | -| **Tuple validation** | See below | - -| Each item of this array must be | Description | -| -------------------------------------- | ----------- | -| [raises items](#pattern1_raises_items) | - | - -#### 1.8.1. Instruction description > .* > raises > raises items - -| | | -| ------------ | ------------------ | -| **Type** | `enum (of string)` | -| **Required** | No | - -Must be one of: -* "Store/AMO Page Fault" -* "Store/AMO Guest-Page Fault" -* "Store Access Fault" -* "Illegal Instruction" -* "Virtual Instruction" -* "MisalignedAddress" - -### 1.9. Property `Instruction description > .* > operation` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | No | - -**Description:** Functional description of the instruction using ISA language - -### 1.10. Property `Instruction description > .* > assembly` - -| | | -| ------------ | -------- | -| **Type** | `string` | -| **Required** | Yes | - -**Description:** Assembly format of the instruction. Can use decode variables - ----------------------------------------------------------------------------------------------------------------------------- -Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2024-06-12 at 20:18:06 -0700 diff --git a/docs/schema/schema_doc.css b/docs/schema/schema_doc.css deleted file mode 100644 index e1f3a5112..000000000 --- a/docs/schema/schema_doc.css +++ /dev/null @@ -1,181 +0,0 @@ -body { - font: 16px/1.5em "Overpass", "Open Sans", Helvetica, sans-serif; - color: #333; - font-weight: 300; - padding: 40px; -} - -.btn.btn-link { - font-size: 18px; - user-select: text; -} - -.jsfh-animated-property { - animation: eclair; - animation-iteration-count: 1; - animation-fill-mode: forwards; - animation-duration: .75s; - -} - -@keyframes eclair { - 0%,100% { - transform: scale(1); - } - 50% { - transform: scale(1.03); - } -} - -.btn.btn-primary { - margin: 10px; -} - -.btn.example-show.collapsed:before { - content: "show" -} - -.btn.example-show:before { - content: "hide" -} - -.description.collapse:not(.show) { - max-height: 100px !important; - overflow: hidden; - - display: -webkit-box; - -webkit-line-clamp: 2; - -webkit-box-orient: vertical; -} - -.description.collapsing { - min-height: 100px !important; -} - -.collapse-description-link.collapsed:after { - content: '+ Read More'; -} - -.collapse-description-link:not(.collapsed):after { - content: '- Read Less'; -} - -.badge { - font-size: 100%; - margin-bottom: 0.5rem; - margin-top: 0.5rem; -} - -.badge.value-type { - font-size: 120%; - margin-right: 5px; - margin-bottom: 10px; -} - - -.badge.default-value { - font-size: 120%; - margin-left: 5px; - margin-bottom: 10px; -} - -.badge.restriction { - display: inline-block; -} - -.badge.required-property,.badge.deprecated-property,.badge.pattern-property,.badge.no-additional { - font-size: 100%; - margin-left: 10px; -} - -.accordion div.card:only-child { - border-bottom: 1px solid rgba(0, 0, 0, 0.125); -} - -.examples { - padding: 1rem !important; -} - -.examples pre { - margin-bottom: 0; -} - -.highlight.jumbotron { - padding: 1rem !important; -} - -.generated-by-footer { - margin-top: 1em; - text-align: right; -} - -/* From https://github.com/richleland/pygments-css/blob/master/friendly.css, see https://github.com/trentm/python-markdown2/wiki/fenced-code-blocks */ -.highlight { background: #e9ecef; } /* Changed from #f0f0f0 in the original style to be the same as bootstrap's jumbotron */ -.highlight .hll { background-color: #ffffcc } -.highlight .c { color: #60a0b0; font-style: italic } /* Comment */ -.highlight .err { border: 1px solid #FF0000 } /* Error */ -.highlight .k { color: #007020; font-weight: bold } /* Keyword */ -.highlight .o { color: #666666 } /* Operator */ -.highlight .ch { color: #60a0b0; font-style: italic } /* Comment.Hashbang */ -.highlight .cm { color: #60a0b0; font-style: italic } /* Comment.Multiline */ -.highlight .cp { color: #007020 } /* Comment.Preproc */ -.highlight .cpf { color: #60a0b0; font-style: italic } /* Comment.PreprocFile */ -.highlight .c1 { color: #60a0b0; font-style: italic } /* Comment.Single */ -.highlight .cs { color: #60a0b0; background-color: #fff0f0 } /* Comment.Special */ -.highlight .gd { color: #A00000 } /* Generic.Deleted */ -.highlight .ge { font-style: italic } /* Generic.Emph */ -.highlight .gr { color: #FF0000 } /* Generic.Error */ -.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ -.highlight .gi { color: #00A000 } /* Generic.Inserted */ -.highlight .go { color: #888888 } /* Generic.Output */ -.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ -.highlight .gs { font-weight: bold } /* Generic.Strong */ -.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ -.highlight .gt { color: #0044DD } /* Generic.Traceback */ -.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ -.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ -.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ -.highlight .kp { color: #007020 } /* Keyword.Pseudo */ -.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ -.highlight .kt { color: #902000 } /* Keyword.Type */ -.highlight .m { color: #40a070 } /* Literal.Number */ -.highlight .s { color: #4070a0 } /* Literal.String */ -.highlight .na { color: #4070a0 } /* Name.Attribute */ -.highlight .nb { color: #007020 } /* Name.Builtin */ -.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ -.highlight .no { color: #60add5 } /* Name.Constant */ -.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ -.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ -.highlight .ne { color: #007020 } /* Name.Exception */ -.highlight .nf { color: #06287e } /* Name.Function */ -.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ -.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ -.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ -.highlight .nv { color: #bb60d5 } /* Name.Variable */ -.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ -.highlight .w { color: #bbbbbb } /* Text.Whitespace */ -.highlight .mb { color: #40a070 } /* Literal.Number.Bin */ -.highlight .mf { color: #40a070 } /* Literal.Number.Float */ -.highlight .mh { color: #40a070 } /* Literal.Number.Hex */ -.highlight .mi { color: #40a070 } /* Literal.Number.Integer */ -.highlight .mo { color: #40a070 } /* Literal.Number.Oct */ -.highlight .sa { color: #4070a0 } /* Literal.String.Affix */ -.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ -.highlight .sc { color: #4070a0 } /* Literal.String.Char */ -.highlight .dl { color: #4070a0 } /* Literal.String.Delimiter */ -.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ -.highlight .s2 { color: #4070a0 } /* Literal.String.Double */ -.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ -.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ -.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ -.highlight .sx { color: #c65d09 } /* Literal.String.Other */ -.highlight .sr { color: #235388 } /* Literal.String.Regex */ -.highlight .s1 { color: #4070a0 } /* Literal.String.Single */ -.highlight .ss { color: #517918 } /* Literal.String.Symbol */ -.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ -.highlight .fm { color: #06287e } /* Name.Function.Magic */ -.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ -.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ -.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ -.highlight .vm { color: #bb60d5 } /* Name.Variable.Magic */ -.highlight .il { color: #40a070 } /* Literal.Number.Integer.Long */ diff --git a/docs/schema/schema_doc.min.js b/docs/schema/schema_doc.min.js deleted file mode 100644 index 17eceaf59..000000000 --- a/docs/schema/schema_doc.min.js +++ /dev/null @@ -1 +0,0 @@ -$(document).on("click",'a[href^="#"]',function(event){event.preventDefault();history.pushState({},"",this.href)});function flashElement(elementId){myElement=document.getElementById(elementId);myElement.classList.add("jsfh-animated-property");setTimeout(function(){myElement.classList.remove("jsfh-animated-property")},1e3)}function setAnchor(anchorLinkDestination){history.pushState({},"",anchorLinkDestination)}function anchorOnLoad(){let linkTarget=decodeURIComponent(window.location.hash.split("?")[0].split("&")[0]);if(linkTarget[0]==="#"){linkTarget=linkTarget.substr(1)}if(linkTarget.length>0){anchorLink(linkTarget)}}function anchorLink(linkTarget){const target=$("#"+linkTarget);target.parents().addBack().filter(".collapse:not(.show), .tab-pane, [role='tab']").each(function(index){if($(this).hasClass("collapse")){$(this).collapse("show")}else if($(this).hasClass("tab-pane")){const tabToShow=$("a[href='#"+$(this).attr("id")+"']");if(tabToShow){tabToShow.tab("show")}}else if($(this).attr("role")==="tab"){$(this).tab("show")}});setTimeout(function(){let targetElement=document.getElementById(linkTarget);if(targetElement){targetElement.scrollIntoView({block:"center",behavior:"smooth"});setTimeout(function(){flashElement(linkTarget)},500)}},1e3)} \ No newline at end of file