<commit_before># openg-api

Represent and parse spec files from the OpenGL [registry][].

[registry]: http://www.opengl.org/registry/#specfiles

## Directory layout

- `spec-files` contains the `.spec` and `.tm` files provided by [opengl.org][].
- `results` contains modified `glext.h` file. This is a `glext.h` header
  provided by [opengl.org][] with one line modified (the one with the last
  update date). It is used to ensure that opengl-api still generated the same
  results after refactoring.

[opengl.org]: http://www.opengl.org/registry/#specfiles

## Current state

`Text.OpenGL.Spec` has code to completely parse and represent the content of
`enumext.spec` (Probably there is not much left to do to support `enum.spec`.),
`gl.tm` and `gl.spec`.
The representations includes comments, blank lines, and passthru lines.

The representations are nearly feature complete, the only missing important bit
is the text defining the array size (in the description of function
parameters).

`Text.OpenGL.Api` has code to create higher-level data structures from the
one in Spec.

`Text.OpenGL.ExtHeader` is able to perfectly recreate the `glext.h` file
from the spec files.

`Text.OpenGL.GenChecks` is able to generate macros to call glGetError after
every GL commands.

## To do

- Offer a simplified representation of `[EnumLine]` with no comment, no blank
  line, no passthru, maybe references already resolved, and a single number
  format.
- Offer a parser for `enum.spec`.
- State in the doc that there is some doc about the spec file format at the
  good old Haskell-OpenGL [page][]!<commit_msg>Typos.<commit_after># opengl-api

Represent and parse spec files from the OpenGL [registry][].

[registry]: http://www.opengl.org/registry/#specfiles

## Directory layout

- `spec-files` contains the `.spec` and `.tm` files provided by [opengl.org][].
- `results` contains a modified `glext.h` file. This is a `glext.h` header
  provided by [opengl.org][] with one line modified (the one with the last
  update date). It is used to ensure that opengl-api still generates the same
  results after refactoring.

[opengl.org]: http://www.opengl.org/registry/#specfiles

## Current state

`Text.OpenGL.Spec` has code to completely parse and represent the content of
`enumext.spec` , `gl.tm` and `gl.spec`. (Probably there is not much left to do
to support `enum.spec`.) The representations includes comments, blank lines,
and passthru lines.

The representations are nearly feature complete, the only missing important bit
is the text defining the array size (in the description of function
parameters).

`Text.OpenGL.Api` has code to create higher-level data structures from the
one in `Text.OpenGL.Spec`.

`Text.OpenGL.ExtHeader` is able to perfectly recreate the `glext.h` file
from the spec files.

`Text.OpenGL.GenChecks` is able to generate macros to call glGetError after
every GL commands.

## To do

- Offer a simplified representation of `[EnumLine]` with no comment, no blank
  line, no passthru, maybe references already resolved, and a single number
  format.
- Offer a parser for `enum.spec`.
- State in the doc that there is some doc about the spec file format at the
  good old Haskell-OpenGL [page][]!
{'fraction_non_alphanumeric': 0.09107864470003109, 'fraction_numerical': 0.0, 'mean_word_length': 4.241042345276873, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3154423', 'n_tokens_mistral': 955, 'n_tokens_neox': 934, 'n_words': 430}