[eclipse-clp-users] Newbie Q: using an exported struct ....

From: Basile Starynkevitch <basile_at_...352...>
Date: Fri, 8 Feb 2013 16:09:31 +0100
Hello 

[[sorry for this newbie question]]


I'm teaching a program semantics course using Eclipse Prolog; 
I'm rewriting the parser for BOPL, a toy language.

My Eclipse code (incomplete, buggy, LGPL-3 licensed) is available 
from https://github.com/bstarynk/BOPL-APS
and I am speaking of commit
  https://github.com/bstarynk/BOPL-APS/commit/e03725e9200efa6b2beba7af43e43b53c9ff2b1f


I can't figure out how to use exported structures. To be precise,

file lexer.ecl contains
   :- export struct(tKeyw(loc,word)).

file parser.ecl contains

   :- use_module(lexer).
then later

parseProgram(FileName,[Tprog|TokensAfterProg], 
	     pProgram(Clas,Vars,SeqInsts,FileName,StartLine,EndLine), 
	     [])
:-
    parseToken(Tprog,tKeyw{loc:StartLine,word:program}),
    parseClassList(FileName, TokensAfterProg, Classes, TokensAfterClassList),
    parseLocals(FileName,TokensAfterClassList, Vars, TokensAfterLocals), 
    parseSeq(FileName,TokensAfterLocals,SeqInsts,[])
.


And Eclispe is unhappy with the above, giving
WARNING: Unrecognized structure name in module parser in
    tKeyw{loc : StartLine, word : program}

I cannot understand why! ???

Cheers

-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***
Received on Fri Feb 08 2013 - 17:09:44 CET

This archive was generated by hypermail 2.3.0 : Thu Feb 22 2024 - 18:13:20 CET