senator-next-tag: Buffer was not parsed by Semantic.

Oleg Sivokon <[email protected]>
Newsgroups gmane.emacs.cedet
Message-ID <[email protected]>
Hi list,
I'm getting this message:

senator-next-tag: Buffer was not parsed by Semantic.

After I thought I've compiled a simple grammar for a mode that I'm
trying to test. Below is the initialization mode stuff:

(define-derived-mode fmt-mode fundamental-mode
  "Common Lisp Format mode"
  "Major for highlighting of Common Lisp format mini-language
This mode uses its own keymap:
\\{fmt-mode-map}"
  (kill-all-local-variables)
  (setq major-mode 'fmt-mode)
  (use-local-map fmt-mode-map)
  (setf mode-name "Common Lisp Format")
  (run-hooks 'fmt-mode-hook)
  (semantic-mode 1))

Nothing fancy, I'm sure it reaches the (semantic-mode 1) call.

I have a fmt.wy file from which I can generate a ftm-wy.el which has the
following: 

(defun fmt-wy--install-parser ()
  "Setup the Semantic Parser."
  (semantic-install-function-overrides
   '((parse-stream . wisent-parse-stream)))
  (setq semantic-parser-name "LALR"
        semantic--parse-table fmt-wy--parse-table
        semantic-debug-parser-source "fmt.wy"
        semantic-flex-keywords-obarray fmt-wy--keyword-table
        semantic-lex-types-obarray fmt-wy--token-table)
  ;; Collect unmatched syntax lexical tokens
  (semantic-make-local-hook 'wisent-discarding-token-functions)
  (add-hook 'wisent-discarding-token-functions
            'wisent-collect-unmatched-syntax nil t))

(define-lex wisent-fmt-lexer
  "Lexical analyzer that handles Common Lisp format."
  semantic-lex-ignore-newline
  semantic-lex-ignore-comments
  semantic-lex-default-action)

(provide 'fmt-wy)

I can require fmt-wy allright (it gives some warnings, but they don't
seem to be important) But now parsing seems to be happening in the test
file I'm trying to edit. What did I have to do beside what I've done?

Also, how would I debug reduce conflicts? Is there any way to make
Semantic more verbose when reporting them? The report of having a reduce
conflic is really like pointing a finger at the sky... unless you give a
hint about what terminals or rules are in conflict.

Lastly, sorry I put many issues together! Is there a way to create
character classes, such as, for example "any character but tilda"? Well,
actually, negation would help my case too, but just for general
knowledge I'd like, if possible, to know the answer to the character
classes question too!

Thanks,

Oleg

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.