;;; case_expression-wy.el --- Generated parser support file

;; Copyright (C) 2013 Stephen Leake.  All Rights Reserved.

;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 3, or (at
;; your option) any later version.
;;
;; This software is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
;; General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.

(require 'wisi)
(require 'semantic/lex)
(require 'wisi-compile)

(defconst case_expression-wy--keyword-table
  (semantic-lex-make-keyword-table
   '(
    ("range" . RANGE)
    ("when" . WHEN)
    )
   nil)
  "Table of language keywords.")

(defconst case_expression-wy--token-table
  (semantic-lex-make-type-table
   '(
     ("line_comment"
      (COMMENT . "--")
     )
     ("punctuation"
      (DOT_DOT . "..")
      (EQUAL_GREATER . "=>")
      (TICK . "'")
     )
     ("symbol"
      (IDENTIFIER)
     )
    )
   nil)
  "Table of language tokens.")

(defconst case_expression-wy--parse-table
   (wisi-compile-grammar
   '((COMMENT DOT_DOT EQUAL_GREATER TICK IDENTIFIER RANGE WHEN )
     ((case_expression
       ((WHEN discrete_choice EQUAL_GREATER )
        (setq wisi-test-success t)))
      (choice_expression
       ((choice_relation )))
      (choice_relation
       ((factor_list )))
      (discrete_choice
       ((choice_expression ))
       ((range_nt )))
      (factor
       ((IDENTIFIER )))
      (factor_list
       ((factor )))
      (range_nt
       ((IDENTIFIER TICK RANGE ))
       ((factor_list DOT_DOT factor_list ))))
     [((default . error) (WHEN .  1))
      ((default . error) (IDENTIFIER .  4))
      ((default . error) ($EOI .  3))
      ((default . error) ($EOI . accept) (WHEN . accept) (RANGE . accept) (IDENTIFIER . accept) (TICK . accept) (EQUAL_GREATER . accept) (DOT_DOT . accept))
      ((default . error) (TICK .  13) (DOT_DOT . (factor . 0)) (EQUAL_GREATER . (factor . 0)))
      ((default . error) (EQUAL_GREATER . (discrete_choice . 0)))
      ((default . error) (EQUAL_GREATER . (choice_expression . 0)))
      ((default . error) (EQUAL_GREATER .  12))
      ((default . error) (DOT_DOT . (factor_list . 0)) (EQUAL_GREATER . (factor_list . 0)))
      ((default . error) (DOT_DOT .  11) (EQUAL_GREATER . (choice_relation . 0)))
      ((default . error) (EQUAL_GREATER . (discrete_choice . 1)))
      ((default . error) (IDENTIFIER .  15))
      ((default . error) ($EOI . (case_expression . 0)))
      ((default . error) (RANGE .  14))
      ((default . error) (EQUAL_GREATER . (range_nt . 0)))
      ((default . error) (EQUAL_GREATER . (factor . 0)))
      ((default . error) (EQUAL_GREATER . (range_nt . 1)))]
     [((case_expression . 2))
      ((choice_expression . 5)(choice_relation . 6)(discrete_choice . 7)(factor . 8)(factor_list . 9)(range_nt . 10))
      nil
      nil
      nil
      nil
      nil
      nil
      nil
      nil
      nil
      ((factor . 8)(factor_list . 16))
      nil
      nil
      nil
      nil
      nil]))
  "Parser table.")

(provide 'case_expression-wy)

;; end of file
