cfengine  3.15.4
About: CFEngine is a configuration management system for configuring and maintaining Unix-like computers (using an own high level policy language). Community version.
  Fossies Dox: cfengine-3.15.4.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

cf3parse.c File Reference
#include "cf3.defs.h"
#include "parser.h"
#include "parser_state.h"
#include "logging.h"
#include "fncall.h"
#include "rlist.h"
#include "item_lib.h"
#include "policy.h"
#include "mod_files.h"
#include "string_lib.h"
#include "logic_expressions.h"
#include "json-yaml.h"
#include "cleanup.h"
#include "syntax.h"
#include <assert.h>
#include <stddef.h>
Include dependency graph for cf3parse.c:

Go to the source code of this file.

Data Structures

union  yyalloc
 

Macros

#define YYBISON   1
 
#define YYBISON_VERSION   "3.0.4"
 
#define YYSKELETON_NAME   "yacc.c"
 
#define YYPURE   0
 
#define YYPUSH   0
 
#define YYPULL   1
 
#define YYMALLOC   xmalloc
 
#define P   PARSER_STATE
 
#define ParserDebug(...)   LogDebug(LOG_MOD_PARSER, __VA_ARGS__)
 
#define YY_NULLPTR   0
 
#define YYERROR_VERBOSE   0
 
#define YY_YY_CF_PARSE_H_INCLUDED
 
#define YYDEBUG   0
 
#define YYTOKENTYPE
 
#define IDSYNTAX   258
 
#define BLOCKID   259
 
#define QSTRING   260
 
#define CLASS   261
 
#define PROMISE_TYPE   262
 
#define BUNDLE   263
 
#define BODY   264
 
#define ASSIGN   265
 
#define ARROW   266
 
#define NAKEDVAR   267
 
#define YYSTYPE_IS_TRIVIAL   1
 
#define YYSTYPE_IS_DECLARED   1
 
#define YYSIZE_T   size_t
 
#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)
 
#define YY_(Msgid)   Msgid
 
#define YY_ATTRIBUTE(Spec)   /* empty */
 
#define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))
 
#define YY_ATTRIBUTE_UNUSED   YY_ATTRIBUTE ((__unused__))
 
#define _Noreturn   YY_ATTRIBUTE ((__noreturn__))
 
#define YYUSE(E)   ((void) (E))
 
#define YY_INITIAL_VALUE(Value)   Value
 
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
 
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
 
#define YYSTACK_ALLOC   YYMALLOC
 
#define YYSTACK_FREE   YYFREE
 
#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM
 
#define YYFREE   free
 
#define YYSTACK_GAP_MAXIMUM   (sizeof (union yyalloc) - 1)
 
#define YYSTACK_BYTES(N)
 
#define YYCOPY_NEEDED   1
 
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
 
#define YYCOPY(Dst, Src, Count)
 
#define YYFINAL   18
 
#define YYLAST   134
 
#define YYNTOKENS   19
 
#define YYNNTS   63
 
#define YYNRULES   118
 
#define YYNSTATES   145
 
#define YYUNDEFTOK   2
 
#define YYMAXUTOK   267
 
#define YYTRANSLATE(YYX)    ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
#define YYPACT_NINF   -98
 
#define yypact_value_is_default(Yystate)    (!!((Yystate) == (-98)))
 
#define YYTABLE_NINF   -112
 
#define yytable_value_is_error(Yytable_value)    0
 
#define yyerrok   (yyerrstatus = 0)
 
#define yyclearin   (yychar = YYEMPTY)
 
#define YYEMPTY   (-2)
 
#define YYEOF   0
 
#define YYACCEPT   goto yyacceptlab
 
#define YYABORT   goto yyabortlab
 
#define YYERROR   goto yyerrorlab
 
#define YYRECOVERING()   (!!yyerrstatus)
 
#define YYBACKUP(Token, Value)
 
#define YYTERROR   1
 
#define YYERRCODE   256
 
#define YYDPRINTF(Args)
 
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
 
#define YY_STACK_PRINT(Bottom, Top)
 
#define YY_REDUCE_PRINT(Rule)
 
#define YYINITDEPTH   200
 
#define YYMAXDEPTH   10000
 
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
 

Typedefs

typedef int YYSTYPE
 
typedef unsigned char yytype_uint8
 
typedef signed char yytype_int8
 
typedef unsigned short int yytype_uint16
 
typedef short int yytype_int16
 

Enumerations

enum  yytokentype {
  IDSYNTAX = 258 , BLOCKID = 259 , QSTRING = 260 , CLASS = 261 ,
  PROMISE_TYPE = 262 , BUNDLE = 263 , BODY = 264 , ASSIGN = 265 ,
  ARROW = 266 , NAKEDVAR = 267 , IDSYNTAX = 258 , BLOCKID = 259 ,
  QSTRING = 260 , CLASS = 261 , PROMISE_TYPE = 262 , BUNDLE = 263 ,
  BODY = 264 , ASSIGN = 265 , ARROW = 266 , NAKEDVAR = 267
}
 

Functions

int yylex (void)
 
static int RelevantBundle (const char *agent, const char *blocktype)
 
static bool LvalWantsBody (char *stype, char *lval)
 
static SyntaxTypeMatch CheckSelection (const char *type, const char *name, const char *lval, Rval rval)
 
static SyntaxTypeMatch CheckConstraint (const char *type, const char *lval, Rval rval, const PromiseTypeSyntax *ss)
 
static void fatal_yyerror (const char *s)
 
static void ParseErrorColumnOffset (int column_offset, const char *s,...)
 
static void ParseError (const char *s,...)
 
static void ParseWarning (unsigned int warning, const char *s,...)
 
static void ValidateClassLiteral (const char *class_literal)
 
int yyparse (void)
 
void free (void *)
 
static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
 
