jtree icon indicating copy to clipboard operation
jtree copied to clipboard

GrammarLang: File imports in grammar language

Open breck7 opened this issue 5 years ago • 3 comments

A potential approach is to have the parser treat files in one folder as a single file. So imports would be done via copying values into a folder (rather than pointers).

breck7 avatar Jan 28 '20 01:01 breck7

not obviously a bad idea but more important things to do first.

breck7 avatar May 24 '21 01:05 breck7

Perhaps a universal imports keyword is necessary across TN. The keyword "on" might make sense—as in "[builds] on".

On could be a simple forgiving mini lang with support for most common list types:

on scrolldown
title Hello world
on "scrolldown"
title Hello world
on https://raw.githubusercontent.com/breck7/scroll/main/scrolldown.grammar
title Hello world
on "https://raw.githubusercontent.com/breck7/scroll/main/scrolldown.grammar"
title Hello world
on "./scrolldown"
title Hello world
on scroll
on ./breck.grammar
title Hello world
on scroll ./breck.grammar
title Hello world
on scroll "./breck.grammar"
title Hello world

Advanced selective imports?

on scroll
on {interviewP} from ./breck.grammar
title Hello world

breck7 avatar Jun 13 '22 22:06 breck7

The simple imports in Scroll seem to be working well. Perhaps could generalize that pattern, use it in grammar, and make it easy for a tree language to use them.

breck7 avatar Nov 30 '22 15:11 breck7

We are no longer using the term "Tree Languages" and instead its all just Scroll. So closing this.

breck7 avatar Jun 17 '24 16:06 breck7