Giter Club home page Giter Club logo

bison-mode's Introduction

bison-mode

Bison major-mode for Emacs.

Changelog

0.3

Added support for jison mode.

jison-mode is started automatically for .jison files.

Functions are now properly namespaced.

0.2

Update for compatibility with modern Emacsen, and removed dependencies on some ancient packages.

Many byte-compiler fixes.

Fixed a crash on indentation.

bison-mode is now started automatically for .y and .l files.

0.1

Initial release.

bison-mode's People

Contributors

lucianolaratelli avatar nverno avatar petermoresi avatar pierre-rouleau avatar syohex avatar wilfred avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

bison-mode's Issues

License?

Hi Wilfred,

I would like to package your bison-mode for Gentoo. What's the license your mode is released under?

Thanks,

nick

Indentation

The electric indentation for bison-mode gives... interesting results when run on each line of the buffer.

doesn't recognize char literals

i think this is the fix:

(defvar bison--word-constituent-re "\\(\\sw\\|_\\)\\|\\('.'\\)")

although maybe it should go in bison--production-re ?

try this:

rule:
          'h' 'e' 'l' 'l' 'o' {}
         | sym1 {}
         ;

off-by-one

on line 450, the forward-sexp starts one character after the opening brace rather than on it... point should be moved back one prior to the forward-sexp.

Add yourself as copyright holder

Hi Wilfred,

I'm working on packaging bison-mode in Debian and when working on the copyright part the team notices that you are not part of the copyright holders (as listed in the comments). As for the current status the common practice is to just include the ones in the copyright notice, I would have to leave you out for now. Would you like to add yourself there as well so that we can acknowledge your contributions in our copyright file?

File mode specification error

Getting the following error on Emacs 25.2:
(emacs --debug-init)

File mode specification error: (error There should be a mode declaration in /usr/share/emacs/25.2/etc/srecode/c.srt)

Incorrect syntax highlighting.

you need to adjust your regexp for keyword coloring.
e.g. preprocess_if when used as a variable (after having been declared earlier) will incorrectly highlight the if portion of the variable.
image

char literals with '|' are confusing

here's the fix, i think:

(defun bison--production-alternative-p (bol eol section)
  "return t if the current line contains a \"|\" used to designate a rule
alternative"
  (save-excursion
    (goto-char bol)
    (if (re-search-forward "[^']|" eol t) ; todo: should also match | at bol
    (not (bison--within-braced-c-expression-p section))
      nil)))

example test case...

rule:
      '|' token1 { /* this matches a literal bar followed by token1 */ |
      | token2 {}
     ;

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.