GithubHelp home page GithubHelp logo

camxes.js's Introduction

camxes.js

Lojban Parser written in JavaScript. Based on camxes.

ChangeLog:

  • 4/29/2013: Initial commit. camxes.js.peg -> A PEG for PEG.js. Currently it's too slow (both to compile a parser and to parse a sentence)
  • 5/2/2013 : Updated the PEG for clearer parse trees. Use the "Use results cache" option for PEG.js for faster search.
  • 5/3/2013 : Finished up until COI
  • 5/4/2013 : Finished writing the whole basic parser - checked up until JOI
  • [FIXED 5/4/2013] [TO DO] zei (strange behavior of gismu)
  • [FIXED 5/4/2013] [TO DO] remove dangling nodes (e.g., tail_terms)
  • 5/6/2013 : Fixed some bugs related to SI, removed empty nodes (intro_null, text_part_2, etc.)

camxes.js can be used, modified, and re-distributed under MIT license.

camxes.js's People

Contributors

mhagiwara avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

camxes.js's Issues

CLL mekso example doesn't parse

From a session on #ckule, this CLL example at http://lojban.github.io/cll/18/18/ doesn't parse:

16:30 <simpson> .exp li na'u tanjo te'u vei pai fe'i re ve'o du li ci'i
16:30 <mensi> SyntaxError: Expected [oO] or [uU] but "i" found.
16:30 <mensi> Location: [49, 50]
16:30 <mensi> …i…
17:35 <simpson> .off li na'u tanjo te'u vei pai fe'i re ve'o du li ci'i
17:35 <mensi> ([{li <(¹na'u tanjo te'u¹) (¹vei [{pai BOI} {fe'i <re BOI>}] ve'o¹) KUhE> LOhO} CU] [du {<li (¹ci'i BOI¹) LOhO> VAU}])

No license for the code?

Your code is used here. While contributing to this project, I remarked that it had no license. On the issue I opened, I've been answered:

we need to look at the initial camxes.js website to see what Masato wrote there.

You didn't write anything :-)

While Github Terms of Service allow us to use your code (which basic copyright doesn't, in many countries), it is always better to specifically know what the author really wants.

As it is, you are not even cited as the original author (a quick way to not have this problem is to put the copyright notice in the header of the source code).

I invite you to create a “COPYING” or a “LICENSE” file, with whatever license you want in it. Github made this site if you don't know what to choose.

Thanks for your attention, and your code :-)

Unable to run the parser

When I run the following code with node:

var PEG = require("pegjs")
var fs = require("fs")
// read peg and build a parser
var camxes_peg = fs.readFileSync("./camxes.js.peg").toString();
var camxes = PEG.buildParser(camxes_peg, {cache: true});
// test it
camxes.parse("ko'a broda");
fs.writeFileSync("/path/to/camxes.js", camxes.toSource());

I get:

/Users/yannis/Downloads/LIVRE/PYTHON/EXOS/03-3/run.js:5
var camxes = PEG.buildParser(camxes_peg, {cache: true});
^

TypeError: PEG.buildParser is not a function
at Object. (/Users/yannis/Downloads/LIVRE/PYTHON/EXOS/03-3/run.js:5:18)
at Module._compile (node:internal/modules/cjs/loader:1257:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1311:10)
at Module.load (node:internal/modules/cjs/loader:1115:32)
at Module._load (node:internal/modules/cjs/loader:962:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
at node:internal/main/run_main_module:23:47

Node.js v20.3.1

What am I doing wrong?

Thanks in advance

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.