Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(238)

Side by Side Diff: lib/src/prism/tests/languages/bison/c_feature.test

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 %{
2 #include <stdio.h>
3 %}
4 %code {
5 if(foo) {
6
7 }
8 }
9 %%
10 exp:
11 NUM {
12 $$ = f($3, $4);
13 @$.first_column = @1.first_column;
14 $result = $left + $<itype>1;
15 }
16 %%
17
18 ----------------------------------------------------
19
20 [
21 ["bison", [
22 ["c", [
23 ["delimiter", "%{"],
24 ["macro", ["#include ", ["string", "<stdio.h>"]]],
25 ["delimiter", "%}"]
26 ]],
27 ["keyword", "%code"],
28 ["c", [
29 ["delimiter", "{"],
30 ["keyword", "if"], ["punctuation", "("], "foo", ["punctu ation", ")"],
31 ["punctuation", "{"], ["punctuation", "}"],
32 ["delimiter", "}"]
33 ]],
34 ["punctuation", "%%"],
35 ["property", "exp"], ["punctuation", ":"],
36 "\r\n\tNUM ",
37 ["c", [
38 ["delimiter", "{"],
39 ["bison-variable", ["$$"]], ["operator", "="],
40 ["function", "f"], ["punctuation", "("],
41 ["bison-variable", ["$3"]], ["punctuation", ","],
42 ["bison-variable", ["$4"]], ["punctuation", ")"], ["punc tuation", ";"],
43 ["bison-variable", ["@$"]], ["punctuation", "."], "first _column ", ["operator", "="],
44 ["bison-variable", ["@1"]], ["punctuation", "."], "first _column", ["punctuation", ";"],
45 ["bison-variable", ["$result"]], ["operator", "="],
46 ["bison-variable", ["$left"]], ["operator", "+"],
47 ["bison-variable", ["$", ["punctuation", "<"], "itype", ["punctuation", ">"], "1"]], ["punctuation", ";"],
48 ["delimiter", "}"]
49 ]],
50 ["punctuation", "%%"]
51 ]]
52 ]
53
54 ----------------------------------------------------
55
56 Checks for C inside Bison, along with special Bison variables.
OLDNEW
« no previous file with comments | « lib/src/prism/tests/languages/batch/label_feature.test ('k') | lib/src/prism/tests/languages/bison/comment_feature.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698