Comments for HackerDan.com http://hackerdan.com Dan's Blog Mon, 11 Dec 2017 03:18:21 +0000 http://wordpress.org/?v=2.2.1 Comment on Using Java CUP by Rafi http://hackerdan.com/programing/using-java-cup/#comment-323 Rafi Thu, 28 Mar 2013 06:56:37 +0000 http://hackerdan.com/programing/using-java-cup/#comment-323 thanx for the tutorial. can you plz tell me where can i get the env, text, node etc packages mentioned in http://www.cs.auckland.ac.nz/~bruce-h/lectures/330ChaptersPDF/ lectures. thanx for the tutorial. can you plz tell me where can i get the env, text, node etc packages mentioned in http://www.cs.auckland.ac.nz/~bruce-h/lectures/330ChaptersPDF/ lectures.

]]>
Comment on Using Java CUP by Isaac http://hackerdan.com/programing/using-java-cup/#comment-293 Isaac Mon, 22 Oct 2012 22:15:30 +0000 http://hackerdan.com/programing/using-java-cup/#comment-293 I got this error: Exception in thread "main" java.lang.RuntimeException: Fatal Syntax Error Error (#0) : Syntax error: Line: 8 Caracter: . Texto: EOF at test.parser.report_fatal_error(parser.java:337) at java_cup.runtime.lr_parser.unrecovered_syntax_error(lr_parser.java:424) at java_cup.runtime.lr_parser.parse(lr_parser.java:616) at test.parser.main(parser.java:341) Java Result: 1 i manage EOF in flex file as eofvalue return sym.EOF, yychar, yyline, yytext() everything its ok and then parsing some example code that error apears :S wut could it be? I got this error:
Exception in thread “main” java.lang.RuntimeException: Fatal Syntax Error
Error (#0) : Syntax error: Line: 8 Caracter: . Texto: EOF
at test.parser.report_fatal_error(parser.java:337)
at java_cup.runtime.lr_parser.unrecovered_syntax_error(lr_parser.java:424)
at java_cup.runtime.lr_parser.parse(lr_parser.java:616)
at test.parser.main(parser.java:341)
Java Result: 1

i manage EOF in flex file as eofvalue return sym.EOF, yychar, yyline, yytext()

everything its ok and then parsing some example code that error apears :S wut could it be?

]]>
Comment on Debugging Moodle by Roger Kidd http://hackerdan.com/programing/debugging-moodle/#comment-291 Roger Kidd Wed, 29 Aug 2012 12:34:48 +0000 http://hackerdan.com/programing/debugging-moodle/#comment-291 I am trying to set the debug option.really it's nice post. Thanks for sharing this post. I am trying to set the debug option.really it’s nice post.
Thanks for sharing this post.

]]>
Comment on Making SciTE Play Nice With Moodle’s Coding Guide Lines by cheap cool grey http://hackerdan.com/programing/making-scite-play-nice-with-moodles-coding-guide-lines/#comment-288 cheap cool grey Wed, 11 Apr 2012 00:57:24 +0000 http://hackerdan.com/programing/making-scite-play-nice-with-moodles-coding-guide-lines/#comment-288 Although doing this by hand is possible in a simple editor, the IDE i am using, SciTE, likes to auto indent lines with tabs and even if it did not it would be a pain to count out four spaces each time you need to indent. Lucky there is a way to make SciTE do this for you and ensure all tabs and indentations are four spaces even if you hit the tab key. All you have to do is add the fallowing to the user options file, /home/yourusername/.SciTEUser.properties : Although doing this by hand is possible in a simple editor, the IDE i am using, SciTE, likes to auto indent lines with tabs and even if it did not it would be a pain to count out four spaces each time you need to indent. Lucky there is a way to make SciTE do this for you and ensure all tabs and indentations are four spaces even if you hit the tab key.

All you have to do is add the fallowing to the user options file, /home/yourusername/.SciTEUser.properties :

]]>
Comment on Using JFlex by George http://hackerdan.com/programing/using-jflex/#comment-285 George Wed, 07 Mar 2012 16:33:27 +0000 http://hackerdan.com/programing/using-jflex/#comment-285 Hey, I had a doubt with jflex. I am trying to develop a scanner for java, using jflex. The scanner is working fine. But the problem is when I see comments jflex does not leave as many lines as the comment took, instead it leaves just a single line on seeing a comment. But I need jflex to see the comments and leave as many lines as the comments took. The code I used to identify comments is - LineTerminator = \r|\n|\r\n Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment} TraditionalComment = "/*" [^*] ~"*/" | "/*" "*"+ "/" EndOfLineComment = "//" {InputCharacter}* {LineTerminator} DocumentationComment = "/**" {CommentContent} "*"+ "/" CommentContent = ( [^*] | \*+ [^/*] )* and then when i see a white space I just ignore it. {Comment} { /*Ignore */ } But then the output is not like what I expect for eg - If i give the input int main() { /* * * Have a pleasant day * * */ } I get the output int main() { } I dont get the 6 lines in between. Thanks Hey,
I had a doubt with jflex.
I am trying to develop a scanner for java, using jflex. The scanner is working fine. But the problem is when I see comments jflex does not leave as many lines as the comment took, instead it leaves just a single line on seeing a comment. But I need jflex to see the comments and leave as many lines as the comments took. The code I used to identify comments is -

LineTerminator = \r|\n|\r\n
Comment = {TraditionalComment} | {EndOfLineComment} | {DocumentationComment}

TraditionalComment = “/*” [^*] ~”*/” | “/*” “*”+ “/”
EndOfLineComment = “//” {InputCharacter}* {LineTerminator}
DocumentationComment = “/**” {CommentContent} “*”+ “/”
CommentContent = ( [^*] | \*+ [^/*] )*

and then when i see a white space I just ignore it.
{Comment} { /*Ignore */ }

But then the output is not like what I expect for eg - If i give the input
int main()
{
/*
*
* Have a pleasant day
*
*
*/
}

I get the output

int main()
{

}

I dont get the 6 lines in between. Thanks

]]>
Comment on Using Java CUP by kmk http://hackerdan.com/programing/using-java-cup/#comment-284 kmk Sat, 25 Feb 2012 22:21:43 +0000 http://hackerdan.com/programing/using-java-cup/#comment-284 Hi, can we have those assignment files for practicing? If possible please give the link for those files mentioned above like Driver.java and others or send to me via email. Thanks Hi, can we have those assignment files for practicing? If possible please give the link for those files mentioned above like Driver.java and others or send to me via email.
Thanks

]]>
Comment on Using JFlex by Estuardolh http://hackerdan.com/programing/using-jflex/#comment-283 Estuardolh Tue, 14 Feb 2012 09:53:21 +0000 http://hackerdan.com/programing/using-jflex/#comment-283 nice link of resource for using Jflex & cup, thaks! nice link of resource for using Jflex & cup, thaks!

]]>
Comment on Moodle Grade Book Plugins by Software Carpentry » Three Weeks and Change http://hackerdan.com/programing/moodle-grade-book-plugins/#comment-282 Software Carpentry » Three Weeks and Change Sat, 28 Jan 2012 06:26:22 +0000 http://hackerdan.com/programing/moodle-grade-book-plugins/#comment-282 [...] Daniel Servos likes Moodle plugins. [...] […] Daniel Servos likes Moodle plugins. […]

]]>
Comment on Using JFlex by Andrés Portillo http://hackerdan.com/programing/using-jflex/#comment-281 Andrés Portillo Thu, 05 Jan 2012 18:27:38 +0000 http://hackerdan.com/programing/using-jflex/#comment-281 Hey thanks for writing this, I was wondering though if you could send me those .java files, i'm trying to understand Jflex but its been so far quite difficult to get any example on how use it, I have to do a kind of Interpreter for an assingment at the Uni and have really no Idea where I should start at, I would really appreciate it if you would send me something I can start with. Andrés Portillo Hey thanks for writing this, I was wondering though if you could send me those .java files, i’m trying to understand Jflex but its been so far quite difficult to get any example on how use it, I have to do a kind of Interpreter for an assingment at the Uni and have really no Idea where I should start at, I would really appreciate it if you would send me something I can start with.

Andrés Portillo

]]>
Comment on Debugging Moodle by richard http://hackerdan.com/programing/debugging-moodle/#comment-277 richard Mon, 27 Jun 2011 11:11:30 +0000 http://hackerdan.com/programing/debugging-moodle/#comment-277 Hi Dan I am trying to set the debug option to developer and show in a html window. the 1st two boxes are ticked in the debug window.... however when i am running a scorm course, it is bookmarking and tracking but the debug window is not opening.... do you have any idea why? what i can do as i have set the debug options to on and the popup blocker is off in internet explorer. help would be much apprecaited. regardds Richard Hi Dan

I am trying to set the debug option to developer and show in a html window. the 1st two boxes are ticked in the debug window…. however when i am running a scorm course, it is bookmarking and tracking but the debug window is not opening…. do you have any idea why? what i can do as i have set the debug options to on and the popup blocker is off in internet explorer.

help would be much apprecaited.

regardds

Richard

]]>