uvl/uvl-lexical
version 1.0
Same models as uvl, with the lexical detail its parsers may not read alike (CRLF and CR line ends, comment lines at any indentation, block comments, attributes and constraint lists across lines, blank lines and comments before the first section); ASCII only
- Format
- Universal Variability Language (uvl)
- Authors
- The Fandango Fuzzer Team
- License
- Apache-2.0
- Fandango
- >=1.3
- Extensions
- uvl
- Media type
- text/plain
- Specification
- https://github.com/Universal-Variability-Language/uvl-parser
- Extends
- uvl
- Its files should decode
- mostly
- In the registry
- specs/uvl/uvl-lexical/uvl-lexical.fan
Use it
fanbase install uvl-lexical fandango fuzz -F uvl-lexical -n 10
How it does
accepts 62%, 78/s. 1000 inputs, seed 1.
| Parser | Accepts | Version |
|---|---|---|
| uvl-python | 62% | 2.5.0 |
The spec says its files decode mostly: as expected.
Cite it
@software{fanbase_uvl_uvl_lexical_1_0,
author = {{The Fandango Fuzzer Team}},
title = {Universal Variability Language (uvl/uvl-lexical), a Fandango input specification},
version = {1.0},
url = {https://github.com/fandango-fuzzer/fanbase},
note = {Fanbase registry, specs/uvl/uvl-lexical/uvl-lexical.fan, sha256 989a00f1b914},
}
Source
Source (45 lines)
# Same models as uvl, with the lexical detail that the reference grammar
# allows, and that each of its parsers handles in its own indentation-tracking
# lexer. All of it is in uvl-parser's own test models:
# - CRLF and lone CR line ends, mixed within a file;
# - comments on lines of their own at any indentation, and block comments,
# spanning lines and with tabs in them, at the end of a line or on lines
# of their own (test_models/syntax/comments_and_blanks);
# - attribute blocks and constraint lists broken across lines: a line end
# inside brackets is not a line end of the tree;
# - blank lines, with or without spaces in them, anywhere; comments and blank
# lines before the first section, when that is not a namespace (the grammar
# has no line end before one).
# ASCII only, like uvl.
include("uvl/uvl.fan")
<start> ::= (
<namespace_section> <include_section>? <imports_section>? <features_section> <constraints_section>? <trailing>?
| <leading>? <include_section>? <imports_section>? <features_section> <constraints_section>? <trailing>?
)
<leading> ::= (<newline> | <note>){1,3}
<trailing> ::= <newline>{1,2}
# --- line ends and comments
<newline> ::= "\n" | "\n" | "\r\n" | "\r"
<eol> ::= <trailing_space>? (<line_comment> | <inline_block_comment>)? <newline> <blank_line>?
<blank_line> ::= r"[ \t]{0,4}" <newline>
<line_comment> ::= r" {1,2}" "//" <comment_text>
<inline_block_comment> ::= r" {1,2}" "/*" <block_text> "*/"
# a comment line, indented any way, after the indentation of the line it is in front of
<note> ::= r"[ \t]{0,6}" ("//" <comment_text> | "/*" <block_text> "*/") <newline>
<comment_text> ::= r"[a-zA-Z0-9 \t,.:!?()-]{0,24}"
<block_text> ::= r"([a-zA-Z0-9 \t,.:!?()-]|\n|\*[a-zA-Z ])*"
# --- brackets broken across lines
<wrap> ::= " " | <newline> r"[ \t]{0,12}"
<attributes> ::= "{" <wrap>? (<attribute> ("," <wrap> <attribute>){0,3})? <wrap>? "}"
<constraint_list> ::= "[" <wrap>? (<constraint> ("," <wrap> <constraint>){0,2})? <wrap>? "]"