Giter Site home page Giter Site logo

Comments (2)

zaach avatar zaach commented on September 14, 2024

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.

husio-org avatar husio-org commented on September 14, 2024

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)

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.