marwes / combine-language Goto Github PK
View Code? Open in Web Editor NEWA crate which defines parsers for common programming language constructs using https://github.com/Marwes/combine
A crate which defines parsers for common programming language constructs using https://github.com/Marwes/combine
Currently, the comment_start
, comment_end,
and comment_line
fields in LanguageDef
take strings, allowing a single string to be used as the definition for comments.
It would be nice if these definitions could take parsers, instead, since in some languages, there are multiple ways to denote a comment. For example, in R6RS Scheme, a line comment may begin with either ;
or #;
.
It seem that in this repository there is both a rustfmt.toml
and a .rustfmt.toml
file which is confusing as only one will be used. See this report
Is this repository still maintained, or is it unmaintained/deprecated? I saw the last commit was two-three years ago.
I'm wondering because I was considering using combine to lex/parse my new programming language. While I was researching combine vs nom, I saw combine-language, which would fulfill all my current needs if it is still maintained.
I might be interested in contributing to (or maybe even maintaining) this if that would be all right.
Thanks,
brightlySalty
I want to parse just float numbers, but combine_language
doesn't provide such functionality.
for example:
let parser = env.float();
parser.parse("123.45"); // => Ok(123.45)
parser.parse("123"); // => currently, Ok(123). But I think it should not be matched.
Are there any functions for this purpose?
If not, How do you think to add it?
The current expression parser only handles infix operators https://docs.rs/combine-language/latest/combine_language/fn.expression_parser.html . Ideally, it would be extended to handle prefix and postfix operators.
See also Marwes/combine#358
See rust-lang/rust#25467 and its related issues.
I had one ignored test in 0.5.0 but running travis against the nightlies on 2015-08-09 also caused the expression_parser test to ICE. Sometimes it is possible to just reorder the code to resolve this issues though not always. Maybe I have been lucky in https://github.com/Marwes/embed_lang but I have not experienced it there.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.