static void ParseErrorVColumnOffset (int column_offset, const char *s, va_list ap)
 
static void ParseErrorV (const char *s, va_list ap)
 
static void ParseWarningV (unsigned int warning, const char *s, va_list ap)
 
void yyerror (const char *str)
 

Variables

char * yytext
 
static bool INSTALL_SKIP = false
 
static size_t CURRENT_BLOCKID_LINE = 0
 
static size_t CURRENT_PROMISER_LINE = 0
 
YYSTYPE yylval
 
static const yytype_uint8 yytranslate []
 
static const yytype_int8 yypact []
 
static const yytype_uint8 yydefact []
 
static const yytype_int8 yypgoto []
 
static const yytype_int16 yydefgoto []
 
static const yytype_int16 yytable []
 
static const yytype_uint8 yycheck []
 
static const yytype_uint8 yystos []
 
static const yytype_uint8 yyr1 []
 
static const yytype_uint8 yyr2 []
 
int yychar
 
int yynerrs
 

Macro Definition Documentation

◆ _Noreturn

#define _Noreturn   YY_ATTRIBUTE ((__noreturn__))

Definition at line 292 of file cf3parse.c.

◆ ARROW

#define ARROW   266

Definition at line 193 of file cf3parse.c.

◆ ASSIGN

#define ASSIGN   265

Definition at line 192 of file cf3parse.c.

◆ BLOCKID

#define BLOCKID   259

Definition at line 186 of file cf3parse.c.

◆ BODY

#define BODY   264

Definition at line 191 of file cf3parse.c.

◆ BUNDLE

#define BUNDLE   263

Definition at line 190 of file cf3parse.c.

◆ CLASS

#define CLASS   261

Definition at line 188 of file cf3parse.c.

◆ IDSYNTAX

#define IDSYNTAX   258

Definition at line 185 of file cf3parse.c.

◆ NAKEDVAR

#define NAKEDVAR   267

Definition at line 194 of file cf3parse.c.

◆ P

#define P   PARSER_STATE

Definition at line 132 of file cf3parse.c.

◆ ParserDebug

#define ParserDebug (   ...)    LogDebug(LOG_MOD_PARSER, __VA_ARGS__)

Definition at line 134 of file cf3parse.c.

◆ PROMISE_TYPE

#define PROMISE_TYPE   262

Definition at line 189 of file cf3parse.c.

◆ QSTRING

#define QSTRING   260

Definition at line 187 of file cf3parse.c.

◆ YY_

#define YY_ (   Msgid)    Msgid

Definition at line 265 of file cf3parse.c.

◆ YY_ATTRIBUTE

#define YY_ATTRIBUTE (   Spec)    /* empty */

Definition at line 275 of file cf3parse.c.

◆ YY_ATTRIBUTE_PURE

#define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))

Definition at line 280 of file cf3parse.c.

◆ YY_ATTRIBUTE_UNUSED

#define YY_ATTRIBUTE_UNUSED   YY_ATTRIBUTE ((__unused__))

Definition at line 284 of file cf3parse.c.

◆ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

Definition at line 315 of file cf3parse.c.

◆ YY_IGNORE_MAYBE_UNINITIALIZED_END

#define YY_IGNORE_MAYBE_UNINITIALIZED_END

Definition at line 316 of file cf3parse.c.

◆ YY_INITIAL_VALUE

#define YY_INITIAL_VALUE (   Value)    Value

Definition at line 312 of file cf3parse.c.

◆ YY_NULLPTR

#define YY_NULLPTR   0

Definition at line 143 of file cf3parse.c.

◆ YY_REDUCE_PRINT

#define YY_REDUCE_PRINT (   Rule)

Definition at line 892 of file cf3parse.c.

◆ YY_STACK_PRINT

#define YY_STACK_PRINT (   Bottom,
  Top 
)

Definition at line 891 of file cf3parse.c.

◆ YY_SYMBOL_PRINT

#define YY_SYMBOL_PRINT (   Title,
  Type,
  Value,
  Location 
)

Definition at line 890 of file cf3parse.c.

◆ YY_YY_CF_PARSE_H_INCLUDED

#define YY_YY_CF_PARSE_H_INCLUDED

Definition at line 158 of file cf3parse.c.

◆ YYABORT

#define YYABORT   goto yyabortlab

Definition at line 737 of file cf3parse.c.

◆ YYACCEPT

#define YYACCEPT   goto yyacceptlab

Definition at line 736 of file cf3parse.c.

◆ YYBACKUP

#define YYBACKUP (   Token,
  Value 
)
Value:
do \
if (yychar == YYEMPTY) \
{ \
yychar = (Token); \
yylval = (Value); \
YYPOPSTACK (yylen); \
yystate = *yyssp; \
goto yybackup; \
} \
else \
{ \
yyerror (YY_("syntax error: cannot back up")); \
YYERROR; \
} \
while (0)
#define YY_(Msgid)
Definition: cf3parse.c:265
int yychar
Definition: cf3parse.c:1156
#define YYEMPTY
Definition: cf3parse.c:733

Definition at line 743 of file cf3parse.c.

◆ YYBISON

#define YYBISON   1

Definition at line 44 of file cf3parse.c.

◆ YYBISON_VERSION

#define YYBISON_VERSION   "3.0.4"

Definition at line 47 of file cf3parse.c.

◆ yyclearin

#define yyclearin   (yychar = YYEMPTY)

Definition at line 732 of file cf3parse.c.

◆ YYCOPY

#define YYCOPY (   Dst,
  Src,
  Count 
)
Value:
do \
{ \
YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} \
while (0)

Definition at line 439 of file cf3parse.c.

◆ YYCOPY_NEEDED

#define YYCOPY_NEEDED   1

Definition at line 411 of file cf3parse.c.

◆ YYDEBUG

#define YYDEBUG   0

