~ubuntu-branches/ubuntu/wily/acl2/wily

« back to all changes in this revision

Viewing changes to books/centaur/vl/loader/parser/notes/indexed-ids.txt

  • Committer: Package Import Robot
  • Author(s): Camm Maguire
  • Date: 2015-01-16 10:35:45 UTC
  • mfrom: (3.3.26 sid)
  • Revision ID: package-import@ubuntu.com-20150116103545-prehe9thgo79o8w8
Tags: 7.0-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
primary
 
2
 
 
3
Verilog-2005:
 
4
 
 
5
    Goal ::= hierarchical_identifier [ { '[' expression ']' } '[' range_expression ']' ]
 
6
 
 
7
SystemVerilog-2012:
 
8
 
 
9
    Goal ::= [ class_qualifier | package_scope ] hierarchical_identifier select
 
10
 
 
11
    class_qualifier ::= ['local' '::'] [ implicit_class_handle '.' | class_scope ]
 
12
 
 
13
    implicit_class_handle ::= 'this' | 'super' | 'this' '.' 'super'
 
14
 
 
15
    class_scope ::= class_type '::'
 
16
 
 
17
    class_type ::= ps_class_identifier [pva] { '::' identifier [pva] }
 
18
 
 
19
    ps_class_identifier ::= [package_scope] identifier
 
20
 
 
21
    package_scope ::= identifier '::'
 
22
                    | '$unit' '::'
 
23
 
 
24
 
 
25
Simplification.  Let's not support 'local' yet.  This reduces class_qualifier to:
 
26
 
 
27
    class_qualifier ::= [ implicit_class_handle '.' | class_scope ]
 
28
 
 
29
Simplification.  Let's not support 'this' or 'super' yet.  This eliminates the
 
30
implicit_class_handle case and just leaves us with:
 
31
 
 
32
    class_qualifier ::= [class_scope]
 
33
 
 
34
So we have:
 
35
 
 
36
    Goal ::= [ class_scope | package_scope ] hierarchical_identifier select
 
37
 
 
38
A package_scope is almost a class_scope.
 
39
 
 
40
    '$unit' '::' 
 
41
 
 
42
 
 
43
 
 
44
 
 
45
Reduction 1.  package_scope is a subset of class_qualifier, so we can just
 
46
reduce the Goal to:
 
47
 
 
48
    Goal ::= [class_qualifier] hierarchical_identifier select
 
49
 
 
50
Explanation: package_scope can be one of two things:
 
51
 
 
52
    1. identifier '::'
 
53
    2. '$unit'    '::'
 
54
 
 
55
Which is 
 
56
 
 
57
 
 
58
Note that package_scope and class_scope are redundant.
 
59
 
 
60
   In particular, everything in "class_type" is optional except for ps_class_identifier
 
61
   So, this permits
 
62
 
 
63
foo::bar    ps-class-identifier
 
64
 
 
65
 
 
66
 
 
67
 
 
68
 
 
69
 
 
70
 
 
71
So, inlining package_scope:
 
72
 
 
73
     ps_class_identifier ::= identifier
 
74
                           | identifier '::' identifier
 
75
                           | '$unit'    '::' identifier
 
76
 
 
77
So class_type is:
 
78
 
 
79
    class_type ::= identifier                  [pva] { '::' identifier [pva] }
 
80
                 | identifier '::' identifier  [pva] { '::' identifier [pva] }
 
81
                 | '$unit'    '::' identifier  [pva] { '::' identifier [pva] }
 
82
 
 
83
So class_scope is
 
84
 
 
85
    class_scope ::= identifier                  [pva] { '::' identifier [pva] } '::'
 
86
                  | identifier '::' identifier  [pva] { '::' identifier [pva] } '::'
 
87
                  | '$unit'    '::' identifier  [pva] { '::' identifier [pva] } '::'
 
88
 
 
89
---------------------------------------------------------------
 
90
 
 
91
Simplified Version:
 
92
 
 
93
   Goal ::=                 hierarchical_identifier select
 
94
          | class_qualifier hierarchical_identifier select
 
95
          | identifier      '::' hierarchical_identifier select
 
96
          | '$unit'         '::' hierarchical_identifier select
 
97
 
 
98
   class_qualifier ::= ['local' '::'] [ implicit_class_handle '.' | class_scope ]
 
99
 
 
100
   implicit_class_handle ::= 'this' | 'super' | 'this' '.' 'super'
 
101
 
 
102
   class_scope ::= identifier                  [pva] { '::' identifier [pva] } '::'
 
103
                 | identifier '::' identifier  [pva] { '::' identifier [pva] } '::'
 
104
                 | '$unit'    '::' identifier  [pva] { '::' identifier [pva] } '::'
 
105
 
 
106
---------------------------------------------------------------
 
107
 
 
108
 
 
109
 
 
110
So, if this starts with an identifier,