Code Monkey home page Code Monkey logo

Comments (3)

blynn avatar blynn commented on August 11, 2024

This behaviour has been inherited from Flex: http://flex.sourceforge.net/manual/Why-doesn_0027t-flex-have-non_002dgreedy-operators-like-perl-does_003f.html. In short, they recommend moving the logic from the lexer to the parser, or using start conditions (which nex does not support yet).

However, I'm willing to add non-greedy operators to nex if I can find the time. Stay tuned!

from nex.

sprungknoedl avatar sprungknoedl commented on August 11, 2024

Thanks for your help 👍 . I moved said logic to goyacc, but the resulting code is not the prettiest. For my use case, a lot of code duplication arose because I'm only interested in the tokens inside PHP code.

I look forward to your changes :)

from nex.

purpleidea avatar purpleidea commented on August 11, 2024

For anyone searching for the above broken link, here is a mirror:

http://www.cas.mcmaster.ca/~kahl/SE3E03/2006/flex/flex_82.html

(Since nex seems sort of unmaintained, I've resorted to looking at closed issues for hints! Let's all drop any learnings that we get to, somewhere like here!)

from nex.

Related Issues (20)

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.