Definition at line 161 of file cf3parse.c.

◆ YYDPRINTF

#define YYDPRINTF (   Args)

Definition at line 889 of file cf3parse.c.

◆ YYEMPTY

#define YYEMPTY   (-2)

Definition at line 733 of file cf3parse.c.

◆ YYEOF

#define YYEOF   0

Definition at line 734 of file cf3parse.c.

◆ YYERRCODE

#define YYERRCODE   256

Definition at line 762 of file cf3parse.c.

◆ yyerrok

#define yyerrok   (yyerrstatus = 0)

Definition at line 731 of file cf3parse.c.

◆ YYERROR

#define YYERROR   goto yyerrorlab

Definition at line 738 of file cf3parse.c.

◆ YYERROR_VERBOSE

#define YYERROR_VERBOSE   0

Definition at line 152 of file cf3parse.c.

◆ YYFINAL

#define YYFINAL   18

Definition at line 452 of file cf3parse.c.

◆ YYFREE

#define YYFREE   free

Definition at line 382 of file cf3parse.c.

◆ YYINITDEPTH

#define YYINITDEPTH   200

Definition at line 898 of file cf3parse.c.

◆ YYLAST

#define YYLAST   134

Definition at line 454 of file cf3parse.c.

◆ YYMALLOC

#define YYMALLOC   xmalloc

Definition at line 131 of file cf3parse.c.

◆ YYMAXDEPTH

#define YYMAXDEPTH   10000

Definition at line 909 of file cf3parse.c.

◆ YYMAXUTOK

#define YYMAXUTOK   267

Definition at line 468 of file cf3parse.c.

◆ YYNNTS

#define YYNNTS   63

Definition at line 459 of file cf3parse.c.

◆ YYNRULES

#define YYNRULES   118

Definition at line 461 of file cf3parse.c.

◆ YYNSTATES

#define YYNSTATES   145

Definition at line 463 of file cf3parse.c.

◆ YYNTOKENS

#define YYNTOKENS   19

Definition at line 457 of file cf3parse.c.

◆ YYPACT_NINF

#define YYPACT_NINF   -98

Definition at line 559 of file cf3parse.c.

◆ yypact_value_is_default

#define yypact_value_is_default (   Yystate)     (!!((Yystate) == (-98)))

Definition at line 561 of file cf3parse.c.

◆ YYPOPSTACK

#define YYPOPSTACK (   N)    (yyvsp -= (N), yyssp -= (N))

◆ YYPULL

#define YYPULL   1

Definition at line 59 of file cf3parse.c.

◆ YYPURE

#define YYPURE   0

Definition at line 53 of file cf3parse.c.

◆ YYPUSH

#define YYPUSH   0

Definition at line 56 of file cf3parse.c.

◆ YYRECOVERING

#define YYRECOVERING ( )    (!!yyerrstatus)

Definition at line 741 of file cf3parse.c.

◆ YYSIZE_MAXIMUM

#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)

Definition at line 255 of file cf3parse.c.

◆ YYSIZE_T

#define YYSIZE_T   size_t

Definition at line 249 of file cf3parse.c.

◆ YYSKELETON_NAME

#define YYSKELETON_NAME   "yacc.c"

Definition at line 50 of file cf3parse.c.

◆ YYSTACK_ALLOC

#define YYSTACK_ALLOC   YYMALLOC

Definition at line 362 of file cf3parse.c.

◆ YYSTACK_ALLOC_MAXIMUM

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Definition at line 365 of file cf3parse.c.

◆ YYSTACK_BYTES

#define YYSTACK_BYTES (   N)
Value:
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
int YYSTYPE
Definition: cf3parse.c:198
short int yytype_int16
Definition: cf3parse.c:239
#define YYSTACK_GAP_MAXIMUM
Definition: cf3parse.c:403

Definition at line 407 of file cf3parse.c.

◆ YYSTACK_FREE

#define YYSTACK_FREE   YYFREE

Definition at line 363 of file cf3parse.c.

◆ YYSTACK_GAP_MAXIMUM

#define YYSTACK_GAP_MAXIMUM   (sizeof (union yyalloc) - 1)

Definition at line 403 of file cf3parse.c.

◆ YYSTACK_RELOCATE

