souffle-lang / souffle.vim Goto Github PK
View Code? Open in Web Editor NEWSyntax highlighting for souffle files
License: MIT License
Syntax highlighting for souffle files
License: MIT License
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
However, if I remove the #include
, and reload syntax (via typing :e
), the syntax is as expected:
But if I add it back in (without reloading file), it also appears as expected:
Yet, if I reload (:e
), it reverts to the syntax highlighting as per the first image.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.