~ubuntu-branches/ubuntu/karmic/cedet/karmic

« back to all changes in this revision

Viewing changes to semantic/semantic-grammar-wy.el

  • Committer: Bazaar Package Importer
  • Author(s): Masayuki Hatta (mhatta)
  • Date: 2006-10-17 05:51:33 UTC
  • mfrom: (2.1.1 dapper)
  • Revision ID: james.westby@ubuntu.com-20061017055133-dlxjfrmuevx5p7uw
Tags: 1:1.0pre3-6
Made Depends to Pre-Depends in cedet-common.  Let's see what happens.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 
35
35
;;; Code:
36
36
 
 
37
;;;
 
38
;;; [Debian] Dirty hack for compiling under XEmacs(21?)
 
39
;;;
 
40
(cond ((featurep 'xemacs)
 
41
       (define-lex-regex-analyzer semantic-grammar-lex-prologue
 
42
         "Detect and create a prologue token."
 
43
         "\\<%{"
 
44
         ;; Zing to the end of this brace block.
 
45
         (semantic-lex-push-token
 
46
          (semantic-lex-token
 
47
           'PROLOGUE (point)
 
48
           (save-excursion
 
49
             (semantic-lex-unterminated-syntax-protection 'PROLOGUE
 
50
               (forward-char)
 
51
               (forward-sexp 1)
 
52
               (point))))))
 
53
       (define-lex-regex-analyzer semantic-grammar-lex-epilogue
 
54
         "Detect and create an epilogue or percent-percent token."
 
55
         "\\<%%\\>"
 
56
         (let ((start (match-beginning 0))
 
57
               (end   (match-end 0))
 
58
               (class 'PERCENT_PERCENT))
 
59
           (when (>= start (semantic-grammar-epilogue-start))
 
60
             (setq class 'EPILOGUE
 
61
                   end   (point-max)))
 
62
           (semantic-lex-push-token
 
63
            (semantic-lex-token class start end))))
 
64
       ))
 
65
 
37
66
;;; Prologue
38
67
;;
39
68
;; Current parsed nonterminal name.