help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting the Bovinator off the ground


From: Eric Abrahamsen
Subject: Getting the Bovinator off the ground
Date: Sat, 25 Mar 2017 12:07:28 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

[I was trying to send this to emacs.cedet, but haven't figured out how
to post there. Hoping someone here can help.]

I'm running emacs from git, and have installed CEDET from git as well.

I'm trying to figure out how to use language grammars, and am obviously
misunderstanding something fairly basic. I'm just trying to get a super
barebones Bovine grammar set up, and then trying to use
`semantic-parse-region' to see what it returns, and start playing with
it.

I'm probably misunderstanding something fairly basic here.
`semantic-parse-region' is supposed to return some kind of structure,
right?

Here's my basic grammar:

%package helloworld
%start         test
%keyword BEGINTEST "THISISATEST"
%token COLON     "\\`[:]\\'"

%%
test : bol BEGINTEST COLON value
       ( $1 )
     ;
value : string
        ( $1 )
      ;
%%

I compile and load the el file, then go into a buffer containing this
text:

THISISATEST:hello world

Run (helloworld--install-parser), and then (semantic-parse-region
(point-min) (point-max)).

First of all it tells me that `semantic-lex' is an obsolete function,
then returns nil.

What's it supposed to return? How do I get at the parsed results?

Thanks,
Eric




reply via email to

[Prev in Thread] Current Thread [Next in Thread]