Comments (2)
Could you provide a link to the bison docs and jison samples you're referring to? I may have totally missed this.
from lex-parser.
Yes of course:
From Jison's Lexical Analysis docs you can follow "pattern matchers" into this URL:
http://dinosaur.compilertools.net/flex/flex_7.html#SEC7
And there you find:
`r$'
an r, but only at the end of a line (i.e., just before a newline). Equivalent to "r/\n".
Note that flex's notion of "newline" is exactly whatever the C compiler used to
compile flex interprets '\n' as; in particular, on some DOS systems you must
either filter out \r's in the input yourself, or explicitly use r/\r\n for "r$".
I was testing to write an HTTP parser where end of line is used to delimiter headers, etc. ^ and $ are very convenient in those cases.
from lex-parser.
Related Issues (7)
- repository format in package.json is not correct
- [GerHobbelt/lex-parser] `reject()` API et al: it's silly to have lexer option `backtrack_lexer` as a run-time option.
- ranges with char numbers doesn't seem to work HOT 2
- ^ (start of line) doesn't work as expected
- Create LICENSE file
- please tag releases
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lex-parser.