Giter Club home page Giter Club logo

fimpp's Issues

Words that should work not working.

I'm trying to write the Fibonacci sequence in FiM++, but I get strange errors, to the point where I can't even use the syntax in the syntax folder anymore!
Example:
Rarity's Gems now becomes add Rarity's Gems and Spike's Hoard.

It claims that 'and' is not recognized, and the phrase:
Rarity's Gems now becomes Rarity's Gems plus Spike's Hoard.

Throws from the RegEx saying it was looking for 'got' but found '." (period) instead...

Am I just doing this all wrong, or is this more WiP than I though?

"and" in conditional expressions confused with tuple syntax.

Conjuctions don't work well because the parser confuses the word and with the syntax for tuples.

For instance, this works with or:

Applejack has more than one or Pinkie Pie has more than one

[1.60] parsed: Alternative(
  List(
    Relational(
      VariableValue(applejack),>,NumberValue(1)
    ), 
    Relational(
      VariableValue(pinkie pie),>,NumberValue(1)
    )
  )
)

However, replacing or with and:

Applejack has more than one and Pinkie Pie has more than one

[1.47] failure: ‘Has’ ain't no pony I've heard of. Do they have tea parties with ‘Has’?

The source of the problem is that the parser attempts to make a tuple from one and Pinkie Pie has ..., which in turn attempts to make an identifier from Pinkie Pie has .... This then fails here because has is a keyword.

I think ^? combinator is not the right approach here. The check for keywords should make the parser backtrack instead of failing.

Main class missing?

Error: Could not find or load main class stasiak.karol.fimpp.main

Not sure if it is my fault, or a code error, or what. I have the newest JDK, recompiled from scala, ran straight out of the box, compiled into new jars twice, and everything. Not sure exactly whats going on. Is something mislabeled in the code or am I completely missing something?

Compiler doesn't work when built from scala source.

The supplied jar works. But if I make a new one with make, and then try to interpret some example, I get:

parsing: examples/fibonacci.fimpp
Exception in thread "main" java.lang.NoSuchMethodError: scala.util.parsing.combinator.Parsers$class.lastNoSuccess_$eq(Lscala/util/parsing/combinator/Parsers;Lscala/util/parsing/combinator/Parsers$NoSuccess;)V
    at stasiak.karol.fimpp.FimppParser$.lastNoSuccess_$eq(FimppParser.scala:5)
    at scala.util.parsing.combinator.Parsers$class.$init$(Parsers.scala:151)
    at stasiak.karol.fimpp.FimppParser$.<init>(FimppParser.scala:5)
    at stasiak.karol.fimpp.FimppParser$.<clinit>(FimppParser.scala)
    at stasiak.karol.fimpp.Main$.main(Main.scala:22)
    at stasiak.karol.fimpp.Main.main(Main.scala)

For reference, this is the output of make:

src/stasiak/karol/fimpp/FimppParser.scala:334: warning: match may not be exhaustive.
It would fail on the following input: Error(_, _)
    parseAll(module,s) match {
            ^
warning: there were 2 feature warnings; re-run with -feature for details
two warnings found
cd target && jar cfe ../bin/fimpp.jar stasiak.karol.fimpp.Main stasiak

Scala version 2.11 requires scala-parser-combinators

If one updates both Scala and Java to compile, the later version of scala will require both building and running linked to the scala-parser-combinators jar file. I am not sure what the solution should be. My suggestions would be either a version requirement or version checking in the makefile.

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.