Menu

Compiler changes

Anobium
2022-12-17
2022-12-19
  • Anobium

    Anobium - 2022-12-17

    The next major change to the compiler will improve the syntax checking with respect the capabilities currently provided by the external preprocessor written AWK.

    The change will move all preprocessing into the compiler thus removing the need for the additional AWK operation.

    The syntax checking that will be consolidated will be 'missing ({[' , missing )}]', incorrect sub or function definition, incorrect 'if' and incorrect 'else if' statement.

    The rational is simple. The external process using AWK is 1) not supportable, 2) not portable to other Operating Systems and 3) uses complex file operations.

    This change moves the syntax checking inside the compiler to provide consistent syntax checking across all operating systems. This change will increase compiling times of the code compilation process.

    For SynWrite users: New supporting batch files will be released to remove the AWK operation.

    For Geany users: Support batch files no longer need to call the AWK operation.

    For Linux and other custom IDEs: No change to supporting scripts needed.


    Performance

    The external AWK is optimised ( using the specific .h archive bit ) to only inspect .h file(s) and/or the user source program that have changed. The AWK process is fast.

    Some users do not use the AWK process and therefore the AWK processing time is not in the end to end compilation process but this means that syntax checking is incomplete (and the compiler can lock up, issue incorrect errors, create invalid ASM and issue meaningless warnings.

    All users will see a sub second increase in compilation time.

    Recap

    The external AWK process will be removed. With all syntax checking completed by the compiler. There will be a small increase compiler time.

     
  • Anobium

    Anobium - 2022-12-18

    Compiler build 1206 will have :

    1. Revised compiler syntax checking
    2. Revised batch emoving support for AWK pre-processing
    3. Revised GCode settings (tasks.json) to call the compiler directly. Removing the dependency on the batch files.

    I have run the test programs over night and all was good with respect to the compiler. But, should anyone encounter any issue please use this thread to report.

     
  • Anobium

    Anobium - 2022-12-18

    The performance may be 0,1s slower with syntax error checking within the compiler.

    This is acceptable.

     
  • stan cartwright

    stan cartwright - 2022-12-18

    What's AWK stand for?

     
    • Anobium

      Anobium - 2022-12-19

      AWK is a domain-specific language designed for text processing and typically used as a data tool. Designed by Alfred Aho, Peter Weinberger, and Brian Kernighan I have been using since the 1980s.

      It is great for processing flies at high speed. It is has C type language.

      But, the tool chain no longer needs AWK as I have moved the syntax checking (completed by the AWK process) to the compiler.

       
  • William Roth

    William Roth - 2022-12-19

    Am I correct in understanding that while AWK has been removed from the "Toolchain" that is remains in the Installation and is used for other tasks ?

     
    • Anobium

      Anobium - 2022-12-19

      What a really good question!

      To clarify.

      AWK has been removed as a dependency for syntax checking only. If folks have used AWK (or GAWK a later recompile of AWK ) then it will still be there in G+STOOLS.

      There are no plans to remove AWK or GAWK or G+STOOLS folder.

      FYI: We have tested GCODE without the G+STOOLS folder and as expected it worked.

       

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.