> ## Documentation Index
> Fetch the complete documentation index at: https://thrackle.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# parseRuleSyntax

> **parseRuleSyntax**(`syntax`, `indexMap`, `foreignCallNameToID`, `encodedValues`, `additionalForeignCalls`, `additionalEffectForeignCalls`): [`RuleDefinition`](../../../modules/types/type-aliases/RuleDefinition)

Parses the rule syntax and converts it into a raw instruction set.

## Parameters

| Parameter                      | Type                                                                                        | Description                                        |
| ------------------------------ | ------------------------------------------------------------------------------------------- | -------------------------------------------------- |
| `syntax`                       | [`RuleJSON`](../../../modules/validation/interfaces/RuleJSON)                               | The JSON representation of the rule syntax.        |
| `indexMap`                     | [`trackerIndexNameMapping`](../../../modules/types/type-aliases/trackerIndexNameMapping)\[] | A mapping of tracker IDs to their names and types. |
| `foreignCallNameToID`          | [`FCNameToID`](../../../modules/types/type-aliases/FCNameToID)\[]                           | A mapping of foreign call names to their IDs.      |
| `encodedValues`                | `string`                                                                                    | -                                                  |
| `additionalForeignCalls`       | `string`\[]                                                                                 | -                                                  |
| `additionalEffectForeignCalls` | `string`\[]                                                                                 | -                                                  |

## Returns

[`RuleDefinition`](../../../modules/types/type-aliases/RuleDefinition)

An object containing the instruction set, raw data, positive effects, negative effects,
placeholders, and effect placeholders.

## Defined in

[src/parsing/parser.ts:81](https://github.com/forte-service-company-ltd/forte-rules-engine-sdk/blob/5aad4d7c3c8cc91280e4449c17ac8ea31219fbed/src/parsing/parser.ts#L81)
