parse.bend checks
raw source on the hub · import bend-osdev-apparmor@0.1.0.0/parse.bend as Parse
bend-osdev-apparmor: loading policy text (apparmor.d(5), "FORMAT").
1. Each file's text is split into tokens (token.bend), and the tokens into
items: statements ending at a comma, variable assignments (which end at
the end of their line), includes, and block openings and closings.
2. Includes are replaced by the items of the included file, taken from the
file map: <name> and "name" both look up name. An include is expanded
at most once in each block (the file's top level, each profile, hat or
qualifier block), so including a file twice is including it once and
include cycles end (apparmor_parser 4.0.1 does the same; see the
README, "Experiments"). A missing file fails unless the include says
if exists.
3. The preamble (before the first profile) assigns variables, @{NAME} =
values or += values, and declares aliases, alias /from/ -> /to/,; abi
statements are accepted and ignored.
4. Profiles are built: headers, flags, rules (with variables expanded:
one value as itself, several as {v1,v2}; a value's trailing '/' is
dropped before a '/'; @{profile_name} is the profile's full name),
child profiles and hats, and qualifier blocks. An alias adds, for each
file rule whose pattern starts with its source, a copy starting with
its target. Two rules on the same literal path with different exec
modes fail.
17 imports
import Base import ./text.bend as X import ./glob.bend as G import ./perm.bend as P import ./token.bend as T import ./error.bend as E import ./options.bend as O import ./profile.bend as PR import ./rule.bend as R import ./rule_file.bend as F import ./rule_capability.bend as RC import ./rule_network.bend as RN import ./rule_signal.bend as RS import ./rule_ptrace.bend as RP import ./rule_mount.bend as RM import ./rule_dbus.bend as RD import ./rule_change_profile.bend as RX
Types
type AaSrcFile source · line 42 · raw
Data
a file of the file map: its name (as includes name it) and its text
AaSrcFile@name:List<&2, U32> -> @text:List<&2, U32> -> AaSrcFile
type AaItem source · line 47 · raw
Data
AaIStmt@toks:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok> -> @src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> AaItem
AaIVar@toks:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok> -> @src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> AaItem
AaIInclude@name:List<&2, U32> -> @optional:Bool -> @src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> AaItem
AaIOpen@toks:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok> -> @src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> AaItem
AaIClose@src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> AaItem
AaIError@err:0x2b280a281d356b8e5cd7b338ab267df1/error.AaError -> AaItem
type AaItMode source · line 65 · raw
Data
The itemizer. Modes: normal; a candidate variable assignment (the word
@{NAME} alone, waiting to see = or +=); a variable assignment on a line;
an include waiting for its path (stage 0), after if (1), after if exists (2).
AaImNormAaItMode
AaImVarCand@line:U32 -> AaItMode
AaImVar@line:U32 -> AaItMode
AaImInc@stage:Nat -> @line:U32 -> AaItMode
type AaItB source · line 71 · raw
Data
AaItB@file:List<&2, U32> -> @mode:AaItMode -> @pend:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok> -> @pdepth:Nat -> @out:List<&2, AaItem> -> AaItB
type AaExpOut source · line 346 · raw
Data
AaExpOut@items:List<&2, AaItem> -> @scopes:List<&2, List<&2, List<&2, U32>>> -> AaExpOut
type AaVRef source · line 508 · raw
Data
@{NAME} at the start of a word: the name and what follows the '}'
AaVRef@name:List<&2, U32> -> @rest:List<&2, U32> -> AaVRef
type AaAssign source · line 543 · raw
Data
an assignment: name, whether it is +=, the values
AaAssign@name:List<&2, U32> -> @append:Bool -> @values:List<&2, List<&2, U32>> -> AaAssign
type AaSb source · line 666 · raw
Data
the substitution: mode (0 text, 1 after an at sign, 2 inside a reference), the name read so far, the output (both last character first), still well formed
AaSb@mode:Nat -> @name:List<&2, U32> -> @out:List<&2, U32> -> @ok:Bool -> AaSb
type AaAlias source · line 808 · raw
Data
AaAlias@from:List<&2, U32> -> @to:List<&2, U32> -> AaAlias
type AaPre source · line 811 · raw
Data
AaPre@env:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/options.AaVar> -> @aliases:List<&2, AaAlias> -> @depth:Nat -> @started:Bool -> @err:Maybe<&2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError> -> AaPre
type AaBQ source · line 954 · raw
Data
AaBQ@audit:Bool -> @access:Nat -> @owner:Bool -> AaBQ
type AaQP source · line 1025 · raw
Data
AaQP@q:AaBQ -> @rest:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTerm> -> AaQP
type AaCtx source · line 1055 · raw
Data
AaCtx@env:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/options.AaVar> -> @aliases:List<&2, AaAlias> -> AaCtx
type AaHead source · line 1242 · raw
Data
AaHead@kind:Nat -> @name:List<&2, U32> -> @attach:Maybe<&2, 0x2b280a281d356b8e5cd7b338ab267df1/glob.AaGlob> -> @flags:0x2b280a281d356b8e5cd7b338ab267df1/profile.AaFlags -> @q:AaBQ -> AaHead
type AaFlB source · line 1246 · raw
Data
Flags: the mode seen (if any) and the audit flag
AaFlB@mode:Maybe<&2, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaMode> -> @audit:Bool -> AaFlB
type AaFrame source · line 1549 · raw
Data
AaFrame@prof:Maybe<&2, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaProfile> -> @hat:Bool -> @full:List<&2, U32> -> @qual:AaBQ -> @src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> AaFrame
type AaBuild source · line 1552 · raw
Data
AaBuild@frames:List<&2, AaFrame> -> @top:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaProfile> -> @err:Maybe<&2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError> -> AaBuild
Definitions
def AaItem.rev_onto source · line 55 · raw
@xs:List<&2, AaItem> -> @acc:List<&2, AaItem> -> List<&2, AaItem>
def AaItB.src source · line 74 · raw
@+file:List<&2, U32> -> @line:U32 -> 0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc
def AaItB.emit source · line 77 · raw
@b:AaItB -> @it:AaItem -> AaItB
def AaItB.err source · line 82 · raw
@b:AaItB -> @e:0x2b280a281d356b8e5cd7b338ab267df1/error.AaError -> AaItB
def AaItB.push source · line 85 · raw
@b:AaItB -> @t:0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok -> AaItB
def AaItB.mode source · line 90 · raw
@b:AaItB -> @m:AaItMode -> AaItB
def AaItB.file source · line 95 · raw
@b:AaItB -> List<&2, U32>
def AaItB.pend_empty source · line 100 · raw
@b:AaItB -> Bool
def AaItB.pdepth source · line 109 · raw
@b:AaItB -> Nat
def AaItB.paren source · line 114 · raw
@b:AaItB -> @up:Bool -> @t:0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok -> AaItB
def AaItB.flush.item source · line 123 · raw
@kind:Nat -> @ts:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok> -> @src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> AaItem
def AaItB.flush source · line 135 · raw
@b:AaItB -> @kind:Nat -> @line:U32 -> AaItB
the pending tokens become an item: 0 a statement, 1 a block opening, 2 an assignment
def AaIt.var_kind.rest source · line 141 · raw
@+r:List<&2, U32> -> Nat
a word starting @{: 0 not a variable word, 1 exactly @{NAME}, 2 @{NAME}= or @{NAME}+= with more
def AaIt.after_close source · line 148 · raw
@xs:List<&2, U32> -> Maybe<&2, List<&2, U32>>
def AaIt.var_kind.go source · line 155 · raw
@m:Maybe<&2, List<&2, U32>> -> Nat
def AaIt.var_kind source · line 162 · raw
@+w:List<&2, U32> -> Nat
def AaIt.is_include source · line 165 · raw
@t:0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok -> Bool
def AaItB.norm.word source · line 173 · raw
@k:Nat -> @+b:AaItB -> @t:0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok -> @+line:U32 -> AaItB
a token in normal mode
def AaItB.norm.first source · line 184 · raw
@t:0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok -> @+b:AaItB -> AaItB
def AaItB.norm.open source · line 191 · raw
@depth0:Bool -> @+b:AaItB -> @t:0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok -> @+l:U32 -> AaItB
def AaItB.norm.close source · line 198 · raw
@depth0:Bool -> @empty:Bool -> @+b:AaItB -> @t:0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok -> @+l:U32 -> AaItB
def AaItB.norm.comma source · line 209 · raw
@depth0:Bool -> @empty:Bool -> @+b:AaItB -> @t:0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok -> @+l:U32 -> AaItB
def AaItB.norm.go source · line 220 · raw
@t:0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok -> @+d0:Bool -> @+empty:Bool -> @+b:AaItB -> AaItB
def AaItB.norm source · line 237 · raw
@+b:AaItB -> @t:0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok -> AaItB
def AaItB.varcand source · line 241 · raw
@+b:AaItB -> @t:0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok -> @+line:U32 -> AaItB
after @{NAME}: = or += makes it an assignment; anything else a rule
def AaItB.var.same source · line 249 · raw
@same:Bool -> @+b:AaItB -> @t:0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok -> @+line:U32 -> AaItB
an assignment takes the tokens of its line; a comma there is an error
def AaItB.var source · line 262 · raw
@+b:AaItB -> @+t:0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok -> @+line:U32 -> AaItB
def AaIt.magic source · line 266 · raw
@+w:List<&2, U32> -> Maybe<&2, List<&2, U32>>
the name inside <...>
def AaItB.inc.magic source · line 269 · raw
@m:Maybe<&2, List<&2, U32>> -> @+b:AaItB -> @opt:Bool -> @+line:U32 -> AaItB
def AaItB.inc.path source · line 276 · raw
@+b:AaItB -> @t:0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok -> @+opt:Bool -> @+line:U32 -> AaItB
def AaItB.inc source · line 285 · raw
@stage:Nat -> @+b:AaItB -> @+t:0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok -> @+line:U32 -> AaItB
def AaItB.step source · line 296 · raw
@b:AaItB -> @+t:0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok -> AaItB
def AaItB.run source · line 309 · raw
@ts:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok> -> @b:AaItB -> AaItB
def AaItB.finish source · line 316 · raw
@b:AaItB -> List<&2, AaItem>
def AaIt.of_lex source · line 333 · raw
@r:Result<&2, &2, U32, List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok>> -> @+file:List<&2, U32> -> List<&2, AaItem>
def AaParse.items source · line 341 · raw
@+file:List<&2, U32> -> @text:List<&2, U32> -> List<&2, AaItem>
the items of a file's text; a fault becomes an error item
def AaExpOut.items source · line 349 · raw
@o:AaExpOut -> List<&2, AaItem>
def AaExpOut.scopes source · line 354 · raw
@o:AaExpOut -> List<&2, List<&2, List<&2, U32>>>
def AaParse.find_file source · line 359 · raw
@fs:List<&2, AaSrcFile> -> @+name:List<&2, U32> -> Maybe<&2, AaSrcFile>
def AaParse.seen source · line 369 · raw
@scopes:List<&2, List<&2, List<&2, U32>>> -> @+name:List<&2, U32> -> Bool
the file is already included in the innermost block
def AaParse.mark source · line 376 · raw
@scopes:List<&2, List<&2, List<&2, U32>>> -> @name:List<&2, U32> -> List<&2, List<&2, List<&2, U32>>>
def AaParse.pop source · line 383 · raw
@scopes:List<&2, List<&2, List<&2, U32>>> -> List<&2, List<&2, List<&2, U32>>>
def AaParse.inc_items source · line 391 · raw
@m:Maybe<&2, AaSrcFile> -> @opt:Bool -> @src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> List<&2, AaItem>
the items an include brings in
def AaParse.expand0 source · line 405 · raw
@items:List<&2, AaItem> -> @+scopes:List<&2, List<&2, List<&2, U32>>> -> @+acc:List<&2, AaItem> -> AaExpOut
includes nested too deep
def AaParse.expand source · line 426 · raw
@+fuel:Nat -> @items:List<&2, AaItem> -> @+files:List<&2, AaSrcFile> -> @+scopes:List<&2, List<&2, List<&2, U32>>> -> @+acc:List<&2, AaItem> -> AaExpOut
the items with every include replaced by the included file's items; scopes: the files included so far in each open block, innermost first
def AaParse.first_error source · line 453 · raw
@items:List<&2, AaItem> -> Maybe<&2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError>
def AaVars.find source · line 466 · raw
@env:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/options.AaVar> -> @+name:List<&2, U32> -> Maybe<&2, List<&2, List<&2, U32>>>
def AaVars.is_some source · line 475 · raw
@m:Maybe<&2, List<&2, List<&2, U32>>> -> Bool
def AaVars.extend source · line 483 · raw
@env:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/options.AaVar> -> @+name:List<&2, U32> -> @+more:List<&2, List<&2, U32>> -> List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/options.AaVar>
values added to a variable's
def AaVars.name_ok.go source · line 493 · raw
@xs:List<&2, U32> -> Bool
a variable name: a letter, then letters, digits and '_'
def AaVars.name_ok source · line 500 · raw
@xs:List<&2, U32> -> Bool
def AaVars.ref.go source · line 511 · raw
@xs:List<&2, U32> -> @+acc:List<&2, U32> -> Maybe<&2, AaVRef>
def AaVars.ref source · line 518 · raw
@+w:List<&2, U32> -> Maybe<&2, AaVRef>
def AaVars.values.cons source · line 521 · raw
@x:List<&2, U32> -> @r:Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, List<&2, List<&2, U32>>> -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, List<&2, List<&2, U32>>>
def AaVars.values source · line 529 · raw
@ts:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok> -> @src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, List<&2, List<&2, U32>>>
the text of each word or string
def AaVars.op source · line 547 · raw
@+x:List<&2, U32> -> Maybe<&2, AaVRef>
the operator at the start of x: += (True) or = (False), and what follows it
def AaVars.first source · line 550 · raw
@rem:List<&2, U32> -> List<&2, List<&2, U32>>
def AaVars.assign.op source · line 557 · raw
@m:Maybe<&2, AaVRef> -> @name:List<&2, U32> -> @rest:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok> -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, AaAssign>
def AaVars.assign.next source · line 569 · raw
@ts:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok> -> @name:List<&2, U32> -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, AaAssign>
@{NAME} then a separate = or += word
def AaVars.assign.ref source · line 580 · raw
@m:Maybe<&2, AaVRef> -> @+rest:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok> -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, AaAssign>
def AaVars.assign.parse source · line 589 · raw
@ts:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok> -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, AaAssign>
def AaVars.apply.go source · line 601 · raw
@ap:Bool -> @known:Bool -> @env:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/options.AaVar> -> @name:List<&2, U32> -> @vs:List<&2, List<&2, U32>> -> @src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/options.AaVar>>
the environment after an assignment
def AaVars.apply source · line 616 · raw
@a:AaAssign -> @+env:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/options.AaVar> -> @src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/options.AaVar>>
def AaVars.unslash source · line 623 · raw
@+v:List<&2, U32> -> List<&2, U32>
def AaVars.value source · line 626 · raw
@strip:Bool -> @+v:List<&2, U32> -> List<&2, U32>
def AaVars.join source · line 634 · raw
@vs:List<&2, List<&2, U32>> -> @+strip:Bool -> @+first:Bool -> @+acc:List<&2, U32> -> List<&2, U32>
the values, separated by commas, last character first, onto acc
def AaVars.emit source · line 642 · raw
@m:Maybe<&2, List<&2, List<&2, U32>>> -> @+strip:Bool -> @out:List<&2, U32> -> Maybe<&2, List<&2, U32>>
the expansion of one reference (last character first, onto out)
def AaVars.lookup source · line 657 · raw
@+env:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/options.AaVar> -> @pname:Maybe<&2, List<&2, U32>> -> @+name:List<&2, U32> -> Maybe<&2, List<&2, List<&2, U32>>>
def AaSb.close source · line 669 · raw
@r:Maybe<&2, List<&2, U32>> -> @ok:Bool -> AaSb
def AaSb.text source · line 676 · raw
@+h:U32 -> @+out:List<&2, U32> -> @+ok:Bool -> AaSb
def AaSb.step source · line 679 · raw
@st:AaSb -> @+h:U32 -> @+next:U32 -> @+env:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/options.AaVar> -> @+pname:Maybe<&2, List<&2, U32>> -> AaSb
def AaSb.run source · line 692 · raw
@xs:List<&2, U32> -> @st:AaSb -> @+env:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/options.AaVar> -> @+pname:Maybe<&2, List<&2, U32>> -> AaSb
def AaSb.result source · line 699 · raw
@st:AaSb -> Maybe<&2, List<&2, U32>>
def AaVars.subst source · line 721 · raw
@xs:List<&2, U32> -> @+env:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/options.AaVar> -> @+pname:Maybe<&2, List<&2, U32>> -> Maybe<&2, List<&2, U32>>
one round: every reference replaced by its values
def AaVars.has_ref source · line 725 · raw
@xs:List<&2, U32> -> Bool
a reference remains: an at sign before an opening brace
def AaVars.more source · line 733 · raw
@m:Maybe<&2, List<&2, U32>> -> Bool
whether a text still holds a reference; None stays None
def AaVars.expand.go source · line 742 · raw
@fuel:Nat -> @+more:Bool -> @m:Maybe<&2, List<&2, U32>> -> @+env:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/options.AaVar> -> @+pname:Maybe<&2, List<&2, U32>> -> Maybe<&2, List<&2, U32>>
more: m still holds a reference (computed by the caller, so that a text without one is not substituted again)
def AaVars.expand source · line 764 · raw
@+xs:List<&2, U32> -> @+env:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/options.AaVar> -> @+pname:Maybe<&2, List<&2, U32>> -> Maybe<&2, List<&2, U32>>
xs with its variables expanded (values may refer to variables, to a depth of eight); None if a variable is not assigned
def AaVars.tok.go source · line 767 · raw
@m:Maybe<&2, List<&2, U32>> -> @quoted:Bool -> @l:U32 -> @src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok>
def AaVars.tok source · line 778 · raw
@t:0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok -> @+env:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/options.AaVar> -> @+pname:Maybe<&2, List<&2, U32>> -> @src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok>
def AaVars.toks source · line 796 · raw
@ts:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok> -> @+env:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/options.AaVar> -> @+pname:Maybe<&2, List<&2, U32>> -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok>>
a statement's tokens with variables expanded
def AaPre.fail source · line 814 · raw
@p:AaPre -> @e:0x2b280a281d356b8e5cd7b338ab267df1/error.AaError -> AaPre
def AaPre.env source · line 823 · raw
@r:Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/options.AaVar>> -> @p:AaPre -> AaPre
def AaPre.assign source · line 832 · raw
@r:Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, AaAssign> -> @+p:AaPre -> @src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> AaPre
def AaPre.text source · line 841 · raw
@t:0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok -> Maybe<&2, List<&2, U32>>
def AaPre.alias.go source · line 851 · raw
@a:Maybe<&2, List<&2, U32>> -> @b:Maybe<&2, List<&2, U32>> -> @p:AaPre -> @src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> AaPre
alias FROM -> TO
def AaPre.alias source · line 864 · raw
@ts:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok> -> @+p:AaPre -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> AaPre
def AaPre.depth source · line 883 · raw
@p:AaPre -> Nat
def AaPre.started source · line 888 · raw
@p:AaPre -> Bool
def AaPre.top source · line 894 · raw
@ts:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok> -> @+p:AaPre -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> AaPre
a statement at the top level: alias (before the first profile), abi, or an error
def AaPre.stmt source · line 901 · raw
@d:Nat -> @ts:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok> -> @+p:AaPre -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> AaPre
def AaPre.var source · line 908 · raw
@ok:Bool -> @ts:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok> -> @+p:AaPre -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> AaPre
def AaPre.open source · line 915 · raw
@p:AaPre -> AaPre
def AaPre.close source · line 920 · raw
@p:AaPre -> @src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> AaPre
def AaPre.step source · line 929 · raw
@+p:AaPre -> @it:AaItem -> AaPre
def AaPre.run source · line 944 · raw
@items:List<&2, AaItem> -> @p:AaPre -> AaPre
def AaBQ.none source · line 957 · raw
AaBQ
def AaQ.kind source · line 961 · raw
@+t:0x2b280a281d356b8e5cd7b338ab267df1/token.AaTerm -> Nat
what a term is as a qualifier: 1 audit, 2 allow, 3 deny, 4 owner, 0 none
def AaQ.allowed source · line 966 · raw
@k:Nat -> @s:Nat -> Bool
the qualifier k may come at stage s (0 start, 1 after audit, 2 after allow or deny, 3 after owner), and the stage after it
def AaQ.stage source · line 985 · raw
@k:Nat -> Nat
def AaQ.add source · line 1004 · raw
@q:AaBQ -> @k:Nat -> AaBQ
def AaQ.parse.go source · line 1028 · raw
@+k:Nat -> @+t:0x2b280a281d356b8e5cd7b338ab267df1/token.AaTerm -> @+rest:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTerm> -> @+stage:Nat -> @+q:AaBQ -> @more:AaQP -> AaQP
def AaQ.parse source · line 1032 · raw
@ts:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTerm> -> @+stage:Nat -> @+q:AaBQ -> AaQP
the leading qualifiers of a rule's terms, and the terms after them
def AaQ.combine source · line 1041 · raw
@b:AaBQ -> @r:AaBQ -> @src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, AaBQ>
a block's qualifiers with a rule's (or an inner block's): allow and deny conflict
def AaBQ.qual source · line 1048 · raw
@q:AaBQ -> 0x2b280a281d356b8e5cd7b338ab267df1/perm.AaQual
def AaCtx.env source · line 1058 · raw
@c:AaCtx -> List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/options.AaVar>
def AaCtx.aliases source · line 1063 · raw
@c:AaCtx -> List<&2, AaAlias>
def AaParse.unsupported source · line 1068 · raw
List<&2, String>
def AaParse.keyword source · line 1075 · raw
@+t:0x2b280a281d356b8e5cd7b338ab267df1/token.AaTerm -> Nat
the keyword of a rule: 1 capability, 2 network, 3 signal, 4 ptrace, 5 mount, 6 remount, 7 umount, 8 dbus, 9 change_profile, 10 file, 11 a rule kind outside the model, 12 a statement that belongs in the preamble, 0 none (a file rule without the keyword)
def AaParse.wrap.cap source · line 1078 · raw
@r:Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/rule_capability.AaCapRule> -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaRules>
def AaParse.wrap.net source · line 1085 · raw
@r:Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/rule_network.AaNetRule> -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaRules>
def AaParse.wrap.signal source · line 1092 · raw
@r:Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/rule_signal.AaSignalRule> -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaRules>
def AaParse.wrap.ptrace source · line 1099 · raw
@r:Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/rule_ptrace.AaPtraceRule> -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaRules>
def AaParse.wrap.mount source · line 1106 · raw
@r:Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/rule_mount.AaMountRule> -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaRules>
def AaParse.wrap.dbus source · line 1113 · raw
@r:Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/rule_dbus.AaDbusRule> -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaRules>
def AaParse.wrap.change source · line 1120 · raw
@r:Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/rule_change_profile.AaChangeRule> -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaRules>
def AaParse.alias.glob source · line 1127 · raw
@m:Maybe<&2, 0x2b280a281d356b8e5cd7b338ab267df1/glob.AaGlob> -> @r:0x2b280a281d356b8e5cd7b338ab267df1/rule_file.AaFileRule -> List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/rule_file.AaFileRule>
def AaParse.alias.one source · line 1137 · raw
@a:AaAlias -> @r:0x2b280a281d356b8e5cd7b338ab267df1/rule_file.AaFileRule -> List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/rule_file.AaFileRule>
a file rule copied under an alias whose source starts its pattern
def AaParse.alias.all source · line 1144 · raw
@als:List<&2, AaAlias> -> @+r:0x2b280a281d356b8e5cd7b338ab267df1/rule_file.AaFileRule -> List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/rule_file.AaFileRule>
def AaParse.wrap.file source · line 1151 · raw
@r:Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/rule_file.AaFileRule> -> @als:List<&2, AaAlias> -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaRules>
def AaParse.dispatch source · line 1158 · raw
@k:Nat -> @+t:0x2b280a281d356b8e5cd7b338ab267df1/token.AaTerm -> @+rest:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTerm> -> @+q:0x2b280a281d356b8e5cd7b338ab267df1/perm.AaQual -> @+als:List<&2, AaAlias> -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaRules>
def AaParse.rule source · line 1210 · raw
@ts:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTerm> -> @+q:0x2b280a281d356b8e5cd7b338ab267df1/perm.AaQual -> @+als:List<&2, AaAlias> -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaRules>
a rule's terms (after the qualifiers), with the qualifiers in force
def AaParse.terms source · line 1217 · raw
@m:Maybe<&2, List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTerm>> -> @src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTerm>>
def AaParse.rule.qual source · line 1224 · raw
@qp:AaQP -> @+block:AaBQ -> @+als:List<&2, AaAlias> -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaRules>
def AaParse.stmt source · line 1232 · raw
@ts:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok> -> @+block:AaBQ -> @+pname:List<&2, U32> -> @+ctx:AaCtx -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaRules>
a statement inside a profile: its rules
def AaFl.mode_of source · line 1249 · raw
@+w:List<&2, U32> -> Maybe<&2, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaMode>
def AaFl.misc source · line 1252 · raw
List<&2, String>
def AaFl.mode_eq source · line 1255 · raw
@a:0x2b280a281d356b8e5cd7b338ab267df1/profile.AaMode -> @b:0x2b280a281d356b8e5cd7b338ab267df1/profile.AaMode -> Bool
def AaFl.set_mode source · line 1258 · raw
@b:AaFlB -> @m:0x2b280a281d356b8e5cd7b338ab267df1/profile.AaMode -> @src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, AaFlB>
def AaFl.word.mode source · line 1267 · raw
@m:Maybe<&2, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaMode> -> @+w:List<&2, U32> -> @+b:AaFlB -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, AaFlB>
def AaFl.step source · line 1277 · raw
@t:0x2b280a281d356b8e5cd7b338ab267df1/token.AaTerm -> @+b:AaFlB -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, AaFlB>
kill.signal=SIGNAL and attach_disconnected.path=PATH are accepted and not modelled
def AaFl.run source · line 1286 · raw
@ts:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTerm> -> @b:AaFlB -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, AaFlB>
def AaFl.finish source · line 1295 · raw
@b:AaFlB -> 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaFlags
def AaFl.list source · line 1300 · raw
@xs:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTerm> -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaFlags>
def AaFl.term source · line 1306 · raw
@t:0x2b280a281d356b8e5cd7b338ab267df1/token.AaTerm -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaFlags>
the flags term: flags=(...) or (...)
def AaFl.opt source · line 1320 · raw
@ts:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTerm> -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaFlags>
optional flags, and nothing after them
def AaParse.alnum source · line 1331 · raw
@+c:U32 -> Bool
def AaParse.name source · line 1335 · raw
@t:0x2b280a281d356b8e5cd7b338ab267df1/token.AaTerm -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, List<&2, U32>>
a profile name: a quoted string, or a word starting with a letter, a digit or '/'
def AaParse.attach.glob source · line 1344 · raw
@r:Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/glob.AaGlob> -> @src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, Maybe<&2, 0x2b280a281d356b8e5cd7b338ab267df1/glob.AaGlob>>
def AaParse.self_attach source · line 1352 · raw
@+name:List<&2, U32> -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, Maybe<&2, 0x2b280a281d356b8e5cd7b338ab267df1/glob.AaGlob>>
a name that is an absolute path is also the attachment
def AaParse.head.make source · line 1355 · raw
@kind:Nat -> @name:List<&2, U32> -> @attach:Maybe<&2, 0x2b280a281d356b8e5cd7b338ab267df1/glob.AaGlob> -> @r:Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaFlags> -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, AaHead>
def AaParse.head.flags_only source · line 1362 · raw
@ts:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTerm> -> @+name:List<&2, U32> -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, AaHead>
def AaParse.head.attached source · line 1367 · raw
@t:0x2b280a281d356b8e5cd7b338ab267df1/token.AaTerm -> @rest:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTerm> -> @name:List<&2, U32> -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, AaHead>
def AaParse.head.profile.rest source · line 1374 · raw
@ts:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTerm> -> @+name:List<&2, U32> -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, AaHead>
after profile NAME: an attachment, then flags
def AaParse.head.profile source · line 1383 · raw
@ts:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTerm> -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, AaHead>
def AaParse.head.hat.name source · line 1392 · raw
@+n:List<&2, U32> -> @rest:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTerm> -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, AaHead>
def AaParse.head.hat source · line 1396 · raw
@ts:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTerm> -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, AaHead>
hat NAME [FLAGS]
def AaParse.head.qual source · line 1407 · raw
@qp:AaQP -> @src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, AaHead>
def AaParse.head.path source · line 1417 · raw
@t:0x2b280a281d356b8e5cd7b338ab267df1/token.AaTerm -> @rest:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTerm> -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, AaHead>
a path as the head: its name and its attachment
def AaParse.head.word source · line 1422 · raw
@+w:List<&2, U32> -> @+t:0x2b280a281d356b8e5cd7b338ab267df1/token.AaTerm -> @+rest:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTerm> -> @+top:Bool -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, AaHead>
def AaParse.head source · line 1426 · raw
@ts:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTerm> -> @+top:Bool -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, AaHead>
the head of a block, at the top level or inside a profile
def AaParse.target_eq source · line 1441 · raw
@a:Maybe<&2, List<&2, U32>> -> @b:Maybe<&2, List<&2, U32>> -> Bool
def AaParse.xconf source · line 1450 · raw
@a:0x2b280a281d356b8e5cd7b338ab267df1/rule_file.AaFileRule -> @b:0x2b280a281d356b8e5cd7b338ab267df1/rule_file.AaFileRule -> Bool
def AaParse.xconf.any source · line 1465 · raw
@+r:0x2b280a281d356b8e5cd7b338ab267df1/rule_file.AaFileRule -> @rs:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/rule_file.AaFileRule> -> Bool
def AaParse.conflicts.go source · line 1472 · raw
@rs:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/rule_file.AaFileRule> -> Bool
def AaParse.exec_literal source · line 1480 · raw
@r:0x2b280a281d356b8e5cd7b338ab267df1/rule_file.AaFileRule -> Bool
the allow rules with an exec mode on a literal pattern: the only ones that can conflict
def AaParse.exec_rules source · line 1489 · raw
@rs:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/rule_file.AaFileRule> -> List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/rule_file.AaFileRule>
def AaParse.conflicts source · line 1496 · raw
@rs:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/rule_file.AaFileRule> -> Bool
def AaParse.cp_applies source · line 1502 · raw
@r:0x2b280a281d356b8e5cd7b338ab267df1/rule_change_profile.AaChangeRule -> Bool
change_profile rules with exec conditions must agree on safe and unsafe (apparmor_parser 4.0.1 refuses overlapping ones that differ; the package, which does not intersect patterns, refuses any allow rules that differ)
def AaParse.cp_safe source · line 1511 · raw
@r:0x2b280a281d356b8e5cd7b338ab267df1/rule_change_profile.AaChangeRule -> Bool
def AaParse.cp_clash source · line 1516 · raw
@applies:Bool -> @+s:Bool -> @seen:Maybe<&2, Bool> -> Bool
def AaParse.cp_next source · line 1527 · raw
@applies:Bool -> @s:Bool -> @+seen:Maybe<&2, Bool> -> Maybe<&2, Bool>
def AaParse.safe_clash source · line 1538 · raw
@rs:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/rule_change_profile.AaChangeRule> -> @+seen:Maybe<&2, Bool> -> Bool
def AaBuild.fail source · line 1555 · raw
@b:AaBuild -> @e:0x2b280a281d356b8e5cd7b338ab267df1/error.AaError -> AaBuild
def AaFrames.full source · line 1565 · raw
@fs:List<&2, AaFrame> -> List<&2, U32>
the innermost profile frame's full name
def AaFrames.qual source · line 1578 · raw
@fs:List<&2, AaFrame> -> AaBQ
def AaFrames.add_rules source · line 1588 · raw
@fs:List<&2, AaFrame> -> @rs:0x2b280a281d356b8e5cd7b338ab267df1/profile.AaRules -> List<&2, AaFrame>
the rules added to the innermost profile
def AaFrames.names.go source · line 1601 · raw
@ps:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaProfile> -> List<&2, List<&2, U32>>
def AaFrames.names source · line 1608 · raw
@+p:0x2b280a281d356b8e5cd7b338ab267df1/profile.AaProfile -> List<&2, List<&2, U32>>
def AaFrames.add_sub.go source · line 1611 · raw
@dup:Bool -> @+x:0x2b280a281d356b8e5cd7b338ab267df1/profile.AaProfile -> @k:0x2b280a281d356b8e5cd7b338ab267df1/profile.AaProfile -> @hat:Bool -> Maybe<&2, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaProfile>
def AaFrames.add_sub.put source · line 1622 · raw
@m:Maybe<&2, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaProfile> -> @h:Bool -> @full:List<&2, U32> -> @q:AaBQ -> @s:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> @t:List<&2, AaFrame> -> Maybe<&2, List<&2, AaFrame>>
def AaFrames.add_sub.cons source · line 1629 · raw
@f:AaFrame -> @m:Maybe<&2, List<&2, AaFrame>> -> Maybe<&2, List<&2, AaFrame>>
def AaFrames.add_sub source · line 1637 · raw
@fs:List<&2, AaFrame> -> @+k:0x2b280a281d356b8e5cd7b338ab267df1/profile.AaProfile -> @+hat:Bool -> Maybe<&2, List<&2, AaFrame>>
a finished child or hat added to the innermost profile; None if the name is taken
def AaFrames.has_profile source · line 1650 · raw
@fs:List<&2, AaFrame> -> Bool
def AaBuild.top_names source · line 1663 · raw
@ps:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaProfile> -> List<&2, List<&2, U32>>
def AaBuild.finish.sub source · line 1667 · raw
@m:Maybe<&2, List<&2, AaFrame>> -> @top:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaProfile> -> @err:Maybe<&2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError> -> @src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> AaBuild
a finished profile: checked, and added to its parent or to the top level
def AaBuild.finish.top source · line 1674 · raw
@+p:0x2b280a281d356b8e5cd7b338ab267df1/profile.AaProfile -> @+top:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaProfile> -> @+err:Maybe<&2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError> -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> AaBuild
def AaBuild.finish.place source · line 1677 · raw
@nested:Bool -> @+p:0x2b280a281d356b8e5cd7b338ab267df1/profile.AaProfile -> @hat:Bool -> @+fs:List<&2, AaFrame> -> @+top:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaProfile> -> @+err:Maybe<&2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError> -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> AaBuild
def AaBuild.finish source · line 1684 · raw
@+p:0x2b280a281d356b8e5cd7b338ab267df1/profile.AaProfile -> @+hat:Bool -> @+fs:List<&2, AaFrame> -> @+top:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaProfile> -> @+err:Maybe<&2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError> -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> AaBuild
def AaBuild.close source · line 1687 · raw
@b:AaBuild -> @src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> AaBuild
def AaBuild.push.qual source · line 1702 · raw
@r:Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, AaBQ> -> @fs:List<&2, AaFrame> -> @top:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaProfile> -> @err:Maybe<&2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError> -> @src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> AaBuild
def AaBuild.push.kind source · line 1709 · raw
@kind:Nat -> @+fs:List<&2, AaFrame> -> @top:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaProfile> -> @err:Maybe<&2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError> -> @name:List<&2, U32> -> @attach:Maybe<&2, 0x2b280a281d356b8e5cd7b338ab267df1/glob.AaGlob> -> @flags:0x2b280a281d356b8e5cd7b338ab267df1/profile.AaFlags -> @q:AaBQ -> @full:List<&2, U32> -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> AaBuild
def AaBuild.push source · line 1721 · raw
@r:Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, AaHead> -> @b:AaBuild -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> AaBuild
a block opens
def AaBuild.frames source · line 1734 · raw
@b:AaBuild -> List<&2, AaFrame>
def AaParse.head.of source · line 1739 · raw
@ts:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok> -> @+top:Bool -> @+pname:Maybe<&2, List<&2, U32>> -> @+ctx:AaCtx -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, AaHead>
def AaBuild.open source · line 1745 · raw
@+b:AaBuild -> @ts:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok> -> @+ctx:AaCtx -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> AaBuild
def AaBuild.rules source · line 1750 · raw
@r:Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaRules> -> @b:AaBuild -> AaBuild
def AaBuild.stmt source · line 1760 · raw
@+b:AaBuild -> @ts:List<&2, 0x2b280a281d356b8e5cd7b338ab267df1/token.AaTok> -> @+ctx:AaCtx -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> AaBuild
a statement: a rule inside a profile; at the top level the preamble pass has checked it
def AaBuild.ok source · line 1764 · raw
@b:AaBuild -> Bool
def AaBuild.step source · line 1773 · raw
@+b:AaBuild -> @it:AaItem -> @+ctx:AaCtx -> AaBuild
def AaBuild.run source · line 1788 · raw
@items:List<&2, AaItem> -> @b:AaBuild -> @+ctx:AaCtx -> AaBuild
def AaBuild.result source · line 1795 · raw
@b:AaBuild -> @src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaPolicy>
def AaParse.pre.result source · line 1814 · raw
@p:AaPre -> @items:List<&2, AaItem> -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaPolicy>
def AaParse.load.items source · line 1831 · raw
@m:Maybe<&2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError> -> @+items:List<&2, AaItem> -> @+opts:0x2b280a281d356b8e5cd7b338ab267df1/options.AaOptions -> @+src:0x2b280a281d356b8e5cd7b338ab267df1/error.AaSrc -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaPolicy>
def AaParse.load.file source · line 1838 · raw
@m:Maybe<&2, AaSrcFile> -> @+opts:0x2b280a281d356b8e5cd7b338ab267df1/options.AaOptions -> @+files:List<&2, AaSrcFile> -> @+main:List<&2, U32> -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaPolicy>
def AaParse.load source · line 1849 · raw
@+opts:0x2b280a281d356b8e5cd7b338ab267df1/options.AaOptions -> @+files:List<&2, AaSrcFile> -> @+main:List<&2, U32> -> Result<&2, &2, 0x2b280a281d356b8e5cd7b338ab267df1/error.AaError, 0x2b280a281d356b8e5cd7b338ab267df1/profile.AaPolicy>
the policy the file named main defines, reading includes from the file map