@@ -279,20 +279,62 @@ definitions>>.
279279
280280==== Syntax
281281
282- A location specifier consists of the keyword `locate`, a kind of definition,
282+ In general, a location specifier consists of the keyword `locate`, a kind of
283+ definition,
283284the name of a definition, and a string representing a file path.
284- For example, to locate the definition of constant `a` at `a.fpp`,
285- we would write
285+ For type and constant specifiers, there is also an optional `dictionary`
286+ specifier, which we will describe
287+ <<Specifying-Models-as-Files_Location-Specifiers_Dictionary-Definitions,below>>.
288+
289+ For example, to locate the definition
290+
291+ [source,fpp]
292+ ----
293+ constant a = 0
294+ ----
295+
296+ appearing in the file `a.fpp`, we would write
286297
287298[source,fpp]
288299----
289300# Locating a constant definition
290301locate constant a at "a.fpp"
291302----
292303
293- For the current version of FPP, the kind of definition can be `constant`,
294- `type`, or `port`.
295- To locate a type `T` in a file `T.fpp`, we would write the following:
304+ The kind of definition must be one of the following:
305+
306+ [[location-specifier-kinds]]
307+ .Location Specifier Kinds
308+ |===
309+ |Keyword|Meaning
310+
311+ |`component`
312+ |A <<Defining-Components,component definition>>
313+
314+ |`constant`
315+ |A <<Defining-Constants,constant definition>>
316+
317+ |`instance`
318+ |A <<Defining-Component-Instances,component instance definition>>
319+
320+ |`interface`
321+ |A <<Defining-and-Using-Port-Interfaces_Defining-Port-Interfaces,port interface definition>>
322+
323+ |`port`
324+ |A <<Defining-Ports,port definition>>
325+
326+ |`state` `machine`
327+ |A <<Defining-State-Machines,state machine definition>>
328+
329+ |`topology`
330+ |A <<Defining-Topologies,topology definition>>
331+
332+ |`type`
333+ |A <<Defining-Types,type>> or <<Defining-Enums,enum>> definition
334+ |===
335+
336+ As a further example, to locate a type `T` in a file `T.fpp`, we would write the
337+ following:
296338
297339[source,fpp]
298340----
@@ -318,6 +360,8 @@ constants are then implied:
318360locate type E at "E.fpp"
319361----
320362
363+ The other kinds operate similarly.
364+
321365==== Path Names
322366
323367As with
@@ -397,6 +441,52 @@ and suppose that file `b.fpp` contains the include specifier `include "a.fppi"`.
397441When analyzing `b.fpp`, the location of the definition of the constant `a`
398442is `b.fpp`, not `a.fppi`.
399443
444+ ==== Dictionary Definitions
445+
446+ For type and constant specifiers only, if the definition being located
447+ is a
448+ <<Dictionary-Definitions,dictionary definition>>, then you must
449+ write the keyword `dictionary` after the keyword `locate`
450+ and before the definition kind.
451+ For example, to locate the dictionary definition
452+
453+ [source,fpp]
454+ ----
455+ dictionary constant b = 1
456+ ----
457+
458+ appearing in the file `b.fpp`, we would write
459+
460+ [source,fpp]
461+ ----
462+ # Locating a dictionary constant definition
463+ locate dictionary constant b at "b.fpp"
464+ ----
465+
466+ The `dictionary` keyword tells the analyzer that the definition is a dictionary
467+ definition and so should be included in the dependency files of the model,
468+ regardless of whether the definition is used in the model.
469+
470+ If a definition is a dictionary definition and the corresponding location
471+ specifier does not specify `dictionary` (or vice versa), then the analyzer
472+ will report an error.
473+
474+ ==== Repeated Location Specifiers
475+
476+ An FPP model may contain any number of location specifiers for the same
477+ definition, so long as the following conditions are met:
478+
479+ . All the specifiers must be consistent.
480+ This means that all the specifiers for the same definition
481+ provide the same location, and either they all specify `dictionary`
482+ or none of them does.
483+
484+ . All the specifiers must agree with the definition, if it exists
485+ in the model.
486+ This means that the location specifiers specify the location
487+ of the definition, and the specifiers specify `dictionary`
488+ if and only if the definition is a dictionary definition.
489+
400490=== Locating Definitions
401491
402492Given a collection of FPP source files _F_, you can generate location specifiers
0 commit comments