GithubHelp home page GithubHelp logo

Report PML construct name-clash about pathways HOT 9 CLOSED

houli avatar houli commented on June 26, 2024
Report PML construct name-clash

from pathways.

Comments (9)

houli avatar houli commented on June 26, 2024 1

Even just for this feature though, if we don't get the full AST ready we can just use the lexer output for now

from pathways.

c-brenn avatar c-brenn commented on June 26, 2024 1

the ident token could be a variable or a construct name. We don't know which until we're in the bowels of the parser. The parser takes the all of the tokens from the lexer at once, and returns a single data structure. I don't think the parser can (or should) cause side effects, so it can only pass the name out as part of the AST.

from pathways.

houli avatar houli commented on June 26, 2024

Just testing this out in iex to understand a bit more about leex and yecc will check the other parsing issue now @c-brenn. Seems like we just need to add the TokenChars to idents assuming that idents only ever appear as construct names.

Here's some crappy iex code that gets a lot of the way

File.read!("test/fixtures/no_ddis.pml") |> to_charlist |> :pml_lexer.string |> elem(1) |> Enum.filter(fn(x) -> elem(x, 0) == :ident end
# [{:ident, 1, 'foo'}, {:ident, 2, 'bar'}, {:ident, 3, 'baz'}, {:ident, 12, 'baz2'}]

from pathways.

c-brenn avatar c-brenn commented on June 26, 2024

Exactly - TokenChars contains the exact string matched by the lexer. After the lex/parse we can iterate over the structure to find name clashes.

from pathways.

houli avatar houli commented on June 26, 2024

Oh, netbeans_req_release.pml has demonstrated to me that identifiers can just appear in requires, provides etc, what does it mean, who knows!

from pathways.

laurmurclar avatar laurmurclar commented on June 26, 2024

@shawa are you taking this now?

from pathways.

shawa avatar shawa commented on June 26, 2024

Sure I'll give it a lash yeah

from pathways.

shawa avatar shawa commented on June 26, 2024

#150

from pathways.

c-brenn avatar c-brenn commented on June 26, 2024

clashes are now returned from panacea, this is just a UI change now

from pathways.

Related Issues (20)

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.