Giter Site home page Giter Site logo

souffle.vim's People

Contributors

azreika avatar b-scholz avatar iliastsa avatar mmcgr avatar rdowavic avatar scyptnex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

souffle.vim's Issues

Having a #include in the file leads to the disabling of Souffle highlighting.

I currently have the problem if I open a .dl file that has a #include file.h, the syntax highlighting is not as one would expect:

For this file:

// an equivalent program that has a rule for each length path, rather than relying on recursion.
.type string

#include "gluemacro.h"

// we are trying to find the paths between these words
.decl goal(worda : string, wordb : string)
goal("be", "bitten").

// edge of the transition graph
.decl edge(worda : string, wordb : string, score : number)

// basic edge
.decl two_path(worda : string, wordb : string, score : number)
two_path(start, end, score) :- edge(start, end, score).
// intermediary (note: i constrained these with goal, as we only use them with the first word as "start")
.decl three_path(worda : string, wordb : string, wordc : string, score : number)
three_path(start, a, end, scoreA + scoreB) :- goal(start, _), two_path(a, end, scoreB), two_path(start, a, scoreA).
// two intermediaries
.decl four_path(worda : string, wordb : string, wordc : string, wordd : string, score : number)
four_path(start, a, b, end, scoreA + scoreB) :- goal(start, _), two_path(b, end, scoreB), three_path(start, a, b, scoreA).
// three intermediaries
.decl five_path(worda : string, wordb : string, wordc : string, wordd : string, worde : string, score : number)
five_path(start, a, b, c, end, scoreA + scoreB) :- goal(start, _), two_path(c, end, scoreB), four_path(start, a, b, c, scoreA).
// four intermediaries (constrained the last one with end too, same reason)
.decl six_path(worda : string, wordb : string, wordc : string, wordd : string, worde : string, wordf : string, score : number)
six_path(start, a, b, c, d, end, scoreA + scoreB) :- goal(start, end), two_path(d, end, scoreB), five_path(start, a, b, c, d, scoreA).

.decl explicit_solution_cat(score : number, path : string)
explicit_solution_cat(score, GLUE6(start, a, b, c, d, end)) :-
    goal(start, end), 
    six_path(start, a, b, c, d, end, score).

.input edge
.output explicit_solution_cat

I get this:
screenshot from 2018-12-01 13-21-53

However, if I remove the #include, and reload syntax (via typing :e), the syntax is as expected:
screenshot from 2018-12-01 13-22-39

But if I add it back in (without reloading file), it also appears as expected:

screenshot from 2018-12-01 13-23-55

Yet, if I reload (:e), it reverts to the syntax highlighting as per the first image.

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.