Giter Club home page Giter Club logo

lacogen1's People

Contributors

duncanamps avatar

Watchers

 avatar

lacogen1's Issues

Include files

Need facility to include files, can be grouped in with the conditional compilation listed in issue #4.

For example:

{$INCLUDE "C:\temp\testing\myfile.inc"}
{$INCLUDE "C:\grammar\new_project\$(option).inc"}

Dev - Remove character ranges

LaCoGen uses characters and character ranges in the dictionary, e.g. 'A', '0..9', etc. and is a leftover from when 16 and 32 bit character sets were used. Now that 8 bit is the character set to use, remove the ranges for improved speed (UTF can still be used for more complex character spaces). This will mandate version 1.2 of the software as the file structures will change.

Indent/Outdent tokens

Add indent and outdent tokens to the grammar so that Python style constructs can be handled.

Dev - Error handling

Require better error handling on the lexer and parser, for example to show more context around the error or to define what should have been expected

XMLs as separate files

The XMLs are currently in one large file. Allow the option to split these out if required.

V1.1 Request - Auto generated code

For version 1.1: In addition to the .lacobj file creation, add some code to create.pas files which contains tables, lexical analyser, parser, error handling, etc. If the original lac file is called asm6502.lac, the following files should be created:

  • lac_asm6502_parser.pas
  • lac_asm6502_code.pas (a skeleton program containing the code for reductions - only if it does not exist already)

lac_asm6502_parser.pas will contain the TLacAsm6502Parser object which can be instanced by the main program.

Conditional compilation

Allow conditional compilation using command line provided 'defines', for example:

lacogen asm6502.lac --compile --dump --define=DEBUG;FULL_VERSION
lacogen xa80.lac --compile --dump --define=PROCLIST:8080;FIRST_ROW:A

Within the software be able to act on these defines with conditional compilation:

{$IFDEF DEBUG}
  <codeline> : <expression> "," <expression>  # ActCodelineDebug
  {$DEFINE EXTRA_INFO}
{$ELSE}
  <codeline> : <expression> "," <expression>  # ActCodeline
{$ENDIF}

And the use of the content of defines with

T_OPCODE = MIXED("AND")
         | MIXED("BIT")
         | MIXED("CCF")
               :
         | MIXED("SRL")
         | MIXED("TST")
         | MIXED("XOR")
{$IF PROC="8080"}
         | MIXED("ACI")
         | MIXED("ADI")
         | MIXED("ANA")
{$ENDIF}

Need to implement the following:

  • Command line capture of:
    • Variable definitions
    • Variable definitions with contents
  • Language grammar additions for:
    • {$DEFINE}
    • {$ELSE}
    • {$ENDIF}
    • {$IF}
    • {$IFDEF}
    • {$IFNDEF}
    • { ... ${var} ... } to expand command line variable into text
    • Simple comparison operators (=, <, <=, >, >=, <>)
    • Boolean operators (not, and, or)
    • Grouping operator using ( ) e.g. (a and b) or c
    • String concatenation with +

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.