Giter Site home page Giter Site logo

ldparser's People

Contributors

pftbest avatar vadzimdambrouski avatar voodoochild99 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

voodoochild99

ldparser's Issues

Upgrade to `nom` 7.1.3

Hi,

I find this crate very helpful. However, this crate is using a somewhat outdated version of nom. If you run cargo fix, you will see a warning:

warning: the following packages contain code that will be rejected by a future version of Rust: nom v3.2.1

Therefore I have managed to upgrade the nom version used in this crate to 7.1.3, which is the latest version. I have passes all the tests and checked that the parser generates the same output. You can checkout my fork here: https://github.com/VoodooChild99/ldparser/tree/upgrade-nom. I can open a PR if you are interested.

`INSERT BEFORE/AFTER` support

This crate has been incredibly useful for testing linker script fragments. Unfortunately, I seem to have run into some limitations.

Is it possible to INSERT BEFORE/AFTER functionality, so that I can test for equality against this crate's types instead of strings?

Support for 'K' and 'M' suffixes for integer constants

I've successfully used this parser with linkerscript that define constants in hex format, but it will fail with an equivalent 'human-readable' text format.

Additionally the suffixes K and M may be used to scale a constant by respectively. For example, the following all refer to the same quantity:

   _fourk_1 = 4K;
  _fourk_2 = 4096;
  _fourk_3 = 0x1000;

source: https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_chapter/ld_3.html#SEC8

For reference, I was specifically using those in the MEMORY section, e.g.:

MEMORY
{
bootloader (rx) : ORIGIN = 0x08000000, LENGTH = 0x020000
FLASH (rx)     : ORIGIN = 0x08020000, LENGTH = 0xE0000
}

this will parse successfully

vs

MEMORY
{
bootloader (rx) : ORIGIN = 0x08000000, LENGTH = 128k
FLASH (rx)     : ORIGIN = 0x08020000, LENGTH = 1M - 128k
}

which won't

I will post minimum reproducible example later

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.