How to switch lexers midflight?
Gracjan Polak <[email protected]> Wed, 17 Feb 2016 19:16:27 +0100
| Newsgroups | gmane.emacs.semantic |
|---|---|
| Message-ID | <CAChsM3R-9OHhLFWQ6-0XO6zyNGWsosNGpWrMWsKHssjoJHCHvA@mail.gmail.com> |
Hi all,
I'm trying to parse Haskell, it has nice block structure where layout in
active. For example here are three top level blocks:
x = 5
fun a b =
a + b
data X = A | B | C
I have a lexer that can split source into blocks correctly by looking at
indentation. Then I have a rule:
%start topblock
%start topdecl
%token TOPBLOCK
topblock : TOPBLOCK
(EXPANDFULL $1 topdecl)
;
topdecl : .... ;
Now, the lexer used inside EXPANDFULL should be a proper Haskell tokenizer.
How do I change tokenizer midflight?
Thanks
--
Gracjan
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
cedet-semantic mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cedet-semantic