#define YYSTACK_RELOCATE (   Stack_alloc,
  Stack 
)
Value:
do \
{ \
YYSIZE_T yynewbytes; \
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
while (0)
A simple stack data structure.
Definition: stack_base.c:47

Definition at line 418 of file cf3parse.c.

◆ YYSTYPE_IS_DECLARED

#define YYSTYPE_IS_DECLARED   1

Definition at line 200 of file cf3parse.c.

◆ YYSTYPE_IS_TRIVIAL

#define YYSTYPE_IS_TRIVIAL   1

Definition at line 199 of file cf3parse.c.

◆ YYTABLE_NINF

#define YYTABLE_NINF   -112

Definition at line 564 of file cf3parse.c.

◆ yytable_value_is_error

#define yytable_value_is_error (   Yytable_value)     0

Definition at line 566 of file cf3parse.c.

◆ YYTERROR

#define YYTERROR   1

Definition at line 761 of file cf3parse.c.

◆ YYTOKENTYPE

#define YYTOKENTYPE

Definition at line 169 of file cf3parse.c.

◆ YYTRANSLATE

#define YYTRANSLATE (   YYX)     ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

Definition at line 470 of file cf3parse.c.

◆ YYUNDEFTOK

#define YYUNDEFTOK   2

Definition at line 467 of file cf3parse.c.

◆ YYUSE

#define YYUSE (   E)    ((void) (E))

Definition at line 298 of file cf3parse.c.

Typedef Documentation

◆ YYSTYPE

typedef int YYSTYPE

Definition at line 198 of file cf3parse.c.

◆ yytype_int16

typedef short int yytype_int16

Definition at line 239 of file cf3parse.c.

◆ yytype_int8

typedef signed char yytype_int8

Definition at line 227 of file cf3parse.c.

◆ yytype_uint16

typedef unsigned short int yytype_uint16

Definition at line 233 of file cf3parse.c.

◆ yytype_uint8

typedef unsigned char yytype_uint8

Definition at line 221 of file cf3parse.c.

Enumeration Type Documentation

◆ yytokentype

Enumerator
IDSYNTAX 
BLOCKID 
QSTRING 
CLASS 
PROMISE_TYPE 
BUNDLE 
BODY 
ASSIGN 
ARROW 
NAKEDVAR 
IDSYNTAX 
BLOCKID 
QSTRING 
CLASS 
PROMISE_TYPE 
BUNDLE 
BODY 
ASSIGN 
ARROW 
NAKEDVAR 

Definition at line 170 of file cf3parse.c.

Function Documentation

◆ CheckConstraint()

◆ CheckSelection()

◆ fatal_yyerror()

static void fatal_yyerror ( const char *  s)
static

Definition at line 2929 of file cf3parse.c.

References DoCleanupAndExit(), P, and yytext.

Referenced by yyparse().

◆ free()

void free ( void *  )

Referenced by __ProgrammingError(), __UnexpectedError(), AbstractDirClose(), AbstractDirOpen(), acl_Free(), AddAllClasses(), AddDefaultBodiesToPromise(), AddDefaultPackageModuleToContext(), AddMigratedFileToDirectoryList(), AddPolicyEntryVariables(), AgentDiagnosticsCheckDB(), AgentDiagnosticsCheckPrivateKey(), AgentDiagnosticsCheckPublicKey(), AgentDiagnosticsResultDestroy(), AllClassesReport(), alloc_entry(), AppendExpandedBodies(), ArgFree(), ArrayMapDestroy(), ArrayMapSoftDestroy(), AuthenticateAgent(), BackupLockDatabase(), BodyDestroy(), BufferClose(), BufferDestroy(), BuildData(), BuildLineArray(), BundleDestroy(), BundleTypesToJson(), CallCleanupFunctions(), CallFunction(), CfDeleteQuery(), CFNetGet(), CFNetMulti(), CFNetOpenConnection(), CFNetOptionsClear(), CFNetParse(), CFNetRun(), cfPS(), CfReadLines(), CheckContextClassmatch(), CheckPsLineLimitations(), ClassDestroy(), ClassDestroySoft(), ClassesMatching(), ClassRefDestroy(), ClassRefQualify(), ClassTableDestroy(), ClassTableIteratorDestroy(), ClassTableMatch(), CleanupOpenSSLThreadLocks(), ClearAuthAndACLs(), CloseDB(), CloseDBInstance(), CollectContainerValues(), CompareResultEqualOrFiltered(), ConfigurationDestroy(), ConfigurationSetBackupPath(), ConfigurationSetBackupTool(), ConfigurationSetCFEnginePath(), ConfigurationSetCFUpgrade(), ConfigurationSetCopy(), ConnCache_Init(), ConnectionInfoDestroy(), ConstraintDestroy(), ConvertToHashMap(), CopyLockDatabaseAtomically(), CopyRegularFile(), CopyRegularFileNet(), CreateBootstrapIDFile(), CsvWriterClose(), CsvWriterFieldVF(), DataRead(), DBIdToPath(), DBIdToSubPath(), DBPathLock(), DBPathMoveBroken(), DefaultTemplateData(), DeleteAgentConn(), DeleteAssoc(), DeleteAuthList(), DeleteCompressedArray(), DeleteConn(), DeleteDBCursor(), DeleteDigestFromLastSeen(), DeleteHashValue(), DeleteIndexKey(), DeleteIpFromLastSeen(), DeleteItem(), DeleteItemGeneral(), DeleteItemList(), DeleteMountInfo(), DeletePackageItems(), DeletePackageManagers(), DeletePackageModuleWrapper(), DeletePromisedLinesMatching(), DeleteSQLColumns(), DeleteThisItem(), DepthSearch(), DeRefCopyPromise(), DereferenceAndPutComment(), DestroyStatCache(), DirClose(), DirOpen(), DoExec2(), EditColumns(), EditLineByColumn(), EncryptCopyRegularFileNet(), EvalConcat(), EvalContextClassPutSoft(), EvalContextDestroy(), EvalContextHeapPersistentSave(), EvalContextSetEntryPoint(), EvalContextSetLaunchDirectory(), EvalContextSetPolicyServerFromFile(), EvalContextVariablePut(), EvalContextVariablePutSpecial(), EvalContextVariablePutSpecialEscaped(), EvalExpression(), EvaluateFinalRval(), EvalVarRef(), ExecConfigDestroy(), ExecConfigNew(), ExecdConfigDestroy(), ExecdConfigNew(), ExecJSON_Pipe(), ExecModule(), ExecPackageCommand(), ExecutePatch(), ExecuteSchedule(), ExpandAndPutWheelVariablesAfter(), ExpandDeRefPromise(), ExpandListEntry(), FileSparseCopy(), FileWriterDetach(), FilterInternal(), FinishEditContext(), FirstBackReference(), FnCallBundlesMatching(), FnCallClassFilterCsv(), FnCallCountLinesMatching(), FnCallDestroy(), FnCallExecResult(), FnCallExpandRange(), FnCallFileSexist(), FnCallFold(), FnCallFormat(), FnCallGetFields(), FnCallGetMetaTags(), FnCallIPRange(), FnCallPeerLeader(), FnCallPeerLeaders(), FnCallPeers(), FnCallReadModuleProtocol(), FnCallRegExtract(), FnCallRegLine(), FnCallSelectServers(), FnCallTextXform(), ForceIpAddressRemoval(), ForceKeyRemoval(), freeaddrinfo(), FreeBucketListItem(), FreeBucketListItemSoft(), FreeExpression(), FreeFixedStringArray(), FreePackageInfo(), FreePackageManager(), FreePackagePromiseContext(), FreeStringArray(), FreeStringExpression(), GatherProcessUsers(), GenericAgentConfigDestroy(), GenericAgentConfigSetInputFile(), GenericAgentDiscoverContext(), GenericAgentInitialize(), GenericAgentShowContextsFormatted(), GenericAgentShowVariablesFormatted(), GenericAgentTagReleaseDirectory(), GetDefaultArch(), GetExecOutput(), GetGlobalMountedFSList(), GetGroupInfo(), GetLegacyPackagesMatching(), GetNameInfo3(), GetNetworkDataFromNetstat(), GetNetworkingStatsInfo(), GetPackageData(), GetPackagesMatching(), GetParentDirectoryCopy(), GetProcFileInfo(), GetRealPath(), GidListDestroy(), GlobFileList(), HandleOldPackagePromiseType(), HandlePresentPromiseAction(), HashMapDestroy(), HashMapPrintStats(), HashMapRemove(), HashMapResize(), HashMapSoftDestroy(), InsertCompoundLineAtLocation(), InsertFileAtLocation(), InstallPackage(), InstallPackageGeneric(), IPAddressDestroy(), IPAddressIsIPAddress(), IPAddressNew(), IPAddressNewHex(), IsLastSeenCoherent(), IsLegalVariableName(), IsProcessNameRunning(), IsSubHandle(), IsVariableSelfReferential(), JsonDestroy(), JsonElementSetPropertyName(), JsonObjectMergeArray(), JsonParseAsArray(), JsonParseAsObject(), JsonParseAsPrimitive(), JsonParseCsvFile(), JsonParseEnvFile(), JsonPrimitiveWrite(), KeepControlPromises(), KeyDestroy(), KeyNew(), ListDestroy(), ListDir(), ListHubs(), ListIteratorDestroy(), ListMutableIteratorRelease(), ListMutableIteratorRemove(), ListPersistentClasses(), ListRemove(), LoadAugments(), LoadAugmentsData(), LoadAugmentsFiles(), LoadFileAsItemList(), LoadMountInfo(), LoadPolicyFile(), LoadProcessTable(), LoadSecretKeys(), LocalExec(), LocksCleanup(), log_entry(), LoggingInitializeOnce(), LogVariableValue(), LookupVariable(), MailResult(), main(), MakeParentDirectory(), MakeParentDirectory2(), MakeTemporaryBundleFromTemplate(), MangledThisScopedRef(), MangleScopedVarNameIntoSpecialScopeName(), MapDestroy(), MapSoftDestroy(), MatchClasses(), MatchFSInFstab(), MatchPolicy(), MatchRegion(), MaybeFixStartTime(), MountAll(), NewEditContext(), NewSQLColumns(), NodeDestroy_(), Nova_FreeSlot(), Nova_RestoreFilePosition(), Nova_SaveFilePosition(), NovaReSample(), OpenChangesDB(), PackageListInstalledFromCommand(), PackageWrapperCommunicate(), ParseAndCheckPackageDataReply(), ParseArray(), ParseErrorVColumnOffset(), ParseHeaders(), ParserStateClean(), ParserStateReset(), ParseWarningV(), pcre_wrap_compile_replacement(), pcre_wrap_execute(), pcre_wrap_free_job(), perform_backup(), perform_restore(), PipeReadData(), PipeReadWriteData(), PipeWriteData(), PolicyCheckUndefinedBodies(), PolicyCheckUndefinedBundles(), PolicyDestroy(), PolicyErrorDestroy(), PolicyMerge(), PolicyServerLookUpFile(), PolicyServerParseFile(), PolicyServerReadFile(), PolicyServerRemoveFile(), PolicyServerSet(), PolicyServerWriteFile(), PortablyFormatTime(), PrintDigest(), PrintFile(), private_run_process_wait(), PromiseAppendConstraint(), PromiseDestroy(), PromiseIteratorDestroy(), PromiseRecheckAllConstraints(), PromiseRef(), PromiseTypeDestroy(), ProtocolOpenDir(), PurgeLocks(), putenv_wrapper(), PutHandleVariable(), QueueDequeue(), QueueDestroy(), RawLoadItemList(), RBTreeCopy(), RBTreeDestroy(), RBTreeIteratorDestroy(), ReadArray(), ReadBootstrapIDFile(), ReadLenPrefixedString(), ReadList(), RefCountDestroy(), RefCountDetach(), RegExMatchSubString(), RemoteDirClose(), RemoteDirList(), RemovePackage(), RenameMainBundle(), Render(), RenderTemplateMustache(), RenderVariablePrimitive(), RepairExec(), ReplacePatterns(), RepoInstall(), ReportToLog(), ResolveControlBody(), RestoreLockDatabase(), RingBufferDestroy(), RingBufferIteratorDestroy(), RlistAppendContainerPrimitive(), RlistDestroy(), RlistFlatten(), RlistMailFilterFill(), rpl_vfprintf(), RSADecrypt(), RSAEncrypt(), RvalDestroy2(), RvalNewRewriter(), safe_chmod(), safe_chown_impl(), safe_open_true_parent_dir(), ScanLastSeenQuality(), SelectAndLoadPolicy(), SelectExecProgram(), SelectExecRegexMatch(), SelectProcess(), SelectProcesses(), SeqMailFilterFill(), SeqSoftDestroy(), SeqStringDeserialize(), SeqStringFromString(), SeqStringReadFile(), SplitString(), StackFrameDestroy(), StackFrameNewPromiseIteration(), StackSoftDestroy(), StringMatchCapturesWithPrecompiledRegex(), StringWriterClose(), StrList_Finalise(), StrList_Free(), SupportsOption(), ThreadedDequeCopy(), ThreadedDequeNew(), ThreadedDequeSoftDestroy(), ThreadedQueueCopy(), ThreadedQueueNew(), ThreadedQueueSoftDestroy(), ThreadedStackCopy(), ThreadedStackNew(), ThreadedStackSoftDestroy(), TransformFile(), TrustKey(), UidListDestroy(), UpdateCache(), UpdatePackagesDB(), UpdateSinglePackageModuleCache(), ValidDuplicate(), VariableDestroy(), VariablesMatching(), VariableTableClear(), VariableTableDestroy(), VariableTableGet(), VariableTableIteratorDestroy(), VariableTablePut(), VarRefDestroy(), VarRefMangle(), VarRefParseFromNamespaceAndScope(), VarRefParseFromScope(), VarRefQualify(), VarRefSetMeta(), VarRefValueToJson(), VerifyClassPromise(), VerifyExecPromise(), VerifyInFstab(), VerifyInstalledPackages(), VerifyMount(), VerifyMountPromise(), VerifyNotInFstab(), VerifyPackagesPromise(), VerifyThatDatabaseIsNotCorrupt_once(), VerifyUnmount(), VerifyVarPromise(), VLog(), WheelDestroy(), WheelValuesSeqDestroy(), WriteAmPolicyHubFile(), WriterClose(), WriterWriteVF(), YieldCurrentLock(), yyfree(), yylex(), and yyparse().

◆ LvalWantsBody()

static bool LvalWantsBody ( char *  stype,
char *  lval 
)
static

◆ ParseError()

static void ParseError ( const char *  s,
  ... 
)
static

Definition at line 2878 of file cf3parse.c.

References ParseErrorV().

Referenced by yyerror(), and yyparse().

◆ ParseErrorColumnOffset()

static void ParseErrorColumnOffset ( int  column_offset,
const char *  s,
  ... 
)
static

Definition at line 2865 of file cf3parse.c.

References ParseErrorVColumnOffset().

Referenced by ValidateClassLiteral().

◆ ParseErrorV()

static void ParseErrorV ( const char *  s,
va_list  ap 
)
static

Definition at line 2873 of file cf3parse.c.

References ParseErrorVColumnOffset().

Referenced by ParseError().

◆ ParseErrorVColumnOffset()

static void ParseErrorVColumnOffset ( int  column_offset,
const char *  s,
va_list  ap 
)
static

Definition at line 2841 of file cf3parse.c.

References DoCleanupAndExit(), free(), P, and StringVFormat().

Referenced by ParseErrorColumnOffset(), and ParseErrorV().

◆ ParseWarning()

static void ParseWarning ( unsigned int  warning,
const char *  s,
  ... 
)
static

Definition at line 2916 of file cf3parse.c.

References ParseWarningV().

Referenced by yyparse().

◆ ParseWarningV()

static void ParseWarningV ( unsigned int  warning,
const char *  s,
va_list  ap 
)
static

Definition at line 2886 of file cf3parse.c.

References DoCleanupAndExit(), free(), P, ParserWarningToString(), and StringVFormat().

Referenced by ParseWarning().

◆ RelevantBundle()

static int RelevantBundle ( const char *  agent,
const char *  blocktype 
)
static

◆ ValidateClassLiteral()

static void ValidateClassLiteral ( const char *  class_literal)
static

◆ yydestruct()

static void yydestruct ( const char *  yymsg,
int  yytype,
YYSTYPE yyvaluep 
)
static

◆ yyerror()

void yyerror ( const char *  str)

◆ yylex()

◆ yyparse()

int yyparse ( void  )

Definition at line 1169 of file cf3parse.c.

References ASSIGN, BODY, BodySyntax_::body_type, BodyAppendConstraint(), BodySyntaxGet(), BodySyntaxGetConstraintSyntax(), BufferData(), BufferDestroy(), BufferNewFrom(), BUNDLE, PromiseTypeSyntax::bundle_type, BundleAppendPromiseType(), BundleTypeCheck(), CF_AGENTTYPES, CF_MAX_NESTING, CF_MAXVARSIZE, CheckConstraint(), CheckSelection(), BodySyntax_::constraints, SourceOffset::context, CURRENT_BLOCKID_LINE, CURRENT_PROMISER_LINE, SourceOffset::end, fatal_yyerror(), FnCallDestroy(), FnCallNew(), free(), IDSYNTAX, INSTALL_SKIP, JSON_ELEMENT_TYPE_PRIMITIVE, JSON_PARSE_OK, JsonDestroy(), JsonGetElementType(), JsonParse(), JsonParseYamlString(), SourceOffset::line, ConstraintSyntax_::lval, LvalWantsBody(), NULL, Constraint_::offset, P, ParseError(), PARSER_WARNING_DEPRECATED, PARSER_WARNING_REMOVED, ParserDebug, ParseWarning(), PolicyAppendBody(), PolicyAppendBundle(), PromiseTypeSyntax::promise_type, PromiseAppendConstraint(), PromiseTypeAppendPromise(), PromiseTypeSyntaxGet(), PromiseTypeSyntaxGetConstraintSyntax(), RelevantBundle(), RlistAppend(), RlistAppendScalar(), RlistCopy(), RlistDestroy(), RVAL_TYPE_CONTAINER, RVAL_TYPE_FNCALL, RVAL_TYPE_LIST, RVAL_TYPE_NOPROMISEE, RVAL_TYPE_SCALAR, RvalCopy(), RvalDestroy(), RvalNew(), SourceOffset::start, ConstraintSyntax_::status, BodySyntax_::status, PromiseTypeSyntax::status, strstr(), SYNTAX_STATUS_DEPRECATED, SYNTAX_STATUS_NORMAL, SYNTAX_STATUS_REMOVED, SYNTAX_TYPE_MATCH_ERROR_UNEXPANDED, SYNTAX_TYPE_MATCH_OK, SyntaxTypeMatchToString(), ValidateClassLiteral(), xstrdup(), xstrndup(), YY_, YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN, YY_IGNORE_MAYBE_UNINITIALIZED_END, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, YYABORT, YYACCEPT, yychar, yycheck, yyclearin, yydefact, yydefgoto, yydestruct(), YYDPRINTF, YYEMPTY, YYEOF, yyerror(), YYFINAL, YYINITDEPTH, YYLAST, yylex(), yylval, YYMAXDEPTH, yynerrs, YYNTOKENS, yypact, yypact_value_is_default, yypgoto, YYPOPSTACK, yyr1, yyr2, YYSIZE_T, yyalloc::yyss_alloc, YYSTACK_ALLOC, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, yystos, yytable, yytable_value_is_error, YYTERROR, yytext, YYTRANSLATE, and yyalloc::yyvs_alloc.

Referenced by ParserParseFile().

Variable Documentation

◆ CURRENT_BLOCKID_LINE

size_t CURRENT_BLOCKID_LINE = 0
static

Definition at line 128 of file cf3parse.c.

Referenced by yyparse().

◆ CURRENT_PROMISER_LINE

size_t CURRENT_PROMISER_LINE = 0
static

Definition at line 129 of file cf3parse.c.

Referenced by yyparse().

◆ INSTALL_SKIP

bool INSTALL_SKIP = false
static

Definition at line 127 of file cf3parse.c.

Referenced by yyparse().

◆ yychar

int yychar

Definition at line 1156 of file cf3parse.c.

Referenced by yyparse().

◆ yycheck

const yytype_uint8 yycheck[]
static
Initial value:
=
{
97, 91, 1, 1, 3, 3, 1, 1, 54, 1,
1, 1, 11, 3, 4, 5, 1, 0, 10, 18,
18, 7, 12, 18, 18, 71, 17, 17, 125, 14,
15, 128, 1, 123, 3, 4, 5, 1, 13, 3,
4, 5, 16, 12, 1, 142, 18, 16, 12, 1,
7, 13, 16, 5, 6, 7, 1, 13, 1, 16,
5, 6, 7, 1, 16, 3, 13, 1, 6, 3,
5, 16, 15, 16, 1, 15, 3, 1, 16, 3,
4, 5, 1, 13, 3, 4, 5, 14, 12, 3,
14, 15, 15, 12, 0, 1, 0, 1, 1, 1,
3, 3, 8, 9, 8, 9, 1, 1, 3, 3,
1, 6, 3, 1, 26, 3, 14, 15, 14, 15,
41, 46, 15, 16, 14, 15, 52, 32, 124, 71,
108, 60, 125, 122, 142
}

Definition at line 657 of file cf3parse.c.

Referenced by yyparse().

◆ yydefact

const yytype_uint8 yydefact[]
static
Initial value:
=
{
0, 8, 0, 0, 0, 0, 4, 6, 7, 13,
23, 0, 11, 12, 19, 0, 17, 18, 1, 5,
16, 24, 25, 14, 15, 22, 25, 20, 21, 29,
0, 0, 0, 38, 37, 9, 35, 28, 33, 30,
27, 0, 31, 71, 10, 0, 0, 26, 0, 43,
45, 0, 40, 41, 0, 34, 32, 81, 80, 85,
0, 73, 76, 0, 0, 75, 36, 42, 61, 60,
44, 0, 48, 51, 0, 54, 55, 0, 50, 72,
74, 78, 77, 83, 82, 0, 49, 52, 53, 84,
0, 0, 92, 86, 87, 88, 89, 0, 79, 90,
0, 91, 70, 69, 59, 0, 65, 66, 0, 56,
103, 99, 105, 100, 101, 93, 0, 0, 102, 108,
107, 64, 0, 0, 0, 0, 94, 98, 0, 67,
68, 57, 95, 97, 118, 114, 115, 116, 117, 0,
0, 109, 0, 113, 112
}

Definition at line 593 of file cf3parse.c.

Referenced by yyparse().

◆ yydefgoto

const yytype_int16 yydefgoto[]
static
Initial value:
=
{
-1, 4, 5, 6, 7, 8, 11, 12, 22, 23,
15, 16, 26, 27, 13, 24, 30, 31, 40, 41,
42, 35, 45, 36, 51, 52, 53, 54, 70, 71,
72, 73, 74, 75, 124, 76, 90, 77, 104, 105,
106, 107, 108, 44, 48, 60, 61, 62, 63, 64,
85, 91, 65, 98, 99, 116, 117, 100, 101, 120,
128, 139, 140
}

Definition at line 625 of file cf3parse.c.

Referenced by yyparse().

◆ yylval

YYSTYPE yylval

Definition at line 1159 of file cf3parse.c.

Referenced by yyparse().

◆ yynerrs

int yynerrs

Definition at line 1161 of file cf3parse.c.

Referenced by yyparse().

◆ yypact

const yytype_int8 yypact[]
static
Initial value:
=
{
94, -98, 66, 97, 17, 96, -98, -98, -98, -98,
-98, 98, -98, -98, -98, 106, -98, -98, -98, -98,
-98, -98, 25, -98, -98, -98, 25, -98, -98, -98,
9, 73, 9, -98, -98, -98, -98, 102, -98, -98,
-98, 104, -98, -98, -98, 43, 109, -98, 105, -98,
-98, 26, 14, -98, 48, -98, -98, -98, -98, -98,
62, -98, -98, 5, 8, -98, -98, -98, -98, -98,
-98, 55, -98, -98, 28, -98, -98, 1, -98, -98,
-98, -98, -98, -98, -98, 10, -98, -98, -98, -98,
2, 10, -98, 38, 44, -98, 53, 31, -98, -98,
70, -98, -98, -98, -98, 6, 60, -98, 8, -98,
-98, 38, -98, -98, 53, -98, 107, 57, -98, -98,
-98, -98, 112, 10, 2, 36, -98, -98, 76, -98,
-98, -98, -98, -98, -98, 38, -98, 53, -98, 110,
15, -98, 81, -98, -98
}

Definition at line 571 of file cf3parse.c.

Referenced by yyparse().

◆ yypgoto

const yytype_int8 yypgoto[]
static
Initial value:
=
{
-98, -98, -98, 65, -98, -98, -98, -98, -98, -98,
-98, -98, -98, -98, 86, 77, 88, -98, 79, -98,
75, -98, -98, 95, -98, -98, 74, -98, -98, -98,
58, -98, -98, -98, -98, -98, -98, -98, 4, -98,
-98, 11, -98, -98, -98, -98, 71, -98, -98, -98,
22, -98, -46, -90, -98, -98, 7, -98, -97, -98,
-98, -98, -8
}

Definition at line 613 of file cf3parse.c.

Referenced by yyparse().

◆ yyr1

const yytype_uint8 yyr1[]
static
Initial value:
=
{
0, 19, 20, 20, 21, 21, 22, 22, 22, 23,
24, 25, 26, 26, 27, 28, 28, 29, 30, 30,
31, 32, 32, 33, 34, 35, 35, 35, 35, 36,
37, 38, 38, 39, 39, 41, 40, 42, 42, 43,
43, 44, 44, 44, 45, 46, 47, 47, 48, 48,
49, 49, 50, 50, 51, 51, 53, 52, 55, 54,
56, 56, 57, 57, 57, 58, 59, 59, 60, 61,
61, 63, 62, 64, 64, 65, 65, 66, 66, 67,
68, 68, 69, 69, 70, 71, 72, 72, 72, 72,
72, 72, 72, 73, 73, 73, 74, 74, 74, 75,
75, 75, 75, 75, 76, 76, 76, 77, 79, 78,
80, 80, 80, 80, 81, 81, 81, 81, 81
}

Definition at line 697 of file cf3parse.c.

Referenced by yyparse().

◆ yyr2

const yytype_uint8 yyr2[]
static
Initial value:
=
{
0, 2, 0, 1, 1, 2, 1, 1, 1, 5,
5, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 0, 3, 2, 2, 1,
1, 1, 3, 1, 1, 0, 4, 1, 1, 0,
1, 1, 2, 1, 2, 1, 0, 1, 1, 2,
1, 1, 2, 2, 1, 1, 0, 5, 0, 3,
1, 1, 0, 1, 2, 1, 1, 3, 3, 1,
1, 0, 4, 1, 2, 1, 1, 2, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 2, 3, 4, 1, 3, 2, 1,
1, 1, 1, 1, 1, 1, 1, 2, 0, 4,
0, 1, 3, 2, 1, 1, 1, 1, 1
}

Definition at line 714 of file cf3parse.c.

Referenced by yyparse().

◆ yystos

const yytype_uint8 yystos[]
static
Initial value:
=
{
0, 1, 8, 9, 20, 21, 22, 23, 24, 1,
3, 25, 26, 33, 1, 29, 30, 33, 0, 22,
1, 3, 27, 28, 34, 1, 31, 32, 34, 13,
35, 36, 35, 1, 17, 40, 42, 1, 3, 14,
37, 38, 39, 42, 62, 41, 15, 37, 63, 1,
7, 43, 44, 45, 46, 1, 39, 1, 3, 6,
64, 65, 66, 67, 68, 71, 16, 45, 1, 5,
47, 48, 49, 50, 51, 52, 54, 56, 71, 16,
65, 1, 18, 1, 10, 69, 49, 18, 1, 11,
55, 70, 1, 3, 4, 5, 12, 17, 72, 73,
76, 77, 1, 3, 57, 58, 59, 60, 61, 72,
1, 3, 4, 5, 12, 16, 74, 75, 77, 13,
78, 1, 15, 69, 53, 15, 16, 1, 79, 60,
72, 57, 16, 75, 1, 3, 5, 12, 77, 80,
81, 14, 15, 1, 81
}

Definition at line 677 of file cf3parse.c.

Referenced by yyparse().

◆ yytable

const yytype_int16 yytable[]
static
Initial value:
=
{
118, 109, 88, 102, -58, 103, 81, 121, 78, 83,
33, 92, 89, 93, 94, 95, 143, 18, 84, -58,
-62, 50, 96, 82, -63, 78, 34, 97, 118, -111,
-111, 138, 110, 130, 111, 112, 113, 110, 29, 111,
112, 113, 66, 114, 49, 138, 87, 115, 114, 68,
50, -104, 132, 69, 59, -46, 68, -105, 127, -39,
69, 59, -47, 57, -46, 58, -106, 9, 59, 10,
19, -47, -96, -96, 37, 122, 38, 134, 79, 135,
112, 136, 134, 119, 135, 112, 136, 39, 137, 17,
-110, -110, 28, 137, -2, 1, -3, 1, 14, 20,
10, 21, 2, 3, 2, 3, 57, 25, 58, 21,
55, 59, 38, 102, 32, 103, -34, -34, 39, 46,
47, 56, 125, 126, 141, 142, 67, 43, 131, 86,
123, 80, 133, 129, 144
}

Definition at line 639 of file cf3parse.c.

Referenced by yyparse().

◆ yytext

char* yytext
extern

Definition at line 789 of file cf3lex.c.

Referenced by fatal_yyerror(), yyget_text(), yylex(), and yyparse().

◆ yytranslate

const yytype_uint8 yytranslate[]
static
Initial value:
=
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13, 14, 2, 2, 15, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 18,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 17, 2, 16, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12
}

Definition at line 475 of file cf3parse.c.