Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dhcpd #772

Merged
merged 3 commits into from Mar 24, 2023
Merged

dhcpd #772

merged 3 commits into from Mar 24, 2023

Conversation

miekg
Copy link
Contributor

@miekg miekg commented Mar 24, 2023

This adds a lexer to parse ISC's dhcpd.conf, https://www.isc.org/dhcp/, this is EOL, but distributions still carry it.

It has the keywords that I could find and takes some liberty with LiteralNumber* tokens to return IP, network and MAC addresses.

It may be possible to make this somewhat smaller, but haven't pushed for that yet.

This adds a lexer to parse ISC's dhcpd.conf, https://www.isc.org/dhcp/,
this is EOL, but distributions still carry it.

It has the keywords that I could find and takes some liberty with
LiteralNumber* tokens to return IP, network and MAC addresses.

It may be possible to make this somewhat smaller, but haven't pushed for
that yet.

Signed-off-by: Miek Gieben <miek@miek.nl>
Signed-off-by: Miek Gieben <miek@miek.nl>
Signed-off-by: Miek Gieben <miek@miek.nl>
@alecthomas alecthomas merged commit 357f0cb into alecthomas:master Mar 24, 2023
2 checks passed
@alecthomas
Copy link
Owner

Nice, thanks!

@gandarez
Copy link
Contributor

gandarez commented Aug 18, 2023

@alecthomas @miekg this PR added *.conf as filename which conflicts with ApacheConf lexer that uses apache.conf. Should ISCdhcpd define the filename as dhcpd.conf only?

@alecthomas
Copy link
Owner

Seems reasonable to me.

gandarez added a commit to wakatime/wakatime-cli that referenced this pull request Aug 29, 2023
Migrate dependency detection to Chroma v2

Add doctype package

Add xml package

Fix language package for Chroma v2

Add ColdfusionHTML lexer

Add Crontab lexer

Add Delphi lexer

Add Gosu lexer

Add Lasso lexer

Add Less lexer

Add Liquid lexer

Add Mustache lexer

Add Pawn lexer

Add SketchDrawing lexer

Add Slim lexer

Add XAML lexer

Add XSLT lexer

Fix priority for ApacheConf lexer as it conflicts with ISCdhcpd

alecthomas/chroma#772 (comment)

Add Pug lexer

Add SublimeTextConfig lexer

Add SWIG lexer

Do not allow re-register a lexer

Test languages already registered in Chroma

Add Marko lexer

Add RPMSpec lexer

Add Objective-J lexer

port custom lexers from forked chroma

fix all but one todo

implement name method for lexers

add line breaks

fix linter

typo

Add missing lexer tests A..H

add tests

more tests

add lexers g-o

lexer tests for lexers a-f

fix linter

fix get lexer by name typos

Fix tests

Fix tests

Update go mod to temporary use Chroma fork

Fix linting

remove reference to Chroma v1

Fix dependencies parser

Remove unnecessary lint comments

Fix Forth analyse text on Windows

Register all custom lexers

Replace fixed strings with language constants

Move lexers to lexer package

Use languages from heartbeat package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants