2 * Program: pgn-extract: a Portable Game Notation (PGN) extractor.
3 * Copyright (C) 1994-2014 David Barnes
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 1, or (at your option)
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 * David Barnes may be contacted as D.J.Barnes@kent.ac.uk
19 * http://www.cs.kent.ac.uk/people/staff/djb/
23 /* Define a type for lexical classification of tokens.
24 * Not all of these values are returned to the parser.
27 /* The first section of tokens contains those that are
28 * returned to the parser as complete token identifications.
30 EOF_TOKEN, TAG, STRING, COMMENT, NAG,
31 CHECK_SYMBOL, MOVE_NUMBER, RAV_START, RAV_END,
32 MOVE, TERMINATING_RESULT,
33 /* The remaining tokens are those that are used to
34 * perform the identification. They are not handled by
37 WHITESPACE, TAG_START, TAG_END, DOUBLE_QUOTE,
38 COMMENT_START, COMMENT_END, ANNOTATE,
39 DOT, PERCENT, ESCAPE, ALPHA, DIGIT,
40 STAR, DASH, EOS, OPERATOR, NO_TOKEN, ERROR_TOKEN
44 /* This string is used to retain tag and result information. */
46 /* Move information. */
50 Variation *variation_details;
52 /* An index into the Game_Header.Tags array for tag strings. */
56 extern YYSTYPE yylval;