Smarts: Receive 'syntax error' in ASL hookscript
search cancel

Smarts: Receive 'syntax error' in ASL hookscript

book

Article ID: 303865

calendar_today

Updated On:

Products

VMware

Issue/Introduction

Symptoms:



 

The following error is seen in the server log file ([servername].log):

ASL-ERROR_YACC_ERROR-syntax error at line 4, next token is 'FreeMemory' 

 

Syntax error seen in ASL hookscript log:

ASL-ERROR_YACC_ERROR-syntax error at line 4, next token is 'FreeMemory' 



Environment

VMware Smart Assurance - SMARTS

Cause

This syntax error is seen when parentheses are used to access the objects property as in the following example:

remoteFree = remoteObj->(FreeMemory);  // this will produce syntax error.

Resolution

To resolve this issue, do not use parentheses when referencing a property. The proper syntax for doing this in ASL is as follows:

objRef->property = value;

The following example shows how to reference the FreeMemory object correctly:

remoteFree = remoteObj->FreeMemory;  // this is correct