# Earley CFG Nullable Left-Recursive Packed Parse Forest

> Earley CFG Nullable Left-Recursive Packed Parse Forest is a paid API for AI agents from detect.halowerk.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-11-04).

Runs the Earley parsing algorithm on a supplied word and context-free grammar (supporting nullable and left-recursive rules) to recover recognition status and the complete finite packed parse forest.

## Facts

- Endpoint: POST https://detect.halowerk.com/v1/F-TD2000-DATASTRUCTURES-10/earley-cfg-nullable-leftrecursive-packed-parse-forest?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-04
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/earley-cfg-nullable-left-recursive-packed-parse-forest-82889136
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_y2Xyl1siEhHxMBZmlRGAb

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability earley-cfg-nullable-left-recursive-packed-parse-forest-82889136 -d '<json body>'
```

Example prompt: Parse the word ['a','b','a'] against my left-recursive CFG with 3 nonterminals whose productions are [[0,1,0],[0,2],[1,3]] starting at nonterminal 0, and return the complete packed parse forest and whether the word is recognized.

## When to prefer this

Use this endpoint when you need to parse input against a context-free grammar that is nullable, left-recursive, or ambiguous — cases where LL(1), LR, or recursive-descent parsers fail. It is the right choice when you need the complete packed parse forest (all derivations) rather than a single parse tree, and when you cannot restrict your grammar to meet LL or LR constraints.

## Known failure modes

- Invalid grammar encoding (malformed productions array or out-of-range nonterminal indices) returns an error
- Word exceeds maxItems limit of 512 tokens
- Productions array exceeds maxItems limit of 512
- Malformed claim object causes schema validation failure
- Grammar is well-formed but word is not in the language — returns recognition failure with empty forest

## How this service works

Recover recognition and the complete finite or cyclic packed parse forest for a supplied word and nullable/left-recursive context-free grammar, rather than LL1 prediction or language-finiteness checks.

## Output

Returns the recognition result (whether the input word is accepted) and the complete finite packed parse forest representing all valid parse derivations of the word under the supplied context-free grammar, including support for ambiguous, nullable, and left-recursive grammars.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "artifact": {
   "type": "object",
   "$defs": {
    "json": {
     "anyOf": [
      {
       "type": "null"
      },
      {
       "type": "boolean"
      },
      {
       "type": "number"
      },
      {
       "type": "string",
       "maxLength": 6000
      },
      {
       "type": "array",
       "items": {
        "$ref": "#/properties/input/properties/body/properties/artifact/%24defs/json"
       },
       "maxItems": 512
      },
      {
       "type": "object",
       "maxProperties": 128,
       "additionalProperties": {
        "$ref": "#/properties/input/properties/body/properties/artifact/%24defs/json"
       }
      }
     ]
    }
   },
   "required": [
    "earleyForest"
   ],
   "properties": {
    "earleyForest": {
     "type": "object",
     "required": [
      "data",
      "claim"
     ],
     "properties": {
      "data": {
       "type": "object",
       "required": [
        "nonterminals",
        "productions",
        "start",
        "word"
       ],
       "properties": {
        "word": {
         "type": "array",
         "items": {
          "$ref": "#/properties/input/properties/body/properties/artifact/%24defs/json"
         },
         "maxItems": 512
        },
        "start": {
         "type": "number"
        },
        "productions": {
         "type": "array",
         "items": {
          "$ref": "#/properties/input/properties/body/properties/artifact/%24defs/json"
         },
         "maxItems": 512
        },
        "nonterminals": {
         "type": "number"
        }
       },
       "additionalProperties": false
      },
      "claim": {
       "$ref": "#/properties/input/properties/body/properties/artifact/%24defs/json"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/earley-cfg-nullable-left-recursive-packed-parse-forest-82889136/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from detect.halowerk.com](https://www.zero.xyz/host/detect.halowerk.com/llms.txt)
