Menu

Reserved keywords

Urs Hopp
2020-01-16
2020-01-17
  • Urs Hopp

    Urs Hopp - 2020-01-16

    Is there a list of all reserved keywords in GCB?

     
  • Trev

    Trev - 2020-01-16

    I wrote an emacs Lisp function so emacs would do syntax highlighting. It lists the GCB keywords and those from the libraries I'd been using. You can download it from https://shadow.sentry.org/~trev/gcb/gcbasic.el

     
    • mkstevo

      mkstevo - 2020-01-17

      Thanks @Trev.

      I can incorporate that into Geany. I've been using the 'FreeBasic' files and manually adding the keywords that are missing.

      I appreciate that.

      Just in case any one else is using Geany, here is @Trev's file converted to a format for Geany. Geany requires that the keywords are all on one continuous line of text, I did convert the text to give that, but it failed to work. Then I noticed that the original keyword text was all lower case. Once I converted the file to all lower text and pasted it in, it worked. So here is the file, in all lower case. Open the filetype configuration file for the language you are using in Geany (I'm using the Freebasic file), locate the 'keywords' entry and either replace it, or edit it to add the entries from the text file.

       

      Last edit: mkstevo 2020-01-17
  • Urs Hopp

    Urs Hopp - 2020-01-16

    Thank you very much. That's exactly what I was looking for.

     
  • Chris Roper

    Chris Roper - 2020-01-16

    Yes Please

     
  • Jim giordano

    Jim giordano - 2020-01-17

    Just out of curiosity, why does it have the intel asm mnemonics at the end? ( I won't even ask about all the gibberish in middle).

     
    • Chris Roper

      Chris Roper - 2020-01-17

      Because GCBASIC can use inline assembler.

      It is not often seen in user generated programmes as GCBASIC is sufficiently optimized that it rarely saved anything and it breaks portability. But having the ability to use assembler mnemonics inline is very powerful and is often used in hidden system libraries.

      Inline Assembler is supported for AVR and PIC CPU’s

      Cheers
      Chris

       
  • Anobium

    Anobium - 2020-01-17

    I have deleted my previous posts - they are factually incorrect.


    We do not have a complete of reserved words that can be publish - today.

    We have a list of Methods and Constants It does not contain the list of system variables (of any type). Therefore the list will not show the variables that you should not be using.

    If would be useful to have a list per library and for the compiler. If anyone has time this is an outline requirement for a tool to read the libraries and the compiler.

    1. Written in Perl. As all the tooling is in Perl
    2. Process each library to extract all constants and varaibles and compare to the per library reserved list.  (this file would not exist initially)
    3. For each potential reserved word remove duplicates and remove globals.   A global list would be produced.
    4. Integrate with R2Build to ensure updates at each release.
    

    Not to hard - just need time to produce.

    Evan

     

    Last edit: Anobium 2020-01-17
  • Jim giordano

    Jim giordano - 2020-01-17

    I can understand, and have used mpasm type commands in a gcb program, but I can't imagine how you would used 32 bit intel instructions. Do you have an example?

     
    • Chris Roper

      Chris Roper - 2020-01-17

      Hi Jim, the original Question was about AVR mnemonics hence my reply about inline assembler.
      Evan has said that the Intel Mnemonics were exposed by a build tool crash and that the list you are questioning is invald, which is why it was removed from the thread.
      See the post above yours for the latest info.

      Cheers
      Chris

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.