Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mincss
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
mincss
Commits
21017977
Commit
21017977
authored
Jul 21, 2014
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed some tokens
parent
a1435cf4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
lexer.mll
lexer.mll
+3
-3
parser.mly
parser.mly
+4
-4
No files found.
lexer.mll
View file @
21017977
...
@@ -99,13 +99,13 @@ rule token = parse
...
@@ -99,13 +99,13 @@ rule token = parse
| '@' uagent K E Y F R A M E S { KEYFRAMES_SYM }
| '@' uagent K E Y F R A M E S { KEYFRAMES_SYM }
| '@' S U P P O R T S { SUPPORTS_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 A N D w (w | comment)* {
W
S_AND }
| (w | comment)* w O R w (w | comment)* {
SUPPORT
S_OR }
| (w | comment)* w O R w (w | comment)* {
W
S_OR }
| O N L Y { ONLY }
| O N L Y { ONLY }
| N O T { NOT }
| N O T { NOT }
| A N D { AND }
| 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 }
| F R O M { FROM }
| T O { TO }
| T O { TO }
...
...
parser.mly
View file @
21017977
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
%
token
<
string
>
COMBINATOR
RELATION
STRING
IDENT
HASH
URI
FUNCTION
%
token
<
string
>
COMBINATOR
RELATION
STRING
IDENT
HASH
URI
FUNCTION
%
token
LPAREN
RPAREN
LBRACE
RBRACE
LBRACK
RBRACK
SEMICOL
COLON
COMMA
DOT
PLUS
%
token
LPAREN
RPAREN
LBRACE
RBRACE
LBRACK
RBRACK
SEMICOL
COLON
COMMA
DOT
PLUS
%
token
MINUS
SLASH
STAR
ONLY
AND
(*OR*)
NOT
FROM
TO
EOF
%
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 *)
(* Start symbol *)
%
type
<
Types
.
stylesheet
>
stylesheet
%
type
<
Types
.
stylesheet
>
stylesheet
...
@@ -68,7 +68,7 @@
...
@@ -68,7 +68,7 @@
%
inline
wslist
(
sep
,
x
)
:
S
*
l
=
separated_list
(
sep
,
terminated
(
x
,
S
*
))
{
l
}
%
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
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
*
{}
cd
:
CDO
S
*
|
CDC
S
*
{}
...
@@ -176,10 +176,10 @@ supports_negation:
...
@@ -176,10 +176,10 @@ supports_negation:
|
NOT
S
+
c
=
supports_condition_in_parens
|
NOT
S
+
c
=
supports_condition_in_parens
{
Not
c
}
{
Not
c
}
supports_conjunction
:
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
)
}
{
And
(
hd
::
tl
)
}
supports_disjunction
:
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
)
}
{
Or
(
hd
::
tl
)
}
supports_declaration_condition
:
supports_declaration_condition
:
|
LPAREN
S
*
decl
=
supports_declaration
RPAREN
|
LPAREN
S
*
decl
=
supports_declaration
RPAREN
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment