question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Changing file-extension for standalone grammar definitions from .g?

See original GitHub issue

Currently standalone files like common and the example json use the file extension .g. However, it looks like g is already associated with the ANTLR parser. While I suppose it’s possible to make Lark compatible with ANTLR, in the meantime it’s probably best to use a different file extension. I would propose the extension lrk as it doesn’t seem to be used by anything currently.

I’m about to submit a pull request to change the file extensions to .lrk in the relevant file names and in the code referencing the .g extension. It’s on a separate branch so if you want to use a different extension that should be easy enough to change.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:31 (26 by maintainers)

github_iconTop GitHub Comments

1reaction
erezshcommented, Apr 11, 2018

@dirk-thomas @RobRoseKnows Fantastic! If you have these 3 covered, I can do vscode. And I don’t mind bumping to 0.6.0 soon. There are other breaking changes I’m looking to make, so it could be a good opportunity.

Also, I noticed that although the grammar is similar to ANTLR, It’s also very similar… to Perl !

  • Perl has both “strings” and /regexps/i

  • Perl also differentiates between lowercase and UPPERCASE

And all editors have it. So perhaps you can use the perl syntax file for some quick-and-easy copy pastes.

Anyway, write them in your free time, and I’ll add them to the README. When they’re all done, I’ll bump the version and update the docs.

P.S. I gave it some thought, and I think .lark is the best choice. It’s clear, simple, and google-able.

Cheers, Erez

0reactions
erezshcommented, Jul 11, 2018

Merged.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Assigning custom extensions to a language's syntax ...
To do this for a user-defined language, look instead for userDefineLang.xml and edit ext="" . If you installed notepad++ in "portable"-mode, ...
Read more >
How to Change File Extension in Windows - YouTube
In this tutorial you will learn how to change the file extension in WindowsDon't forget to check out our site http://howtech.tv/ for more ......
Read more >
How to change the extension of each file in a list with multiple ...
In a GNU makefile, I am wondering if it is possible, with an file list input, to make a file list output with...
Read more >
ASP File Extension - What is .asp and how to open?
Files with the file extension .asp can only be launched by certain ... Only special conversion software can change a file from one...
Read more >
grammar terms - Search for entries starting with G - Writing Tips
antecedent. Is a noun, noun phrase or pronoun referred to by a pronoun. The antecedent usually comes before the pronoun replacing it. For...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found