gnupic: Yikes, I crashed GPAL


Previous by date: 25 Oct 2004 01:42:06 +0100 Re: GPAL questions, Craig Franklin
Next by date: 25 Oct 2004 01:42:06 +0100 Re: how to init EEPROM internal memory ?, Gabor Kiss [Bitman]
Previous in thread: 25 Oct 2004 01:42:06 +0100 Re: Yikes, I crashed GPAL, Craig Franklin
Next in thread: 25 Oct 2004 01:42:06 +0100 Re: Yikes, I crashed GPAL, Craig Franklin

Subject: Re: Yikes, I crashed GPAL
From: David McNab ####@####.####
Date: 25 Oct 2004 01:42:06 +0100
Message-Id: <417C4BD6.3030909@rebirthing.co.nz>

Craig Franklin wrote:
> Update your cvs and try again.
...
>> scan.l:614: error: invalid lvalue in assignment
...
> Check your version of flex.   gputils supports 2.5.4(a).

I was using flex 2.5.31. Downgrading to 2.5.4a and re-flexing scan.l got 
me a clean compile.

But the current flex doco explicitly states that YY_CURRENT_BUFFER 
should /NOT/ be used as an lvalue, so I'm sorry to say that scan.l is 
broken. However, thanks for the tip - it's a relief to be able to build 
from cvs.

There's another small thing - the line:
   DATA_ADDRESS       : constant uint8 = 0x5;
in p16f873a causes compilations to fail, complaining about duplicate 
definitions. Commenting out this def fixes the problem.

Anyway, onward to learning/mastering GPAL. I look forward to the 
evolution of this interesting language.

Cheers
David

> 
>>
>> Craig Franklin wrote:
>>
>>> David McNab wrote:
>>>
>>>> Hi,
>>>>
>>>> How do I import another module into a GPAL module?
>>>>
>>>> For instance, the following 'hello world' program:
>>>>
>>>>   module helloleds is
>>>>
>>>>   pragma processor = "16f873a";
>>>>
>>>    with p16f873a;
>>>
>>>>   procedure main is
>>>>     begin
>>>>        p16f873a.TRISB = 0x00;
>>>>        p16f873a.PORTB = 0xa5;
>>>>     end procedure;
>>>>
>>>>   end module;
>>>>
>>>> I've spent a couple of frustrating hours trying to figure out how to 
>>>> get this thing to compile. 
>>>
>>>
>>>
>>>
>>> gpal p16f873a.pub helloleds.pal
>>>
>>>> No mention in the docs of how to import needed modules and access 
>>>> their namespaces.
>>>>
>>>  From the manual:
>>>
>>> 2.6.11 With
>>>
>>> with <name>;
>>>
>>> The with statement tells the compiler to add the data
>>> from the public <name> to its symbol tables. This will
>>> allow access to that module's subprograms and data.
>>>
>>>
>>> I am committing big changes to gpal now.  If you have any  
>>> recommendations I am listening.
>>>
>>>> Please help
>>>>
>>>
>>>
>>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
> 
> 
> 

Previous by date: 25 Oct 2004 01:42:06 +0100 Re: GPAL questions, Craig Franklin
Next by date: 25 Oct 2004 01:42:06 +0100 Re: how to init EEPROM internal memory ?, Gabor Kiss [Bitman]
Previous in thread: 25 Oct 2004 01:42:06 +0100 Re: Yikes, I crashed GPAL, Craig Franklin
Next in thread: 25 Oct 2004 01:42:06 +0100 Re: Yikes, I crashed GPAL, Craig Franklin


Powered by ezmlm-browse 0.20.