{
  "name": "hcl",
  "rules": {
    "config_file": {
      "type": "CHOICE",
      "members": [
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SYMBOL",
              "name": "body"
            },
            {
              "type": "SYMBOL",
              "name": "object"
            }
          ]
        },
        {
          "type": "BLANK"
        }
      ]
    },
    "body": {
      "type": "REPEAT1",
      "content": {
        "type": "CHOICE",
        "members": [
          {
            "type": "SYMBOL",
            "name": "attribute"
          },
          {
            "type": "SYMBOL",
            "name": "block"
          }
        ]
      }
    },
    "attribute": {
      "type": "SEQ",
      "members": [
        {
          "type": "SYMBOL",
          "name": "identifier"
        },
        {
          "type": "STRING",
          "value": "="
        },
        {
          "type": "SYMBOL",
          "name": "expression"
        }
      ]
    },
    "block": {
      "type": "SEQ",
      "members": [
        {
          "type": "SYMBOL",
          "name": "identifier"
        },
        {
          "type": "REPEAT",
          "content": {
            "type": "CHOICE",
            "members": [
              {
                "type": "SYMBOL",
                "name": "string_lit"
              },
              {
                "type": "SYMBOL",
                "name": "identifier"
              }
            ]
          }
        },
        {
          "type": "SYMBOL",
          "name": "_block_start"
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SYMBOL",
              "name": "body"
            },
            {
              "type": "BLANK"
            }
          ]
        },
        {
          "type": "SYMBOL",
          "name": "_block_end"
        }
      ]
    },
    "_block_start": {
      "type": "STRING",
      "value": "{"
    },
    "_block_end": {
      "type": "STRING",
      "value": "}"
    },
    "identifier": {
      "type": "TOKEN",
      "content": {
        "type": "SEQ",
        "members": [
          {
            "type": "CHOICE",
            "members": [
              {
                "type": "PATTERN",
                "value": "\\p{ID_Start}"
              },
              {
                "type": "STRING",
                "value": "_"
              }
            ]
          },
          {
            "type": "REPEAT",
            "content": {
              "type": "CHOICE",
              "members": [
                {
                  "type": "PATTERN",
                  "value": "\\p{ID_Continue}"
                },
                {
                  "type": "STRING",
                  "value": "-"
                }
              ]
            }
          }
        ]
      }
    },
    "expression": {
      "type": "PREC_RIGHT",
      "value": 0,
      "content": {
        "type": "CHOICE",
        "members": [
          {
            "type": "SYMBOL",
            "name": "_expr_term"
          },
          {
            "type": "SYMBOL",
            "name": "conditional"
          }
        ]
      }
    },
    "_expr_term": {
      "type": "CHOICE",
      "members": [
        {
          "type": "SYMBOL",
          "name": "literal_value"
        },
        {
          "type": "SYMBOL",
          "name": "template_expr"
        },
        {
          "type": "SYMBOL",
          "name": "collection_value"
        },
        {
          "type": "SYMBOL",
          "name": "variable_expr"
        },
        {
          "type": "SYMBOL",
          "name": "function_call"
        },
        {
          "type": "SYMBOL",
          "name": "for_expr"
        },
        {
          "type": "SYMBOL",
          "name": "operation"
        },
        {
          "type": "SEQ",
          "members": [
            {
              "type": "SYMBOL",
              "name": "_expr_term"
            },
            {
              "type": "SYMBOL",
              "name": "index"
            }
          ]
        },
        {
          "type": "SEQ",
          "members": [
            {
              "type": "SYMBOL",
              "name": "_expr_term"
            },
            {
              "type": "SYMBOL",
              "name": "get_attr"
            }
          ]
        },
        {
          "type": "SEQ",
          "members": [
            {
              "type": "SYMBOL",
              "name": "_expr_term"
            },
            {
              "type": "SYMBOL",
              "name": "splat"
            }
          ]
        },
        {
          "type": "SEQ",
          "members": [
            {
              "type": "STRING",
              "value": "("
            },
            {
              "type": "SYMBOL",
              "name": "expression"
            },
            {
              "type": "STRING",
              "value": ")"
            }
          ]
        }
      ]
    },
    "literal_value": {
      "type": "CHOICE",
      "members": [
        {
          "type": "SYMBOL",
          "name": "numeric_lit"
        },
        {
          "type": "SYMBOL",
          "name": "bool_lit"
        },
        {
          "type": "SYMBOL",
          "name": "null_lit"
        },
        {
          "type": "SYMBOL",
          "name": "string_lit"
        }
      ]
    },
    "numeric_lit": {
      "type": "CHOICE",
      "members": [
        {
          "type": "PATTERN",
          "value": "[0-9]+(\\.[0-9]+([eE][-+]?[0-9]+)?)?"
        },
        {
          "type": "PATTERN",
          "value": "0x[0-9a-zA-Z]+"
        }
      ]
    },
    "bool_lit": {
      "type": "CHOICE",
      "members": [
        {
          "type": "STRING",
          "value": "true"
        },
        {
          "type": "STRING",
          "value": "false"
        }
      ]
    },
    "null_lit": {
      "type": "STRING",
      "value": "null"
    },
    "string_lit": {
      "type": "PREC",
      "value": 2,
      "content": {
        "type": "SEQ",
        "members": [
          {
            "type": "SYMBOL",
            "name": "_quoted_template_start"
          },
          {
            "type": "SYMBOL",
            "name": "template_literal"
          },
          {
            "type": "SYMBOL",
            "name": "_quoted_template_end"
          }
        ]
      }
    },
    "collection_value": {
      "type": "CHOICE",
      "members": [
        {
          "type": "SYMBOL",
          "name": "tuple"
        },
        {
          "type": "SYMBOL",
          "name": "object"
        }
      ]
    },
    "_comma": {
      "type": "STRING",
      "value": ","
    },
    "tuple": {
      "type": "SEQ",
      "members": [
        {
          "type": "SYMBOL",
          "name": "_tuple_start"
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SYMBOL",
              "name": "_tuple_elems"
            },
            {
              "type": "BLANK"
            }
          ]
        },
        {
          "type": "SYMBOL",
          "name": "_tuple_end"
        }
      ]
    },
    "_tuple_start": {
      "type": "STRING",
      "value": "["
    },
    "_tuple_end": {
      "type": "STRING",
      "value": "]"
    },
    "_tuple_elems": {
      "type": "SEQ",
      "members": [
        {
          "type": "SYMBOL",
          "name": "expression"
        },
        {
          "type": "REPEAT",
          "content": {
            "type": "SEQ",
            "members": [
              {
                "type": "SYMBOL",
                "name": "_comma"
              },
              {
                "type": "SYMBOL",
                "name": "expression"
              }
            ]
          }
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SYMBOL",
              "name": "_comma"
            },
            {
              "type": "BLANK"
            }
          ]
        }
      ]
    },
    "object": {
      "type": "SEQ",
      "members": [
        {
          "type": "SYMBOL",
          "name": "_object_start"
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SYMBOL",
              "name": "_object_elems"
            },
            {
              "type": "BLANK"
            }
          ]
        },
        {
          "type": "SYMBOL",
          "name": "_object_end"
        }
      ]
    },
    "_object_start": {
      "type": "STRING",
      "value": "{"
    },
    "_object_end": {
      "type": "STRING",
      "value": "}"
    },
    "_object_elems": {
      "type": "SEQ",
      "members": [
        {
          "type": "SYMBOL",
          "name": "object_elem"
        },
        {
          "type": "REPEAT",
          "content": {
            "type": "SEQ",
            "members": [
              {
                "type": "CHOICE",
                "members": [
                  {
                    "type": "SYMBOL",
                    "name": "_comma"
                  },
                  {
                    "type": "BLANK"
                  }
                ]
              },
              {
                "type": "SYMBOL",
                "name": "object_elem"
              }
            ]
          }
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SYMBOL",
              "name": "_comma"
            },
            {
              "type": "BLANK"
            }
          ]
        }
      ]
    },
    "object_elem": {
      "type": "SEQ",
      "members": [
        {
          "type": "SYMBOL",
          "name": "expression"
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "STRING",
              "value": "="
            },
            {
              "type": "STRING",
              "value": ":"
            }
          ]
        },
        {
          "type": "SYMBOL",
          "name": "expression"
        }
      ]
    },
    "index": {
      "type": "CHOICE",
      "members": [
        {
          "type": "SYMBOL",
          "name": "new_index"
        },
        {
          "type": "SYMBOL",
          "name": "legacy_index"
        }
      ]
    },
    "new_index": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "["
        },
        {
          "type": "SYMBOL",
          "name": "expression"
        },
        {
          "type": "STRING",
          "value": "]"
        }
      ]
    },
    "legacy_index": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "."
        },
        {
          "type": "PATTERN",
          "value": "[0-9]+"
        }
      ]
    },
    "get_attr": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "."
        },
        {
          "type": "SYMBOL",
          "name": "identifier"
        }
      ]
    },
    "splat": {
      "type": "CHOICE",
      "members": [
        {
          "type": "SYMBOL",
          "name": "attr_splat"
        },
        {
          "type": "SYMBOL",
          "name": "full_splat"
        }
      ]
    },
    "attr_splat": {
      "type": "PREC_RIGHT",
      "value": 0,
      "content": {
        "type": "SEQ",
        "members": [
          {
            "type": "STRING",
            "value": ".*"
          },
          {
            "type": "REPEAT",
            "content": {
              "type": "CHOICE",
              "members": [
                {
                  "type": "SYMBOL",
                  "name": "get_attr"
                },
                {
                  "type": "SYMBOL",
                  "name": "index"
                }
              ]
            }
          }
        ]
      }
    },
    "full_splat": {
      "type": "PREC_RIGHT",
      "value": 0,
      "content": {
        "type": "SEQ",
        "members": [
          {
            "type": "STRING",
            "value": "[*]"
          },
          {
            "type": "REPEAT",
            "content": {
              "type": "CHOICE",
              "members": [
                {
                  "type": "SYMBOL",
                  "name": "get_attr"
                },
                {
                  "type": "SYMBOL",
                  "name": "index"
                }
              ]
            }
          }
        ]
      }
    },
    "for_expr": {
      "type": "CHOICE",
      "members": [
        {
          "type": "SYMBOL",
          "name": "for_tuple_expr"
        },
        {
          "type": "SYMBOL",
          "name": "for_object_expr"
        }
      ]
    },
    "for_tuple_expr": {
      "type": "SEQ",
      "members": [
        {
          "type": "SYMBOL",
          "name": "_tuple_start"
        },
        {
          "type": "SYMBOL",
          "name": "for_intro"
        },
        {
          "type": "SYMBOL",
          "name": "expression"
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SYMBOL",
              "name": "for_cond"
            },
            {
              "type": "BLANK"
            }
          ]
        },
        {
          "type": "SYMBOL",
          "name": "_tuple_end"
        }
      ]
    },
    "for_object_expr": {
      "type": "SEQ",
      "members": [
        {
          "type": "SYMBOL",
          "name": "_object_start"
        },
        {
          "type": "SYMBOL",
          "name": "for_intro"
        },
        {
          "type": "SYMBOL",
          "name": "expression"
        },
        {
          "type": "STRING",
          "value": "=>"
        },
        {
          "type": "SYMBOL",
          "name": "expression"
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SYMBOL",
              "name": "ellipsis"
            },
            {
              "type": "BLANK"
            }
          ]
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SYMBOL",
              "name": "for_cond"
            },
            {
              "type": "BLANK"
            }
          ]
        },
        {
          "type": "SYMBOL",
          "name": "_object_end"
        }
      ]
    },
    "for_intro": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "for"
        },
        {
          "type": "SYMBOL",
          "name": "identifier"
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SEQ",
              "members": [
                {
                  "type": "STRING",
                  "value": ","
                },
                {
                  "type": "SYMBOL",
                  "name": "identifier"
                }
              ]
            },
            {
              "type": "BLANK"
            }
          ]
        },
        {
          "type": "STRING",
          "value": "in"
        },
        {
          "type": "SYMBOL",
          "name": "expression"
        },
        {
          "type": "STRING",
          "value": ":"
        }
      ]
    },
    "for_cond": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "if"
        },
        {
          "type": "SYMBOL",
          "name": "expression"
        }
      ]
    },
    "variable_expr": {
      "type": "PREC_RIGHT",
      "value": 0,
      "content": {
        "type": "SYMBOL",
        "name": "identifier"
      }
    },
    "function_call": {
      "type": "SEQ",
      "members": [
        {
          "type": "SYMBOL",
          "name": "identifier"
        },
        {
          "type": "SYMBOL",
          "name": "_function_call_start"
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SYMBOL",
              "name": "function_arguments"
            },
            {
              "type": "BLANK"
            }
          ]
        },
        {
          "type": "SYMBOL",
          "name": "_function_call_end"
        }
      ]
    },
    "_function_call_start": {
      "type": "STRING",
      "value": "("
    },
    "_function_call_end": {
      "type": "STRING",
      "value": ")"
    },
    "function_arguments": {
      "type": "PREC_RIGHT",
      "value": 0,
      "content": {
        "type": "SEQ",
        "members": [
          {
            "type": "SYMBOL",
            "name": "expression"
          },
          {
            "type": "REPEAT",
            "content": {
              "type": "SEQ",
              "members": [
                {
                  "type": "SYMBOL",
                  "name": "_comma"
                },
                {
                  "type": "SYMBOL",
                  "name": "expression"
                }
              ]
            }
          },
          {
            "type": "CHOICE",
            "members": [
              {
                "type": "CHOICE",
                "members": [
                  {
                    "type": "STRING",
                    "value": ","
                  },
                  {
                    "type": "SYMBOL",
                    "name": "ellipsis"
                  }
                ]
              },
              {
                "type": "BLANK"
              }
            ]
          }
        ]
      }
    },
    "ellipsis": {
      "type": "TOKEN",
      "content": {
        "type": "STRING",
        "value": "..."
      }
    },
    "conditional": {
      "type": "PREC_LEFT",
      "value": 0,
      "content": {
        "type": "SEQ",
        "members": [
          {
            "type": "SYMBOL",
            "name": "expression"
          },
          {
            "type": "STRING",
            "value": "?"
          },
          {
            "type": "SYMBOL",
            "name": "expression"
          },
          {
            "type": "STRING",
            "value": ":"
          },
          {
            "type": "SYMBOL",
            "name": "expression"
          }
        ]
      }
    },
    "operation": {
      "type": "CHOICE",
      "members": [
        {
          "type": "SYMBOL",
          "name": "unary_operation"
        },
        {
          "type": "SYMBOL",
          "name": "binary_operation"
        }
      ]
    },
    "unary_operation": {
      "type": "PREC_LEFT",
      "value": 7,
      "content": {
        "type": "SEQ",
        "members": [
          {
            "type": "CHOICE",
            "members": [
              {
                "type": "STRING",
                "value": "-"
              },
              {
                "type": "STRING",
                "value": "!"
              }
            ]
          },
          {
            "type": "SYMBOL",
            "name": "_expr_term"
          }
        ]
      }
    },
    "binary_operation": {
      "type": "CHOICE",
      "members": [
        {
          "type": "PREC_LEFT",
          "value": 6,
          "content": {
            "type": "SEQ",
            "members": [
              {
                "type": "SYMBOL",
                "name": "_expr_term"
              },
              {
                "type": "CHOICE",
                "members": [
                  {
                    "type": "STRING",
                    "value": "*"
                  },
                  {
                    "type": "STRING",
                    "value": "/"
                  },
                  {
                    "type": "STRING",
                    "value": "%"
                  }
                ]
              },
              {
                "type": "SYMBOL",
                "name": "_expr_term"
              }
            ]
          }
        },
        {
          "type": "PREC_LEFT",
          "value": 5,
          "content": {
            "type": "SEQ",
            "members": [
              {
                "type": "SYMBOL",
                "name": "_expr_term"
              },
              {
                "type": "CHOICE",
                "members": [
                  {
                    "type": "STRING",
                    "value": "+"
                  },
                  {
                    "type": "STRING",
                    "value": "-"
                  }
                ]
              },
              {
                "type": "SYMBOL",
                "name": "_expr_term"
              }
            ]
          }
        },
        {
          "type": "PREC_LEFT",
          "value": 4,
          "content": {
            "type": "SEQ",
            "members": [
              {
                "type": "SYMBOL",
                "name": "_expr_term"
              },
              {
                "type": "CHOICE",
                "members": [
                  {
                    "type": "STRING",
                    "value": ">"
                  },
                  {
                    "type": "STRING",
                    "value": ">="
                  },
                  {
                    "type": "STRING",
                    "value": "<"
                  },
                  {
                    "type": "STRING",
                    "value": "<="
                  }
                ]
              },
              {
                "type": "SYMBOL",
                "name": "_expr_term"
              }
            ]
          }
        },
        {
          "type": "PREC_LEFT",
          "value": 3,
          "content": {
            "type": "SEQ",
            "members": [
              {
                "type": "SYMBOL",
                "name": "_expr_term"
              },
              {
                "type": "CHOICE",
                "members": [
                  {
                    "type": "STRING",
                    "value": "=="
                  },
                  {
                    "type": "STRING",
                    "value": "!="
                  }
                ]
              },
              {
                "type": "SYMBOL",
                "name": "_expr_term"
              }
            ]
          }
        },
        {
          "type": "PREC_LEFT",
          "value": 2,
          "content": {
            "type": "SEQ",
            "members": [
              {
                "type": "SYMBOL",
                "name": "_expr_term"
              },
              {
                "type": "CHOICE",
                "members": [
                  {
                    "type": "STRING",
                    "value": "&&"
                  }
                ]
              },
              {
                "type": "SYMBOL",
                "name": "_expr_term"
              }
            ]
          }
        },
        {
          "type": "PREC_LEFT",
          "value": 1,
          "content": {
            "type": "SEQ",
            "members": [
              {
                "type": "SYMBOL",
                "name": "_expr_term"
              },
              {
                "type": "CHOICE",
                "members": [
                  {
                    "type": "STRING",
                    "value": "||"
                  }
                ]
              },
              {
                "type": "SYMBOL",
                "name": "_expr_term"
              }
            ]
          }
        }
      ]
    },
    "template_expr": {
      "type": "CHOICE",
      "members": [
        {
          "type": "SYMBOL",
          "name": "quoted_template"
        },
        {
          "type": "SYMBOL",
          "name": "heredoc_template"
        }
      ]
    },
    "quoted_template": {
      "type": "PREC",
      "value": 1,
      "content": {
        "type": "SEQ",
        "members": [
          {
            "type": "SYMBOL",
            "name": "_quoted_template_start"
          },
          {
            "type": "CHOICE",
            "members": [
              {
                "type": "REPEAT",
                "content": {
                  "type": "CHOICE",
                  "members": [
                    {
                      "type": "SYMBOL",
                      "name": "template_literal"
                    },
                    {
                      "type": "SYMBOL",
                      "name": "template_interpolation"
                    },
                    {
                      "type": "SYMBOL",
                      "name": "template_directive"
                    }
                  ]
                }
              },
              {
                "type": "BLANK"
              }
            ]
          },
          {
            "type": "SYMBOL",
            "name": "_quoted_template_end"
          }
        ]
      }
    },
    "heredoc_template": {
      "type": "SEQ",
      "members": [
        {
          "type": "SYMBOL",
          "name": "heredoc_start"
        },
        {
          "type": "SYMBOL",
          "name": "heredoc_identifier"
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "REPEAT",
              "content": {
                "type": "CHOICE",
                "members": [
                  {
                    "type": "SYMBOL",
                    "name": "template_literal"
                  },
                  {
                    "type": "SYMBOL",
                    "name": "template_interpolation"
                  },
                  {
                    "type": "SYMBOL",
                    "name": "template_directive"
                  }
                ]
              }
            },
            {
              "type": "BLANK"
            }
          ]
        },
        {
          "type": "SYMBOL",
          "name": "heredoc_identifier"
        }
      ]
    },
    "heredoc_start": {
      "type": "CHOICE",
      "members": [
        {
          "type": "STRING",
          "value": "<<"
        },
        {
          "type": "STRING",
          "value": "<<-"
        }
      ]
    },
    "strip_marker": {
      "type": "STRING",
      "value": "~"
    },
    "template_literal": {
      "type": "PREC_RIGHT",
      "value": 0,
      "content": {
        "type": "REPEAT1",
        "content": {
          "type": "SYMBOL",
          "name": "_template_literal_chunk"
        }
      }
    },
    "template_interpolation": {
      "type": "SEQ",
      "members": [
        {
          "type": "SYMBOL",
          "name": "_template_interpolation_start"
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SYMBOL",
              "name": "strip_marker"
            },
            {
              "type": "BLANK"
            }
          ]
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SYMBOL",
              "name": "expression"
            },
            {
              "type": "BLANK"
            }
          ]
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SYMBOL",
              "name": "strip_marker"
            },
            {
              "type": "BLANK"
            }
          ]
        },
        {
          "type": "SYMBOL",
          "name": "_template_interpolation_end"
        }
      ]
    },
    "template_directive": {
      "type": "CHOICE",
      "members": []
    },
    "comment": {
      "type": "TOKEN",
      "content": {
        "type": "CHOICE",
        "members": [
          {
            "type": "SEQ",
            "members": [
              {
                "type": "STRING",
                "value": "#"
              },
              {
                "type": "PATTERN",
                "value": ".*"
              }
            ]
          },
          {
            "type": "SEQ",
            "members": [
              {
                "type": "STRING",
                "value": "//"
              },
              {
                "type": "PATTERN",
                "value": ".*"
              }
            ]
          },
          {
            "type": "SEQ",
            "members": [
              {
                "type": "STRING",
                "value": "/*"
              },
              {
                "type": "PATTERN",
                "value": "[^*]*\\*+([^/*][^*]*\\*+)*"
              },
              {
                "type": "STRING",
                "value": "/"
              }
            ]
          }
        ]
      }
    },
    "_whitespace": {
      "type": "TOKEN",
      "content": {
        "type": "PATTERN",
        "value": "\\s"
      }
    }
  },
  "extras": [
    {
      "type": "SYMBOL",
      "name": "comment"
    },
    {
      "type": "SYMBOL",
      "name": "_whitespace"
    }
  ],
  "conflicts": [],
  "precedences": [],
  "externals": [
    {
      "type": "SYMBOL",
      "name": "_quoted_template_start"
    },
    {
      "type": "SYMBOL",
      "name": "_quoted_template_end"
    },
    {
      "type": "SYMBOL",
      "name": "_template_literal_chunk"
    },
    {
      "type": "SYMBOL",
      "name": "_template_interpolation_start"
    },
    {
      "type": "SYMBOL",
      "name": "_template_interpolation_end"
    },
    {
      "type": "SYMBOL",
      "name": "heredoc_identifier"
    }
  ],
  "inline": [],
  "supertypes": []
}

