Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mincss
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Taddeüs Kroes
mincss
Commits
21017977
Commit
21017977
authored
10 years ago
by
Taddeüs Kroes
Browse files
Options
Downloads
Patches
Plain Diff
Renamed some tokens
parent
a1435cf4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lexer.mll
+3
-3
3 additions, 3 deletions
lexer.mll
parser.mly
+4
-4
4 additions, 4 deletions
parser.mly
with
7 additions
and
7 deletions
lexer.mll
+
3
−
3
View file @
21017977
...
...
@@ -99,13 +99,13 @@ rule token = parse
| '@' uagent K E Y F R A M E S { KEYFRAMES_SYM }
| '@' S U P P O R T S { SUPPORTS_SYM }
| (w | comment)* w A N D w (w | comment)* {
SUPPORT
S_AND }
| (w | comment)* w O R w (w | comment)* {
SUPPORT
S_OR }
| (w | comment)* w A N D w (w | comment)* {
W
S_AND }
| (w | comment)* w O R w (w | comment)* {
W
S_OR }
| O N L Y { ONLY }
| N O T { NOT }
| A N D { AND }
(*| O R { OR } removed in favor of
SUPPORT
S_OR *)
(*| O R { OR } removed in favor of
W
S_OR *)
| F R O M { FROM }
| T O { TO }
...
...
This diff is collapsed.
Click to expand it.
parser.mly
+
4
−
4
View file @
21017977
...
...
@@ -54,7 +54,7 @@
%
token
<
string
>
COMBINATOR
RELATION
STRING
IDENT
HASH
URI
FUNCTION
%
token
LPAREN
RPAREN
LBRACE
RBRACE
LBRACK
RBRACK
SEMICOL
COLON
COMMA
DOT
PLUS
%
token
MINUS
SLASH
STAR
ONLY
AND
(*OR*)
NOT
FROM
TO
EOF
%
token
SUPPORTS_AND
SUPPORT
S_OR
%
token
WS_AND
W
S_OR
(* Start symbol *)
%
type
<
Types
.
stylesheet
>
stylesheet
...
...
@@ -68,7 +68,7 @@
%
inline
wslist
(
sep
,
x
)
:
S
*
l
=
separated_list
(
sep
,
terminated
(
x
,
S
*
))
{
l
}
%
inline
wspreceded
(
prefix
,
x
)
:
p
=
preceded
(
ig2
(
prefix
,
S
*
)
,
x
)
{
p
}
%
inline
all_and
:
AND
|
SUPPORT
S_AND
{}
%
inline
all_and
:
AND
|
W
S_AND
{}
cd
:
CDO
S
*
|
CDC
S
*
{}
...
...
@@ -176,10 +176,10 @@ supports_negation:
|
NOT
S
+
c
=
supports_condition_in_parens
{
Not
c
}
supports_conjunction
:
|
hd
=
supports_condition_in_parens
tl
=
preceded
(
SUPPORT
S_AND
,
supports_condition_in_parens
)
+
|
hd
=
supports_condition_in_parens
tl
=
preceded
(
W
S_AND
,
supports_condition_in_parens
)
+
{
And
(
hd
::
tl
)
}
supports_disjunction
:
|
hd
=
supports_condition_in_parens
tl
=
preceded
(
SUPPORT
S_OR
,
supports_condition_in_parens
)
+
|
hd
=
supports_condition_in_parens
tl
=
preceded
(
W
S_OR
,
supports_condition_in_parens
)
+
{
Or
(
hd
::
tl
)
}
supports_declaration_condition
:
|
LPAREN
S
*
decl
=
supports_declaration
RPAREN
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment