Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: GLSL grammar specs

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2009
    Location
    Germany
    Posts
    5

    GLSL grammar specs

    Hello,
    I've been searching for a text version of the grammar part at the back of the GLSL specs and haven't been able to find anything.

    I want to look into creating an ANTLR GLSL grammar and copying the grammar out of the PDF is not easily possible. (ANTLR's grammars are quite similar to normal BNF syntax if no actions are specified.)

    It would be awesome if someone who has the source of the GLSL specs could release/copy the grammar part in the original form.

    I think this would lessen the hurdle for people who want to create tools that work with GLSL.

    Thanks in advance.
    Best regards,
    Andreas

  2. #2
    Member Regular Contributor
    Join Date
    Oct 2006
    Posts
    349

    Re: GLSL grammar specs

    Mesa3d contains an open source GLSL compiler.

    Edit: sorry, I thought you simply needed the source for a compiler. I agree, it would be nice to have the grammar in a nicely defined fashion.

  3. #3
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    2,891

    Re: GLSL grammar specs

    Quote Originally Posted by BlackHC
    I've been searching for a text version of the grammar part at the back of the GLSL specs and haven't been able to find anything
    You can do a pdftohtml (part of the poppler-tools [formerly xpdf]), and then cut-n-paste from there. If you want the HTML form, PM me and I'll mail it to you.

  4. #4
    Junior Member Newbie
    Join Date
    Jul 2009
    Location
    Germany
    Posts
    5

    Re: GLSL grammar specs

    Hi,
    thanks for your replies (I was busy with uni all week). I've looked at the Mesa source and they are using their own specification language it seems, so it's not straight forward to port.
    I'm going to try pdftohtml next and if it's okay I'm also going to upload the grammar as text file.
    Cheers,
    Andreas

  5. #5
    Junior Member Newbie
    Join Date
    Jul 2009
    Location
    Germany
    Posts
    5

    Re: GLSL grammar specs

    Okay, a late update: I've tried pdftohtml and it didn't work very well.
    I've decided not to use a GLSL grammar for now but more general text parsing rules in my project.
    Thanks for your help.
    Cheers,
    Andreas

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •