diff options
Diffstat (limited to 'tests/lexers/rconsole')
| -rw-r--r-- | tests/lexers/rconsole/example.txt | 171 |
1 files changed, 171 insertions, 0 deletions
diff --git a/tests/lexers/rconsole/example.txt b/tests/lexers/rconsole/example.txt new file mode 100644 index 00000000..bfb1b3d6 --- /dev/null +++ b/tests/lexers/rconsole/example.txt @@ -0,0 +1,171 @@ +---input--- + +R version 2.9.2 (2009-08-24) +Copyright (C) 2009 The R Foundation for Statistical Computing +ISBN 3-900051-07-0 + +R is free software and comes with ABSOLUTELY NO WARRANTY. +You are welcome to redistribute it under certain conditions. +Type 'license()' or 'licence()' for distribution details. + + Natural language support but running in an English locale + +R is a collaborative project with many contributors. +Type 'contributors()' for more information and +'citation()' on how to cite R or R packages in publications. + +Type 'demo()' for some demos, 'help()' for on-line help, or +'help.start()' for an HTML browser interface to help. +Type 'q()' to quit R. + +[R.app GUI 1.29 (5464) i386-apple-darwin8.11.1] + +> x <- function {} +Error: syntax error +> x <- function() {} +> x <- function() { ++ cat("hello") ++ cat("world") ++ } +> x +function() { +cat("hello") +cat("world") +} +> x() +helloworld +> 2 + 2 +[1] 4 +> + +---tokens--- +'R version 2.9.2 (2009-08-24)\n' Generic.Output + +'Copyright (C) 2009 The R Foundation for Statistical Computing\n' Generic.Output + +'ISBN 3-900051-07-0\n' Generic.Output + +'\n' Generic.Output + +'R is free software and comes with ABSOLUTELY NO WARRANTY.\n' Generic.Output + +'You are welcome to redistribute it under certain conditions.\n' Generic.Output + +"Type 'license()' or 'licence()' for distribution details.\n" Generic.Output + +'\n' Generic.Output + +' Natural language support but running in an English locale\n' Generic.Output + +'\n' Generic.Output + +'R is a collaborative project with many contributors.\n' Generic.Output + +"Type 'contributors()' for more information and\n" Generic.Output + +"'citation()' on how to cite R or R packages in publications.\n" Generic.Output + +'\n' Generic.Output + +"Type 'demo()' for some demos, 'help()' for on-line help, or\n" Generic.Output + +"'help.start()' for an HTML browser interface to help.\n" Generic.Output + +"Type 'q()' to quit R.\n" Generic.Output + +'\n' Generic.Output + +'[R.app GUI 1.29 (5464) i386-apple-darwin8.11.1]\n' Generic.Output + +'\n' Generic.Output + +'> ' Generic.Prompt +'x' Name +' ' Text +'<-' Operator +' ' Text +'function' Name +' ' Text +'{' Punctuation +'}' Punctuation +'\n' Text + +'Error: syntax error\n' Generic.Output + +'> ' Generic.Prompt +'x' Name +' ' Text +'<-' Operator +' ' Text +'function' Name.Function +'(' Punctuation +')' Punctuation +' ' Text +'{' Punctuation +'}' Punctuation +'\n' Text + +'> ' Generic.Prompt +'x' Name +' ' Text +'<-' Operator +' ' Text +'function' Name.Function +'(' Punctuation +')' Punctuation +' ' Text +'{' Punctuation +'\n' Text + +'+ ' Generic.Prompt +'cat' Name.Function +'(' Punctuation +'"' Literal.String +'hello"' Literal.String +')' Punctuation +'\n' Text + +'+ ' Generic.Prompt +'cat' Name.Function +'(' Punctuation +'"' Literal.String +'world"' Literal.String +')' Punctuation +'\n' Text + +'+ ' Generic.Prompt +'}' Punctuation +'\n' Text + +'> ' Generic.Prompt +'x' Name +'\n' Text + +'function() {\n' Generic.Output + +'cat("hello")\n' Generic.Output + +'cat("world")\n' Generic.Output + +'}\n' Generic.Output + +'> ' Generic.Prompt +'x' Name.Function +'(' Punctuation +')' Punctuation +'\n' Text + +'helloworld\n' Generic.Output + +'> ' Generic.Prompt +'2' Literal.Number +' ' Text +'+' Operator +' ' Text +'2' Literal.Number +'\n' Text + +'[1] 4\n' Generic.Output + +'> ' Generic.Prompt +'\n' Text |
