Re: using define-lex

Arnab Chakraborty <[email protected]> Wed, 28 Oct 2015 07:24:02 +0530
Newsgroups gmane.emacs.semantic
Message-ID <CAM3RRn2BwH7zZgEYvF8BU2P8r_bikFGx93yHf62cFoM9O+WptA@mail.gmail.com>
Hi Eric,

   Thanks a lot for your help. But still some points are not clear to me.
Let me tell you the simple grammar I am working with.

;;First the grammar as a elisp structure. The language just consists of
lists of ;;the token "number".

(setq g '( (number)
               ()
               (line
                    ((number) (format "%s" $1))
                    ((line number) (format "%s %s" $1 $2))
               )
             )
)

;;;Convert to an automaton
(setq a (wisent-grammar-compile g))

;;;Create a lexer
(define-lex mylex "" semantic-number-analyzer)

;;;Try to put them together (it is here that I get error, saying that
;;;mylex does not fit the bill.
(wisent-parse a mylex)


I have not tried using a .wy file yet, because I have not yet figured out
how to convert a .wy file to  an elisp structure. So java.wy etc  are not
helping me yet.

Thanks and regards.

Arnab.

------------------------------------------------------------------------------

_______________________________________________
cedet-semantic mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cedet-semantic