From 589b4a049acf4ad51886750b209c6a8073fb94e7 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 16 Aug 2019 11:09:29 +0200 Subject: vhdl: recognize PSL units reserved words. --- python/libghdl/thin/std_names.py | 1309 ++++++++++++++++++------------------ python/libghdl/thin/vhdl/nodes.py | 68 +- python/libghdl/thin/vhdl/tokens.py | 91 +-- src/ghdldrv/ghdlprint.adb | 2 +- src/std_names.adb | 6 +- src/std_names.ads | 20 +- src/vhdl/vhdl-scanner.adb | 6 + src/vhdl/vhdl-tokens.adb | 6 + src/vhdl/vhdl-tokens.ads | 3 + 9 files changed, 774 insertions(+), 737 deletions(-) diff --git a/python/libghdl/thin/std_names.py b/python/libghdl/thin/std_names.py index a4ad8bece..0cc9749b3 100644 --- a/python/libghdl/thin/std_names.py +++ b/python/libghdl/thin/std_names.py @@ -103,655 +103,660 @@ class Name: Last_Vhdl93 = 353 Protected = 354 Last_Vhdl00 = 354 - Context = 355 - Parameter = 356 - Last_Vhdl08 = 356 - First_Ams_Keyword = 357 - Across = 357 - Break = 358 - Limit = 359 - Nature = 360 - Noise = 361 - Procedural = 362 - Quantity = 363 - Reference = 364 - Spectrum = 365 - Subnature = 366 - Terminal = 367 - Through = 368 - Tolerance = 369 - Last_AMS_Vhdl = 369 - Last_Keyword = 369 - First_Verilog = 370 - Always = 370 - Assign = 371 - Buf = 372 - Bufif0 = 373 - Bufif1 = 374 - Casex = 375 - Casez = 376 - Cmos = 377 - Deassign = 378 - Default = 379 - Defparam = 380 - Disable = 381 - Edge = 382 - Endcase = 383 - Endfunction = 384 - Endmodule = 385 - Endprimitive = 386 - Endspecify = 387 - Endtable = 388 - Endtask = 389 - Force = 390 - Forever = 391 - Fork = 392 - Highz0 = 393 - Highz1 = 394 - Ifnone = 395 - Initial = 396 - Input = 397 - Join = 398 - Large = 399 - Macromodule = 400 - Medium = 401 - Module = 402 - Negedge = 403 - Nmos = 404 - Notif0 = 405 - Notif1 = 406 - Output = 407 - Pmos = 408 - Posedge = 409 - Primitive = 410 - Pull0 = 411 - Pull1 = 412 - Pulldown = 413 - Pullup = 414 - Realtime = 415 - Release = 416 - Reg = 417 - Repeat = 418 - Rcmos = 419 - Rnmos = 420 - Rpmos = 421 - Rtran = 422 - Rtranif0 = 423 - Rtranif1 = 424 - Scalared = 425 - Small = 426 - Specify = 427 - Specparam = 428 - Strong0 = 429 - Strong1 = 430 - Supply0 = 431 - Supply1 = 432 - Tablex = 433 - Task = 434 - Tran = 435 - Tranif0 = 436 - Tranif1 = 437 - Tri = 438 - Tri0 = 439 - Tri1 = 440 - Triand = 441 - Trior = 442 - Trireg = 443 - Vectored = 444 - Wand = 445 - Weak0 = 446 - Weak1 = 447 - Wire = 448 - Wor = 449 - Last_Verilog = 449 - First_V2001 = 450 - Automatic = 450 - Endgenerate = 451 - Genvar = 452 - Localparam = 453 - Unsigned = 454 - Signed = 455 - Last_V2001 = 455 - Uwire = 456 - First_SV3_0 = 457 - Always_Comb = 457 - Always_Ff = 458 - Always_Latch = 459 - Bit = 460 - Byte = 461 - Changed = 462 - Char = 463 - Const = 464 - Continue = 465 - Do = 466 - Endinterface = 467 - Endtransition = 468 - Enum = 469 - Export = 470 - Extern = 471 - Forkjoin = 472 - Iff = 473 - Import = 474 - Int = 475 - Interface = 476 - Logic = 477 - Longint = 478 - Longreal = 479 - Modport = 480 - Packed = 481 - Priority = 482 - Shortint = 483 - Shortreal = 484 - Static = 485 - Struct = 486 - Timeprecision = 487 - Timeunit = 488 - Transition = 489 - Typedef = 490 - Union = 491 - Unique = 492 - Unique0 = 493 - Void = 494 - Last_SV3_0 = 494 - First_SV3_1 = 495 - Chandle = 495 - Class = 496 - Clocking = 497 - Constraint = 498 - Cover = 499 - Dist = 500 - Endclass = 501 - Endclocking = 502 - Endprogram = 503 - Endproperty = 504 - Endsequence = 505 - Extends = 506 - Final = 507 - First_Match = 508 - Inside = 509 - Intersect = 510 - Join_Any = 511 - Join_None = 512 - Local = 513 - Program = 514 - Property = 515 - Rand = 516 - Randc = 517 - Ref = 518 - Sequence = 519 - Solve = 520 - String = 521 - Super = 522 - This = 523 - Throughout = 524 - Var = 525 - Virtual = 526 - Wait_Order = 527 - Last_SV3_1 = 527 - First_SV3_1a = 528 - Assume = 528 - Covergroup = 529 - Coverpoint = 530 - Endgroup = 531 - Endpackage = 532 - Expect = 533 - Foreach = 534 - Ignore_Bins = 535 - Illegal_Bins = 536 - Matches = 537 - Randcase = 538 - Randsequence = 539 - Tagged = 540 - Wildcard = 541 - Last_SV3_1a = 541 - First_SV2009 = 542 - Implies = 542 - S_Until = 543 - S_Until_With = 544 - Until_With = 545 - Last_SV2009 = 545 - First_Operator = 546 - Op_Equality = 546 - Op_Inequality = 547 - Op_Less = 548 - Op_Less_Equal = 549 - Op_Greater = 550 - Op_Greater_Equal = 551 - Op_Plus = 552 - Op_Minus = 553 - Op_Mul = 554 - Op_Div = 555 - Op_Exp = 556 - Op_Concatenation = 557 - Op_Condition = 558 - Op_Match_Equality = 559 - Op_Match_Inequality = 560 - Op_Match_Less = 561 - Op_Match_Less_Equal = 562 - Op_Match_Greater = 563 - Op_Match_Greater_Equal = 564 - Last_Operator = 564 - First_Attribute = 565 - Base = 565 - Left = 566 - Right = 567 - High = 568 - Low = 569 - Pos = 570 - Val = 571 - Succ = 572 - Pred = 573 - Leftof = 574 - Rightof = 575 - Reverse_Range = 576 - Length = 577 - Delayed = 578 - Stable = 579 - Quiet = 580 - Transaction = 581 - Event = 582 - Active = 583 - Last_Event = 584 - Last_Active = 585 - Last_Value = 586 - Last_Attribute = 586 - First_Vhdl87_Attribute = 587 - Behavior = 587 - Structure = 588 - Last_Vhdl87_Attribute = 588 - First_Vhdl93_Attribute = 589 - Ascending = 589 - Image = 590 - Value = 591 - Driving = 592 - Driving_Value = 593 - Simple_Name = 594 - Instance_Name = 595 - Path_Name = 596 - Last_Vhdl93_Attribute = 596 - First_Vhdl08_Attribute = 597 - Element = 597 - Last_Vhdl08_Attribute = 597 - First_AMS_Attribute = 598 - Contribution = 598 - Dot = 599 - Integ = 600 - Above = 601 - ZOH = 602 - LTF = 603 - ZTF = 604 - Ramp = 605 - Slew = 606 - Last_AMS_Attribute = 606 - First_Standard = 607 - Std = 607 - Standard = 608 - Boolean = 609 - NFalse = 610 - NTrue = 611 - Character = 612 - Severity_Level = 613 - Note = 614 - Warning = 615 - Error = 616 - Failure = 617 - Universal_Integer = 618 - Universal_Real = 619 - Convertible_Integer = 620 - Convertible_Real = 621 - Integer = 622 - Real = 623 - Time = 624 - Fs = 625 - Ps = 626 - Ns = 627 - Us = 628 - Ms = 629 - Sec = 630 - Min = 631 - Hr = 632 - Max = 633 - Delay_Length = 634 - Now = 635 - Natural = 636 - Positive = 637 - Bit_Vector = 638 - File_Open_Kind = 639 - Read_Mode = 640 - Write_Mode = 641 - Append_Mode = 642 - File_Open_Status = 643 - Open_Ok = 644 - Status_Error = 645 - Name_Error = 646 - Mode_Error = 647 - Foreign = 648 - Boolean_Vector = 649 - To_Bstring = 650 - To_Binary_String = 651 - To_Ostring = 652 - To_Octal_String = 653 - To_Hstring = 654 - To_Hex_String = 655 - Integer_Vector = 656 - Real_Vector = 657 - Time_Vector = 658 - Digits = 659 - Format = 660 - Unit = 661 - Domain_Type = 662 - Quiescent_Domain = 663 - Time_Domain = 664 - Frequency_Domain = 665 - Domain = 666 - Frequency = 667 - Last_Standard = 667 - First_Charname = 668 - Nul = 668 - Soh = 669 - Stx = 670 - Etx = 671 - Eot = 672 - Enq = 673 - Ack = 674 - Bel = 675 - Bs = 676 - Ht = 677 - Lf = 678 - Vt = 679 - Ff = 680 - Cr = 681 - So = 682 - Si = 683 - Dle = 684 - Dc1 = 685 - Dc2 = 686 - Dc3 = 687 - Dc4 = 688 - Nak = 689 - Syn = 690 - Etb = 691 - Can = 692 - Em = 693 - Sub = 694 - Esc = 695 - Fsp = 696 - Gsp = 697 - Rsp = 698 - Usp = 699 - Del = 700 - C128 = 701 - C129 = 702 - C130 = 703 - C131 = 704 - C132 = 705 - C133 = 706 - C134 = 707 - C135 = 708 - C136 = 709 - C137 = 710 - C138 = 711 - C139 = 712 - C140 = 713 - C141 = 714 - C142 = 715 - C143 = 716 - C144 = 717 - C145 = 718 - C146 = 719 - C147 = 720 - C148 = 721 - C149 = 722 - C150 = 723 - C151 = 724 - C152 = 725 - C153 = 726 - C154 = 727 - C155 = 728 - C156 = 729 - C157 = 730 - C158 = 731 - C159 = 732 - Last_Charname = 732 - First_Misc = 733 - Guard = 733 - Deallocate = 734 - File_Open = 735 - File_Close = 736 - Read = 737 - Write = 738 - Flush = 739 - Endfile = 740 - I = 741 - J = 742 - F = 743 - L = 744 - P = 745 - R = 746 - S = 747 - V = 748 - External_Name = 749 - Open_Kind = 750 - First = 751 - Last = 752 - Textio = 753 - Work = 754 - Text = 755 - To_String = 756 - Minimum = 757 - Maximum = 758 - Untruncated_Text_Read = 759 - Textio_Read_Real = 760 - Textio_Write_Real = 761 - Get_Resolution_Limit = 762 - Control_Simulation = 763 - Step = 764 - Index = 765 - Item = 766 - Uu_File_Uu = 767 - Uu_Line_Uu = 768 - Synthesis = 769 - Translate_Off = 770 - Translate_On = 771 - NNone = 772 - Last_Misc = 772 - First_Ieee = 773 - Ieee = 773 - Std_Logic_1164 = 774 - Std_Ulogic = 775 - Std_Ulogic_Vector = 776 - Std_Logic = 777 - Std_Logic_Vector = 778 - Rising_Edge = 779 - Falling_Edge = 780 - VITAL_Timing = 781 - VITAL_Level0 = 782 - VITAL_Level1 = 783 - Numeric_Std = 784 - Numeric_Bit = 785 - Unresolved_Unsigned = 786 - Unresolved_Signed = 787 - Std_Logic_Arith = 788 - Std_Logic_Signed = 789 - Std_Logic_Textio = 790 - Std_Logic_Unsigned = 791 - To_Integer = 792 - To_Unsigned = 793 - To_Signed = 794 - Resize = 795 - Math_Real = 796 - Ceil = 797 - Log2 = 798 - Last_Ieee = 798 - First_Directive = 799 - Define = 799 - Endif = 800 - Ifdef = 801 - Ifndef = 802 - Include = 803 - Timescale = 804 - Undef = 805 - Protect = 806 - Begin_Protected = 807 - End_Protected = 808 - Key_Block = 809 - Data_Block = 810 - Line = 811 - Celldefine = 812 - Endcelldefine = 813 - Default_Nettype = 814 - Resetall = 815 - Last_Directive = 815 - First_Systask = 816 - Bits = 816 - D_Root = 817 - D_Unit = 818 - Last_Systask = 818 - First_SV_Method = 819 - Size = 819 - Insert = 820 - Delete = 821 - Pop_Front = 822 - Pop_Back = 823 - Push_Front = 824 - Push_Back = 825 - Name = 826 - Len = 827 - Substr = 828 - Exists = 829 - Atoi = 830 - Itoa = 831 - Find = 832 - Find_Index = 833 - Find_First = 834 - Find_First_Index = 835 - Find_Last = 836 - Find_Last_Index = 837 - Num = 838 - Randomize = 839 - Pre_Randomize = 840 - Post_Randomize = 841 - Srandom = 842 - Get_Randstate = 843 - Set_Randstate = 844 - Seed = 845 - State = 846 - Last_SV_Method = 846 - First_BSV = 847 - uAction = 847 - uActionValue = 848 - BVI = 849 - uC = 850 - uCF = 851 - uE = 852 - uSB = 853 - uSBR = 854 - Action = 855 - Endaction = 856 - Actionvalue = 857 - Endactionvalue = 858 - Ancestor = 859 - Clocked_By = 860 - Default_Clock = 861 - Default_Reset = 862 - Dependencies = 863 - Deriving = 864 - Determines = 865 - Enable = 866 - Ifc_Inout = 867 - Input_Clock = 868 - Input_Reset = 869 - Instance = 870 - Endinstance = 871 - Let = 872 - Match = 873 - Method = 874 - Endmethod = 875 - Numeric = 876 - Output_Clock = 877 - Output_Reset = 878 - Par = 879 - Endpar = 880 - Path = 881 - Provisos = 882 - Ready = 883 - Reset_By = 884 - Rule = 885 - Endrule = 886 - Rules = 887 - Endrules = 888 - Same_Family = 889 - Schedule = 890 - Seq = 891 - Endseq = 892 - Typeclass = 893 - Endtypeclass = 894 - Valueof = 895 - uValueof = 896 - Last_BSV = 896 - First_Comment = 897 - Psl = 897 - Pragma = 898 - Last_Comment = 898 - First_PSL = 899 - A = 899 - Af = 900 - Ag = 901 - Ax = 902 - Abort = 903 - Assume_Guarantee = 904 - Before = 905 - Clock = 906 - E = 907 - Ef = 908 - Eg = 909 - Ex = 910 - Endpoint = 911 - Eventually = 912 - Fairness = 913 - Fell = 914 - Forall = 915 - G = 916 - Inf = 917 - Inherit = 918 - Never = 919 - Next_A = 920 - Next_E = 921 - Next_Event = 922 - Next_Event_A = 923 - Next_Event_E = 924 - Prev = 925 - Restrict = 926 - Restrict_Guarantee = 927 - Rose = 928 - Strong = 929 - Vmode = 930 - Vprop = 931 - Vunit = 932 - W = 933 - Whilenot = 934 - Within = 935 - X = 936 - Last_PSL = 936 - First_Edif = 937 - Celltype = 947 - View = 948 - Viewtype = 949 - Direction = 950 - Contents = 951 - Net = 952 - Viewref = 953 - Cellref = 954 - Libraryref = 955 - Portinstance = 956 - Joined = 957 - Portref = 958 - Instanceref = 959 - Design = 960 - Designator = 961 - Owner = 962 - Member = 963 - Number = 964 - Rename = 965 - Userdata = 966 - Last_Edif = 966 + Assume = 355 + Context = 356 + Cover = 357 + Default = 358 + Parameter = 359 + Property = 360 + Restrict = 361 + Restrict_Guarantee = 362 + Sequence = 363 + Vmode = 364 + Vprop = 365 + Vunit = 366 + Last_Vhdl08 = 366 + First_Ams_Keyword = 367 + Across = 367 + Break = 368 + Limit = 369 + Nature = 370 + Noise = 371 + Procedural = 372 + Quantity = 373 + Reference = 374 + Spectrum = 375 + Subnature = 376 + Terminal = 377 + Through = 378 + Tolerance = 379 + Last_AMS_Vhdl = 379 + Last_Keyword = 379 + First_Verilog = 380 + Always = 380 + Assign = 381 + Buf = 382 + Bufif0 = 383 + Bufif1 = 384 + Casex = 385 + Casez = 386 + Cmos = 387 + Deassign = 388 + Defparam = 389 + Disable = 390 + Edge = 391 + Endcase = 392 + Endfunction = 393 + Endmodule = 394 + Endprimitive = 395 + Endspecify = 396 + Endtable = 397 + Endtask = 398 + Force = 399 + Forever = 400 + Fork = 401 + Highz0 = 402 + Highz1 = 403 + Ifnone = 404 + Initial = 405 + Input = 406 + Join = 407 + Large = 408 + Macromodule = 409 + Medium = 410 + Module = 411 + Negedge = 412 + Nmos = 413 + Notif0 = 414 + Notif1 = 415 + Output = 416 + Pmos = 417 + Posedge = 418 + Primitive = 419 + Pull0 = 420 + Pull1 = 421 + Pulldown = 422 + Pullup = 423 + Realtime = 424 + Release = 425 + Reg = 426 + Repeat = 427 + Rcmos = 428 + Rnmos = 429 + Rpmos = 430 + Rtran = 431 + Rtranif0 = 432 + Rtranif1 = 433 + Scalared = 434 + Small = 435 + Specify = 436 + Specparam = 437 + Strong0 = 438 + Strong1 = 439 + Supply0 = 440 + Supply1 = 441 + Tablex = 442 + Task = 443 + Tran = 444 + Tranif0 = 445 + Tranif1 = 446 + Tri = 447 + Tri0 = 448 + Tri1 = 449 + Triand = 450 + Trior = 451 + Trireg = 452 + Vectored = 453 + Wand = 454 + Weak0 = 455 + Weak1 = 456 + Wire = 457 + Wor = 458 + Last_Verilog = 458 + First_V2001 = 459 + Automatic = 459 + Endgenerate = 460 + Genvar = 461 + Localparam = 462 + Unsigned = 463 + Signed = 464 + Last_V2001 = 464 + Uwire = 465 + First_SV3_0 = 466 + Always_Comb = 466 + Always_Ff = 467 + Always_Latch = 468 + Bit = 469 + Byte = 470 + Changed = 471 + Char = 472 + Const = 473 + Continue = 474 + Do = 475 + Endinterface = 476 + Endtransition = 477 + Enum = 478 + Export = 479 + Extern = 480 + Forkjoin = 481 + Iff = 482 + Import = 483 + Int = 484 + Interface = 485 + Logic = 486 + Longint = 487 + Longreal = 488 + Modport = 489 + Packed = 490 + Priority = 491 + Shortint = 492 + Shortreal = 493 + Static = 494 + Struct = 495 + Timeprecision = 496 + Timeunit = 497 + Transition = 498 + Typedef = 499 + Union = 500 + Unique = 501 + Unique0 = 502 + Void = 503 + Last_SV3_0 = 503 + First_SV3_1 = 504 + Chandle = 504 + Class = 505 + Clocking = 506 + Constraint = 507 + Dist = 508 + Endclass = 509 + Endclocking = 510 + Endprogram = 511 + Endproperty = 512 + Endsequence = 513 + Extends = 514 + Final = 515 + First_Match = 516 + Inside = 517 + Intersect = 518 + Join_Any = 519 + Join_None = 520 + Local = 521 + Program = 522 + Rand = 523 + Randc = 524 + Ref = 525 + Solve = 526 + String = 527 + Super = 528 + This = 529 + Throughout = 530 + Var = 531 + Virtual = 532 + Wait_Order = 533 + Last_SV3_1 = 533 + First_SV3_1a = 534 + Covergroup = 534 + Coverpoint = 535 + Endgroup = 536 + Endpackage = 537 + Expect = 538 + Foreach = 539 + Ignore_Bins = 540 + Illegal_Bins = 541 + Matches = 542 + Randcase = 543 + Randsequence = 544 + Tagged = 545 + Wildcard = 546 + Last_SV3_1a = 546 + First_SV2009 = 547 + Implies = 547 + S_Until = 548 + S_Until_With = 549 + Until_With = 550 + Last_SV2009 = 550 + First_Operator = 551 + Op_Equality = 551 + Op_Inequality = 552 + Op_Less = 553 + Op_Less_Equal = 554 + Op_Greater = 555 + Op_Greater_Equal = 556 + Op_Plus = 557 + Op_Minus = 558 + Op_Mul = 559 + Op_Div = 560 + Op_Exp = 561 + Op_Concatenation = 562 + Op_Condition = 563 + Op_Match_Equality = 564 + Op_Match_Inequality = 565 + Op_Match_Less = 566 + Op_Match_Less_Equal = 567 + Op_Match_Greater = 568 + Op_Match_Greater_Equal = 569 + Last_Operator = 569 + First_Attribute = 570 + Base = 570 + Left = 571 + Right = 572 + High = 573 + Low = 574 + Pos = 575 + Val = 576 + Succ = 577 + Pred = 578 + Leftof = 579 + Rightof = 580 + Reverse_Range = 581 + Length = 582 + Delayed = 583 + Stable = 584 + Quiet = 585 + Transaction = 586 + Event = 587 + Active = 588 + Last_Event = 589 + Last_Active = 590 + Last_Value = 591 + Last_Attribute = 591 + First_Vhdl87_Attribute = 592 + Behavior = 592 + Structure = 593 + Last_Vhdl87_Attribute = 593 + First_Vhdl93_Attribute = 594 + Ascending = 594 + Image = 595 + Value = 596 + Driving = 597 + Driving_Value = 598 + Simple_Name = 599 + Instance_Name = 600 + Path_Name = 601 + Last_Vhdl93_Attribute = 601 + First_Vhdl08_Attribute = 602 + Element = 602 + Last_Vhdl08_Attribute = 602 + First_AMS_Attribute = 603 + Contribution = 603 + Dot = 604 + Integ = 605 + Above = 606 + ZOH = 607 + LTF = 608 + ZTF = 609 + Ramp = 610 + Slew = 611 + Last_AMS_Attribute = 611 + First_Standard = 612 + Std = 612 + Standard = 613 + Boolean = 614 + NFalse = 615 + NTrue = 616 + Character = 617 + Severity_Level = 618 + Note = 619 + Warning = 620 + Error = 621 + Failure = 622 + Universal_Integer = 623 + Universal_Real = 624 + Convertible_Integer = 625 + Convertible_Real = 626 + Integer = 627 + Real = 628 + Time = 629 + Fs = 630 + Ps = 631 + Ns = 632 + Us = 633 + Ms = 634 + Sec = 635 + Min = 636 + Hr = 637 + Max = 638 + Delay_Length = 639 + Now = 640 + Natural = 641 + Positive = 642 + Bit_Vector = 643 + File_Open_Kind = 644 + Read_Mode = 645 + Write_Mode = 646 + Append_Mode = 647 + File_Open_Status = 648 + Open_Ok = 649 + Status_Error = 650 + Name_Error = 651 + Mode_Error = 652 + Foreign = 653 + Boolean_Vector = 654 + To_Bstring = 655 + To_Binary_String = 656 + To_Ostring = 657 + To_Octal_String = 658 + To_Hstring = 659 + To_Hex_String = 660 + Integer_Vector = 661 + Real_Vector = 662 + Time_Vector = 663 + Digits = 664 + Format = 665 + Unit = 666 + Domain_Type = 667 + Quiescent_Domain = 668 + Time_Domain = 669 + Frequency_Domain = 670 + Domain = 671 + Frequency = 672 + Last_Standard = 672 + First_Charname = 673 + Nul = 673 + Soh = 674 + Stx = 675 + Etx = 676 + Eot = 677 + Enq = 678 + Ack = 679 + Bel = 680 + Bs = 681 + Ht = 682 + Lf = 683 + Vt = 684 + Ff = 685 + Cr = 686 + So = 687 + Si = 688 + Dle = 689 + Dc1 = 690 + Dc2 = 691 + Dc3 = 692 + Dc4 = 693 + Nak = 694 + Syn = 695 + Etb = 696 + Can = 697 + Em = 698 + Sub = 699 + Esc = 700 + Fsp = 701 + Gsp = 702 + Rsp = 703 + Usp = 704 + Del = 705 + C128 = 706 + C129 = 707 + C130 = 708 + C131 = 709 + C132 = 710 + C133 = 711 + C134 = 712 + C135 = 713 + C136 = 714 + C137 = 715 + C138 = 716 + C139 = 717 + C140 = 718 + C141 = 719 + C142 = 720 + C143 = 721 + C144 = 722 + C145 = 723 + C146 = 724 + C147 = 725 + C148 = 726 + C149 = 727 + C150 = 728 + C151 = 729 + C152 = 730 + C153 = 731 + C154 = 732 + C155 = 733 + C156 = 734 + C157 = 735 + C158 = 736 + C159 = 737 + Last_Charname = 737 + First_Misc = 738 + Guard = 738 + Deallocate = 739 + File_Open = 740 + File_Close = 741 + Read = 742 + Write = 743 + Flush = 744 + Endfile = 745 + I = 746 + J = 747 + F = 748 + L = 749 + P = 750 + R = 751 + S = 752 + V = 753 + External_Name = 754 + Open_Kind = 755 + First = 756 + Last = 757 + Textio = 758 + Work = 759 + Text = 760 + To_String = 761 + Minimum = 762 + Maximum = 763 + Untruncated_Text_Read = 764 + Textio_Read_Real = 765 + Textio_Write_Real = 766 + Get_Resolution_Limit = 767 + Control_Simulation = 768 + Step = 769 + Index = 770 + Item = 771 + Uu_File_Uu = 772 + Uu_Line_Uu = 773 + Synthesis = 774 + Translate_Off = 775 + Translate_On = 776 + Label_Applies_To = 777 + Return_Port_Name = 778 + Map_To_Operator = 779 + Type_Function = 780 + Built_In = 781 + NNone = 782 + Last_Misc = 782 + First_Ieee = 783 + Ieee = 783 + Std_Logic_1164 = 784 + Std_Ulogic = 785 + Std_Ulogic_Vector = 786 + Std_Logic = 787 + Std_Logic_Vector = 788 + Rising_Edge = 789 + Falling_Edge = 790 + VITAL_Timing = 791 + VITAL_Level0 = 792 + VITAL_Level1 = 793 + Numeric_Std = 794 + Numeric_Bit = 795 + Unresolved_Unsigned = 796 + Unresolved_Signed = 797 + Std_Logic_Arith = 798 + Std_Logic_Signed = 799 + Std_Logic_Textio = 800 + Std_Logic_Unsigned = 801 + To_Integer = 802 + To_Unsigned = 803 + To_Signed = 804 + Resize = 805 + Math_Real = 806 + Ceil = 807 + Log2 = 808 + Last_Ieee = 808 + First_Directive = 809 + Define = 809 + Endif = 810 + Ifdef = 811 + Ifndef = 812 + Include = 813 + Timescale = 814 + Undef = 815 + Protect = 816 + Begin_Protected = 817 + End_Protected = 818 + Key_Block = 819 + Data_Block = 820 + Line = 821 + Celldefine = 822 + Endcelldefine = 823 + Default_Nettype = 824 + Resetall = 825 + Last_Directive = 825 + First_Systask = 826 + Bits = 826 + D_Root = 827 + D_Unit = 828 + Last_Systask = 828 + First_SV_Method = 829 + Size = 829 + Insert = 830 + Delete = 831 + Pop_Front = 832 + Pop_Back = 833 + Push_Front = 834 + Push_Back = 835 + Name = 836 + Len = 837 + Substr = 838 + Exists = 839 + Atoi = 840 + Itoa = 841 + Find = 842 + Find_Index = 843 + Find_First = 844 + Find_First_Index = 845 + Find_Last = 846 + Find_Last_Index = 847 + Num = 848 + Randomize = 849 + Pre_Randomize = 850 + Post_Randomize = 851 + Srandom = 852 + Get_Randstate = 853 + Set_Randstate = 854 + Seed = 855 + State = 856 + Last_SV_Method = 856 + First_BSV = 857 + uAction = 857 + uActionValue = 858 + BVI = 859 + uC = 860 + uCF = 861 + uE = 862 + uSB = 863 + uSBR = 864 + Action = 865 + Endaction = 866 + Actionvalue = 867 + Endactionvalue = 868 + Ancestor = 869 + Clocked_By = 870 + Default_Clock = 871 + Default_Reset = 872 + Dependencies = 873 + Deriving = 874 + Determines = 875 + Enable = 876 + Ifc_Inout = 877 + Input_Clock = 878 + Input_Reset = 879 + Instance = 880 + Endinstance = 881 + Let = 882 + Match = 883 + Method = 884 + Endmethod = 885 + Numeric = 886 + Output_Clock = 887 + Output_Reset = 888 + Par = 889 + Endpar = 890 + Path = 891 + Provisos = 892 + Ready = 893 + Reset_By = 894 + Rule = 895 + Endrule = 896 + Rules = 897 + Endrules = 898 + Same_Family = 899 + Schedule = 900 + Seq = 901 + Endseq = 902 + Typeclass = 903 + Endtypeclass = 904 + Valueof = 905 + uValueof = 906 + Last_BSV = 906 + First_Comment = 907 + Psl = 907 + Pragma = 908 + Last_Comment = 908 + First_PSL = 909 + A = 909 + Af = 910 + Ag = 911 + Ax = 912 + Abort = 913 + Assume_Guarantee = 914 + Before = 915 + Clock = 916 + E = 917 + Ef = 918 + Eg = 919 + Ex = 920 + Endpoint = 921 + Eventually = 922 + Fairness = 923 + Fell = 924 + Forall = 925 + G = 926 + Inf = 927 + Inherit = 928 + Never = 929 + Next_A = 930 + Next_E = 931 + Next_Event = 932 + Next_Event_A = 933 + Next_Event_E = 934 + Prev = 935 + Rose = 936 + Strong = 937 + W = 941 + Whilenot = 942 + Within = 943 + X = 944 + Last_PSL = 944 + First_Edif = 945 + Celltype = 955 + View = 956 + Viewtype = 957 + Direction = 958 + Contents = 959 + Net = 960 + Viewref = 961 + Cellref = 962 + Libraryref = 963 + Portinstance = 964 + Joined = 965 + Portref = 966 + Instanceref = 967 + Design = 968 + Designator = 969 + Owner = 970 + Member = 971 + Number = 972 + Rename = 973 + Userdata = 974 + Last_Edif = 974 diff --git a/python/libghdl/thin/vhdl/nodes.py b/python/libghdl/thin/vhdl/nodes.py index 5983c4972..3e2ff1972 100644 --- a/python/libghdl/thin/vhdl/nodes.py +++ b/python/libghdl/thin/vhdl/nodes.py @@ -1108,33 +1108,47 @@ class Iir_Predefined: Ieee_Numeric_Std_Ne_Sgn_Sgn = 241 Ieee_Numeric_Std_Ne_Sgn_Int = 242 Ieee_Numeric_Std_Ne_Int_Sgn = 243 - Ieee_Numeric_Std_Neg_Uns = 244 - Ieee_Numeric_Std_Neg_Sgn = 245 - Ieee_Math_Real_Ceil = 246 - Ieee_Math_Real_Log2 = 247 - Ieee_Std_Logic_Unsigned_Add_Slv_Slv = 248 - Ieee_Std_Logic_Unsigned_Add_Slv_Int = 249 - Ieee_Std_Logic_Unsigned_Add_Int_Slv = 250 - Ieee_Std_Logic_Unsigned_Add_Slv_Sl = 251 - Ieee_Std_Logic_Unsigned_Add_Sl_Slv = 252 - Ieee_Std_Logic_Unsigned_Lt_Slv_Slv = 253 - Ieee_Std_Logic_Unsigned_Lt_Slv_Int = 254 - Ieee_Std_Logic_Unsigned_Lt_Int_Slv = 255 - Ieee_Std_Logic_Unsigned_Le_Slv_Slv = 256 - Ieee_Std_Logic_Unsigned_Le_Slv_Int = 257 - Ieee_Std_Logic_Unsigned_Le_Int_Slv = 258 - Ieee_Std_Logic_Unsigned_Gt_Slv_Slv = 259 - Ieee_Std_Logic_Unsigned_Gt_Slv_Int = 260 - Ieee_Std_Logic_Unsigned_Gt_Int_Slv = 261 - Ieee_Std_Logic_Unsigned_Ge_Slv_Slv = 262 - Ieee_Std_Logic_Unsigned_Ge_Slv_Int = 263 - Ieee_Std_Logic_Unsigned_Ge_Int_Slv = 264 - Ieee_Std_Logic_Unsigned_Eq_Slv_Slv = 265 - Ieee_Std_Logic_Unsigned_Eq_Slv_Int = 266 - Ieee_Std_Logic_Unsigned_Eq_Int_Slv = 267 - Ieee_Std_Logic_Unsigned_Ne_Slv_Slv = 268 - Ieee_Std_Logic_Unsigned_Ne_Slv_Int = 269 - Ieee_Std_Logic_Unsigned_Ne_Int_Slv = 270 + Ieee_Numeric_Std_Not_Uns = 244 + Ieee_Numeric_Std_Not_Sgn = 245 + Ieee_Numeric_Std_And_Uns_Uns = 246 + Ieee_Numeric_Std_And_Sgn_Sgn = 247 + Ieee_Numeric_Std_Or_Uns_Uns = 248 + Ieee_Numeric_Std_Or_Sgn_Sgn = 249 + Ieee_Numeric_Std_Nand_Uns_Uns = 250 + Ieee_Numeric_Std_Nand_Sgn_Sgn = 251 + Ieee_Numeric_Std_Nor_Uns_Uns = 252 + Ieee_Numeric_Std_Nor_Sgn_Sgn = 253 + Ieee_Numeric_Std_Xor_Uns_Uns = 254 + Ieee_Numeric_Std_Xor_Sgn_Sgn = 255 + Ieee_Numeric_Std_Xnor_Uns_Uns = 256 + Ieee_Numeric_Std_Xnor_Sgn_Sgn = 257 + Ieee_Numeric_Std_Neg_Uns = 258 + Ieee_Numeric_Std_Neg_Sgn = 259 + Ieee_Math_Real_Ceil = 260 + Ieee_Math_Real_Log2 = 261 + Ieee_Std_Logic_Unsigned_Add_Slv_Slv = 262 + Ieee_Std_Logic_Unsigned_Add_Slv_Int = 263 + Ieee_Std_Logic_Unsigned_Add_Int_Slv = 264 + Ieee_Std_Logic_Unsigned_Add_Slv_Sl = 265 + Ieee_Std_Logic_Unsigned_Add_Sl_Slv = 266 + Ieee_Std_Logic_Unsigned_Lt_Slv_Slv = 267 + Ieee_Std_Logic_Unsigned_Lt_Slv_Int = 268 + Ieee_Std_Logic_Unsigned_Lt_Int_Slv = 269 + Ieee_Std_Logic_Unsigned_Le_Slv_Slv = 270 + Ieee_Std_Logic_Unsigned_Le_Slv_Int = 271 + Ieee_Std_Logic_Unsigned_Le_Int_Slv = 272 + Ieee_Std_Logic_Unsigned_Gt_Slv_Slv = 273 + Ieee_Std_Logic_Unsigned_Gt_Slv_Int = 274 + Ieee_Std_Logic_Unsigned_Gt_Int_Slv = 275 + Ieee_Std_Logic_Unsigned_Ge_Slv_Slv = 276 + Ieee_Std_Logic_Unsigned_Ge_Slv_Int = 277 + Ieee_Std_Logic_Unsigned_Ge_Int_Slv = 278 + Ieee_Std_Logic_Unsigned_Eq_Slv_Slv = 279 + Ieee_Std_Logic_Unsigned_Eq_Slv_Int = 280 + Ieee_Std_Logic_Unsigned_Eq_Int_Slv = 281 + Ieee_Std_Logic_Unsigned_Ne_Slv_Slv = 282 + Ieee_Std_Logic_Unsigned_Ne_Slv_Int = 283 + Ieee_Std_Logic_Unsigned_Ne_Int_Slv = 284 Get_Kind = libghdl.vhdl__nodes__get_kind Get_Location = libghdl.vhdl__nodes__get_location diff --git a/python/libghdl/thin/vhdl/tokens.py b/python/libghdl/thin/vhdl/tokens.py index 2d5655001..67bf038e7 100644 --- a/python/libghdl/thin/vhdl/tokens.py +++ b/python/libghdl/thin/vhdl/tokens.py @@ -160,47 +160,50 @@ class Tok: Rol = 156 Ror = 157 Protected = 158 - Context = 159 - Parameter = 160 - Across = 161 - Break = 162 - Limit = 163 - Nature = 164 - Noise = 165 - Procedural = 166 - Quantity = 167 - Reference = 168 - Spectrum = 169 - Subnature = 170 - Terminal = 171 - Through = 172 - Tolerance = 173 - Psl_Default = 174 - Psl_Clock = 175 - Psl_Property = 176 - Psl_Sequence = 177 - Psl_Endpoint = 178 - Psl_Assume = 179 - Psl_Cover = 180 - Psl_Restrict = 181 - Psl_Restrict_Guarantee = 182 - Psl_Const = 183 - Psl_Boolean = 184 - Inf = 185 - Within = 186 - Abort = 187 - Before = 188 - Before_Em = 189 - Before_Un = 190 - Before_Em_Un = 191 - Until_Em = 192 - Until_Un = 193 - Until_Em_Un = 194 - Always = 195 - Never = 196 - Eventually = 197 - Next_A = 198 - Next_E = 199 - Next_Event = 200 - Next_Event_A = 201 - Next_Event_E = 202 + Assume = 159 + Context = 160 + Cover = 161 + Default = 162 + Parameter = 163 + Property = 164 + Restrict = 165 + Restrict_Guarantee = 166 + Sequence = 167 + Vmode = 168 + Vprop = 169 + Vunit = 170 + Across = 171 + Break = 172 + Limit = 173 + Nature = 174 + Noise = 175 + Procedural = 176 + Quantity = 177 + Reference = 178 + Spectrum = 179 + Subnature = 180 + Terminal = 181 + Through = 182 + Tolerance = 183 + Psl_Clock = 184 + Psl_Endpoint = 185 + Psl_Const = 186 + Psl_Boolean = 187 + Inf = 188 + Within = 189 + Abort = 190 + Before = 191 + Before_Em = 192 + Before_Un = 193 + Before_Em_Un = 194 + Until_Em = 195 + Until_Un = 196 + Until_Em_Un = 197 + Always = 198 + Never = 199 + Eventually = 200 + Next_A = 201 + Next_E = 202 + Next_Event = 203 + Next_Event_A = 204 + Next_Event_E = 205 diff --git a/src/ghdldrv/ghdlprint.adb b/src/ghdldrv/ghdlprint.adb index 65eec4ed3..c4eb08da7 100644 --- a/src/ghdldrv/ghdlprint.adb +++ b/src/ghdldrv/ghdlprint.adb @@ -383,7 +383,7 @@ package body Ghdlprint is Disp_Text; Put (""); end case; - when Tok_Mod .. Tok_Sequence => + when Tok_Mod .. Tok_Vunit => Disp_Reserved; when Tok_Semi_Colon => Disp_Spaces; diff --git a/src/std_names.adb b/src/std_names.adb index e13c010e6..bdc11e695 100644 --- a/src/std_names.adb +++ b/src/std_names.adb @@ -162,6 +162,9 @@ package body Std_Names is Def ("restrict", Name_Restrict); Def ("restrict_guarantee", Name_Restrict_Guarantee); Def ("sequence", Name_Sequence); + Def ("vmode", Name_Vmode); + Def ("vprop", Name_Vprop); + Def ("vunit", Name_Vunit); Def ("across", Name_Across); Def ("break", Name_Break); @@ -786,9 +789,6 @@ package body Std_Names is Def ("rose", Name_Rose); Def ("strong", Name_Strong); Def ("union", Name_Union); - Def ("vmode", Name_Vmode); - Def ("vprop", Name_Vprop); - Def ("vunit", Name_Vunit); Def ("w", Name_W); Def ("whilenot", Name_Whilenot); Def ("within", Name_Within); diff --git a/src/std_names.ads b/src/std_names.ads index 0e08cac9d..a00d89585 100644 --- a/src/std_names.ads +++ b/src/std_names.ads @@ -181,8 +181,11 @@ package Std_Names is Name_Restrict : constant Name_Id := Name_First_Keyword + 104; Name_Restrict_Guarantee : constant Name_Id := Name_First_Keyword + 105; Name_Sequence : constant Name_Id := Name_First_Keyword + 106; + Name_Vmode : constant Name_Id := Name_First_Keyword + 107; + Name_Vprop : constant Name_Id := Name_First_Keyword + 108; + Name_Vunit : constant Name_Id := Name_First_Keyword + 109; + Name_Last_Vhdl08 : constant Name_Id := Name_Vunit; - Name_Last_Vhdl08 : constant Name_Id := Name_Sequence; subtype Name_Id_Vhdl08_Reserved_Words is Name_Id range Name_Assume .. Name_Last_Vhdl08; @@ -899,10 +902,10 @@ package Std_Names is Name_Ef : constant Name_Id := Name_First_PSL + 09; Name_Eg : constant Name_Id := Name_First_PSL + 10; Name_Ex : constant Name_Id := Name_First_PSL + 11; - Name_Endpoint : constant Name_Id := Name_First_PSL + 12; + Name_Endpoint : constant Name_Id := Name_First_PSL + 12; Name_Eventually : constant Name_Id := Name_First_PSL + 13; Name_Fairness : constant Name_Id := Name_First_PSL + 14; - Name_Fell : constant Name_Id := Name_First_PSL + 15; + Name_Fell : constant Name_Id := Name_First_PSL + 15; Name_Forall : constant Name_Id := Name_First_PSL + 16; Name_G : constant Name_Id := Name_First_PSL + 17; -- Name_In @@ -927,13 +930,10 @@ package Std_Names is Name_Strong : constant Name_Id := Name_First_PSL + 28; -- union -- until - Name_Vmode : constant Name_Id := Name_First_PSL + 29; - Name_Vprop : constant Name_Id := Name_First_PSL + 30; - Name_Vunit : constant Name_Id := Name_First_PSL + 31; - Name_W : constant Name_Id := Name_First_PSL + 32; - Name_Whilenot : constant Name_Id := Name_First_PSL + 33; - Name_Within : constant Name_Id := Name_First_PSL + 34; - Name_X : constant Name_Id := Name_First_PSL + 35; + Name_W : constant Name_Id := Name_First_PSL + 29; + Name_Whilenot : constant Name_Id := Name_First_PSL + 30; + Name_Within : constant Name_Id := Name_First_PSL + 31; + Name_X : constant Name_Id := Name_First_PSL + 32; Name_Last_PSL : constant Name_Id := Name_X; subtype Name_Id_PSL_Keywords is diff --git a/src/vhdl/vhdl-scanner.adb b/src/vhdl/vhdl-scanner.adb index e71b2936e..d0b2910bc 100644 --- a/src/vhdl/vhdl-scanner.adb +++ b/src/vhdl/vhdl-scanner.adb @@ -1272,6 +1272,12 @@ package body Vhdl.Scanner is Current_Token := Tok_Restrict; when Std_Names.Name_Restrict_Guarantee => Current_Token := Tok_Restrict_Guarantee; + when Std_Names.Name_Vmode => + Current_Token := Tok_Vmode; + when Std_Names.Name_Vprop => + Current_Token := Tok_Vprop; + when Std_Names.Name_Vunit => + Current_Token := Tok_Vunit; when others => Current_Token := Tok_Identifier; end case; diff --git a/src/vhdl/vhdl-tokens.adb b/src/vhdl/vhdl-tokens.adb index b06f916d7..089f8173f 100644 --- a/src/vhdl/vhdl-tokens.adb +++ b/src/vhdl/vhdl-tokens.adb @@ -370,6 +370,12 @@ package body Vhdl.Tokens is return "restrict_guarantee"; when Tok_Sequence => return "sequence"; + when Tok_Vmode => + return "vmode"; + when Tok_Vprop => + return "vprop"; + when Tok_Vunit => + return "vunit"; -- AMS-VHDL when Tok_Across => diff --git a/src/vhdl/vhdl-tokens.ads b/src/vhdl/vhdl-tokens.ads index 739134d2c..93b3c77a2 100644 --- a/src/vhdl/vhdl-tokens.ads +++ b/src/vhdl/vhdl-tokens.ads @@ -246,6 +246,9 @@ package Vhdl.Tokens is Tok_Restrict, Tok_Restrict_Guarantee, Tok_Sequence, + Tok_Vmode, + Tok_Vprop, + Tok_Vunit, -- AMS reserved words Tok_Across, -- cgit v1.2.3