--- /dev/null
+/*\r
+ * Mesa 3-D graphics library\r
+ * Version: 6.3\r
+ *\r
+ * Copyright (C) 2005 Brian Paul All Rights Reserved.\r
+ *\r
+ * Permission is hereby granted, free of charge, to any person obtaining a\r
+ * copy of this software and associated documentation files (the "Software"),\r
+ * to deal in the Software without restriction, including without limitation\r
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,\r
+ * and/or sell copies of the Software, and to permit persons to whom the\r
+ * Software is furnished to do so, subject to the following conditions:\r
+ *\r
+ * The above copyright notice and this permission notice shall be included\r
+ * in all copies or substantial portions of the Software.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS\r
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\r
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN\r
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+ */\r
+\r
+/**\r
+ * \file slang_version.syn\r
+ * slang #version directive syntax\r
+ * \author Michal Krol\r
+ */\r
+\r
+.syntax version_directive;\r
+\r
+version_directive\r
+ version_directive_1 .and .loop version_directive_2;\r
+version_directive_1\r
+ prior_optional_spaces .and optional_version_directive .and .true .emit $;\r
+version_directive_2\r
+ prior_optional_spaces .and version_directive_body .and .true .emit $;\r
+\r
+optional_version_directive\r
+ version_directive_body .or .true .emit 10 .emit 1;\r
+\r
+version_directive_body\r
+ '#' .and optional_space .and "version" .and space .and version_number .and optional_space .and\r
+ new_line;\r
+\r
+version_number\r
+ version_number_110;\r
+\r
+version_number_110\r
+ leading_zeroes .and "110" .emit 10 .emit 1;\r
+\r
+leading_zeroes\r
+ .loop zero;\r
+\r
+zero\r
+ '0';\r
+\r
+space\r
+ single_space .and .loop single_space;\r
+\r
+optional_space\r
+ .loop single_space;\r
+\r
+single_space\r
+ ' ' .or '\t';\r
+\r
+prior_optional_spaces\r
+ .loop prior_space;\r
+\r
+prior_space\r
+ c_style_comment_block .or cpp_style_comment_block .or space .or new_line;\r
+\r
+c_style_comment_block\r
+ '/' .and '*' .and c_style_comment_rest;\r
+\r
+c_style_comment_rest\r
+ .loop c_style_comment_char_no_star .and c_style_comment_rest_1;\r
+c_style_comment_rest_1\r
+ c_style_comment_end .or c_style_comment_rest_2;\r
+c_style_comment_rest_2\r
+ '*' .and c_style_comment_rest;\r
+\r
+c_style_comment_char_no_star\r
+ '\x2B'-'\xFF' .or '\x01'-'\x29';\r
+\r
+c_style_comment_end\r
+ '*' .and '/';\r
+\r
+cpp_style_comment_block\r
+ '/' .and '/' .and cpp_style_comment_block_1;\r
+cpp_style_comment_block_1\r
+ cpp_style_comment_block_2 .or cpp_style_comment_block_3;\r
+cpp_style_comment_block_2\r
+ .loop cpp_style_comment_char .and new_line;\r
+cpp_style_comment_block_3\r
+ .loop cpp_style_comment_char;\r
+\r
+cpp_style_comment_char\r
+ '\x0E'-'\xFF' .or '\x01'-'\x09' .or '\x0B'-'\x0C';\r
+\r
+new_line\r
+ cr_lf .or lf_cr .or '\n' .or '\r';\r
+\r
+cr_lf\r
+ '\r' .and '\n';\r
+\r
+lf_cr\r
+ '\n' .and '\r';\r
+\r
+.string __string_filter;\r
+\r
+__string_filter\r
+ .loop __identifier_char;\r
+\r
+__identifier_char\r
+ 'a'-'z' .or 'A'-'Z' .or '_' .or '0'-'9';\r
+\r
--- /dev/null
+".syntax version_directive;\n"\r
+"version_directive\n"\r
+" version_directive_1 .and .loop version_directive_2;\n"\r
+"version_directive_1\n"\r
+" prior_optional_spaces .and optional_version_directive .and .true .emit $;\n"\r
+"version_directive_2\n"\r
+" prior_optional_spaces .and version_directive_body .and .true .emit $;\n"\r
+"optional_version_directive\n"\r
+" version_directive_body .or .true .emit 10 .emit 1;\n"\r
+"version_directive_body\n"\r
+" '#' .and optional_space .and \"version\" .and space .and version_number .and optional_space .and\n"\r
+" new_line;\n"\r
+"version_number\n"\r
+" version_number_110;\n"\r
+"version_number_110\n"\r
+" leading_zeroes .and \"110\" .emit 10 .emit 1;\n"\r
+"leading_zeroes\n"\r
+" .loop zero;\n"\r
+"zero\n"\r
+" '0';\n"\r
+"space\n"\r
+" single_space .and .loop single_space;\n"\r
+"optional_space\n"\r
+" .loop single_space;\n"\r
+"single_space\n"\r
+" ' ' .or '\\t';\n"\r
+"prior_optional_spaces\n"\r
+" .loop prior_space;\n"\r
+"prior_space\n"\r
+" c_style_comment_block .or cpp_style_comment_block .or space .or new_line;\n"\r
+"c_style_comment_block\n"\r
+" '/' .and '*' .and c_style_comment_rest;\n"\r
+"c_style_comment_rest\n"\r
+" .loop c_style_comment_char_no_star .and c_style_comment_rest_1;\n"\r
+"c_style_comment_rest_1\n"\r
+" c_style_comment_end .or c_style_comment_rest_2;\n"\r
+"c_style_comment_rest_2\n"\r
+" '*' .and c_style_comment_rest;\n"\r
+"c_style_comment_char_no_star\n"\r
+" '\\x2B'-'\\xFF' .or '\\x01'-'\\x29';\n"\r
+"c_style_comment_end\n"\r
+" '*' .and '/';\n"\r
+"cpp_style_comment_block\n"\r
+" '/' .and '/' .and cpp_style_comment_block_1;\n"\r
+"cpp_style_comment_block_1\n"\r
+" cpp_style_comment_block_2 .or cpp_style_comment_block_3;\n"\r
+"cpp_style_comment_block_2\n"\r
+" .loop cpp_style_comment_char .and new_line;\n"\r
+"cpp_style_comment_block_3\n"\r
+" .loop cpp_style_comment_char;\n"\r
+"cpp_style_comment_char\n"\r
+" '\\x0E'-'\\xFF' .or '\\x01'-'\\x09' .or '\\x0B'-'\\x0C';\n"\r
+"new_line\n"\r
+" cr_lf .or lf_cr .or '\\n' .or '\\r';\n"\r
+"cr_lf\n"\r
+" '\\r' .and '\\n';\n"\r
+"lf_cr\n"\r
+" '\\n' .and '\\r';\n"\r
+".string __string_filter;\n"\r
+"__string_filter\n"\r
+" .loop __identifier_char;\n"\r
+"__identifier_char\n"\r
+" 'a'-'z' .or 'A'-'Z' .or '_' .or '0'-'9';\n"\r
+""
\ No newline at end of file